From 5e69650534410fca7f8dcb186a5a5a3b0b997309 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 4 Nov 2025 13:21:49 -0500 Subject: [PATCH] add perfetto with single .proto file, parts of it commented we only want to encode data, and only part of it, so we can skip some java-specific messages, as well as the whole Ftrace subsystem. --- Makefile | 3 + dune-project | 19 + src/perfetto/README.md | 6 + src/perfetto/dune | 25 + src/perfetto/perfetto_trace.ml | 49960 ++++++++++++++++++++++++++++ src/perfetto/perfetto_trace.mli | 26819 +++++++++++++++ src/perfetto/perfetto_trace.proto | 17734 ++++++++++ trace-perfetto.opam | 36 + 8 files changed, 94602 insertions(+) create mode 100644 src/perfetto/README.md create mode 100644 src/perfetto/dune create mode 100644 src/perfetto/perfetto_trace.ml create mode 100644 src/perfetto/perfetto_trace.mli create mode 100644 src/perfetto/perfetto_trace.proto create mode 100644 trace-perfetto.opam diff --git a/Makefile b/Makefile index 7c931c1..0451d2c 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ test-autopromote: doc: @dune build $(DUNE_OPTS) @doc +genproto: + FORCE_GENPROTO=true dune build @lint --auto-promote + WATCH?= @install @runtest watch: dune build $(DUNE_OPTS) -w $(WATCH) diff --git a/dune-project b/dune-project index 78ee148..4e06712 100644 --- a/dune-project +++ b/dune-project @@ -94,4 +94,23 @@ (tags (trace tracing fuchsia))) + +(package + (name trace-perfetto) + (synopsis + "A backend for trace based on perfetto's protobuf format") + (depends + (ocaml + (>= 4.08)) + (trace + (= :version)) + (mtime + (>= 2.0)) + (thread-local-storage + (>= 0.2)) + pbrt + dune) + (tags + (trace tracing perfetto))) + ; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project diff --git a/src/perfetto/README.md b/src/perfetto/README.md new file mode 100644 index 0000000..b2f8333 --- /dev/null +++ b/src/perfetto/README.md @@ -0,0 +1,6 @@ + +## NOTES + +- to generate, `make genproto` in root directory. Pay attention to the version of `ocaml-protoc`. +- we commented some parts that are not really relevant to reduce the size of the code. + diff --git a/src/perfetto/dune b/src/perfetto/dune new file mode 100644 index 0000000..3048fe3 --- /dev/null +++ b/src/perfetto/dune @@ -0,0 +1,25 @@ + +(library + (name trace_perfetto) + (public_name trace-perfetto) + (synopsis + "A high-performance backend for trace, emitting a Fuchsia trace into a file") + (libraries + trace.core + trace.private.util + trace.subscriber + thread-local-storage + mtime + mtime.clock.os + pbrt + )) + +(rule + (alias lint) + (mode promote) + (enabled_if %{env:FORCE_GENPROTO=false}) + (targets perfetto_trace.ml perfetto_trace.mli) + (deps + (:file perfetto_trace.proto)) + (action + (run ocaml-protoc %{file} --ml_out . --encode-only --pp --make --binary))) diff --git a/src/perfetto/perfetto_trace.ml b/src/perfetto/perfetto_trace.ml new file mode 100644 index 0000000..f7575f2 --- /dev/null +++ b/src/perfetto/perfetto_trace.ml @@ -0,0 +1,49960 @@ +[@@@ocaml.warning "-23-27-30-39-44"] + +type ftrace_descriptor_atrace_category = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable description : string; +} + +type ftrace_descriptor = { + mutable atrace_categories : ftrace_descriptor_atrace_category list; +} + +type gpu_counter_descriptor_gpu_counter_group = + | Unclassified + | System + | Vertices + | Fragments + | Primitives + | Memory + | Compute + | Ray_tracing + +type gpu_counter_descriptor_measure_unit = + | None + | Bit + | Kilobit + | Megabit + | Gigabit + | Terabit + | Petabit + | Byte + | Kilobyte + | Megabyte + | Gigabyte + | Terabyte + | Petabyte + | Hertz + | Kilohertz + | Megahertz + | Gigahertz + | Terahertz + | Petahertz + | Nanosecond + | Microsecond + | Millisecond + | Second + | Minute + | Hour + | Vertex + | Pixel + | Triangle + | Primitive + | Fragment + | Milliwatt + | Watt + | Kilowatt + | Joule + | Volt + | Ampere + | Celsius + | Fahrenheit + | Kelvin + | Percent + | Instruction + +type gpu_counter_descriptor_gpu_counter_spec_peak_value = + | Int_peak_value of int64 + | Double_peak_value of float + +and gpu_counter_descriptor_gpu_counter_spec = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable counter_id : int32; + mutable name : string; + mutable description : string; + mutable peak_value : gpu_counter_descriptor_gpu_counter_spec_peak_value option; + mutable numerator_units : gpu_counter_descriptor_measure_unit list; + mutable denominator_units : gpu_counter_descriptor_measure_unit list; + mutable select_by_default : bool; + mutable groups : gpu_counter_descriptor_gpu_counter_group list; +} + +type gpu_counter_descriptor_gpu_counter_block = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable block_id : int32; + mutable block_capacity : int32; + mutable name : string; + mutable description : string; + mutable counter_ids : int32 list; +} + +type gpu_counter_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable specs : gpu_counter_descriptor_gpu_counter_spec list; + mutable blocks : gpu_counter_descriptor_gpu_counter_block list; + mutable min_sampling_period_ns : int64; + mutable max_sampling_period_ns : int64; + mutable supports_instrumented_sampling : bool; +} + +type track_event_category = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable description : string; + mutable tags : string list; +} + +type track_event_descriptor = { + mutable available_categories : track_event_category list; +} + +type data_source_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable name : string; + mutable id : int64; + mutable will_notify_on_stop : bool; + mutable will_notify_on_start : bool; + mutable handles_incremental_state_clear : bool; + mutable no_flush : bool; + mutable gpu_counter_descriptor : gpu_counter_descriptor option; + mutable track_event_descriptor : track_event_descriptor option; + mutable ftrace_descriptor : ftrace_descriptor option; +} + +type tracing_service_state_producer = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable id : int32; + mutable name : string; + mutable pid : int32; + mutable uid : int32; + mutable sdk_version : string; + mutable frozen : bool; +} + +type tracing_service_state_data_source = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable ds_descriptor : data_source_descriptor option; + mutable producer_id : int32; +} + +type tracing_service_state_tracing_session = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 10 fields *) + mutable id : int64; + mutable consumer_uid : int32; + mutable state : string; + mutable unique_session_name : string; + mutable buffer_size_kb : int32 list; + mutable duration_ms : int32; + mutable num_data_sources : int32; + mutable start_realtime_ns : int64; + mutable bugreport_score : int32; + mutable bugreport_filename : string; + mutable is_started : bool; +} + +type tracing_service_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable producers : tracing_service_state_producer list; + mutable data_sources : tracing_service_state_data_source list; + mutable tracing_sessions : tracing_service_state_tracing_session list; + mutable supports_tracing_sessions : bool; + mutable num_sessions : int32; + mutable num_sessions_started : int32; + mutable tracing_service_version : string; +} + +type builtin_clock = + | Builtin_clock_unknown + | Builtin_clock_realtime + | Builtin_clock_realtime_coarse + | Builtin_clock_monotonic + | Builtin_clock_monotonic_coarse + | Builtin_clock_monotonic_raw + | Builtin_clock_boottime + | Builtin_clock_tsc + | Builtin_clock_perf + | Builtin_clock_max_id + +type android_game_intervention_list_config = { + mutable package_name_filter : string list; +} + +type android_input_event_config_trace_mode = + | Trace_mode_trace_all + | Trace_mode_use_rules + +type android_input_event_config_trace_level = + | Trace_level_none + | Trace_level_redacted + | Trace_level_complete + +type android_input_event_config_trace_rule = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable trace_level : android_input_event_config_trace_level; + mutable match_all_packages : string list; + mutable match_any_packages : string list; + mutable match_secure : bool; + mutable match_ime_connection_active : bool; +} + +type android_input_event_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable mode : android_input_event_config_trace_mode; + mutable rules : android_input_event_config_trace_rule list; + mutable trace_dispatcher_input_events : bool; + mutable trace_dispatcher_window_dispatch : bool; +} + +type android_log_id = + | Lid_default + | Lid_radio + | Lid_events + | Lid_system + | Lid_crash + | Lid_stats + | Lid_security + | Lid_kernel + +type android_log_priority = + | Prio_unspecified + | Prio_unused + | Prio_verbose + | Prio_debug + | Prio_info + | Prio_warn + | Prio_error + | Prio_fatal + +type android_log_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable log_ids : android_log_id list; + mutable min_prio : android_log_priority; + mutable filter_tags : string list; +} + +type android_polled_state_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable poll_ms : int32; +} + +type android_sdk_sysprop_guard_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable surfaceflinger_skia_track_events : bool; + mutable hwui_skia_track_events : bool; + mutable hwui_package_name_filter : string list; +} + +type android_system_property_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable poll_ms : int32; + mutable property_name : string list; +} + +type app_wakelocks_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable write_delay_ms : int32; + mutable filter_duration_below_ms : int32; + mutable drop_owner_pid : bool; +} + +type cpu_per_uid_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable poll_ms : int32; +} + +type kernel_wakelocks_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable poll_ms : int32; +} + +type network_packet_trace_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable poll_ms : int32; + mutable aggregation_threshold : int32; + mutable intern_limit : int32; + mutable drop_local_port : bool; + mutable drop_remote_port : bool; + mutable drop_tcp_flags : bool; +} + +type packages_list_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable package_name_filter : string list; + mutable only_write_on_cpu_use_every_ms : int32; +} + +type pixel_modem_config_event_group = + | Event_group_unknown + | Event_group_low_bandwidth + | Event_group_high_and_low_bandwidth + +type pixel_modem_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable event_group : pixel_modem_config_event_group; + mutable pigweed_hash_allow_list : int64 list; + mutable pigweed_hash_deny_list : int64 list; +} + +type proto_log_level = + | Protolog_level_undefined + | Protolog_level_debug + | Protolog_level_verbose + | Protolog_level_info + | Protolog_level_warn + | Protolog_level_error + | Protolog_level_wtf + +type proto_log_config_tracing_mode = + | Default + | Enable_all + +type proto_log_group = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable group_name : string; + mutable log_from : proto_log_level; + mutable collect_stacktrace : bool; +} + +type proto_log_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable group_overrides : proto_log_group list; + mutable tracing_mode : proto_log_config_tracing_mode; + mutable default_log_from_level : proto_log_level; +} + +type surface_flinger_layers_config_mode = + | Mode_unspecified + | Mode_active + | Mode_generated + | Mode_dump + | Mode_generated_bugreport_only + +type surface_flinger_layers_config_trace_flag = + | Trace_flag_unspecified + | Trace_flag_input + | Trace_flag_composition + | Trace_flag_extra + | Trace_flag_hwc + | Trace_flag_buffers + | Trace_flag_virtual_displays + | Trace_flag_all + +type surface_flinger_layers_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable mode : surface_flinger_layers_config_mode; + mutable trace_flags : surface_flinger_layers_config_trace_flag list; +} + +type surface_flinger_transactions_config_mode = + | Mode_unspecified + | Mode_continuous + | Mode_active + +type surface_flinger_transactions_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable mode : surface_flinger_transactions_config_mode; +} + +type window_manager_config_log_frequency = + | Log_frequency_unspecified + | Log_frequency_frame + | Log_frequency_transaction + | Log_frequency_single_dump + +type window_manager_config_log_level = + | Log_level_unspecified + | Log_level_verbose + | Log_level_debug + | Log_level_critical + +type window_manager_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable log_frequency : window_manager_config_log_frequency; + mutable log_level : window_manager_config_log_level; +} + +type chrome_config_client_priority = + | Unknown + | Background + | User_initiated + +type chrome_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable trace_config : string; + mutable privacy_filtering_enabled : bool; + mutable convert_to_legacy_json : bool; + mutable client_priority : chrome_config_client_priority; + mutable json_agent_label_filter : string; + mutable event_package_name_filter_enabled : bool; +} + +type chromium_histogram_samples_config_histogram_sample = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable histogram_name : string; + mutable min_value : int64; + mutable max_value : int64; +} + +type chromium_histogram_samples_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable histograms : chromium_histogram_samples_config_histogram_sample list; + mutable filter_histogram_names : bool; +} + +type chromium_system_metrics_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable sampling_interval_ms : int32; +} + +type v8_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable log_script_sources : bool; + mutable log_instructions : bool; +} + +type etw_config_kernel_flag = + | Cswitch + | Dispatcher + +type etw_config = { + mutable kernel_flags : etw_config_kernel_flag list; + mutable scheduler_provider_events : string list; + mutable memory_provider_events : string list; + mutable file_provider_events : string list; +} + +type frozen_ftrace_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable instance_name : string; +} + +type ftrace_config_compact_sched_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable enabled : bool; +} + +type ftrace_config_print_filter_rule_atrace_message = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable type_ : string; + mutable prefix : string; +} + +type ftrace_config_print_filter_rule_match = + | Prefix of string + | Atrace_msg of ftrace_config_print_filter_rule_atrace_message + +and ftrace_config_print_filter_rule = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable match_ : ftrace_config_print_filter_rule_match option; + mutable allow : bool; +} + +type ftrace_config_print_filter = { + mutable rules : ftrace_config_print_filter_rule list; +} + +type ftrace_config_ksyms_mem_policy = + | Ksyms_unspecified + | Ksyms_cleanup_on_stop + | Ksyms_retain + +type ftrace_config_kprobe_event_kprobe_type = + | Kprobe_type_unknown + | Kprobe_type_kprobe + | Kprobe_type_kretprobe + | Kprobe_type_both + +type ftrace_config_kprobe_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable probe : string; + mutable type_ : ftrace_config_kprobe_event_kprobe_type; +} + +type ftrace_config_tracefs_option_state = + | State_unknown + | State_enabled + | State_disabled + +type ftrace_config_tracefs_option = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable state : ftrace_config_tracefs_option_state; +} + +type ftrace_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 18 fields *) + mutable ftrace_events : string list; + mutable atrace_categories : string list; + mutable atrace_apps : string list; + mutable atrace_categories_prefer_sdk : string list; + mutable atrace_userspace_only : bool; + mutable buffer_size_kb : int32; + mutable buffer_size_lower_bound : bool; + mutable drain_period_ms : int32; + mutable drain_buffer_percent : int32; + mutable compact_sched : ftrace_config_compact_sched_config option; + mutable print_filter : ftrace_config_print_filter option; + mutable symbolize_ksyms : bool; + mutable ksyms_mem_policy : ftrace_config_ksyms_mem_policy; + mutable throttle_rss_stat : bool; + mutable denser_generic_event_encoding : bool; + mutable disable_generic_events : bool; + mutable syscall_events : string list; + mutable enable_function_graph : bool; + mutable function_filters : string list; + mutable function_graph_roots : string list; + mutable function_graph_max_depth : int32; + mutable kprobe_events : ftrace_config_kprobe_event list; + mutable preserve_ftrace_buffer : bool; + mutable use_monotonic_raw_clock : bool; + mutable instance_name : string; + mutable debug_ftrace_abi : bool; + mutable tids_to_trace : int32 list; + mutable tracefs_options : ftrace_config_tracefs_option list; + mutable tracing_cpumask : string; + mutable initialize_ksyms_synchronously_for_testing : bool; +} + +type gpu_counter_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable counter_period_ns : int64; + mutable counter_ids : int32 list; + mutable instrumented_sampling : bool; + mutable fix_gpu_clock : bool; +} + +type gpu_render_stages_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable full_loadstore : bool; + mutable low_overhead : bool; + mutable trace_metrics : string list; +} + +type vulkan_memory_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable track_driver_memory_usage : bool; + mutable track_device_memory_usage : bool; +} + +type inode_file_config_mount_point_mapping_entry = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable mountpoint : string; + mutable scan_roots : string list; +} + +type inode_file_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable scan_interval_ms : int32; + mutable scan_delay_ms : int32; + mutable scan_batch_size : int32; + mutable do_not_scan : bool; + mutable scan_mount_points : string list; + mutable mount_point_mapping : inode_file_config_mount_point_mapping_entry list; +} + +type console_config_output = + | Output_unspecified + | Output_stdout + | Output_stderr + +type console_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable output : console_config_output; + mutable enable_colors : bool; +} + +type interceptor_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable console_config : console_config option; +} + +type android_power_config_battery_counters = + | Battery_counter_unspecified + | Battery_counter_charge + | Battery_counter_capacity_percent + | Battery_counter_current + | Battery_counter_current_avg + | Battery_counter_voltage + +type android_power_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable battery_poll_ms : int32; + mutable battery_counters : android_power_config_battery_counters list; + mutable collect_power_rails : bool; + mutable collect_energy_estimation_breakdown : bool; + mutable collect_entity_state_residency : bool; +} + +type priority_boost_config_boost_policy = + | Policy_unspecified + | Policy_sched_other + | Policy_sched_fifo + +type priority_boost_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable policy : priority_boost_config_boost_policy; + mutable priority : int32; +} + +type process_stats_config_quirks = + | Quirks_unspecified + | Disable_initial_dump + | Disable_on_demand + +type process_stats_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable quirks : process_stats_config_quirks list; + mutable scan_all_processes_on_start : bool; + mutable record_thread_names : bool; + mutable proc_stats_poll_ms : int32; + mutable proc_stats_cache_ttl_ms : int32; + mutable scan_smaps_rollup : bool; + mutable record_process_age : bool; + mutable record_process_runtime : bool; + mutable record_process_dmabuf_rss : bool; + mutable resolve_process_fds : bool; +} + +type heapprofd_config_continuous_dump_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable dump_phase_ms : int32; + mutable dump_interval_ms : int32; +} + +type heapprofd_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 17 fields *) + mutable sampling_interval_bytes : int64; + mutable adaptive_sampling_shmem_threshold : int64; + mutable adaptive_sampling_max_sampling_interval_bytes : int64; + mutable process_cmdline : string list; + mutable pid : int64 list; + mutable target_installed_by : string list; + mutable heaps : string list; + mutable exclude_heaps : string list; + mutable stream_allocations : bool; + mutable heap_sampling_intervals : int64 list; + mutable all_heaps : bool; + mutable all : bool; + mutable min_anonymous_memory_kb : int32; + mutable max_heapprofd_memory_kb : int32; + mutable max_heapprofd_cpu_secs : int64; + mutable skip_symbol_prefix : string list; + mutable continuous_dump_config : heapprofd_config_continuous_dump_config option; + mutable shmem_size_bytes : int64; + mutable block_client : bool; + mutable block_client_timeout_us : int32; + mutable no_startup : bool; + mutable no_running : bool; + mutable dump_at_max : bool; + mutable disable_fork_teardown : bool; + mutable disable_vfork_detection : bool; +} + +type atom_id = + | Atom_unspecified + | Atom_ble_scan_state_changed + | Atom_process_state_changed + | Atom_ble_scan_result_received + | Atom_sensor_state_changed + | Atom_gps_scan_state_changed + | Atom_sync_state_changed + | Atom_scheduled_job_state_changed + | Atom_screen_brightness_changed + | Atom_wakelock_state_changed + | Atom_long_partial_wakelock_state_changed + | Atom_mobile_radio_power_state_changed + | Atom_wifi_radio_power_state_changed + | Atom_activity_manager_sleep_state_changed + | Atom_memory_factor_state_changed + | Atom_excessive_cpu_usage_reported + | Atom_cached_kill_reported + | Atom_process_memory_stat_reported + | Atom_launcher_event + | Atom_battery_saver_mode_state_changed + | Atom_device_idle_mode_state_changed + | Atom_device_idling_mode_state_changed + | Atom_audio_state_changed + | Atom_media_codec_state_changed + | Atom_camera_state_changed + | Atom_flashlight_state_changed + | Atom_uid_process_state_changed + | Atom_process_life_cycle_state_changed + | Atom_screen_state_changed + | Atom_battery_level_changed + | Atom_charging_state_changed + | Atom_plugged_state_changed + | Atom_interactive_state_changed + | Atom_touch_event_reported + | Atom_wakeup_alarm_occurred + | Atom_kernel_wakeup_reported + | Atom_wifi_lock_state_changed + | Atom_wifi_signal_strength_changed + | Atom_wifi_scan_state_changed + | Atom_phone_signal_strength_changed + | Atom_setting_changed + | Atom_activity_foreground_state_changed + | Atom_isolated_uid_changed + | Atom_packet_wakeup_occurred + | Atom_wall_clock_time_shifted + | Atom_anomaly_detected + | Atom_app_breadcrumb_reported + | Atom_app_start_occurred + | Atom_app_start_canceled + | Atom_app_start_fully_drawn + | Atom_lmk_kill_occurred + | Atom_picture_in_picture_state_changed + | Atom_wifi_multicast_lock_state_changed + | Atom_app_start_memory_state_captured + | Atom_shutdown_sequence_reported + | Atom_boot_sequence_reported + | Atom_overlay_state_changed + | Atom_foreground_service_state_changed + | Atom_call_state_changed + | Atom_keyguard_state_changed + | Atom_keyguard_bouncer_state_changed + | Atom_keyguard_bouncer_password_entered + | Atom_app_died + | Atom_resource_configuration_changed + | Atom_bluetooth_enabled_state_changed + | Atom_bluetooth_connection_state_changed + | Atom_gps_signal_quality_changed + | Atom_usb_connector_state_changed + | Atom_speaker_impedance_reported + | Atom_hardware_failed + | Atom_physical_drop_detected + | Atom_charge_cycles_reported + | Atom_mobile_connection_state_changed + | Atom_mobile_radio_technology_changed + | Atom_usb_device_attached + | Atom_app_crash_occurred + | Atom_anr_occurred + | Atom_wtf_occurred + | Atom_low_mem_reported + | Atom_generic_atom + | Atom_vibrator_state_changed + | Atom_deferred_job_stats_reported + | Atom_thermal_throttling + | Atom_biometric_acquired + | Atom_biometric_authenticated + | Atom_biometric_error_occurred + | Atom_ui_event_reported + | Atom_battery_health_snapshot + | Atom_slow_io + | Atom_battery_caused_shutdown + | Atom_phone_service_state_changed + | Atom_phone_state_changed + | Atom_user_restriction_changed + | Atom_settings_ui_changed + | Atom_connectivity_state_changed + | Atom_service_state_changed + | Atom_service_launch_reported + | Atom_flag_flip_update_occurred + | Atom_binary_push_state_changed + | Atom_device_policy_event + | Atom_docs_ui_file_op_canceled + | Atom_docs_ui_file_op_copy_move_mode_reported + | Atom_docs_ui_file_op_failure + | Atom_docs_ui_provider_file_op + | Atom_docs_ui_invalid_scoped_access_request + | Atom_docs_ui_launch_reported + | Atom_docs_ui_root_visited + | Atom_docs_ui_startup_ms + | Atom_docs_ui_user_action_reported + | Atom_wifi_enabled_state_changed + | Atom_wifi_running_state_changed + | Atom_app_compacted + | Atom_network_dns_event_reported + | Atom_docs_ui_picker_launched_from_reported + | Atom_docs_ui_pick_result_reported + | Atom_docs_ui_search_mode_reported + | Atom_docs_ui_search_type_reported + | Atom_data_stall_event + | Atom_rescue_party_reset_reported + | Atom_signed_config_reported + | Atom_gnss_ni_event_reported + | Atom_bluetooth_link_layer_connection_event + | Atom_bluetooth_acl_connection_state_changed + | Atom_bluetooth_sco_connection_state_changed + | Atom_app_downgraded + | Atom_app_optimized_after_downgraded + | Atom_low_storage_state_changed + | Atom_gnss_nfw_notification_reported + | Atom_gnss_configuration_reported + | Atom_usb_port_overheat_event_reported + | Atom_nfc_error_occurred + | Atom_nfc_state_changed + | Atom_nfc_beam_occurred + | Atom_nfc_cardemulation_occurred + | Atom_nfc_tag_occurred + | Atom_nfc_hce_transaction_occurred + | Atom_se_state_changed + | Atom_se_omapi_reported + | Atom_broadcast_dispatch_latency_reported + | Atom_attention_manager_service_result_reported + | Atom_adb_connection_changed + | Atom_speech_dsp_stat_reported + | Atom_usb_contaminant_reported + | Atom_watchdog_rollback_occurred + | Atom_biometric_system_health_issue_detected + | Atom_bubble_ui_changed + | Atom_scheduled_job_constraint_changed + | Atom_bluetooth_active_device_changed + | Atom_bluetooth_a2_dp_playback_state_changed + | Atom_bluetooth_a2_dp_codec_config_changed + | Atom_bluetooth_a2_dp_codec_capability_changed + | Atom_bluetooth_a2_dp_audio_underrun_reported + | Atom_bluetooth_a2_dp_audio_overrun_reported + | Atom_bluetooth_device_rssi_reported + | Atom_bluetooth_device_failed_contact_counter_reported + | Atom_bluetooth_device_tx_power_level_reported + | Atom_bluetooth_hci_timeout_reported + | Atom_bluetooth_quality_report_reported + | Atom_bluetooth_device_info_reported + | Atom_bluetooth_remote_version_info_reported + | Atom_bluetooth_sdp_attribute_reported + | Atom_bluetooth_bond_state_changed + | Atom_bluetooth_classic_pairing_event_reported + | Atom_bluetooth_smp_pairing_event_reported + | Atom_screen_timeout_extension_reported + | Atom_process_start_time + | Atom_permission_grant_request_result_reported + | Atom_bluetooth_socket_connection_state_changed + | Atom_device_identifier_access_denied + | Atom_bubble_developer_error_reported + | Atom_assist_gesture_stage_reported + | Atom_assist_gesture_feedback_reported + | Atom_assist_gesture_progress_reported + | Atom_touch_gesture_classified + | Atom_hidden_api_used + | Atom_style_ui_changed + | Atom_privacy_indicators_interacted + | Atom_app_install_on_external_storage_reported + | Atom_network_stack_reported + | Atom_app_moved_storage_reported + | Atom_biometric_enrolled + | Atom_system_server_watchdog_occurred + | Atom_tomb_stone_occurred + | Atom_bluetooth_class_of_device_reported + | Atom_intelligence_event_reported + | Atom_thermal_throttling_severity_state_changed + | Atom_role_request_result_reported + | Atom_mediametrics_audiopolicy_reported + | Atom_mediametrics_audiorecord_reported + | Atom_mediametrics_audiothread_reported + | Atom_mediametrics_audiotrack_reported + | Atom_mediametrics_codec_reported + | Atom_mediametrics_drm_widevine_reported + | Atom_mediametrics_extractor_reported + | Atom_mediametrics_mediadrm_reported + | Atom_mediametrics_nuplayer_reported + | Atom_mediametrics_recorder_reported + | Atom_mediametrics_drmmanager_reported + | Atom_car_power_state_changed + | Atom_garage_mode_info + | Atom_test_atom_reported + | Atom_content_capture_caller_mismatch_reported + | Atom_content_capture_service_events + | Atom_content_capture_session_events + | Atom_content_capture_flushed + | Atom_location_manager_api_usage_reported + | Atom_review_permissions_fragment_result_reported + | Atom_runtime_permissions_upgrade_result + | Atom_grant_permissions_activity_button_actions + | Atom_location_access_check_notification_action + | Atom_app_permission_fragment_action_reported + | Atom_app_permission_fragment_viewed + | Atom_app_permissions_fragment_viewed + | Atom_permission_apps_fragment_viewed + | Atom_text_selection_event + | Atom_text_linkify_event + | Atom_conversation_actions_event + | Atom_language_detection_event + | Atom_exclusion_rect_state_changed + | Atom_back_gesture_reported_reported + | Atom_update_engine_update_attempt_reported + | Atom_update_engine_successful_update_reported + | Atom_camera_action_event + | Atom_app_compatibility_change_reported + | Atom_perfetto_uploaded + | Atom_vms_client_connection_state_changed + | Atom_media_provider_scan_occurred + | Atom_media_content_deleted + | Atom_media_provider_permission_requested + | Atom_media_provider_schema_changed + | Atom_media_provider_idle_maintenance_finished + | Atom_reboot_escrow_recovery_reported + | Atom_boot_time_event_duration_reported + | Atom_boot_time_event_elapsed_time_reported + | Atom_boot_time_event_utc_time_reported + | Atom_boot_time_event_error_code_reported + | Atom_userspace_reboot_reported + | Atom_notification_reported + | Atom_notification_panel_reported + | Atom_notification_channel_modified + | Atom_integrity_check_result_reported + | Atom_integrity_rules_pushed + | Atom_cb_message_reported + | Atom_cb_message_error + | Atom_wifi_health_stat_reported + | Atom_wifi_failure_stat_reported + | Atom_wifi_connection_result_reported + | Atom_app_freeze_changed + | Atom_snapshot_merge_reported + | Atom_foreground_service_app_op_session_ended + | Atom_display_jank_reported + | Atom_app_standby_bucket_changed + | Atom_sharesheet_started + | Atom_ranking_selected + | Atom_tvsettings_ui_interacted + | Atom_launcher_snapshot + | Atom_package_installer_v2_reported + | Atom_user_lifecycle_journey_reported + | Atom_user_lifecycle_event_occurred + | Atom_accessibility_shortcut_reported + | Atom_accessibility_service_reported + | Atom_docs_ui_drag_and_drop_reported + | Atom_app_usage_event_occurred + | Atom_auto_revoke_notification_clicked + | Atom_auto_revoke_fragment_app_viewed + | Atom_auto_revoked_app_interaction + | Atom_app_permission_groups_fragment_auto_revoke_action + | Atom_evs_usage_stats_reported + | Atom_audio_power_usage_data_reported + | Atom_tv_tuner_state_changed + | Atom_mediaoutput_op_switch_reported + | Atom_cb_message_filtered + | Atom_tv_tuner_dvr_status + | Atom_tv_cas_session_open_status + | Atom_assistant_invocation_reported + | Atom_display_wake_reported + | Atom_car_user_hal_modify_user_request_reported + | Atom_car_user_hal_modify_user_response_reported + | Atom_car_user_hal_post_switch_response_reported + | Atom_car_user_hal_initial_user_info_request_reported + | Atom_car_user_hal_initial_user_info_response_reported + | Atom_car_user_hal_user_association_request_reported + | Atom_car_user_hal_set_user_association_response_reported + | Atom_network_ip_provisioning_reported + | Atom_network_dhcp_renew_reported + | Atom_network_validation_reported + | Atom_network_stack_quirk_reported + | Atom_mediametrics_audiorecorddeviceusage_reported + | Atom_mediametrics_audiothreaddeviceusage_reported + | Atom_mediametrics_audiotrackdeviceusage_reported + | Atom_mediametrics_audiodeviceconnection_reported + | Atom_blob_committed + | Atom_blob_leased + | Atom_blob_opened + | Atom_contacts_provider_status_reported + | Atom_keystore_key_event_reported + | Atom_network_tethering_reported + | Atom_ime_touch_reported + | Atom_ui_interaction_frame_info_reported + | Atom_ui_action_latency_reported + | Atom_wifi_disconnect_reported + | Atom_wifi_connection_state_changed + | Atom_hdmi_cec_active_source_changed + | Atom_hdmi_cec_message_reported + | Atom_airplane_mode + | Atom_modem_restart + | Atom_carrier_id_mismatch_reported + | Atom_carrier_id_table_updated + | Atom_data_stall_recovery_reported + | Atom_mediametrics_mediaparser_reported + | Atom_tls_handshake_reported + | Atom_text_classifier_api_usage_reported + | Atom_car_watchdog_kill_stats_reported + | Atom_mediametrics_playback_reported + | Atom_media_network_info_changed + | Atom_media_playback_state_changed + | Atom_media_playback_error_reported + | Atom_media_playback_track_changed + | Atom_wifi_scan_reported + | Atom_wifi_pno_scan_reported + | Atom_tif_tune_changed + | Atom_auto_rotate_reported + | Atom_perfetto_trigger + | Atom_transcoding_data + | Atom_ims_service_entitlement_updated + | Atom_device_rotated + | Atom_sim_specific_settings_restored + | Atom_text_classifier_download_reported + | Atom_pin_storage_event + | Atom_face_down_reported + | Atom_bluetooth_hal_crash_reason_reported + | Atom_reboot_escrow_preparation_reported + | Atom_reboot_escrow_lskf_capture_reported + | Atom_reboot_escrow_reboot_reported + | Atom_binder_latency_reported + | Atom_mediametrics_aaudiostream_reported + | Atom_media_transcoding_session_ended + | Atom_magnification_usage_reported + | Atom_magnification_mode_with_ime_on_reported + | Atom_app_search_call_stats_reported + | Atom_app_search_put_document_stats_reported + | Atom_device_control_changed + | Atom_device_state_changed + | Atom_inputdevice_registered + | Atom_smartspace_card_reported + | Atom_auth_prompt_authenticate_invoked + | Atom_auth_manager_can_authenticate_invoked + | Atom_auth_enroll_action_invoked + | Atom_auth_deprecated_api_used + | Atom_unattended_reboot_occurred + | Atom_long_reboot_blocking_reported + | Atom_location_time_zone_provider_state_changed + | Atom_fdtrack_event_occurred + | Atom_timeout_auto_extended_reported + | Atom_alarm_batch_delivered + | Atom_alarm_scheduled + | Atom_car_watchdog_io_overuse_stats_reported + | Atom_user_level_hibernation_state_changed + | Atom_app_search_initialize_stats_reported + | Atom_app_search_query_stats_reported + | Atom_app_process_died + | Atom_network_ip_reachability_monitor_reported + | Atom_slow_input_event_reported + | Atom_anr_occurred_processing_started + | Atom_app_search_remove_stats_reported + | Atom_media_codec_reported + | Atom_permission_usage_fragment_interaction + | Atom_permission_details_interaction + | Atom_privacy_sensor_toggle_interaction + | Atom_privacy_toggle_dialog_interaction + | Atom_app_search_optimize_stats_reported + | Atom_non_a11_y_tool_service_warning_report + | Atom_app_compat_state_changed + | Atom_size_compat_restart_button_event_reported + | Atom_splitscreen_ui_changed + | Atom_network_dns_handshake_reported + | Atom_bluetooth_code_path_counter + | Atom_bluetooth_le_batch_scan_report_delay + | Atom_accessibility_floating_menu_ui_changed + | Atom_neuralnetworks_compilation_completed + | Atom_neuralnetworks_execution_completed + | Atom_neuralnetworks_compilation_failed + | Atom_neuralnetworks_execution_failed + | Atom_context_hub_booted + | Atom_context_hub_restarted + | Atom_context_hub_loaded_nanoapp_snapshot_reported + | Atom_chre_code_download_transacted + | Atom_uwb_session_inited + | Atom_uwb_session_closed + | Atom_uwb_first_ranging_received + | Atom_uwb_ranging_measurement_received + | Atom_text_classifier_download_work_scheduled + | Atom_text_classifier_download_work_completed + | Atom_clipboard_cleared + | Atom_vm_creation_requested + | Atom_nearby_device_scan_state_changed + | Atom_application_locales_changed + | Atom_mediametrics_audiotrackstatus_reported + | Atom_fold_state_duration_reported + | Atom_location_time_zone_provider_controller_state_changed + | Atom_display_hbm_state_changed + | Atom_display_hbm_brightness_changed + | Atom_persistent_uri_permissions_flushed + | Atom_early_boot_comp_os_artifacts_check_reported + | Atom_vbmeta_digest_reported + | Atom_apex_info_gathered + | Atom_pvm_info_gathered + | Atom_wear_settings_ui_interacted + | Atom_tracing_service_report_event + | Atom_mediametrics_audiorecordstatus_reported + | Atom_launcher_latency + | Atom_dropbox_entry_dropped + | Atom_wifi_p2_p_connection_reported + | Atom_game_state_changed + | Atom_hotword_detector_create_requested + | Atom_hotword_detection_service_init_result_reported + | Atom_hotword_detection_service_restarted + | Atom_hotword_detector_keyphrase_triggered + | Atom_hotword_detector_events + | Atom_boot_completed_broadcast_completion_latency_reported + | Atom_contacts_indexer_update_stats_reported + | Atom_app_background_restrictions_info + | Atom_mms_sms_provider_get_thread_id_failed + | Atom_mms_sms_database_helper_on_upgrade_failed + | Atom_permission_reminder_notification_interacted + | Atom_recent_permission_decisions_interacted + | Atom_gnss_psds_download_reported + | Atom_le_audio_connection_session_reported + | Atom_le_audio_broadcast_session_reported + | Atom_dream_ui_event_reported + | Atom_task_manager_event_reported + | Atom_cdm_association_action + | Atom_magnification_triple_tap_and_hold_activated_session_reported + | Atom_magnification_follow_typing_focus_activated_session_reported + | Atom_accessibility_text_reading_options_changed + | Atom_wifi_setup_failure_crash_reported + | Atom_uwb_device_error_reported + | Atom_isolated_compilation_scheduled + | Atom_isolated_compilation_ended + | Atom_ons_opportunistic_esim_provisioning_complete + | Atom_system_server_pre_watchdog_occurred + | Atom_telephony_anomaly_detected + | Atom_letterbox_position_changed + | Atom_remote_key_provisioning_attempt + | Atom_remote_key_provisioning_network_info + | Atom_remote_key_provisioning_timing + | Atom_mediaoutput_op_interaction_report + | Atom_sync_exemption_occurred + | Atom_autofill_presentation_event_reported + | Atom_dock_state_changed + | Atom_safety_source_state_collected + | Atom_safety_center_system_event_reported + | Atom_safety_center_interaction_reported + | Atom_settings_provider_setting_changed + | Atom_broadcast_delivery_event_reported + | Atom_service_request_event_reported + | Atom_provider_acquisition_event_reported + | Atom_bluetooth_device_name_reported + | Atom_cb_config_updated + | Atom_cb_module_error_reported + | Atom_cb_service_feature_changed + | Atom_cb_receiver_feature_changed + | Atom_privacy_signal_notification_interaction + | Atom_privacy_signal_issue_card_interaction + | Atom_privacy_signals_job_failure + | Atom_vibration_reported + | Atom_uwb_ranging_start + | Atom_app_compacted_v2 + | Atom_display_brightness_changed + | Atom_activity_action_blocked + | Atom_network_dns_server_support_reported + | Atom_vm_booted + | Atom_vm_exited + | Atom_ambient_brightness_stats_reported + | Atom_mediametrics_spatializercapabilities_reported + | Atom_mediametrics_spatializerdeviceenabled_reported + | Atom_mediametrics_headtrackerdeviceenabled_reported + | Atom_mediametrics_headtrackerdevicesupported_reported + | Atom_hearing_aid_info_reported + | Atom_device_wide_job_constraint_changed + | Atom_ambient_mode_changed + | Atom_anr_latency_reported + | Atom_resource_api_info + | Atom_system_default_network_changed + | Atom_iwlan_setup_data_call_result_reported + | Atom_iwlan_pdn_disconnected_reason_reported + | Atom_airplane_mode_session_reported + | Atom_vm_cpu_status_reported + | Atom_vm_mem_status_reported + | Atom_package_installation_session_reported + | Atom_default_network_rematch_info + | Atom_network_selection_performance + | Atom_network_nsd_reported + | Atom_bluetooth_disconnection_reason_reported + | Atom_bluetooth_local_versions_reported + | Atom_bluetooth_remote_supported_features_reported + | Atom_bluetooth_local_supported_features_reported + | Atom_bluetooth_gatt_app_info + | Atom_brightness_configuration_updated + | Atom_wear_media_output_switcher_launched + | Atom_wear_media_output_switcher_finished + | Atom_wear_media_output_switcher_connection_reported + | Atom_wear_media_output_switcher_device_scan_triggered + | Atom_wear_media_output_switcher_first_device_scan_latency + | Atom_wear_media_output_switcher_connect_device_latency + | Atom_package_manager_snapshot_reported + | Atom_package_manager_apps_filter_cache_build_reported + | Atom_package_manager_apps_filter_cache_update_reported + | Atom_launcher_impression_event + | Atom_wear_media_output_switcher_all_devices_scan_latency + | Atom_ws_watch_face_edited + | Atom_ws_watch_face_favorite_action_reported + | Atom_ws_watch_face_set_action_reported + | Atom_package_uninstallation_reported + | Atom_game_mode_changed + | Atom_game_mode_configuration_changed + | Atom_bedtime_mode_state_changed + | Atom_network_slice_session_ended + | Atom_network_slice_daily_data_usage_reported + | Atom_nfc_tag_type_occurred + | Atom_nfc_aid_conflict_occurred + | Atom_nfc_reader_conflict_occurred + | Atom_ws_tile_list_changed + | Atom_get_type_accessed_without_permission + | Atom_mobile_bundled_app_info_gathered + | Atom_ws_watch_face_complication_set_changed + | Atom_media_drm_created + | Atom_media_drm_errored + | Atom_media_drm_session_opened + | Atom_media_drm_session_closed + | Atom_user_selected_resolution + | Atom_unsafe_intent_event_reported + | Atom_performance_hint_session_reported + | Atom_mediametrics_midi_device_close_reported + | Atom_biometric_touch_reported + | Atom_hotword_audio_egress_event_reported + | Atom_location_enabled_state_changed + | Atom_ime_request_finished + | Atom_usb_compliance_warnings_reported + | Atom_app_supported_locales_changed + | Atom_media_provider_volume_recovery_reported + | Atom_biometric_properties_collected + | Atom_kernel_wakeup_attributed + | Atom_screen_state_changed_v2 + | Atom_ws_backup_action_reported + | Atom_ws_restore_action_reported + | Atom_device_log_access_event_reported + | Atom_media_session_updated + | Atom_wear_oobe_state_changed + | Atom_ws_notification_updated + | Atom_network_validation_failure_stats_daily_reported + | Atom_ws_complication_tapped + | Atom_ws_notification_blocking + | Atom_ws_notification_bridgemode_updated + | Atom_ws_notification_dismissal_actioned + | Atom_ws_notification_actioned + | Atom_ws_notification_latency + | Atom_wifi_bytes_transfer + | Atom_wifi_bytes_transfer_by_fg_bg + | Atom_mobile_bytes_transfer + | Atom_mobile_bytes_transfer_by_fg_bg + | Atom_bluetooth_bytes_transfer + | Atom_kernel_wakelock + | Atom_subsystem_sleep_state + | Atom_cpu_time_per_uid + | Atom_cpu_time_per_uid_freq + | Atom_wifi_activity_info + | Atom_modem_activity_info + | Atom_bluetooth_activity_info + | Atom_process_memory_state + | Atom_system_elapsed_realtime + | Atom_system_uptime + | Atom_cpu_active_time + | Atom_cpu_cluster_time + | Atom_disk_space + | Atom_remaining_battery_capacity + | Atom_full_battery_capacity + | Atom_temperature + | Atom_binder_calls + | Atom_binder_calls_exceptions + | Atom_looper_stats + | Atom_disk_stats + | Atom_directory_usage + | Atom_app_size + | Atom_category_size + | Atom_proc_stats + | Atom_battery_voltage + | Atom_num_fingerprints_enrolled + | Atom_disk_io + | Atom_power_profile + | Atom_proc_stats_pkg_proc + | Atom_process_cpu_time + | Atom_cpu_time_per_thread_freq + | Atom_on_device_power_measurement + | Atom_device_calculated_power_use + | Atom_process_memory_high_water_mark + | Atom_battery_level + | Atom_build_information + | Atom_battery_cycle_count + | Atom_debug_elapsed_clock + | Atom_debug_failing_elapsed_clock + | Atom_num_faces_enrolled + | Atom_role_holder + | Atom_dangerous_permission_state + | Atom_train_info + | Atom_time_zone_data_info + | Atom_external_storage_info + | Atom_gpu_stats_global_info + | Atom_gpu_stats_app_info + | Atom_system_ion_heap_size + | Atom_apps_on_external_storage_info + | Atom_face_settings + | Atom_cooling_device + | Atom_app_ops + | Atom_process_system_ion_heap_size + | Atom_surfaceflinger_stats_global_info + | Atom_surfaceflinger_stats_layer_info + | Atom_process_memory_snapshot + | Atom_vms_client_stats + | Atom_notification_remote_views + | Atom_dangerous_permission_state_sampled + | Atom_graphics_stats + | Atom_runtime_app_op_access + | Atom_ion_heap_size + | Atom_package_notification_preferences + | Atom_package_notification_channel_preferences + | Atom_package_notification_channel_group_preferences + | Atom_gnss_stats + | Atom_attributed_app_ops + | Atom_voice_call_session + | Atom_voice_call_rat_usage + | Atom_sim_slot_state + | Atom_supported_radio_access_family + | Atom_setting_snapshot + | Atom_blob_info + | Atom_data_usage_bytes_transfer + | Atom_bytes_transfer_by_tag_and_metered + | Atom_dnd_mode_rule + | Atom_general_external_storage_access_stats + | Atom_incoming_sms + | Atom_outgoing_sms + | Atom_carrier_id_table_version + | Atom_data_call_session + | Atom_cellular_service_state + | Atom_cellular_data_service_switch + | Atom_system_memory + | Atom_ims_registration_termination + | Atom_ims_registration_stats + | Atom_cpu_time_per_cluster_freq + | Atom_cpu_cycles_per_uid_cluster + | Atom_device_rotated_data + | Atom_cpu_cycles_per_thread_group_cluster + | Atom_media_drm_activity_info + | Atom_oem_managed_bytes_transfer + | Atom_gnss_power_stats + | Atom_time_zone_detector_state + | Atom_keystore2_storage_stats + | Atom_rkp_pool_stats + | Atom_process_dmabuf_memory + | Atom_pending_alarm_info + | Atom_user_level_hibernated_apps + | Atom_launcher_layout_snapshot + | Atom_global_hibernated_apps + | Atom_input_event_latency_sketch + | Atom_battery_usage_stats_before_reset + | Atom_battery_usage_stats_since_reset + | Atom_battery_usage_stats_since_reset_using_power_profile_model + | Atom_installed_incremental_package + | Atom_telephony_network_requests + | Atom_app_search_storage_info + | Atom_vmstat + | Atom_keystore2_key_creation_with_general_info + | Atom_keystore2_key_creation_with_auth_info + | Atom_keystore2_key_creation_with_purpose_and_modes_info + | Atom_keystore2_atom_with_overflow + | Atom_keystore2_key_operation_with_purpose_and_modes_info + | Atom_keystore2_key_operation_with_general_info + | Atom_rkp_error_stats + | Atom_keystore2_crash_stats + | Atom_vendor_apex_info + | Atom_accessibility_shortcut_stats + | Atom_accessibility_floating_menu_stats + | Atom_data_usage_bytes_transfer_v2 + | Atom_media_capabilities + | Atom_car_watchdog_system_io_usage_summary + | Atom_car_watchdog_uid_io_usage_summary + | Atom_ims_registration_feature_tag_stats + | Atom_rcs_client_provisioning_stats + | Atom_rcs_acs_provisioning_stats + | Atom_sip_delegate_stats + | Atom_sip_transport_feature_tag_stats + | Atom_sip_message_response + | Atom_sip_transport_session + | Atom_ims_dedicated_bearer_listener_event + | Atom_ims_dedicated_bearer_event + | Atom_ims_registration_service_desc_stats + | Atom_uce_event_stats + | Atom_presence_notify_event + | Atom_gba_event + | Atom_per_sim_status + | Atom_gpu_work_per_uid + | Atom_persistent_uri_permissions_amount_per_package + | Atom_signed_partition_info + | Atom_pinned_file_sizes_per_package + | Atom_pending_intents_per_package + | Atom_user_info + | Atom_telephony_network_requests_v2 + | Atom_device_telephony_properties + | Atom_remote_key_provisioning_error_counts + | Atom_safety_state + | Atom_incoming_mms + | Atom_outgoing_mms + | Atom_multi_user_info + | Atom_network_bpf_map_info + | Atom_outgoing_short_code_sms + | Atom_connectivity_state_sample + | Atom_network_selection_rematch_reasons_info + | Atom_game_mode_info + | Atom_game_mode_configuration + | Atom_game_mode_listener + | Atom_network_slice_request_count + | Atom_ws_tile_snapshot + | Atom_ws_active_watch_face_complication_set_snapshot + | Atom_process_state + | Atom_process_association + | Atom_adpf_system_component_info + | Atom_notification_memory_use + | Atom_hdr_capabilities + | Atom_ws_favourite_watch_face_list_snapshot + | Atom_accessibility_check_result_reported + | Atom_adaptive_auth_unlock_after_lock_reported + | Atom_thermal_status_called + | Atom_thermal_headroom_called + | Atom_thermal_headroom_thresholds_called + | Atom_adpf_hint_session_tid_cleanup + | Atom_thermal_headroom_thresholds + | Atom_adpf_session_snapshot + | Atom_jsscriptengine_latency_reported + | Atom_ad_services_api_called + | Atom_ad_services_mesurement_reports_uploaded + | Atom_mobile_data_download_file_group_status_reported + | Atom_mobile_data_download_download_result_reported + | Atom_ad_services_settings_usage_reported + | Atom_background_fetch_process_reported + | Atom_update_custom_audience_process_reported + | Atom_run_ad_bidding_process_reported + | Atom_run_ad_scoring_process_reported + | Atom_run_ad_selection_process_reported + | Atom_run_ad_bidding_per_ca_process_reported + | Atom_mobile_data_download_file_group_storage_stats_reported + | Atom_ad_services_measurement_registrations + | Atom_ad_services_get_topics_reported + | Atom_ad_services_epoch_computation_get_top_topics_reported + | Atom_ad_services_epoch_computation_classifier_reported + | Atom_ad_services_back_compat_get_topics_reported + | Atom_ad_services_back_compat_epoch_computation_classifier_reported + | Atom_ad_services_measurement_debug_keys + | Atom_ad_services_error_reported + | Atom_ad_services_background_jobs_execution_reported + | Atom_ad_services_measurement_delayed_source_registration + | Atom_ad_services_measurement_attribution + | Atom_ad_services_measurement_jobs + | Atom_ad_services_measurement_wipeout + | Atom_ad_services_measurement_ad_id_match_for_debug_keys + | Atom_ad_services_enrollment_data_stored + | Atom_ad_services_enrollment_file_downloaded + | Atom_ad_services_enrollment_matched + | Atom_ad_services_consent_migrated + | Atom_ad_services_enrollment_failed + | Atom_ad_services_measurement_click_verification + | Atom_ad_services_encryption_key_fetched + | Atom_ad_services_encryption_key_db_transaction_ended + | Atom_destination_registered_beacons + | Atom_report_interaction_api_called + | Atom_interaction_reporting_table_cleared + | Atom_app_manifest_config_helper_called + | Atom_ad_filtering_process_join_ca_reported + | Atom_ad_filtering_process_ad_selection_reported + | Atom_ad_counter_histogram_updater_reported + | Atom_signature_verification + | Atom_k_anon_immediate_sign_join_status_reported + | Atom_k_anon_background_job_status_reported + | Atom_k_anon_initialize_status_reported + | Atom_k_anon_sign_status_reported + | Atom_k_anon_join_status_reported + | Atom_k_anon_key_attestation_status_reported + | Atom_get_ad_selection_data_api_called + | Atom_get_ad_selection_data_buyer_input_generated + | Atom_background_job_scheduling_reported + | Atom_topics_encryption_epoch_computation_reported + | Atom_topics_encryption_get_topics_reported + | Atom_adservices_shell_command_called + | Atom_update_signals_api_called + | Atom_encoding_job_run + | Atom_encoding_js_fetch + | Atom_encoding_js_execution + | Atom_persist_ad_selection_result_called + | Atom_server_auction_key_fetch_called + | Atom_server_auction_background_key_fetch_enabled + | Atom_ad_services_measurement_process_odp_registration + | Atom_ad_services_measurement_notify_registration_to_odp + | Atom_select_ads_from_outcomes_api_called + | Atom_report_impression_api_called + | Atom_ad_services_enrollment_transaction_stats + | Atom_ad_services_cobalt_logger_event_reported + | Atom_ad_services_cobalt_periodic_job_event_reported + | Atom_update_signals_process_reported + | Atom_topics_schedule_epoch_job_setting_reported + | Atom_ai_wallpapers_button_pressed + | Atom_ai_wallpapers_template_selected + | Atom_ai_wallpapers_term_selected + | Atom_ai_wallpapers_wallpaper_set + | Atom_ai_wallpapers_session_summary + | Atom_apex_installation_requested + | Atom_apex_installation_staged + | Atom_apex_installation_ended + | Atom_app_search_set_schema_stats_reported + | Atom_app_search_schema_migration_stats_reported + | Atom_app_search_usage_search_intent_stats_reported + | Atom_app_search_usage_search_intent_raw_query_stats_reported + | Atom_app_search_apps_indexer_stats_reported + | Atom_art_datum_reported + | Atom_art_device_datum_reported + | Atom_art_datum_delta_reported + | Atom_art_dex2_oat_reported + | Atom_art_device_status + | Atom_background_dexopt_job_ended + | Atom_prereboot_dexopt_job_ended + | Atom_odrefresh_reported + | Atom_odsign_reported + | Atom_autofill_ui_event_reported + | Atom_autofill_fill_request_reported + | Atom_autofill_fill_response_reported + | Atom_autofill_save_event_reported + | Atom_autofill_session_committed + | Atom_autofill_field_classification_event_reported + | Atom_car_recents_event_reported + | Atom_car_calm_mode_event_reported + | Atom_car_wakeup_from_suspend_reported + | Atom_plugin_initialized + | Atom_bluetooth_hashed_device_name_reported + | Atom_bluetooth_l2_cap_coc_client_connection + | Atom_bluetooth_l2_cap_coc_server_connection + | Atom_bluetooth_le_session_connected + | Atom_restricted_bluetooth_device_name_reported + | Atom_bluetooth_profile_connection_attempted + | Atom_bluetooth_content_profile_error_reported + | Atom_bluetooth_rfcomm_connection_attempted + | Atom_remote_device_information_with_metric_id + | Atom_le_app_scan_state_changed + | Atom_le_radio_scan_stopped + | Atom_le_scan_result_received + | Atom_le_scan_abused + | Atom_le_adv_state_changed + | Atom_le_adv_error_reported + | Atom_a2_dp_session_reported + | Atom_bluetooth_cross_layer_event_reported + | Atom_broadcast_audio_session_reported + | Atom_broadcast_audio_sync_reported + | Atom_bluetooth_rfcomm_connection_reported_at_close + | Atom_bluetooth_le_connection + | Atom_broadcast_sent + | Atom_camera_feature_combination_query_event + | Atom_certificate_transparency_log_list_state_changed + | Atom_certificate_transparency_log_list_update_failed + | Atom_daily_keepalive_info_reported + | Atom_network_request_state_changed + | Atom_tethering_active_sessions_reported + | Atom_network_stats_recorder_file_operated + | Atom_core_networking_terrible_error_occurred + | Atom_apf_session_info_reported + | Atom_ip_client_ra_info_reported + | Atom_vpn_connection_state_changed + | Atom_vpn_connection_reported + | Atom_cpu_policy + | Atom_credential_manager_api_called + | Atom_credential_manager_init_phase_reported + | Atom_credential_manager_candidate_phase_reported + | Atom_credential_manager_final_phase_reported + | Atom_credential_manager_total_reported + | Atom_credential_manager_finalnouid_reported + | Atom_credential_manager_get_reported + | Atom_credential_manager_auth_click_reported + | Atom_credential_manager_apiv2_called + | Atom_cronet_engine_created + | Atom_cronet_traffic_reported + | Atom_cronet_engine_builder_initialized + | Atom_cronet_http_flags_initialized + | Atom_cronet_initialized + | Atom_desktop_mode_ui_changed + | Atom_desktop_mode_session_task_update + | Atom_desktop_mode_task_size_updated + | Atom_device_lock_check_in_request_reported + | Atom_device_lock_provisioning_complete_reported + | Atom_device_lock_kiosk_app_request_reported + | Atom_device_lock_check_in_retry_reported + | Atom_device_lock_provision_failure_reported + | Atom_device_lock_lock_unlock_device_failure_reported + | Atom_device_policy_management_mode + | Atom_device_policy_state + | Atom_display_mode_director_vote_changed + | Atom_external_display_state_changed + | Atom_dnd_state_changed + | Atom_dream_setting_changed + | Atom_dream_setting_snapshot + | Atom_express_event_reported + | Atom_express_histogram_sample_reported + | Atom_express_uid_event_reported + | Atom_express_uid_histogram_sample_reported + | Atom_federated_compute_api_called + | Atom_federated_compute_training_event_reported + | Atom_example_iterator_next_latency_reported + | Atom_full_screen_intent_launched + | Atom_bal_allowed + | Atom_in_task_activity_started + | Atom_device_orientation_changed + | Atom_cached_apps_high_watermark + | Atom_stylus_prediction_metrics_reported + | Atom_user_risk_event_reported + | Atom_media_projection_state_changed + | Atom_media_projection_target_changed + | Atom_excessive_binder_proxy_count_reported + | Atom_proxy_bytes_transfer_by_fg_bg + | Atom_mobile_bytes_transfer_by_proc_state + | Atom_biometric_frr_notification + | Atom_sensitive_content_media_projection_session + | Atom_sensitive_notification_app_protection_session + | Atom_sensitive_notification_app_protection_applied + | Atom_sensitive_notification_redaction + | Atom_sensitive_content_app_protection + | Atom_app_restriction_state_changed + | Atom_battery_usage_stats_per_uid + | Atom_postgc_memory_snapshot + | Atom_power_save_temp_allowlist_changed + | Atom_app_op_access_tracked + | Atom_content_or_file_uri_event_reported + | Atom_application_grammatical_inflection_changed + | Atom_system_grammatical_inflection_changed + | Atom_battery_health + | Atom_hdmi_earc_status_reported + | Atom_hdmi_soundbar_mode_status_reported + | Atom_health_connect_api_called + | Atom_health_connect_usage_stats + | Atom_health_connect_storage_stats + | Atom_health_connect_api_invoked + | Atom_exercise_route_api_called + | Atom_health_connect_export_invoked + | Atom_health_connect_import_invoked + | Atom_health_connect_export_import_stats_reported + | Atom_health_connect_ui_impression + | Atom_health_connect_ui_interaction + | Atom_health_connect_app_opened_reported + | Atom_hotword_egress_size_atom_reported + | Atom_ike_session_terminated + | Atom_ike_liveness_check_session_validated + | Atom_negotiated_security_association + | Atom_keyboard_configured + | Atom_keyboard_systems_event_reported + | Atom_inputdevice_usage_reported + | Atom_input_event_latency_reported + | Atom_touchpad_usage + | Atom_kernel_oom_kill_occurred + | Atom_emergency_state_changed + | Atom_chre_significant_motion_state_changed + | Atom_population_density_provider_loading_reported + | Atom_density_based_coarse_locations_usage_reported + | Atom_density_based_coarse_locations_provider_query_reported + | Atom_media_codec_reclaim_request_completed + | Atom_media_codec_started + | Atom_media_codec_stopped + | Atom_media_codec_rendered + | Atom_media_editing_ended_reported + | Atom_mte_state + | Atom_microxr_device_boot_complete_reported + | Atom_nfc_observe_mode_state_changed + | Atom_nfc_field_changed + | Atom_nfc_polling_loop_notification_reported + | Atom_nfc_proprietary_capabilities_reported + | Atom_ondevicepersonalization_api_called + | Atom_component_state_changed_reported + | Atom_pdf_load_reported + | Atom_pdf_api_usage_reported + | Atom_pdf_search_reported + | Atom_pressure_stall_information + | Atom_permission_rationale_dialog_viewed + | Atom_permission_rationale_dialog_action_reported + | Atom_app_data_sharing_updates_notification_interaction + | Atom_app_data_sharing_updates_fragment_viewed + | Atom_app_data_sharing_updates_fragment_action_reported + | Atom_enhanced_confirmation_dialog_result_reported + | Atom_enhanced_confirmation_restriction_cleared + | Atom_photopicker_session_info_reported + | Atom_photopicker_api_info_reported + | Atom_photopicker_ui_event_logged + | Atom_photopicker_media_item_status_reported + | Atom_photopicker_preview_info_logged + | Atom_photopicker_menu_interaction_logged + | Atom_photopicker_banner_interaction_logged + | Atom_photopicker_media_library_info_logged + | Atom_photopicker_page_info_logged + | Atom_photopicker_media_grid_sync_info_reported + | Atom_photopicker_album_sync_info_reported + | Atom_photopicker_search_info_reported + | Atom_search_data_extraction_details_reported + | Atom_embedded_photopicker_info_reported + | Atom_atom_9999 + | Atom_atom_99999 + | Atom_screen_off_reported + | Atom_screen_timeout_override_reported + | Atom_screen_interactive_session_reported + | Atom_screen_dim_reported + | Atom_media_provider_database_rollback_reported + | Atom_backup_setup_status_reported + | Atom_ranging_session_configured + | Atom_ranging_session_started + | Atom_ranging_session_closed + | Atom_ranging_technology_started + | Atom_ranging_technology_stopped + | Atom_rkpd_pool_stats + | Atom_rkpd_client_operation + | Atom_sandbox_api_called + | Atom_sandbox_activity_event_occurred + | Atom_sdk_sandbox_restricted_access_in_session + | Atom_sandbox_sdk_storage + | Atom_selinux_audit_log + | Atom_settings_spa_reported + | Atom_test_extension_atom_reported + | Atom_test_restricted_atom_reported + | Atom_stats_socket_loss_reported + | Atom_lockscreen_shortcut_selected + | Atom_lockscreen_shortcut_triggered + | Atom_launcher_impression_event_v2 + | Atom_display_switch_latency_tracked + | Atom_notification_listener_service + | Atom_nav_handle_touch_points + | Atom_communal_hub_widget_event_reported + | Atom_communal_hub_snapshot + | Atom_emergency_number_dialed + | Atom_call_stats + | Atom_call_audio_route_stats + | Atom_telecom_api_stats + | Atom_telecom_error_stats + | Atom_cellular_radio_power_state_changed + | Atom_emergency_numbers_info + | Atom_data_network_validation + | Atom_data_rat_state_changed + | Atom_connected_channel_changed + | Atom_iwlan_underlying_network_validation_result_reported + | Atom_qualified_rat_list_changed + | Atom_qns_ims_call_drop_stats + | Atom_qns_fallback_restriction_changed + | Atom_qns_rat_preference_mismatch_info + | Atom_qns_handover_time_millis + | Atom_qns_handover_pingpong + | Atom_satellite_controller + | Atom_satellite_session + | Atom_satellite_incoming_datagram + | Atom_satellite_outgoing_datagram + | Atom_satellite_provision + | Atom_satellite_sos_message_recommender + | Atom_carrier_roaming_satellite_session + | Atom_carrier_roaming_satellite_controller_stats + | Atom_controller_stats_per_package + | Atom_satellite_entitlement + | Atom_satellite_config_updater + | Atom_satellite_access_controller + | Atom_cellular_identifier_disclosed + | Atom_threadnetwork_telemetry_data_reported + | Atom_threadnetwork_topo_entry_repeated + | Atom_threadnetwork_device_info_reported + | Atom_boot_integrity_info_reported + | Atom_tv_low_power_standby_policy + | Atom_external_tv_input_event + | Atom_test_uprobestats_atom_reported + | Atom_uwb_activity_info + | Atom_mediator_updated + | Atom_sysproxy_bluetooth_bytes_transfer + | Atom_sysproxy_connection_updated + | Atom_wear_companion_connection_state + | Atom_media_action_reported + | Atom_media_controls_launched + | Atom_media_session_state_changed + | Atom_wear_media_output_switcher_device_scan_api_latency + | Atom_wear_media_output_switcher_sass_device_unavailable + | Atom_wear_media_output_switcher_fastpair_api_timeout + | Atom_wear_mode_state_changed + | Atom_renderer_initialized + | Atom_schema_version_received + | Atom_layout_inspected + | Atom_layout_expression_inspected + | Atom_layout_animations_inspected + | Atom_material_components_inspected + | Atom_tile_requested + | Atom_state_response_received + | Atom_tile_response_received + | Atom_inflation_finished + | Atom_inflation_failed + | Atom_ignored_inflation_failures_reported + | Atom_drawable_rendered + | Atom_wear_time_sync_requested + | Atom_wear_time_update_started + | Atom_wear_time_sync_attempt_completed + | Atom_wear_time_changed + | Atom_wear_adaptive_suspend_stats_reported + | Atom_wear_power_anomaly_service_operational_stats_reported + | Atom_wear_power_anomaly_service_event_stats_reported + | Atom_ws_wear_time_session + | Atom_ws_incoming_call_action_reported + | Atom_ws_call_disconnection_reported + | Atom_ws_call_duration_reported + | Atom_ws_call_user_experience_latency_reported + | Atom_ws_call_interaction_reported + | Atom_ws_on_body_state_changed + | Atom_ws_watch_face_restricted_complications_impacted + | Atom_ws_watch_face_default_restricted_complications_removed + | Atom_ws_complications_impacted_notification_event_reported + | Atom_ws_remote_event_usage_reported + | Atom_ws_bugreport_requested + | Atom_ws_bugreport_triggered + | Atom_ws_bugreport_finished + | Atom_ws_bugreport_result_received + | Atom_ws_standalone_mode_snapshot + | Atom_ws_favorite_watch_face_snapshot + | Atom_ws_photos_watch_face_feature_snapshot + | Atom_ws_watch_face_customization_snapshot + | Atom_wear_power_menu_opened + | Atom_wear_assistant_opened + | Atom_first_overlay_state_changed + | Atom_wifi_aware_ndp_reported + | Atom_wifi_aware_attach_reported + | Atom_wifi_self_recovery_triggered + | Atom_soft_ap_started + | Atom_soft_ap_stopped + | Atom_wifi_lock_released + | Atom_wifi_lock_deactivated + | Atom_wifi_config_saved + | Atom_wifi_aware_resource_using_changed + | Atom_wifi_aware_hal_api_called + | Atom_wifi_local_only_request_received + | Atom_wifi_local_only_request_scan_triggered + | Atom_wifi_thread_task_executed + | Atom_wifi_state_changed + | Atom_pno_scan_started + | Atom_pno_scan_stopped + | Atom_wifi_is_unusable_reported + | Atom_wifi_ap_capabilities_reported + | Atom_soft_ap_state_changed + | Atom_scorer_prediction_result_reported + | Atom_wifi_aware_capabilities + | Atom_wifi_module_info + | Atom_wifi_setting_info + | Atom_wifi_complex_setting_info + | Atom_wifi_configured_network_info + +type statsd_pull_atom_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable pull_atom_id : atom_id list; + mutable raw_pull_atom_id : int32 list; + mutable pull_frequency_ms : int32; + mutable packages : string list; +} + +type statsd_tracing_config = { + mutable push_atom_id : atom_id list; + mutable raw_push_atom_id : int32 list; + mutable pull_config : statsd_pull_atom_config list; +} + +type meminfo_counters = + | Meminfo_unspecified + | Meminfo_mem_total + | Meminfo_mem_free + | Meminfo_mem_available + | Meminfo_buffers + | Meminfo_cached + | Meminfo_swap_cached + | Meminfo_active + | Meminfo_inactive + | Meminfo_active_anon + | Meminfo_inactive_anon + | Meminfo_active_file + | Meminfo_inactive_file + | Meminfo_unevictable + | Meminfo_mlocked + | Meminfo_swap_total + | Meminfo_swap_free + | Meminfo_dirty + | Meminfo_writeback + | Meminfo_anon_pages + | Meminfo_mapped + | Meminfo_shmem + | Meminfo_slab + | Meminfo_slab_reclaimable + | Meminfo_slab_unreclaimable + | Meminfo_kernel_stack + | Meminfo_page_tables + | Meminfo_commit_limit + | Meminfo_commited_as + | Meminfo_vmalloc_total + | Meminfo_vmalloc_used + | Meminfo_vmalloc_chunk + | Meminfo_cma_total + | Meminfo_cma_free + | Meminfo_gpu + | Meminfo_zram + | Meminfo_misc + | Meminfo_ion_heap + | Meminfo_ion_heap_pool + +type vmstat_counters = + | Vmstat_unspecified + | Vmstat_nr_free_pages + | Vmstat_nr_alloc_batch + | Vmstat_nr_inactive_anon + | Vmstat_nr_active_anon + | Vmstat_nr_inactive_file + | Vmstat_nr_active_file + | Vmstat_nr_unevictable + | Vmstat_nr_mlock + | Vmstat_nr_anon_pages + | Vmstat_nr_mapped + | Vmstat_nr_file_pages + | Vmstat_nr_dirty + | Vmstat_nr_writeback + | Vmstat_nr_slab_reclaimable + | Vmstat_nr_slab_unreclaimable + | Vmstat_nr_page_table_pages + | Vmstat_nr_kernel_stack + | Vmstat_nr_overhead + | Vmstat_nr_unstable + | Vmstat_nr_bounce + | Vmstat_nr_vmscan_write + | Vmstat_nr_vmscan_immediate_reclaim + | Vmstat_nr_writeback_temp + | Vmstat_nr_isolated_anon + | Vmstat_nr_isolated_file + | Vmstat_nr_shmem + | Vmstat_nr_dirtied + | Vmstat_nr_written + | Vmstat_nr_pages_scanned + | Vmstat_workingset_refault + | Vmstat_workingset_activate + | Vmstat_workingset_nodereclaim + | Vmstat_nr_anon_transparent_hugepages + | Vmstat_nr_free_cma + | Vmstat_nr_swapcache + | Vmstat_nr_dirty_threshold + | Vmstat_nr_dirty_background_threshold + | Vmstat_pgpgin + | Vmstat_pgpgout + | Vmstat_pgpgoutclean + | Vmstat_pswpin + | Vmstat_pswpout + | Vmstat_pgalloc_dma + | Vmstat_pgalloc_normal + | Vmstat_pgalloc_movable + | Vmstat_pgfree + | Vmstat_pgactivate + | Vmstat_pgdeactivate + | Vmstat_pgfault + | Vmstat_pgmajfault + | Vmstat_pgrefill_dma + | Vmstat_pgrefill_normal + | Vmstat_pgrefill_movable + | Vmstat_pgsteal_kswapd_dma + | Vmstat_pgsteal_kswapd_normal + | Vmstat_pgsteal_kswapd_movable + | Vmstat_pgsteal_direct_dma + | Vmstat_pgsteal_direct_normal + | Vmstat_pgsteal_direct_movable + | Vmstat_pgscan_kswapd_dma + | Vmstat_pgscan_kswapd_normal + | Vmstat_pgscan_kswapd_movable + | Vmstat_pgscan_direct_dma + | Vmstat_pgscan_direct_normal + | Vmstat_pgscan_direct_movable + | Vmstat_pgscan_direct_throttle + | Vmstat_pginodesteal + | Vmstat_slabs_scanned + | Vmstat_kswapd_inodesteal + | Vmstat_kswapd_low_wmark_hit_quickly + | Vmstat_kswapd_high_wmark_hit_quickly + | Vmstat_pageoutrun + | Vmstat_allocstall + | Vmstat_pgrotated + | Vmstat_drop_pagecache + | Vmstat_drop_slab + | Vmstat_pgmigrate_success + | Vmstat_pgmigrate_fail + | Vmstat_compact_migrate_scanned + | Vmstat_compact_free_scanned + | Vmstat_compact_isolated + | Vmstat_compact_stall + | Vmstat_compact_fail + | Vmstat_compact_success + | Vmstat_compact_daemon_wake + | Vmstat_unevictable_pgs_culled + | Vmstat_unevictable_pgs_scanned + | Vmstat_unevictable_pgs_rescued + | Vmstat_unevictable_pgs_mlocked + | Vmstat_unevictable_pgs_munlocked + | Vmstat_unevictable_pgs_cleared + | Vmstat_unevictable_pgs_stranded + | Vmstat_nr_zspages + | Vmstat_nr_ion_heap + | Vmstat_nr_gpu_heap + | Vmstat_allocstall_dma + | Vmstat_allocstall_movable + | Vmstat_allocstall_normal + | Vmstat_compact_daemon_free_scanned + | Vmstat_compact_daemon_migrate_scanned + | Vmstat_nr_fastrpc + | Vmstat_nr_indirectly_reclaimable + | Vmstat_nr_ion_heap_pool + | Vmstat_nr_kernel_misc_reclaimable + | Vmstat_nr_shadow_call_stack_bytes + | Vmstat_nr_shmem_hugepages + | Vmstat_nr_shmem_pmdmapped + | Vmstat_nr_unreclaimable_pages + | Vmstat_nr_zone_active_anon + | Vmstat_nr_zone_active_file + | Vmstat_nr_zone_inactive_anon + | Vmstat_nr_zone_inactive_file + | Vmstat_nr_zone_unevictable + | Vmstat_nr_zone_write_pending + | Vmstat_oom_kill + | Vmstat_pglazyfree + | Vmstat_pglazyfreed + | Vmstat_pgrefill + | Vmstat_pgscan_direct + | Vmstat_pgscan_kswapd + | Vmstat_pgskip_dma + | Vmstat_pgskip_movable + | Vmstat_pgskip_normal + | Vmstat_pgsteal_direct + | Vmstat_pgsteal_kswapd + | Vmstat_swap_ra + | Vmstat_swap_ra_hit + | Vmstat_workingset_restore + | Vmstat_allocstall_device + | Vmstat_allocstall_dma32 + | Vmstat_balloon_deflate + | Vmstat_balloon_inflate + | Vmstat_balloon_migrate + | Vmstat_cma_alloc_fail + | Vmstat_cma_alloc_success + | Vmstat_nr_file_hugepages + | Vmstat_nr_file_pmdmapped + | Vmstat_nr_foll_pin_acquired + | Vmstat_nr_foll_pin_released + | Vmstat_nr_sec_page_table_pages + | Vmstat_nr_shadow_call_stack + | Vmstat_nr_swapcached + | Vmstat_nr_throttled_written + | Vmstat_pgalloc_device + | Vmstat_pgalloc_dma32 + | Vmstat_pgdemote_direct + | Vmstat_pgdemote_kswapd + | Vmstat_pgreuse + | Vmstat_pgscan_anon + | Vmstat_pgscan_file + | Vmstat_pgskip_device + | Vmstat_pgskip_dma32 + | Vmstat_pgsteal_anon + | Vmstat_pgsteal_file + | Vmstat_thp_collapse_alloc + | Vmstat_thp_collapse_alloc_failed + | Vmstat_thp_deferred_split_page + | Vmstat_thp_fault_alloc + | Vmstat_thp_fault_fallback + | Vmstat_thp_fault_fallback_charge + | Vmstat_thp_file_alloc + | Vmstat_thp_file_fallback + | Vmstat_thp_file_fallback_charge + | Vmstat_thp_file_mapped + | Vmstat_thp_migration_fail + | Vmstat_thp_migration_split + | Vmstat_thp_migration_success + | Vmstat_thp_scan_exceed_none_pte + | Vmstat_thp_scan_exceed_share_pte + | Vmstat_thp_scan_exceed_swap_pte + | Vmstat_thp_split_page + | Vmstat_thp_split_page_failed + | Vmstat_thp_split_pmd + | Vmstat_thp_swpout + | Vmstat_thp_swpout_fallback + | Vmstat_thp_zero_page_alloc + | Vmstat_thp_zero_page_alloc_failed + | Vmstat_vma_lock_abort + | Vmstat_vma_lock_miss + | Vmstat_vma_lock_retry + | Vmstat_vma_lock_success + | Vmstat_workingset_activate_anon + | Vmstat_workingset_activate_file + | Vmstat_workingset_nodes + | Vmstat_workingset_refault_anon + | Vmstat_workingset_refault_file + | Vmstat_workingset_restore_anon + | Vmstat_workingset_restore_file + +type sys_stats_config_stat_counters = + | Stat_unspecified + | Stat_cpu_times + | Stat_irq_counts + | Stat_softirq_counts + | Stat_fork_count + +type sys_stats_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable meminfo_period_ms : int32; + mutable meminfo_counters : meminfo_counters list; + mutable vmstat_period_ms : int32; + mutable vmstat_counters : vmstat_counters list; + mutable stat_period_ms : int32; + mutable stat_counters : sys_stats_config_stat_counters list; + mutable devfreq_period_ms : int32; + mutable cpufreq_period_ms : int32; + mutable buddyinfo_period_ms : int32; + mutable diskstat_period_ms : int32; + mutable psi_period_ms : int32; + mutable thermal_period_ms : int32; + mutable cpuidle_period_ms : int32; + mutable gpufreq_period_ms : int32; +} + +type system_info_config = unit + +type test_config_dummy_fields = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 14 fields *) + mutable field_uint32 : int32; + mutable field_int32 : int32; + mutable field_uint64 : int64; + mutable field_int64 : int64; + mutable field_fixed64 : int64; + mutable field_sfixed64 : int64; + mutable field_fixed32 : int32; + mutable field_sfixed32 : int32; + mutable field_double : float; + mutable field_float : float; + mutable field_sint64 : int64; + mutable field_sint32 : int32; + mutable field_string : string; + mutable field_bytes : bytes; +} + +type test_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable message_count : int32; + mutable max_messages_per_second : int32; + mutable seed : int32; + mutable message_size : int32; + mutable send_batch_on_register : bool; + mutable dummy_fields : test_config_dummy_fields option; +} + +type track_event_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable disabled_categories : string list; + mutable enabled_categories : string list; + mutable disabled_tags : string list; + mutable enabled_tags : string list; + mutable disable_incremental_timestamps : bool; + mutable timestamp_unit_multiplier : int64; + mutable filter_debug_annotations : bool; + mutable enable_thread_time_sampling : bool; + mutable thread_time_subsampling_ns : int64; + mutable filter_dynamic_event_names : bool; +} + +type data_source_config_session_initiator = + | Session_initiator_unspecified + | Session_initiator_trusted_system + +type data_source_config_buffer_exhausted_policy = + | Buffer_exhausted_unspecified + | Buffer_exhausted_drop + | Buffer_exhausted_stall_then_abort + | Buffer_exhausted_stall_then_drop + +type data_source_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable name : string; + mutable target_buffer : int32; + mutable trace_duration_ms : int32; + mutable prefer_suspend_clock_for_duration : bool; + mutable stop_timeout_ms : int32; + mutable enable_extra_guardrails : bool; + mutable session_initiator : data_source_config_session_initiator; + mutable tracing_session_id : int64; + mutable buffer_exhausted_policy : data_source_config_buffer_exhausted_policy; + mutable priority_boost : priority_boost_config option; + mutable ftrace_config : ftrace_config option; + mutable inode_file_config : inode_file_config option; + mutable process_stats_config : process_stats_config option; + mutable sys_stats_config : sys_stats_config option; + mutable heapprofd_config : heapprofd_config option; + mutable android_power_config : android_power_config option; + mutable android_log_config : android_log_config option; + mutable gpu_counter_config : gpu_counter_config option; + mutable android_game_intervention_list_config : android_game_intervention_list_config option; + mutable packages_list_config : packages_list_config option; + mutable vulkan_memory_config : vulkan_memory_config option; + mutable track_event_config : track_event_config option; + mutable android_polled_state_config : android_polled_state_config option; + mutable android_system_property_config : android_system_property_config option; + mutable statsd_tracing_config : statsd_tracing_config option; + mutable system_info_config : unit; + mutable frozen_ftrace_config : frozen_ftrace_config option; + mutable chrome_config : chrome_config option; + mutable v8_config : v8_config option; + mutable interceptor_config : interceptor_config option; + mutable network_packet_trace_config : network_packet_trace_config option; + mutable surfaceflinger_layers_config : surface_flinger_layers_config option; + mutable surfaceflinger_transactions_config : surface_flinger_transactions_config option; + mutable android_sdk_sysprop_guard_config : android_sdk_sysprop_guard_config option; + mutable etw_config : etw_config option; + mutable protolog_config : proto_log_config option; + mutable android_input_event_config : android_input_event_config option; + mutable pixel_modem_config : pixel_modem_config option; + mutable windowmanager_config : window_manager_config option; + mutable chromium_system_metrics : chromium_system_metrics_config option; + mutable kernel_wakelocks_config : kernel_wakelocks_config option; + mutable gpu_renderstages_config : gpu_render_stages_config option; + mutable chromium_histogram_samples : chromium_histogram_samples_config option; + mutable app_wakelocks_config : app_wakelocks_config option; + mutable cpu_per_uid_config : cpu_per_uid_config option; + mutable legacy_config : string; + mutable for_testing : test_config option; +} + +type trace_config_buffer_config_fill_policy = + | Unspecified + | Ring_buffer + | Discard + +type trace_config_buffer_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable size_kb : int32; + mutable fill_policy : trace_config_buffer_config_fill_policy; + mutable transfer_on_clone : bool; + mutable clear_before_clone : bool; +} + +type trace_config_data_source = { + mutable config : data_source_config option; + mutable producer_name_filter : string list; + mutable producer_name_regex_filter : string list; + mutable machine_name_filter : string list; +} + +type trace_config_builtin_data_source = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable disable_clock_snapshotting : bool; + mutable disable_trace_config : bool; + mutable disable_system_info : bool; + mutable disable_service_events : bool; + mutable primary_trace_clock : builtin_clock; + mutable snapshot_interval_ms : int32; + mutable prefer_suspend_clock_for_snapshot : bool; + mutable disable_chunk_usage_histograms : bool; +} + +type trace_config_lockdown_mode_operation = + | Lockdown_unchanged + | Lockdown_clear + | Lockdown_set + +type trace_config_producer_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable producer_name : string; + mutable shm_size_kb : int32; + mutable page_size_kb : int32; +} + +type trace_config_statsd_metadata = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable triggering_alert_id : int64; + mutable triggering_config_uid : int32; + mutable triggering_config_id : int64; + mutable triggering_subscription_id : int64; +} + +type trace_config_guardrail_overrides = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable max_upload_per_day_bytes : int64; + mutable max_tracing_buffer_size_kb : int32; +} + +type trace_config_trigger_config_trigger_mode = + | Unspecified + | Start_tracing + | Stop_tracing + | Clone_snapshot + +type trace_config_trigger_config_trigger = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable name : string; + mutable producer_name_regex : string; + mutable stop_delay_ms : int32; + mutable max_per_24_h : int32; + mutable skip_probability : float; +} + +type trace_config_trigger_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable trigger_mode : trace_config_trigger_config_trigger_mode; + mutable use_clone_snapshot_if_available : bool; + mutable triggers : trace_config_trigger_config_trigger list; + mutable trigger_timeout_ms : int32; +} + +type trace_config_incremental_state_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable clear_period_ms : int32; +} + +type trace_config_compression_type = + | Compression_type_unspecified + | Compression_type_deflate + +type trace_config_incident_report_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable destination_package : string; + mutable destination_class : string; + mutable privacy_level : int32; + mutable skip_incidentd : bool; + mutable skip_dropbox : bool; +} + +type trace_config_statsd_logging = + | Statsd_logging_unspecified + | Statsd_logging_enabled + | Statsd_logging_disabled + +type trace_config_trace_filter_string_filter_policy = + | Sfp_unspecified + | Sfp_match_redact_groups + | Sfp_atrace_match_redact_groups + | Sfp_match_break + | Sfp_atrace_match_break + | Sfp_atrace_repeated_search_redact_groups + +type trace_config_trace_filter_string_filter_rule = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable policy : trace_config_trace_filter_string_filter_policy; + mutable regex_pattern : string; + mutable atrace_payload_starts_with : string; +} + +type trace_config_trace_filter_string_filter_chain = { + mutable rules : trace_config_trace_filter_string_filter_rule list; +} + +type trace_config_trace_filter = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable bytecode : bytes; + mutable bytecode_v2 : bytes; + mutable string_filter_chain : trace_config_trace_filter_string_filter_chain option; +} + +type trace_config_android_report_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable reporter_service_package : string; + mutable reporter_service_class : string; + mutable skip_report : bool; + mutable use_pipe_in_framework_for_testing : bool; +} + +type trace_config_cmd_trace_start_delay = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable min_delay_ms : int32; + mutable max_delay_ms : int32; +} + +type trace_config_session_semaphore = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable max_other_session_count : int64; +} + +type trace_config = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 23 fields *) + mutable buffers : trace_config_buffer_config list; + mutable data_sources : trace_config_data_source list; + mutable builtin_data_sources : trace_config_builtin_data_source option; + mutable duration_ms : int32; + mutable prefer_suspend_clock_for_duration : bool; + mutable enable_extra_guardrails : bool; + mutable lockdown_mode : trace_config_lockdown_mode_operation; + mutable producers : trace_config_producer_config list; + mutable statsd_metadata : trace_config_statsd_metadata option; + mutable write_into_file : bool; + mutable output_path : string; + mutable file_write_period_ms : int32; + mutable max_file_size_bytes : int64; + mutable guardrail_overrides : trace_config_guardrail_overrides option; + mutable deferred_start : bool; + mutable flush_period_ms : int32; + mutable flush_timeout_ms : int32; + mutable data_source_stop_timeout_ms : int32; + mutable notify_traceur : bool; + mutable bugreport_score : int32; + mutable bugreport_filename : string; + mutable trigger_config : trace_config_trigger_config option; + mutable activate_triggers : string list; + mutable incremental_state_config : trace_config_incremental_state_config option; + mutable allow_user_build_tracing : bool; + mutable unique_session_name : string; + mutable compression_type : trace_config_compression_type; + mutable incident_report_config : trace_config_incident_report_config option; + mutable statsd_logging : trace_config_statsd_logging; + mutable trace_uuid_msb : int64; + mutable trace_uuid_lsb : int64; + mutable trace_filter : trace_config_trace_filter option; + mutable android_report_config : trace_config_android_report_config option; + mutable cmd_trace_start_delay : trace_config_cmd_trace_start_delay option; + mutable session_semaphores : trace_config_session_semaphore list; + mutable priority_boost : priority_boost_config option; + mutable exclusive_prio : int32; + mutable no_flush_before_write_into_file : bool; +} + +type utsname = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable sysname : string; + mutable version : string; + mutable release : string; + mutable machine : string; +} + +type system_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 14 fields *) + mutable utsname : utsname option; + mutable android_build_fingerprint : string; + mutable android_device_manufacturer : string; + mutable android_soc_model : string; + mutable android_guest_soc_model : string; + mutable android_hardware_revision : string; + mutable android_storage_model : string; + mutable android_ram_model : string; + mutable android_serial_console : string; + mutable tracing_service_version : string; + mutable android_sdk_version : int64; + mutable page_size : int32; + mutable num_cpus : int32; + mutable timezone_off_mins : int32; + mutable hz : int64; +} + +type trace_stats_buffer_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 19 fields *) + mutable buffer_size : int64; + mutable bytes_written : int64; + mutable bytes_overwritten : int64; + mutable bytes_read : int64; + mutable padding_bytes_written : int64; + mutable padding_bytes_cleared : int64; + mutable chunks_written : int64; + mutable chunks_rewritten : int64; + mutable chunks_overwritten : int64; + mutable chunks_discarded : int64; + mutable chunks_read : int64; + mutable chunks_committed_out_of_order : int64; + mutable write_wrap_count : int64; + mutable patches_succeeded : int64; + mutable patches_failed : int64; + mutable readaheads_succeeded : int64; + mutable readaheads_failed : int64; + mutable abi_violations : int64; + mutable trace_writer_packet_loss : int64; +} + +type trace_stats_writer_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable sequence_id : int64; + mutable buffer : int32; + mutable chunk_payload_histogram_counts : int64 list; + mutable chunk_payload_histogram_sum : int64 list; +} + +type trace_stats_filter_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable input_packets : int64; + mutable input_bytes : int64; + mutable output_bytes : int64; + mutable errors : int64; + mutable time_taken_ns : int64; + mutable bytes_discarded_per_buffer : int64 list; +} + +type trace_stats_final_flush_outcome = + | Final_flush_unspecified + | Final_flush_succeeded + | Final_flush_failed + +type trace_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable buffer_stats : trace_stats_buffer_stats list; + mutable chunk_payload_histogram_def : int64 list; + mutable writer_stats : trace_stats_writer_stats list; + mutable producers_connected : int32; + mutable producers_seen : int64; + mutable data_sources_registered : int32; + mutable data_sources_seen : int64; + mutable tracing_sessions : int32; + mutable total_buffers : int32; + mutable chunks_discarded : int64; + mutable patches_discarded : int64; + mutable invalid_packets : int64; + mutable filter_stats : trace_stats_filter_stats option; + mutable flushes_requested : int64; + mutable flushes_succeeded : int64; + mutable flushes_failed : int64; + mutable final_flush_outcome : trace_stats_final_flush_outcome; +} + +type android_game_intervention_list_game_mode_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable mode : int32; + mutable use_angle : bool; + mutable resolution_downscale : float; + mutable fps : float; +} + +type android_game_intervention_list_game_package_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable name : string; + mutable uid : int64; + mutable current_mode : int32; + mutable game_mode_info : android_game_intervention_list_game_mode_info list; +} + +type android_game_intervention_list = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable game_packages : android_game_intervention_list_game_package_info list; + mutable parse_error : bool; + mutable read_error : bool; +} + +type android_log_packet_log_event_arg_value = + | Int_value of int64 + | Float_value of float + | String_value of string + +and android_log_packet_log_event_arg = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable value : android_log_packet_log_event_arg_value option; +} + +type android_log_packet_log_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable log_id : android_log_id; + mutable pid : int32; + mutable tid : int32; + mutable uid : int32; + mutable timestamp : int64; + mutable tag : string; + mutable prio : android_log_priority; + mutable message : string; + mutable args : android_log_packet_log_event_arg list; +} + +type android_log_packet_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable num_total : int64; + mutable num_failed : int64; + mutable num_skipped : int64; +} + +type android_log_packet = { + mutable events : android_log_packet_log_event list; + mutable stats : android_log_packet_stats option; +} + +type android_system_property_property_value = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable value : string; +} + +type android_system_property = { + mutable values : android_system_property_property_value list; +} + +type app_wakelock_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable iid : int32; + mutable tag : string; + mutable flags : int32; + mutable owner_pid : int32; + mutable owner_uid : int32; + mutable work_uid : int32; +} + +type app_wakelock_bundle = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable intern_id : int32 list; + mutable encoded_ts : int64 list; + mutable info : app_wakelock_info option; + mutable acquired : bool; +} + +type bluetooth_trace_packet_type = + | Hci_cmd + | Hci_evt + | Hci_acl_rx + | Hci_acl_tx + | Hci_sco_rx + | Hci_sco_tx + | Hci_iso_rx + | Hci_iso_tx + +type bluetooth_trace_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable packet_type : bluetooth_trace_packet_type; + mutable count : int32; + mutable length : int32; + mutable duration : int32; + mutable op_code : int32; + mutable event_code : int32; + mutable subevent_code : int32; + mutable connection_handle : int32; +} + +type android_camera_frame_event_capture_result_status = + | Status_unspecified + | Status_ok + | Status_early_metadata_error + | Status_final_metadata_error + | Status_buffer_error + | Status_flush_error + +type android_camera_frame_event_camera_node_processing_details = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable node_id : int64; + mutable start_processing_ns : int64; + mutable end_processing_ns : int64; + mutable scheduling_latency_ns : int64; +} + +type android_camera_frame_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 15 fields *) + mutable session_id : int64; + mutable camera_id : int32; + mutable frame_number : int64; + mutable request_id : int64; + mutable request_received_ns : int64; + mutable request_processing_started_ns : int64; + mutable start_of_exposure_ns : int64; + mutable start_of_frame_ns : int64; + mutable responses_all_sent_ns : int64; + mutable capture_result_status : android_camera_frame_event_capture_result_status; + mutable skipped_sensor_frames : int32; + mutable capture_intent : int32; + mutable num_streams : int32; + mutable node_processing_details : android_camera_frame_event_camera_node_processing_details list; + mutable vendor_data_version : int32; + mutable vendor_data : bytes; +} + +type android_camera_session_stats_camera_graph_camera_node = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable node_id : int64; + mutable input_ids : int64 list; + mutable output_ids : int64 list; + mutable vendor_data_version : int32; + mutable vendor_data : bytes; +} + +type android_camera_session_stats_camera_graph_camera_edge = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable output_node_id : int64; + mutable output_id : int64; + mutable input_node_id : int64; + mutable input_id : int64; + mutable vendor_data_version : int32; + mutable vendor_data : bytes; +} + +type android_camera_session_stats_camera_graph = { + mutable nodes : android_camera_session_stats_camera_graph_camera_node list; + mutable edges : android_camera_session_stats_camera_graph_camera_edge list; +} + +type android_camera_session_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable session_id : int64; + mutable graph : android_camera_session_stats_camera_graph option; +} + +type cpu_per_uid_data = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable cluster_count : int32; + mutable uid : int32 list; + mutable total_time_ms : int64 list; +} + +type frame_timeline_event_jank_type = + | Jank_unspecified + | Jank_none + | Jank_sf_scheduling + | Jank_prediction_error + | Jank_display_hal + | Jank_sf_cpu_deadline_missed + | Jank_sf_gpu_deadline_missed + | Jank_app_deadline_missed + | Jank_buffer_stuffing + | Jank_unknown + | Jank_sf_stuffing + | Jank_dropped + | Jank_non_animating + | Jank_app_resynced_jitter + | Jank_display_not_on + +type frame_timeline_event_jank_severity_type = + | Severity_unknown + | Severity_none + | Severity_partial + | Severity_full + +type frame_timeline_event_present_type = + | Present_unspecified + | Present_on_time + | Present_late + | Present_early + | Present_dropped + | Present_unknown + +type frame_timeline_event_prediction_type = + | Prediction_unspecified + | Prediction_valid + | Prediction_expired + | Prediction_unknown + +type frame_timeline_event_expected_surface_frame_start = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable cookie : int64; + mutable token : int64; + mutable display_frame_token : int64; + mutable pid : int32; + mutable layer_name : string; +} + +type frame_timeline_event_actual_surface_frame_start = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 17 fields *) + mutable cookie : int64; + mutable token : int64; + mutable display_frame_token : int64; + mutable pid : int32; + mutable layer_name : string; + mutable present_type : frame_timeline_event_present_type; + mutable on_time_finish : bool; + mutable gpu_composition : bool; + mutable jank_type : int32; + mutable prediction_type : frame_timeline_event_prediction_type; + mutable is_buffer : bool; + mutable jank_severity_type : frame_timeline_event_jank_severity_type; + mutable present_delay_millis : float; + mutable vsync_resynced_jitter_millis : float; + mutable jank_severity_score : float; + mutable jank_type_experimental : int32; + mutable present_type_experimental : frame_timeline_event_present_type; +} + +type frame_timeline_event_expected_display_frame_start = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable cookie : int64; + mutable token : int64; + mutable pid : int32; +} + +type frame_timeline_event_actual_display_frame_start = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable cookie : int64; + mutable token : int64; + mutable pid : int32; + mutable present_type : frame_timeline_event_present_type; + mutable on_time_finish : bool; + mutable gpu_composition : bool; + mutable jank_type : int32; + mutable prediction_type : frame_timeline_event_prediction_type; + mutable jank_severity_type : frame_timeline_event_jank_severity_type; + mutable present_delay_millis : float; + mutable jank_severity_score : float; + mutable jank_type_experimental : int32; + mutable present_type_experimental : frame_timeline_event_present_type; +} + +type frame_timeline_event_frame_end = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable cookie : int64; +} + +type frame_timeline_event = + | Expected_display_frame_start of frame_timeline_event_expected_display_frame_start + | Actual_display_frame_start of frame_timeline_event_actual_display_frame_start + | Expected_surface_frame_start of frame_timeline_event_expected_surface_frame_start + | Actual_surface_frame_start of frame_timeline_event_actual_surface_frame_start + | Frame_end of frame_timeline_event_frame_end + +type gpu_mem_total_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable gpu_id : int32; + mutable pid : int32; + mutable size : int64; +} + +type graphics_frame_event_buffer_event_type = + | Unspecified + | Dequeue + | Queue + | Post + | Acquire_fence + | Latch + | Hwc_composition_queued + | Fallback_composition + | Present_fence + | Release_fence + | Modify + | Detach + | Attach + | Cancel + +type graphics_frame_event_buffer_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable frame_number : int32; + mutable type_ : graphics_frame_event_buffer_event_type; + mutable layer_name : string; + mutable duration_ns : int64; + mutable buffer_id : int32; +} + +type graphics_frame_event = { + mutable buffer_event : graphics_frame_event_buffer_event option; +} + +type initial_display_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable display_state : int32; + mutable brightness : float; +} + +type kernel_wakelock_data_wakelock_type = + | Wakelock_type_unknown + | Wakelock_type_kernel + | Wakelock_type_native + +type kernel_wakelock_data_wakelock = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable wakelock_id : int32; + mutable wakelock_name : string; + mutable wakelock_type : kernel_wakelock_data_wakelock_type; +} + +type kernel_wakelock_data = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable wakelock : kernel_wakelock_data_wakelock list; + mutable wakelock_id : int32 list; + mutable time_held_millis : int64 list; + mutable error_flags : int64; +} + +type traffic_direction = + | Dir_unspecified + | Dir_ingress + | Dir_egress + +type network_packet_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable direction : traffic_direction; + mutable network_interface : string; + mutable length : int32; + mutable uid : int32; + mutable tag : int32; + mutable ip_proto : int32; + mutable tcp_flags : int32; + mutable local_port : int32; + mutable remote_port : int32; + mutable icmp_type : int32; + mutable icmp_code : int32; +} + +type network_packet_bundle_packet_context = + | Iid of int64 + | Ctx of network_packet_event + +and network_packet_bundle = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable packet_context : network_packet_bundle_packet_context option; + mutable packet_timestamps : int64 list; + mutable packet_lengths : int32 list; + mutable total_packets : int32; + mutable total_duration : int64; + mutable total_length : int64; +} + +type network_packet_context = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable iid : int64; + mutable ctx : network_packet_event option; +} + +type packages_list_package_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable name : string; + mutable uid : int64; + mutable debuggable : bool; + mutable profileable_from_shell : bool; + mutable version_code : int64; +} + +type packages_list = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable packages : packages_list_package_info list; + mutable parse_error : bool; + mutable read_error : bool; +} + +type pixel_modem_events = { + mutable events : bytes list; + mutable event_time_nanos : int64 list; +} + +type pixel_modem_token_database = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable database : bytes; +} + +type proto_log_message = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable message_id : int64; + mutable str_param_iids : int32 list; + mutable sint64_params : int64 list; + mutable double_params : float list; + mutable boolean_params : int32 list; + mutable stacktrace_iid : int32; +} + +type proto_log_viewer_config_message_data = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable message_id : int64; + mutable message : string; + mutable level : proto_log_level; + mutable group_id : int32; + mutable location : string; +} + +type proto_log_viewer_config_group = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable id : int32; + mutable name : string; + mutable tag : string; +} + +type proto_log_viewer_config = { + mutable messages : proto_log_viewer_config_message_data list; + mutable groups : proto_log_viewer_config_group list; +} + +type shell_transition_target = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable mode : int32; + mutable layer_id : int32; + mutable window_id : int32; + mutable flags : int32; +} + +type shell_transition = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 16 fields *) + mutable id : int32; + mutable create_time_ns : int64; + mutable send_time_ns : int64; + mutable dispatch_time_ns : int64; + mutable merge_time_ns : int64; + mutable merge_request_time_ns : int64; + mutable shell_abort_time_ns : int64; + mutable wm_abort_time_ns : int64; + mutable finish_time_ns : int64; + mutable start_transaction_id : int64; + mutable finish_transaction_id : int64; + mutable handler : int32; + mutable type_ : int32; + mutable targets : shell_transition_target list; + mutable merge_target : int32; + mutable flags : int32; + mutable starting_window_remove_time_ns : int64; +} + +type shell_handler_mapping = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable id : int32; + mutable name : string; +} + +type shell_handler_mappings = { + mutable mapping : shell_handler_mapping list; +} + +type rect_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable left : int32; + mutable top : int32; + mutable right : int32; + mutable bottom : int32; +} + +type region_proto = { + mutable rect : rect_proto list; +} + +type size_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable w : int32; + mutable h : int32; +} + +type transform_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable dsdx : float; + mutable dtdx : float; + mutable dsdy : float; + mutable dtdy : float; + mutable type_ : int32; +} + +type color_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable r : float; + mutable g : float; + mutable b : float; + mutable a : float; +} + +type input_window_info_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable layout_params_flags : int32; + mutable layout_params_type : int32; + mutable frame : rect_proto option; + mutable touchable_region : region_proto option; + mutable surface_inset : int32; + mutable visible : bool; + mutable can_receive_keys : bool; + mutable focusable : bool; + mutable has_wallpaper : bool; + mutable global_scale_factor : float; + mutable window_x_scale : float; + mutable window_y_scale : float; + mutable crop_layer_id : int32; + mutable replace_touchable_region_with_crop : bool; + mutable touchable_region_crop : rect_proto option; + mutable transform : transform_proto option; + mutable input_config : int32; +} + +type blur_region = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 18 fields *) + mutable blur_radius : int32; + mutable corner_radius_tl : int32; + mutable corner_radius_tr : int32; + mutable corner_radius_bl : int32; + mutable corner_radius_br : float; + mutable corner_radius_tlx : float; + mutable corner_radius_tly : float; + mutable corner_radius_trx : float; + mutable corner_radius_try : float; + mutable corner_radius_blx : float; + mutable corner_radius_bly : float; + mutable corner_radius_brx : float; + mutable corner_radius_bry : float; + mutable alpha : float; + mutable left : int32; + mutable top : int32; + mutable right : int32; + mutable bottom : int32; +} + +type color_transform_proto = { + mutable val_ : float list; +} + +type trusted_overlay = + | Unset + | Disabled + | Enabled + +type box_shadow_settings_box_shadow_params = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable blur_radius : float; + mutable spread_radius : float; + mutable color : int32; + mutable offset_x : float; + mutable offset_y : float; +} + +type box_shadow_settings = { + mutable box_shadows : box_shadow_settings_box_shadow_params list; +} + +type border_settings = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable stroke_width : float; + mutable color : int32; +} + +type layers_trace_file_proto_magic_number = + | Invalid + | Magic_number_l + | Magic_number_h + +type position_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable x : float; + mutable y : float; +} + +type active_buffer_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable width : int32; + mutable height : int32; + mutable stride : int32; + mutable format : int32; + mutable usage : int64; +} + +type float_rect_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable left : float; + mutable top : float; + mutable right : float; + mutable bottom : float; +} + +type hwc_composition_type = + | Hwc_type_unspecified + | Hwc_type_client + | Hwc_type_device + | Hwc_type_solid_color + | Hwc_type_cursor + | Hwc_type_sideband + | Hwc_type_display_decoration + +type barrier_layer_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable id : int32; + mutable frame_number : int64; +} + +type corner_radii_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable tl : float; + mutable tr : float; + mutable bl : float; + mutable br : float; +} + +type layer_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 32 fields *) + mutable id : int32; + mutable name : string; + mutable children : int32 list; + mutable relatives : int32 list; + mutable type_ : string; + mutable transparent_region : region_proto option; + mutable visible_region : region_proto option; + mutable damage_region : region_proto option; + mutable layer_stack : int32; + mutable z : int32; + mutable position : position_proto option; + mutable requested_position : position_proto option; + mutable size : size_proto option; + mutable crop : rect_proto option; + mutable final_crop : rect_proto option; + mutable is_opaque : bool; + mutable invalidate : bool; + mutable dataspace : string; + mutable pixel_format : string; + mutable color : color_proto option; + mutable requested_color : color_proto option; + mutable flags : int32; + mutable transform : transform_proto option; + mutable requested_transform : transform_proto option; + mutable parent : int32; + mutable z_order_relative_of : int32; + mutable active_buffer : active_buffer_proto option; + mutable queued_frames : int32; + mutable refresh_pending : bool; + mutable hwc_frame : rect_proto option; + mutable hwc_crop : float_rect_proto option; + mutable hwc_transform : int32; + mutable window_type : int32; + mutable app_id : int32; + mutable hwc_composition_type : hwc_composition_type; + mutable is_protected : bool; + mutable curr_frame : int64; + mutable barrier_layer : barrier_layer_proto list; + mutable buffer_transform : transform_proto option; + mutable effective_scaling_mode : int32; + mutable corner_radius : float; + mutable metadata : (int32 * string) list; + mutable effective_transform : transform_proto option; + mutable source_bounds : float_rect_proto option; + mutable bounds : float_rect_proto option; + mutable screen_bounds : float_rect_proto option; + mutable input_window_info : input_window_info_proto option; + mutable corner_radius_crop : float_rect_proto option; + mutable shadow_radius : float; + mutable color_transform : color_transform_proto option; + mutable is_relative_of : bool; + mutable background_blur_radius : int32; + mutable owner_uid : int32; + mutable blur_regions : blur_region list; + mutable is_trusted_overlay : bool; + mutable requested_corner_radius : float; + mutable destination_frame : rect_proto option; + mutable original_id : int32; + mutable trusted_overlay : trusted_overlay; + mutable background_blur_scale : float; + mutable corner_radii : corner_radii_proto option; + mutable requested_corner_radii : corner_radii_proto option; + mutable client_drawn_corner_radii : corner_radii_proto option; + mutable system_content_priority : int32; + mutable box_shadow_settings : box_shadow_settings option; + mutable border_settings : border_settings option; + mutable effective_radii : corner_radii_proto option; +} + +type layers_proto = { + mutable layers : layer_proto list; +} + +type display_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable id : int64; + mutable name : string; + mutable layer_stack : int32; + mutable size : size_proto option; + mutable layer_stack_space_rect : rect_proto option; + mutable transform : transform_proto option; + mutable is_virtual : bool; + mutable dpi_x : float; + mutable dpi_y : float; +} + +type layers_snapshot_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable elapsed_realtime_nanos : int64; + mutable where : string; + mutable layers : layers_proto option; + mutable hwc_blob : string; + mutable excludes_composition_state : bool; + mutable missed_entries : int32; + mutable displays : display_proto list; + mutable vsync_id : int64; +} + +type layers_trace_file_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable magic_number : int64; + mutable entry : layers_snapshot_proto list; + mutable real_to_elapsed_time_offset_nanos : int64; +} + +type transaction_trace_file_magic_number = + | Invalid + | Magic_number_l + | Magic_number_h + +type layer_state_matrix22 = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable dsdx : float; + mutable dtdx : float; + mutable dtdy : float; + mutable dsdy : float; +} + +type layer_state_color3 = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable r : float; + mutable g : float; + mutable b : float; +} + +type layer_state_buffer_data_pixel_format = + | Pixel_format_unknown + | Pixel_format_custom + | Pixel_format_translucent + | Pixel_format_transparent + | Pixel_format_opaque + | Pixel_format_rgba_8888 + | Pixel_format_rgbx_8888 + | Pixel_format_rgb_888 + | Pixel_format_rgb_565 + | Pixel_format_bgra_8888 + | Pixel_format_rgba_5551 + | Pixel_format_rgba_4444 + | Pixel_format_rgba_fp16 + | Pixel_format_rgba_1010102 + | Pixel_format_r_8 + +type layer_state_buffer_data = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable buffer_id : int64; + mutable width : int32; + mutable height : int32; + mutable frame_number : int64; + mutable flags : int32; + mutable cached_buffer_id : int64; + mutable pixel_format : layer_state_buffer_data_pixel_format; + mutable usage : int64; +} + +type transform = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable dsdx : float; + mutable dtdx : float; + mutable dtdy : float; + mutable dsdy : float; + mutable tx : float; + mutable ty : float; +} + +type layer_state_window_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable layout_params_flags : int32; + mutable layout_params_type : int32; + mutable touchable_region : region_proto option; + mutable surface_inset : int32; + mutable focusable : bool; + mutable has_wallpaper : bool; + mutable global_scale_factor : float; + mutable crop_layer_id : int32; + mutable replace_touchable_region_with_crop : bool; + mutable touchable_region_crop : rect_proto option; + mutable transform : transform option; + mutable input_config : int32; +} + +type layer_state_drop_input_mode = + | None + | All + | Obscured + +type layer_state_corner_radii = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable tl : float; + mutable tr : float; + mutable bl : float; + mutable br : float; +} + +type layer_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 35 fields *) + mutable layer_id : int32; + mutable what : int64; + mutable x : float; + mutable y : float; + mutable z : int32; + mutable w : int32; + mutable h : int32; + mutable layer_stack : int32; + mutable flags : int32; + mutable mask : int32; + mutable matrix : layer_state_matrix22 option; + mutable corner_radius : float; + mutable background_blur_radius : int32; + mutable parent_id : int32; + mutable relative_parent_id : int32; + mutable alpha : float; + mutable color : layer_state_color3 option; + mutable transparent_region : region_proto option; + mutable transform : int32; + mutable transform_to_display_inverse : bool; + mutable crop : rect_proto option; + mutable buffer_data : layer_state_buffer_data option; + mutable api : int32; + mutable has_sideband_stream : bool; + mutable color_transform : color_transform_proto option; + mutable blur_regions : blur_region list; + mutable window_info_handle : layer_state_window_info option; + mutable bg_color_alpha : float; + mutable bg_color_dataspace : int32; + mutable color_space_agnostic : bool; + mutable shadow_radius : float; + mutable frame_rate_selection_priority : int32; + mutable frame_rate : float; + mutable frame_rate_compatibility : int32; + mutable change_frame_rate_strategy : int32; + mutable fixed_transform_hint : int32; + mutable frame_number : int64; + mutable auto_refresh : bool; + mutable is_trusted_overlay : bool; + mutable buffer_crop : rect_proto option; + mutable destination_frame : rect_proto option; + mutable drop_input_mode : layer_state_drop_input_mode; + mutable trusted_overlay : trusted_overlay; + mutable background_blur_scale : float; + mutable corner_radii : layer_state_corner_radii option; + mutable client_drawn_corner_radii : layer_state_corner_radii option; + mutable system_content_priority : int32; + mutable box_shadow_settings : box_shadow_settings option; + mutable border_settings : border_settings option; +} + +type display_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable id : int32; + mutable what : int32; + mutable flags : int32; + mutable layer_stack : int32; + mutable orientation : int32; + mutable layer_stack_space_rect : rect_proto option; + mutable oriented_display_space_rect : rect_proto option; + mutable width : int32; + mutable height : int32; +} + +type transaction_barrier = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable barrier_token : string; + mutable kind : int32; +} + +type transaction_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable pid : int32; + mutable uid : int32; + mutable vsync_id : int64; + mutable input_event_id : int32; + mutable post_time : int64; + mutable transaction_id : int64; + mutable layer_changes : layer_state list; + mutable display_changes : display_state list; + mutable merged_transaction_ids : int64 list; + mutable apply_token : int64; + mutable transaction_barriers : transaction_barrier list; +} + +type layer_creation_args = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable layer_id : int32; + mutable name : string; + mutable flags : int32; + mutable parent_id : int32; + mutable mirror_from_id : int32; + mutable add_to_root : bool; + mutable layer_stack_to_mirror : int32; +} + +type display_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 10 fields *) + mutable layer_stack : int32; + mutable display_id : int32; + mutable logical_width : int32; + mutable logical_height : int32; + mutable transform_inverse : transform option; + mutable transform : transform option; + mutable receives_input : bool; + mutable is_secure : bool; + mutable is_primary : bool; + mutable is_virtual : bool; + mutable rotation_flags : int32; + mutable transform_hint : int32; +} + +type transaction_trace_entry = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable elapsed_realtime_nanos : int64; + mutable vsync_id : int64; + mutable transactions : transaction_state list; + mutable added_layers : layer_creation_args list; + mutable destroyed_layers : int32 list; + mutable added_displays : display_state list; + mutable removed_displays : int32 list; + mutable destroyed_layer_handles : int32 list; + mutable displays_changed : bool; + mutable displays : display_info list; +} + +type transaction_trace_file = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable magic_number : int64; + mutable entry : transaction_trace_entry list; + mutable real_to_elapsed_time_offset_nanos : int64; + mutable version : int32; +} + +type layer_state_changes_lsb = + | E_changes_lsb_none + | E_position_changed + | E_layer_changed + | E_alpha_changed + | E_matrix_changed + | E_transparent_region_changed + | E_flags_changed + | E_layer_stack_changed + | E_release_buffer_listener_changed + | E_shadow_radius_changed + | E_buffer_crop_changed + | E_relative_layer_changed + | E_reparent + | E_color_changed + | E_buffer_transform_changed + | E_transform_to_display_inverse_changed + | E_crop_changed + | E_buffer_changed + | E_acquire_fence_changed + | E_dataspace_changed + | E_hdr_metadata_changed + | E_surface_damage_region_changed + | E_api_changed + | E_sideband_stream_changed + | E_color_transform_changed + | E_has_listener_callbacks_changed + | E_input_info_changed + | E_corner_radius_changed + +type layer_state_changes_msb = + | E_changes_msb_none + | E_destination_frame_changed + | E_cached_buffer_changed + | E_background_color_changed + | E_metadata_changed + | E_color_space_agnostic_changed + | E_frame_rate_selection_priority + | E_frame_rate_changed + | E_background_blur_radius_changed + | E_producer_disconnect + | E_fixed_transform_hint_changed + | E_frame_number_changed + | E_blur_regions_changed + | E_auto_refresh_changed + | E_stretch_changed + | E_trusted_overlay_changed + | E_drop_input_mode_changed + | E_client_drawn_corner_radius_changed + | E_system_content_priority_changed + | E_box_shadow_settings_changed + | E_border_settings_changed + +type layer_state_flags = + | E_flags_none + | E_layer_hidden + | E_layer_opaque + | E_layer_skip_screenshot + | E_layer_secure + | E_enable_backpressure + | E_layer_is_display_decoration + +type layer_state_buffer_data_buffer_data_change = + | Buffer_data_change_none + | Fence_changed + | Frame_number_changed + | Cached_buffer_changed + +type display_state_changes = + | E_changes_none + | E_surface_changed + | E_layer_stack_changed + | E_display_projection_changed + | E_display_size_changed + | E_flags_changed + +type winscope_extensions = unit + +type chrome_benchmark_metadata = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable benchmark_start_time_us : int64; + mutable story_run_time_us : int64; + mutable benchmark_name : string; + mutable benchmark_description : string; + mutable label : string; + mutable story_name : string; + mutable story_tags : string list; + mutable story_run_index : int32; + mutable had_failures : bool; +} + +type chrome_metadata_packet_finch_hash = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : int32; + mutable group : int32; +} + +type background_tracing_metadata_trigger_rule_trigger_type = + | Trigger_unspecified + | Monitor_and_dump_when_specific_histogram_and_value + | Monitor_and_dump_when_trigger_named + +type background_tracing_metadata_trigger_rule_histogram_rule = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable histogram_name_hash : int64; + mutable histogram_min_trigger : int64; + mutable histogram_max_trigger : int64; +} + +type background_tracing_metadata_trigger_rule_named_rule_event_type = + | Unspecified + | Session_restore + | Navigation + | Startup + | Reached_code + | Content_trigger + | Test_rule + +type background_tracing_metadata_trigger_rule_named_rule = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable event_type : background_tracing_metadata_trigger_rule_named_rule_event_type; + mutable content_trigger_name_hash : int64; +} + +type background_tracing_metadata_trigger_rule = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable trigger_type : background_tracing_metadata_trigger_rule_trigger_type; + mutable histogram_rule : background_tracing_metadata_trigger_rule_histogram_rule option; + mutable named_rule : background_tracing_metadata_trigger_rule_named_rule option; + mutable name_hash : int32; +} + +type background_tracing_metadata = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable triggered_rule : background_tracing_metadata_trigger_rule option; + mutable active_rules : background_tracing_metadata_trigger_rule list; + mutable scenario_name_hash : int32; +} + +type chrome_metadata_packet = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable background_tracing_metadata : background_tracing_metadata option; + mutable chrome_version_code : int32; + mutable enabled_categories : string; + mutable field_trial_hashes : chrome_metadata_packet_finch_hash list; +} + +type chrome_traced_value_nested_type = + | Dict + | Array + +type chrome_traced_value = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable nested_type : chrome_traced_value_nested_type; + mutable dict_keys : string list; + mutable dict_values : chrome_traced_value list; + mutable array_values : chrome_traced_value list; + mutable int_value : int32; + mutable double_value : float; + mutable bool_value : bool; + mutable string_value : string; +} + +type chrome_string_table_entry = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable value : string; + mutable index : int32; +} + +type chrome_trace_event_arg_value = + | Bool_value of bool + | Uint_value of int64 + | Int_value of int64 + | Double_value of float + | String_value of string + | Pointer_value of int64 + | Json_value of string + | Traced_value of chrome_traced_value + +and chrome_trace_event_arg = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable value : chrome_trace_event_arg_value option; + mutable name_index : int32; +} + +type chrome_trace_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 15 fields *) + mutable name : string; + mutable timestamp : int64; + mutable phase : int32; + mutable thread_id : int32; + mutable duration : int64; + mutable thread_duration : int64; + mutable scope : string; + mutable id : int64; + mutable flags : int32; + mutable category_group_name : string; + mutable process_id : int32; + mutable thread_timestamp : int64; + mutable bind_id : int64; + mutable args : chrome_trace_event_arg list; + mutable name_index : int32; + mutable category_group_name_index : int32; +} + +type chrome_metadata_value = + | String_value of string + | Bool_value of bool + | Int_value of int64 + | Json_value of string + +and chrome_metadata = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable value : chrome_metadata_value option; +} + +type chrome_legacy_json_trace_trace_type = + | User_trace + | System_trace + +type chrome_legacy_json_trace = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable type_ : chrome_legacy_json_trace_trace_type; + mutable data : string; +} + +type chrome_event_bundle = { + mutable trace_events : chrome_trace_event list; + mutable metadata : chrome_metadata list; + mutable legacy_ftrace_output : string list; + mutable legacy_json_trace : chrome_legacy_json_trace list; + mutable string_table : chrome_string_table_entry list; +} + +type chrome_trigger = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable trigger_name : string; + mutable trigger_name_hash : int32; + mutable flow_id : int64; +} + +type v8_string = + | Latin1 of bytes + | Utf16_le of bytes + | Utf16_be of bytes + +type interned_v8_string_encoded_string = + | Latin1 of bytes + | Utf16_le of bytes + | Utf16_be of bytes + +and interned_v8_string = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable iid : int64; + mutable encoded_string : interned_v8_string_encoded_string option; +} + +type interned_v8_js_script_type = + | Type_unknown + | Type_normal + | Type_eval + | Type_module + | Type_native + | Type_extension + | Type_inspector + +type interned_v8_js_script = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable iid : int64; + mutable script_id : int32; + mutable type_ : interned_v8_js_script_type; + mutable name : v8_string option; + mutable source : v8_string option; +} + +type interned_v8_wasm_script = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable iid : int64; + mutable script_id : int32; + mutable url : string; + mutable wire_bytes : bytes; +} + +type interned_v8_js_function_kind = + | Kind_unknown + | Kind_normal_function + | Kind_module + | Kind_async_module + | Kind_base_constructor + | Kind_default_base_constructor + | Kind_default_derived_constructor + | Kind_derived_constructor + | Kind_getter_function + | Kind_static_getter_function + | Kind_setter_function + | Kind_static_setter_function + | Kind_arrow_function + | Kind_async_arrow_function + | Kind_async_function + | Kind_async_concise_method + | Kind_static_async_concise_method + | Kind_async_concise_generator_method + | Kind_static_async_concise_generator_method + | Kind_async_generator_function + | Kind_generator_function + | Kind_concise_generator_method + | Kind_static_concise_generator_method + | Kind_concise_method + | Kind_static_concise_method + | Kind_class_members_initializer_function + | Kind_class_static_initializer_function + | Kind_invalid + +type interned_v8_js_function = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable iid : int64; + mutable v8_js_function_name_iid : int64; + mutable v8_js_script_iid : int64; + mutable is_toplevel : bool; + mutable kind : interned_v8_js_function_kind; + mutable byte_offset : int32; + mutable line : int32; + mutable column : int32; +} + +type interned_v8_isolate_code_range = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable base_address : int64; + mutable size : int64; + mutable embedded_blob_code_copy_start_address : int64; + mutable is_process_wide : bool; +} + +type interned_v8_isolate = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable iid : int64; + mutable pid : int32; + mutable isolate_id : int32; + mutable code_range : interned_v8_isolate_code_range option; + mutable embedded_blob_code_start_address : int64; + mutable embedded_blob_code_size : int64; +} + +type v8_js_code_tier = + | Tier_unknown + | Tier_ignition + | Tier_sparkplug + | Tier_maglev + | Tier_turboshaft + | Tier_turbofan + +type v8_js_code_instructions = + | Machine_code of bytes + | Bytecode of bytes + +and v8_js_code = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable v8_isolate_iid : int64; + mutable tid : int32; + mutable v8_js_function_iid : int64; + mutable tier : v8_js_code_tier; + mutable instruction_start : int64; + mutable instruction_size_bytes : int64; + mutable instructions : v8_js_code_instructions option; +} + +type v8_internal_code_type = + | Type_unknown + | Type_bytecode_handler + | Type_for_testing + | Type_builtin + | Type_wasm_function + | Type_wasm_to_capi_function + | Type_wasm_to_js_function + | Type_js_to_wasm_function + | Type_js_to_js_function + | Type_c_wasm_entry + +type v8_internal_code = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable v8_isolate_iid : int64; + mutable tid : int32; + mutable name : string; + mutable type_ : v8_internal_code_type; + mutable builtin_id : int32; + mutable instruction_start : int64; + mutable instruction_size_bytes : int64; + mutable machine_code : bytes; +} + +type v8_wasm_code_tier = + | Tier_unknown + | Tier_liftoff + | Tier_turbofan + +type v8_wasm_code = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable v8_isolate_iid : int64; + mutable tid : int32; + mutable v8_wasm_script_iid : int64; + mutable function_name : string; + mutable tier : v8_wasm_code_tier; + mutable code_offset_in_module : int32; + mutable instruction_start : int64; + mutable instruction_size_bytes : int64; + mutable machine_code : bytes; +} + +type v8_reg_exp_code = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable v8_isolate_iid : int64; + mutable tid : int32; + mutable pattern : v8_string option; + mutable instruction_start : int64; + mutable instruction_size_bytes : int64; + mutable machine_code : bytes; +} + +type v8_code_move_to_instructions = + | To_machine_code of bytes + | To_bytecode of bytes + +and v8_code_move = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable isolate_iid : int64; + mutable tid : int32; + mutable from_instruction_start_address : int64; + mutable to_instruction_start_address : int64; + mutable instruction_size_bytes : int64; + mutable to_instructions : v8_code_move_to_instructions option; +} + +type v8_code_defaults = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable tid : int32; +} + +type clock_snapshot_clock_builtin_clocks = + | Unknown + | Realtime + | Realtime_coarse + | Monotonic + | Monotonic_coarse + | Monotonic_raw + | Boottime + | Builtin_clock_max_id + +type clock_snapshot_clock = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable clock_id : int32; + mutable timestamp : int64; + mutable is_incremental : bool; + mutable unit_multiplier_ns : int64; +} + +type clock_snapshot = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable clocks : clock_snapshot_clock list; + mutable primary_trace_clock : builtin_clock; +} + +type cswitch_etw_event_old_thread_wait_reason = + | Executive + | Free_page + | Page_in + | Pool_allocation + | Delay_execution + | Suspend + | User_request + | Wr_executive + | Wr_free_page + | Wr_page_in + | Wr_pool_allocation + | Wr_delay_execution + | Wr_suspended + | Wr_user_request + | Wr_event_pair + | Wr_queue + | Wr_lpc_receiver + | Wr_lpc_reply + | Wr_virtual_memory + | Wr_page_out + | Wr_rendez_vous + | Wr_keyed_event + | Wr_terminated + | Wr_process_in_swap + | Wr_cpu_rate_control + | Wr_callout_stack + | Wr_kernel + | Wr_resource + | Wr_push_lock + | Wr_mutex + | Wr_quantum_end + | Wr_dispatch_int + | Wr_preempted + | Wr_yield_execution + | Wr_fast_mutex + | Wr_guard_mutex + | Wr_rundown + | Maximum_wait_reason + +type cswitch_etw_event_old_thread_wait_mode = + | Kernel_mode + | User_mode + +type cswitch_etw_event_old_thread_state = + | Initialized + | Ready + | Running + | Standby + | Terminated + | Waiting + | Transition + | Deferred_ready + +type cswitch_etw_event_old_thread_wait_reason_enum_or_int = + | Old_thread_wait_reason of cswitch_etw_event_old_thread_wait_reason + | Old_thread_wait_reason_int of int32 + +and cswitch_etw_event_old_thread_wait_mode_enum_or_int = + | Old_thread_wait_mode of cswitch_etw_event_old_thread_wait_mode + | Old_thread_wait_mode_int of int32 + +and cswitch_etw_event_old_thread_state_enum_or_int = + | Old_thread_state of cswitch_etw_event_old_thread_state + | Old_thread_state_int of int32 + +and cswitch_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable new_thread_id : int32; + mutable old_thread_id : int32; + mutable new_thread_priority : int32; + mutable old_thread_priority : int32; + mutable previous_c_state : int32; + mutable old_thread_wait_reason_enum_or_int : cswitch_etw_event_old_thread_wait_reason_enum_or_int option; + mutable old_thread_wait_mode_enum_or_int : cswitch_etw_event_old_thread_wait_mode_enum_or_int option; + mutable old_thread_state_enum_or_int : cswitch_etw_event_old_thread_state_enum_or_int option; + mutable old_thread_wait_ideal_processor : int32; + mutable new_thread_wait_time : int32; +} + +type ready_thread_etw_event_adjust_reason = + | Ignore_the_increment + | Apply_increment + | Apply_increment_boost + +type ready_thread_etw_event_trace_flag = + | Trace_flag_unspecified + | Thread_readied + | Kernel_stack_swapped_out + | Process_address_swapped_out + +type ready_thread_etw_event_adjust_reason_enum_or_int = + | Adjust_reason of ready_thread_etw_event_adjust_reason + | Adjust_reason_int of int32 + +and ready_thread_etw_event_flag_enum_or_int = + | Flag of ready_thread_etw_event_trace_flag + | Flag_int of int32 + +and ready_thread_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable t_thread_id : int32; + mutable adjust_reason_enum_or_int : ready_thread_etw_event_adjust_reason_enum_or_int option; + mutable adjust_increment : int32; + mutable flag_enum_or_int : ready_thread_etw_event_flag_enum_or_int option; +} + +type mem_info_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable priority_levels : int32; + mutable zero_page_count : int64; + mutable free_page_count : int64; + mutable modified_page_count : int64; + mutable modified_no_write_page_count : int64; + mutable bad_page_count : int64; + mutable standby_page_counts : int64 list; + mutable repurposed_page_counts : int64 list; + mutable modified_page_count_page_file : int64; + mutable paged_pool_page_count : int64; + mutable non_paged_pool_page_count : int64; + mutable mdl_page_count : int64; + mutable commit_page_count : int64; +} + +type file_io_create_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable irp_ptr : int64; + mutable file_object : int64; + mutable ttid : int32; + mutable create_options : int32; + mutable file_attributes : int32; + mutable share_access : int32; + mutable open_path : string; +} + +type file_io_dir_enum_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable irp_ptr : int64; + mutable file_object : int64; + mutable file_key : int64; + mutable ttid : int32; + mutable length : int32; + mutable info_class : int32; + mutable file_index : int32; + mutable file_name : string; +} + +type file_io_info_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable irp_ptr : int64; + mutable file_object : int64; + mutable file_key : int64; + mutable extra_info : int64; + mutable ttid : int32; + mutable info_class : int32; +} + +type file_io_read_write_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable offset : int64; + mutable irp_ptr : int64; + mutable file_object : int64; + mutable file_key : int64; + mutable ttid : int32; + mutable io_size : int32; + mutable io_flags : int32; +} + +type file_io_simple_op_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable irp_ptr : int64; + mutable file_object : int64; + mutable file_key : int64; + mutable ttid : int32; +} + +type file_io_op_end_etw_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable irp_ptr : int64; + mutable extra_info : int64; + mutable nt_status : int32; +} + +type etw_trace_event_event = + | C_switch of cswitch_etw_event + | Ready_thread of ready_thread_etw_event + | Mem_info of mem_info_etw_event + | File_io_create of file_io_create_etw_event + | File_io_dir_enum of file_io_dir_enum_etw_event + | File_io_info of file_io_info_etw_event + | File_io_read_write of file_io_read_write_etw_event + | File_io_simple_op of file_io_simple_op_etw_event + | File_io_op_end of file_io_op_end_etw_event + +and etw_trace_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable timestamp : int64; + mutable cpu : int32; + mutable thread_id : int32; + mutable event : etw_trace_event_event option; +} + +type etw_trace_event_bundle = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable cpu : int32; + mutable event : etw_trace_event list; +} + +type evdev_event_input_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable kernel_timestamp : int64; + mutable type_ : int32; + mutable code : int32; + mutable value : int32; +} + +type evdev_event_event = + | Input_event of evdev_event_input_event + +and evdev_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable device_id : int32; + mutable event : evdev_event_event option; +} + +type field_descriptor_proto_label = + | Label_optional + | Label_required + | Label_repeated + +type field_descriptor_proto_type = + | Type_double + | Type_float + | Type_int64 + | Type_uint64 + | Type_int32 + | Type_fixed64 + | Type_fixed32 + | Type_bool + | Type_string + | Type_group + | Type_message + | Type_bytes + | Type_uint32 + | Type_enum + | Type_sfixed32 + | Type_sfixed64 + | Type_sint32 + | Type_sint64 + +type uninterpreted_option_name_part = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name_part : string; + mutable is_extension : bool; +} + +type uninterpreted_option = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable name : uninterpreted_option_name_part list; + mutable identifier_value : string; + mutable positive_int_value : int64; + mutable negative_int_value : int64; + mutable double_value : float; + mutable string_value : bytes; + mutable aggregate_value : string; +} + +type field_options = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable packed : bool; + mutable uninterpreted_option : uninterpreted_option list; +} + +type field_descriptor_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable name : string; + mutable number : int32; + mutable label : field_descriptor_proto_label; + mutable type_ : field_descriptor_proto_type; + mutable type_name : string; + mutable extendee : string; + mutable default_value : string; + mutable options : field_options option; + mutable oneof_index : int32; +} + +type enum_value_descriptor_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable number : int32; +} + +type enum_descriptor_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable value : enum_value_descriptor_proto list; + mutable reserved_name : string list; +} + +type oneof_options = unit + +type oneof_descriptor_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable options : unit; +} + +type descriptor_proto_reserved_range = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable start : int32; + mutable end_ : int32; +} + +type descriptor_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable field : field_descriptor_proto list; + mutable extension : field_descriptor_proto list; + mutable nested_type : descriptor_proto list; + mutable enum_type : enum_descriptor_proto list; + mutable oneof_decl : oneof_descriptor_proto list; + mutable reserved_range : descriptor_proto_reserved_range list; + mutable reserved_name : string list; +} + +type file_descriptor_proto = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable package : string; + mutable dependency : string list; + mutable public_dependency : int32 list; + mutable weak_dependency : int32 list; + mutable message_type : descriptor_proto list; + mutable enum_type : enum_descriptor_proto list; + mutable extension : field_descriptor_proto list; +} + +type file_descriptor_set = { + mutable file : file_descriptor_proto list; +} + +type extension_descriptor = { + mutable extension_set : file_descriptor_set option; +} + +type inode_file_map_entry_type = + | Unknown + | File + | Directory + +type inode_file_map_entry = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable inode_number : int64; + mutable paths : string list; + mutable type_ : inode_file_map_entry_type; +} + +type inode_file_map = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable block_device_id : int64; + mutable mount_points : string list; + mutable entries : inode_file_map_entry list; +} + +type generic_kernel_cpu_frequency_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable cpu : int32; + mutable freq_hz : int64; +} + +type generic_kernel_task_state_event_task_state_enum = + | Task_state_unknown + | Task_state_created + | Task_state_runnable + | Task_state_running + | Task_state_interruptible_sleep + | Task_state_uninterruptible_sleep + | Task_state_stopped + | Task_state_dead + | Task_state_destroyed + +type generic_kernel_task_state_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable cpu : int32; + mutable comm : string; + mutable tid : int64; + mutable state : generic_kernel_task_state_event_task_state_enum; + mutable prio : int32; +} + +type generic_kernel_task_rename_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable tid : int64; + mutable comm : string; +} + +type generic_kernel_process_tree_thread = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable tid : int64; + mutable pid : int64; + mutable comm : string; + mutable is_main_thread : bool; +} + +type generic_kernel_process_tree_process = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable pid : int64; + mutable ppid : int64; + mutable cmdline : string; +} + +type generic_kernel_process_tree = { + mutable processes : generic_kernel_process_tree_process list; + mutable threads : generic_kernel_process_tree_thread list; +} + +type gpu_counter_event_gpu_counter_value = + | Int_value of int64 + | Double_value of float + +and gpu_counter_event_gpu_counter = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable counter_id : int32; + mutable value : gpu_counter_event_gpu_counter_value option; +} + +type gpu_counter_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable counter_descriptor : gpu_counter_descriptor option; + mutable counters : gpu_counter_event_gpu_counter list; + mutable gpu_id : int32; +} + +type gpu_log_severity = + | Log_severity_unspecified + | Log_severity_verbose + | Log_severity_debug + | Log_severity_info + | Log_severity_warning + | Log_severity_error + +type gpu_log = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable severity : gpu_log_severity; + mutable tag : string; + mutable log_message : string; +} + +type gpu_render_stage_event_extra_data = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable value : string; +} + +type gpu_render_stage_event_specifications_context_spec = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable context : int64; + mutable pid : int32; +} + +type gpu_render_stage_event_specifications_description = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable description : string; +} + +type gpu_render_stage_event_specifications = { + mutable context_spec : gpu_render_stage_event_specifications_context_spec option; + mutable hw_queue : gpu_render_stage_event_specifications_description list; + mutable stage : gpu_render_stage_event_specifications_description list; +} + +type gpu_render_stage_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable event_id : int64; + mutable duration : int64; + mutable hw_queue_iid : int64; + mutable stage_iid : int64; + mutable gpu_id : int32; + mutable context : int64; + mutable render_target_handle : int64; + mutable submission_id : int32; + mutable extra_data : gpu_render_stage_event_extra_data list; + mutable render_pass_handle : int64; + mutable render_pass_instance_id : int64; + mutable render_subpass_index_mask : int64 list; + mutable command_buffer_handle : int64; + mutable specifications : gpu_render_stage_event_specifications option; + mutable hw_queue_id : int32; + mutable stage_id : int32; +} + +type interned_graphics_context_api = + | Undefined + | Open_gl + | Vulkan + | Open_cl + +type interned_graphics_context = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable iid : int64; + mutable pid : int32; + mutable api : interned_graphics_context_api; +} + +type interned_gpu_render_stage_specification_render_stage_category = + | Other + | Graphics + | Compute + +type interned_gpu_render_stage_specification = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable iid : int64; + mutable name : string; + mutable description : string; + mutable category : interned_gpu_render_stage_specification_render_stage_category; +} + +type vulkan_api_event_vk_debug_utils_object_name = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable pid : int32; + mutable vk_device : int64; + mutable object_type : int32; + mutable object_ : int64; + mutable object_name : string; +} + +type vulkan_api_event_vk_queue_submit = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable duration_ns : int64; + mutable pid : int32; + mutable tid : int32; + mutable vk_queue : int64; + mutable vk_command_buffers : int64 list; + mutable submission_id : int32; +} + +type vulkan_api_event = + | Vk_debug_utils_object_name of vulkan_api_event_vk_debug_utils_object_name + | Vk_queue_submit of vulkan_api_event_vk_queue_submit + +type vulkan_memory_event_annotation_value = + | Int_value of int64 + | Double_value of float + | String_iid of int64 + +and vulkan_memory_event_annotation = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable key_iid : int64; + mutable value : vulkan_memory_event_annotation_value option; +} + +type vulkan_memory_event_source = + | Source_unspecified + | Source_driver + | Source_device + | Source_device_memory + | Source_buffer + | Source_image + +type vulkan_memory_event_operation = + | Op_unspecified + | Op_create + | Op_destroy + | Op_bind + | Op_destroy_bound + | Op_annotations + +type vulkan_memory_event_allocation_scope = + | Scope_unspecified + | Scope_command + | Scope_object + | Scope_cache + | Scope_device + | Scope_instance + +type vulkan_memory_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable source : vulkan_memory_event_source; + mutable operation : vulkan_memory_event_operation; + mutable timestamp : int64; + mutable pid : int32; + mutable memory_address : int64; + mutable memory_size : int64; + mutable caller_iid : int64; + mutable allocation_scope : vulkan_memory_event_allocation_scope; + mutable annotations : vulkan_memory_event_annotation list; + mutable device : int64; + mutable device_memory : int64; + mutable memory_type : int32; + mutable heap : int32; + mutable object_handle : int64; +} + +type interned_string = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable str : bytes; +} + +type line = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable function_name : string; + mutable source_file_name : string; + mutable line_number : int32; +} + +type address_symbols = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable address : int64; + mutable lines : line list; +} + +type module_symbols = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable path : string; + mutable build_id : string; + mutable address_symbols : address_symbols list; +} + +type mapping = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable iid : int64; + mutable build_id : int64; + mutable exact_offset : int64; + mutable start_offset : int64; + mutable start : int64; + mutable end_ : int64; + mutable load_bias : int64; + mutable path_string_ids : int64 list; +} + +type frame = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable iid : int64; + mutable function_name_id : int64; + mutable mapping_id : int64; + mutable rel_pc : int64; + mutable source_path_iid : int64; + mutable line_number : int32; +} + +type callstack = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable iid : int64; + mutable frame_ids : int64 list; +} + +type histogram_name = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type chrome_histogram_sample = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable name_hash : int64; + mutable name : string; + mutable sample : int64; + mutable name_iid : int64; +} + +type debug_annotation_nested_value_nested_type = + | Unspecified + | Dict + | Array + +type debug_annotation_nested_value = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable nested_type : debug_annotation_nested_value_nested_type; + mutable dict_keys : string list; + mutable dict_values : debug_annotation_nested_value list; + mutable array_values : debug_annotation_nested_value list; + mutable int_value : int64; + mutable double_value : float; + mutable bool_value : bool; + mutable string_value : string; +} + +type debug_annotation_name_field = + | Name_iid of int64 + | Name of string + +and debug_annotation_value = + | Bool_value of bool + | Uint_value of int64 + | Int_value of int64 + | Double_value of float + | Pointer_value of int64 + | Nested_value of debug_annotation_nested_value + | Legacy_json_value of string + | String_value of string + | String_value_iid of int64 + +and debug_annotation_proto_type_descriptor = + | Proto_type_name of string + | Proto_type_name_iid of int64 + +and debug_annotation = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name_field : debug_annotation_name_field option; + mutable value : debug_annotation_value option; + mutable proto_type_descriptor : debug_annotation_proto_type_descriptor option; + mutable proto_value : bytes; + mutable dict_entries : debug_annotation list; + mutable array_values : debug_annotation list; +} + +type debug_annotation_name = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type debug_annotation_value_type_name = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type log_message_priority = + | Prio_unspecified + | Prio_unused + | Prio_verbose + | Prio_debug + | Prio_info + | Prio_warn + | Prio_error + | Prio_fatal + +type log_message = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable source_location_iid : int64; + mutable body_iid : int64; + mutable prio : log_message_priority; +} + +type log_message_body = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable body : string; +} + +type unsymbolized_source_location = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable iid : int64; + mutable mapping_id : int64; + mutable rel_pc : int64; +} + +type source_location = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable iid : int64; + mutable file_name : string; + mutable function_name : string; + mutable line_number : int32; +} + +type chrome_active_processes = { + mutable pid : int32 list; +} + +type chrome_application_state_info_chrome_application_state = + | Application_state_unknown + | Application_state_has_running_activities + | Application_state_has_paused_activities + | Application_state_has_stopped_activities + | Application_state_has_destroyed_activities + +type chrome_application_state_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable application_state : chrome_application_state_info_chrome_application_state; +} + +type chrome_compositor_scheduler_action = + | Cc_scheduler_action_unspecified + | Cc_scheduler_action_none + | Cc_scheduler_action_send_begin_main_frame + | Cc_scheduler_action_commit + | Cc_scheduler_action_activate_sync_tree + | Cc_scheduler_action_draw_if_possible + | Cc_scheduler_action_draw_forced + | Cc_scheduler_action_draw_abort + | Cc_scheduler_action_begin_layer_tree_frame_sink_creation + | Cc_scheduler_action_prepare_tiles + | Cc_scheduler_action_invalidate_layer_tree_frame_sink + | Cc_scheduler_action_perform_impl_side_invalidation + | Cc_scheduler_action_notify_begin_main_frame_not_expected_until + | Cc_scheduler_action_notify_begin_main_frame_not_expected_soon + +type chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode = + | Deadline_mode_unspecified + | Deadline_mode_none + | Deadline_mode_immediate + | Deadline_mode_regular + | Deadline_mode_late + | Deadline_mode_blocked + +type chrome_compositor_state_machine_major_state_begin_impl_frame_state = + | Begin_impl_frame_unspecified + | Begin_impl_frame_idle + | Begin_impl_frame_inside_begin_frame + | Begin_impl_frame_inside_deadline + +type chrome_compositor_state_machine_major_state_begin_main_frame_state = + | Begin_main_frame_unspecified + | Begin_main_frame_idle + | Begin_main_frame_sent + | Begin_main_frame_ready_to_commit + +type chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state = + | Layer_tree_frame_unspecified + | Layer_tree_frame_none + | Layer_tree_frame_active + | Layer_tree_frame_creating + | Layer_tree_frame_waiting_for_first_commit + | Layer_tree_frame_waiting_for_first_activation + +type chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state = + | Forced_redraw_unspecified + | Forced_redraw_idle + | Forced_redraw_waiting_for_commit + | Forced_redraw_waiting_for_activation + | Forced_redraw_waiting_for_draw + +type chrome_compositor_state_machine_major_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable next_action : chrome_compositor_scheduler_action; + mutable begin_impl_frame_state : chrome_compositor_state_machine_major_state_begin_impl_frame_state; + mutable begin_main_frame_state : chrome_compositor_state_machine_major_state_begin_main_frame_state; + mutable layer_tree_frame_sink_state : chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state; + mutable forced_redraw_state : chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state; +} + +type chrome_compositor_state_machine_minor_state_tree_priority = + | Tree_priority_unspecified + | Tree_priority_same_priority_for_both_trees + | Tree_priority_smoothness_takes_priority + | Tree_priority_new_content_takes_priority + +type chrome_compositor_state_machine_minor_state_scroll_handler_state = + | Scroll_handler_unspecified + | Scroll_affects_scroll_handler + | Scroll_does_not_affect_scroll_handler + +type chrome_compositor_state_machine_minor_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 45 fields *) + mutable commit_count : int32; + mutable current_frame_number : int32; + mutable last_frame_number_submit_performed : int32; + mutable last_frame_number_draw_performed : int32; + mutable last_frame_number_begin_main_frame_sent : int32; + mutable did_draw : bool; + mutable did_send_begin_main_frame_for_current_frame : bool; + mutable did_notify_begin_main_frame_not_expected_until : bool; + mutable did_notify_begin_main_frame_not_expected_soon : bool; + mutable wants_begin_main_frame_not_expected : bool; + mutable did_commit_during_frame : bool; + mutable did_invalidate_layer_tree_frame_sink : bool; + mutable did_perform_impl_side_invalidaion : bool; + mutable did_prepare_tiles : bool; + mutable consecutive_checkerboard_animations : int32; + mutable pending_submit_frames : int32; + mutable submit_frames_with_current_layer_tree_frame_sink : int32; + mutable needs_redraw : bool; + mutable needs_prepare_tiles : bool; + mutable needs_begin_main_frame : bool; + mutable needs_one_begin_impl_frame : bool; + mutable visible : bool; + mutable begin_frame_source_paused : bool; + mutable can_draw : bool; + mutable resourceless_draw : bool; + mutable has_pending_tree : bool; + mutable pending_tree_is_ready_for_activation : bool; + mutable active_tree_needs_first_draw : bool; + mutable active_tree_is_ready_to_draw : bool; + mutable did_create_and_initialize_first_layer_tree_frame_sink : bool; + mutable tree_priority : chrome_compositor_state_machine_minor_state_tree_priority; + mutable scroll_handler_state : chrome_compositor_state_machine_minor_state_scroll_handler_state; + mutable critical_begin_main_frame_to_activate_is_fast : bool; + mutable main_thread_missed_last_deadline : bool; + mutable video_needs_begin_frames : bool; + mutable defer_begin_main_frame : bool; + mutable last_commit_had_no_updates : bool; + mutable did_draw_in_last_frame : bool; + mutable did_submit_in_last_frame : bool; + mutable needs_impl_side_invalidation : bool; + mutable current_pending_tree_is_impl_side : bool; + mutable previous_pending_tree_was_impl_side : bool; + mutable processing_animation_worklets_for_active_tree : bool; + mutable processing_animation_worklets_for_pending_tree : bool; + mutable processing_paint_worklets_for_pending_tree : bool; +} + +type chrome_compositor_state_machine = { + mutable major_state : chrome_compositor_state_machine_major_state option; + mutable minor_state : chrome_compositor_state_machine_minor_state option; +} + +type begin_impl_frame_args_state = + | Begin_frame_finished + | Begin_frame_using + +type begin_frame_args_begin_frame_args_type = + | Begin_frame_args_type_unspecified + | Begin_frame_args_type_invalid + | Begin_frame_args_type_normal + | Begin_frame_args_type_missed + +type begin_frame_args_created_from = + | Source_location_iid of int64 + | Source_location of source_location + +and begin_frame_args = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable type_ : begin_frame_args_begin_frame_args_type; + mutable source_id : int64; + mutable sequence_number : int64; + mutable frame_time_us : int64; + mutable deadline_us : int64; + mutable interval_delta_us : int64; + mutable on_critical_path : bool; + mutable animate_only : bool; + mutable created_from : begin_frame_args_created_from option; + mutable frames_throttled_since_last : int64; +} + +type begin_impl_frame_args_timestamps_in_us = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable interval_delta : int64; + mutable now_to_deadline_delta : int64; + mutable frame_time_to_now_delta : int64; + mutable frame_time_to_deadline_delta : int64; + mutable now : int64; + mutable frame_time : int64; + mutable deadline : int64; +} + +type begin_impl_frame_args_args = + | Current_args of begin_frame_args + | Last_args of begin_frame_args + +and begin_impl_frame_args = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable updated_at_us : int64; + mutable finished_at_us : int64; + mutable state : begin_impl_frame_args_state; + mutable args : begin_impl_frame_args_args option; + mutable timestamps_in_us : begin_impl_frame_args_timestamps_in_us option; +} + +type begin_frame_observer_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable dropped_begin_frame_args : int64; + mutable last_begin_frame_args : begin_frame_args option; +} + +type begin_frame_source_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable source_id : int32; + mutable paused : bool; + mutable num_observers : int32; + mutable last_begin_frame_args : begin_frame_args option; +} + +type compositor_timing_history = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable begin_main_frame_queue_critical_estimate_delta_us : int64; + mutable begin_main_frame_queue_not_critical_estimate_delta_us : int64; + mutable begin_main_frame_start_to_ready_to_commit_estimate_delta_us : int64; + mutable commit_to_ready_to_activate_estimate_delta_us : int64; + mutable prepare_tiles_estimate_delta_us : int64; + mutable activate_estimate_delta_us : int64; + mutable draw_estimate_delta_us : int64; +} + +type chrome_compositor_scheduler_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable state_machine : chrome_compositor_state_machine option; + mutable observing_begin_frame_source : bool; + mutable begin_impl_frame_deadline_task : bool; + mutable pending_begin_frame_task : bool; + mutable skipped_last_frame_missed_exceeded_deadline : bool; + mutable inside_action : chrome_compositor_scheduler_action; + mutable deadline_mode : chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode; + mutable deadline_us : int64; + mutable deadline_scheduled_at_us : int64; + mutable now_us : int64; + mutable now_to_deadline_delta_us : int64; + mutable now_to_deadline_scheduled_at_delta_us : int64; + mutable begin_impl_frame_args : begin_impl_frame_args option; + mutable begin_frame_observer_state : begin_frame_observer_state option; + mutable begin_frame_source_state : begin_frame_source_state option; + mutable compositor_timing_history : compositor_timing_history option; +} + +type chrome_content_settings_event_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable number_of_exceptions : int32; +} + +type chrome_frame_reporter_state = + | State_no_update_desired + | State_presented_all + | State_presented_partial + | State_dropped + +type chrome_frame_reporter_frame_drop_reason = + | Reason_unspecified + | Reason_display_compositor + | Reason_main_thread + | Reason_client_compositor + +type chrome_frame_reporter_scroll_state = + | Scroll_none + | Scroll_main_thread + | Scroll_compositor_thread + | Scroll_raster + | Scroll_unknown + +type chrome_frame_reporter_frame_type = + | Forked + | Backfill + +type chrome_frame_reporter = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 17 fields *) + mutable state : chrome_frame_reporter_state; + mutable reason : chrome_frame_reporter_frame_drop_reason; + mutable frame_source : int64; + mutable frame_sequence : int64; + mutable affects_smoothness : bool; + mutable scroll_state : chrome_frame_reporter_scroll_state; + mutable has_main_animation : bool; + mutable has_compositor_animation : bool; + mutable has_smooth_input_main : bool; + mutable has_missing_content : bool; + mutable layer_tree_host_id : int64; + mutable has_high_latency : bool; + mutable frame_type : chrome_frame_reporter_frame_type; + mutable high_latency_contribution_stage : string list; + mutable checkerboarded_needs_raster : bool; + mutable checkerboarded_needs_record : bool; + mutable surface_frame_trace_id : int64; + mutable display_trace_id : int64; +} + +type chrome_keyed_service = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; +} + +type chrome_latency_info_step = + | Step_unspecified + | Step_send_input_event_ui + | Step_handle_input_event_impl + | Step_did_handle_input_and_overscroll + | Step_handle_input_event_main + | Step_main_thread_scroll_update + | Step_handle_input_event_main_commit + | Step_handled_input_event_main_or_impl + | Step_handled_input_event_impl + | Step_swap_buffers + | Step_draw_and_swap + | Step_finished_swap_buffers + +type chrome_latency_info_latency_component_type = + | Component_unspecified + | Component_input_event_latency_begin_rwh + | Component_input_event_latency_scroll_update_original + | Component_input_event_latency_first_scroll_update_original + | Component_input_event_latency_original + | Component_input_event_latency_ui + | Component_input_event_latency_renderer_main + | Component_input_event_latency_rendering_scheduled_main + | Component_input_event_latency_rendering_scheduled_impl + | Component_input_event_latency_scroll_update_last_event + | Component_input_event_latency_ack_rwh + | Component_input_event_latency_renderer_swap + | Component_display_compositor_received_frame + | Component_input_event_gpu_swap_buffer + | Component_input_event_latency_frame_swap + +type chrome_latency_info_component_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable component_type : chrome_latency_info_latency_component_type; + mutable time_us : int64; +} + +type chrome_latency_info_input_type = + | Unspecified_or_other + | Touch_moved + | Gesture_scroll_begin + | Gesture_scroll_update + | Gesture_scroll_end + | Gesture_tap + | Gesture_tap_cancel + +type chrome_latency_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable trace_id : int64; + mutable step : chrome_latency_info_step; + mutable frame_tree_node_id : int32; + mutable component_info : chrome_latency_info_component_info list; + mutable is_coalesced : bool; + mutable gesture_scroll_id : int64; + mutable touch_id : int64; + mutable input_type : chrome_latency_info_input_type; +} + +type chrome_legacy_ipc_message_class = + | Class_unspecified + | Class_automation + | Class_frame + | Class_page + | Class_view + | Class_widget + | Class_input + | Class_test + | Class_worker + | Class_nacl + | Class_gpu_channel + | Class_media + | Class_ppapi + | Class_chrome + | Class_drag + | Class_print + | Class_extension + | Class_text_input_client + | Class_blink_test + | Class_accessibility + | Class_prerender + | Class_chromoting + | Class_browser_plugin + | Class_android_web_view + | Class_nacl_host + | Class_encrypted_media + | Class_cast + | Class_gin_java_bridge + | Class_chrome_utility_printing + | Class_ozone_gpu + | Class_web_test + | Class_network_hints + | Class_extensions_guest_view + | Class_guest_view + | Class_media_player_delegate + | Class_extension_worker + | Class_subresource_filter + | Class_unfreezable_frame + +type chrome_legacy_ipc = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable message_class : chrome_legacy_ipc_message_class; + mutable message_line : int32; +} + +type chrome_message_pump = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable sent_messages_in_queue : bool; + mutable io_handler_location_iid : int64; +} + +type chrome_mojo_event_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable watcher_notify_interface_tag : string; + mutable ipc_hash : int32; + mutable mojo_interface_tag : string; + mutable mojo_interface_method_iid : int64; + mutable is_reply : bool; + mutable payload_size : int64; + mutable data_num_bytes : int64; +} + +type chrome_railmode = + | Rail_mode_none + | Rail_mode_response + | Rail_mode_animation + | Rail_mode_idle + | Rail_mode_load + +type chrome_renderer_scheduler_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable rail_mode : chrome_railmode; + mutable is_backgrounded : bool; + mutable is_hidden : bool; +} + +type chrome_user_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable action : string; + mutable action_hash : int64; +} + +type chrome_window_handle_event_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable dpi : int32; + mutable message_id : int32; + mutable hwnd_ptr : int64; +} + +type screenshot = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable jpg_image : bytes; +} + +type task_execution = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable posted_from_iid : int64; +} + +type track_event_type = + | Type_unspecified + | Type_slice_begin + | Type_slice_end + | Type_instant + | Type_counter + +type track_event_callstack_frame = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable function_name : string; + mutable source_file : string; + mutable line_number : int32; +} + +type track_event_callstack = { + mutable frames : track_event_callstack_frame list; +} + +type track_event_legacy_event_flow_direction = + | Flow_unspecified + | Flow_in + | Flow_out + | Flow_inout + +type track_event_legacy_event_instant_event_scope = + | Scope_unspecified + | Scope_global + | Scope_process + | Scope_thread + +type track_event_legacy_event_id = + | Unscoped_id of int64 + | Local_id of int64 + | Global_id of int64 + +and track_event_legacy_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable name_iid : int64; + mutable phase : int32; + mutable duration_us : int64; + mutable thread_duration_us : int64; + mutable thread_instruction_delta : int64; + mutable id : track_event_legacy_event_id option; + mutable id_scope : string; + mutable use_async_tts : bool; + mutable bind_id : int64; + mutable bind_to_enclosing : bool; + mutable flow_direction : track_event_legacy_event_flow_direction; + mutable instant_event_scope : track_event_legacy_event_instant_event_scope; + mutable pid_override : int32; + mutable tid_override : int32; +} + +type track_event_name_field = + | Name_iid of int64 + | Name of string + +and track_event_counter_value_field = + | Counter_value of int64 + | Double_counter_value of float + +and track_event_correlation_id_field = + | Correlation_id of int64 + | Correlation_id_str of string + | Correlation_id_str_iid of int64 + +and track_event_callstack_field = + | Callstack of track_event_callstack + | Callstack_iid of int64 + +and track_event_source_location_field = + | Source_location of source_location + | Source_location_iid of int64 + +and track_event_timestamp = + | Timestamp_delta_us of int64 + | Timestamp_absolute_us of int64 + +and track_event_thread_time = + | Thread_time_delta_us of int64 + | Thread_time_absolute_us of int64 + +and track_event_thread_instruction_count = + | Thread_instruction_count_delta of int64 + | Thread_instruction_count_absolute of int64 + +and track_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable category_iids : int64 list; + mutable categories : string list; + mutable name_field : track_event_name_field option; + mutable type_ : track_event_type; + mutable track_uuid : int64; + mutable counter_value_field : track_event_counter_value_field option; + mutable extra_counter_track_uuids : int64 list; + mutable extra_counter_values : int64 list; + mutable extra_double_counter_track_uuids : int64 list; + mutable extra_double_counter_values : float list; + mutable flow_ids_old : int64 list; + mutable flow_ids : int64 list; + mutable terminating_flow_ids_old : int64 list; + mutable terminating_flow_ids : int64 list; + mutable correlation_id_field : track_event_correlation_id_field option; + mutable callstack_field : track_event_callstack_field option; + mutable debug_annotations : debug_annotation list; + mutable task_execution : task_execution option; + mutable log_message : log_message option; + mutable cc_scheduler_state : chrome_compositor_scheduler_state option; + mutable chrome_user_event : chrome_user_event option; + mutable chrome_keyed_service : chrome_keyed_service option; + mutable chrome_legacy_ipc : chrome_legacy_ipc option; + mutable chrome_histogram_sample : chrome_histogram_sample option; + mutable chrome_latency_info : chrome_latency_info option; + mutable chrome_frame_reporter : chrome_frame_reporter option; + mutable chrome_application_state_info : chrome_application_state_info option; + mutable chrome_renderer_scheduler_state : chrome_renderer_scheduler_state option; + mutable chrome_window_handle_event_info : chrome_window_handle_event_info option; + mutable chrome_content_settings_event_info : chrome_content_settings_event_info option; + mutable chrome_active_processes : chrome_active_processes option; + mutable screenshot : screenshot option; + mutable source_location_field : track_event_source_location_field option; + mutable chrome_message_pump : chrome_message_pump option; + mutable chrome_mojo_event_info : chrome_mojo_event_info option; + mutable timestamp : track_event_timestamp option; + mutable thread_time : track_event_thread_time option; + mutable thread_instruction_count : track_event_thread_instruction_count option; + mutable legacy_event : track_event_legacy_event option; +} + +type track_event_defaults = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable track_uuid : int64; + mutable extra_counter_track_uuids : int64 list; + mutable extra_double_counter_track_uuids : int64 list; +} + +type event_category = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type event_name = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type interned_data = { + mutable event_categories : event_category list; + mutable event_names : event_name list; + mutable debug_annotation_names : debug_annotation_name list; + mutable debug_annotation_value_type_names : debug_annotation_value_type_name list; + mutable source_locations : source_location list; + mutable unsymbolized_source_locations : unsymbolized_source_location list; + mutable log_message_body : log_message_body list; + mutable histogram_names : histogram_name list; + mutable build_ids : interned_string list; + mutable mapping_paths : interned_string list; + mutable source_paths : interned_string list; + mutable function_names : interned_string list; + mutable mappings : mapping list; + mutable frames : frame list; + mutable callstacks : callstack list; + mutable vulkan_memory_keys : interned_string list; + mutable graphics_contexts : interned_graphics_context list; + mutable gpu_specifications : interned_gpu_render_stage_specification list; + mutable kernel_symbols : interned_string list; + mutable debug_annotation_string_values : interned_string list; + mutable packet_context : network_packet_context list; + mutable v8_js_function_name : interned_v8_string list; + mutable v8_js_function : interned_v8_js_function list; + mutable v8_js_script : interned_v8_js_script list; + mutable v8_wasm_script : interned_v8_wasm_script list; + mutable v8_isolate : interned_v8_isolate list; + mutable protolog_string_args : interned_string list; + mutable protolog_stacktrace : interned_string list; + mutable viewcapture_package_name : interned_string list; + mutable viewcapture_window_name : interned_string list; + mutable viewcapture_view_id : interned_string list; + mutable viewcapture_class_name : interned_string list; + mutable app_wakelock_info : app_wakelock_info list; + mutable correlation_id_str : interned_string list; +} + +type memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units = + | Unspecified + | Bytes + | Count + +type memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable name : string; + mutable units : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units; + mutable value_uint64 : int64; + mutable value_string : string; +} + +type memory_tracker_snapshot_process_snapshot_memory_node = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable id : int64; + mutable absolute_name : string; + mutable weak : bool; + mutable size_bytes : int64; + mutable entries : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry list; +} + +type memory_tracker_snapshot_process_snapshot_memory_edge = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable source_id : int64; + mutable target_id : int64; + mutable importance : int32; + mutable overridable : bool; +} + +type memory_tracker_snapshot_process_snapshot = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable pid : int32; + mutable allocator_dumps : memory_tracker_snapshot_process_snapshot_memory_node list; + mutable memory_edges : memory_tracker_snapshot_process_snapshot_memory_edge list; +} + +type memory_tracker_snapshot_level_of_detail = + | Detail_full + | Detail_light + | Detail_background + +type memory_tracker_snapshot = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable global_dump_id : int64; + mutable level_of_detail : memory_tracker_snapshot_level_of_detail; + mutable process_memory_dumps : memory_tracker_snapshot_process_snapshot list; +} + +type perfetto_metatrace_arg_key_or_interned_key = + | Key of string + | Key_iid of int64 + +and perfetto_metatrace_arg_value_or_interned_value = + | Value of string + | Value_iid of int64 + +and perfetto_metatrace_arg = { + mutable key_or_interned_key : perfetto_metatrace_arg_key_or_interned_key option; + mutable value_or_interned_value : perfetto_metatrace_arg_value_or_interned_value option; +} + +type perfetto_metatrace_interned_string = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable value : string; +} + +type perfetto_metatrace_record_type = + | Event_id of int32 + | Counter_id of int32 + | Event_name of string + | Event_name_iid of int64 + | Counter_name of string + +and perfetto_metatrace = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable record_type : perfetto_metatrace_record_type option; + mutable event_duration_ns : int64; + mutable counter_value : int32; + mutable thread_id : int32; + mutable has_overruns : bool; + mutable args : perfetto_metatrace_arg list; + mutable interned_strings : perfetto_metatrace_interned_string list; +} + +type tracing_service_event_data_sources_data_source = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable producer_name : string; + mutable data_source_name : string; +} + +type tracing_service_event_data_sources = { + mutable data_source : tracing_service_event_data_sources_data_source list; +} + +type tracing_service_event = + | Tracing_started of bool + | All_data_sources_started of bool + | Flush_started of bool + | All_data_sources_flushed of bool + | Read_tracing_buffers_completed of bool + | Tracing_disabled of bool + | Seized_for_bugreport of bool + | Slow_starting_data_sources of tracing_service_event_data_sources + | Last_flush_slow_data_sources of tracing_service_event_data_sources + | Clone_started of bool + | Buffer_cloned of int32 + +type android_energy_consumer = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable energy_consumer_id : int32; + mutable ordinal : int32; + mutable type_ : string; + mutable name : string; +} + +type android_energy_consumer_descriptor = { + mutable energy_consumers : android_energy_consumer list; +} + +type android_energy_estimation_breakdown_energy_uid_breakdown = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable uid : int32; + mutable energy_uws : int64; +} + +type android_energy_estimation_breakdown = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable energy_consumer_descriptor : android_energy_consumer_descriptor option; + mutable energy_consumer_id : int32; + mutable energy_uws : int64; + mutable per_uid_breakdown : android_energy_estimation_breakdown_energy_uid_breakdown list; +} + +type entity_state_residency_power_entity_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable entity_index : int32; + mutable state_index : int32; + mutable entity_name : string; + mutable state_name : string; +} + +type entity_state_residency_state_residency = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable entity_index : int32; + mutable state_index : int32; + mutable total_time_in_state_ms : int64; + mutable total_state_entry_count : int64; + mutable last_entry_timestamp_ms : int64; +} + +type entity_state_residency = { + mutable power_entity_state : entity_state_residency_power_entity_state list; + mutable residency : entity_state_residency_state_residency list; +} + +type battery_counters = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable charge_counter_uah : int64; + mutable capacity_percent : float; + mutable current_ua : int64; + mutable current_avg_ua : int64; + mutable name : string; + mutable energy_counter_uwh : int64; + mutable voltage_uv : int64; +} + +type power_rails_rail_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable index : int32; + mutable rail_name : string; + mutable subsys_name : string; + mutable sampling_rate : int32; +} + +type power_rails_energy_data = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable index : int32; + mutable timestamp_ms : int64; + mutable energy : int64; +} + +type power_rails = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable rail_descriptor : power_rails_rail_descriptor list; + mutable energy_data : power_rails_energy_data list; + mutable session_uuid : int64; +} + +type obfuscated_member = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable obfuscated_name : string; + mutable deobfuscated_name : string; +} + +type obfuscated_class = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable obfuscated_name : string; + mutable deobfuscated_name : string; + mutable obfuscated_members : obfuscated_member list; + mutable obfuscated_methods : obfuscated_member list; +} + +type deobfuscation_mapping = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable package_name : string; + mutable version_code : int64; + mutable obfuscated_classes : obfuscated_class list; +} + +type heap_graph_root_type = + | Root_unknown + | Root_jni_global + | Root_jni_local + | Root_java_frame + | Root_native_stack + | Root_sticky_class + | Root_thread_block + | Root_monitor_used + | Root_thread_object + | Root_interned_string + | Root_finalizing + | Root_debugger + | Root_reference_cleanup + | Root_vm_internal + | Root_jni_monitor + +type heap_graph_root = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable object_ids : int64 list; + mutable root_type : heap_graph_root_type; +} + +type heap_graph_type_kind = + | Kind_unknown + | Kind_normal + | Kind_noreferences + | Kind_string + | Kind_array + | Kind_class + | Kind_classloader + | Kind_dexcache + | Kind_soft_reference + | Kind_weak_reference + | Kind_finalizer_reference + | Kind_phantom_reference + +type heap_graph_type = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable id : int64; + mutable location_id : int64; + mutable class_name : string; + mutable object_size : int64; + mutable superclass_id : int64; + mutable reference_field_id : int64 list; + mutable kind : heap_graph_type_kind; + mutable classloader_id : int64; +} + +type heap_graph_object_heap_type = + | Heap_type_unknown + | Heap_type_app + | Heap_type_zygote + | Heap_type_boot_image + +type heap_graph_object_identifier = + | Id of int64 + | Id_delta of int64 + +and heap_graph_object = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable identifier : heap_graph_object_identifier option; + mutable type_id : int64; + mutable self_size : int64; + mutable reference_field_id_base : int64; + mutable reference_field_id : int64 list; + mutable reference_object_id : int64 list; + mutable native_allocation_registry_size_field : int64; + mutable heap_type_delta : heap_graph_object_heap_type; + mutable runtime_internal_object_id : int64 list; +} + +type heap_graph = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable pid : int32; + mutable objects : heap_graph_object list; + mutable roots : heap_graph_root list; + mutable types : heap_graph_type list; + mutable field_names : interned_string list; + mutable location_names : interned_string list; + mutable continued : bool; + mutable index : int64; +} + +type profile_packet_heap_sample = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable callstack_id : int64; + mutable self_allocated : int64; + mutable self_freed : int64; + mutable self_max : int64; + mutable self_max_count : int64; + mutable timestamp : int64; + mutable alloc_count : int64; + mutable free_count : int64; +} + +type profile_packet_histogram_bucket = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable upper_limit : int64; + mutable max_bucket : bool; + mutable count : int64; +} + +type profile_packet_histogram = { + mutable buckets : profile_packet_histogram_bucket list; +} + +type profile_packet_process_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable unwinding_errors : int64; + mutable heap_samples : int64; + mutable map_reparses : int64; + mutable unwinding_time_us : profile_packet_histogram option; + mutable total_unwinding_time_us : int64; + mutable client_spinlock_blocked_us : int64; +} + +type profile_packet_process_heap_samples_client_error = + | Client_error_none + | Client_error_hit_timeout + | Client_error_invalid_stack_bounds + +type profile_packet_process_heap_samples = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 12 fields *) + mutable pid : int64; + mutable from_startup : bool; + mutable rejected_concurrent : bool; + mutable disconnected : bool; + mutable buffer_overran : bool; + mutable client_error : profile_packet_process_heap_samples_client_error; + mutable buffer_corrupted : bool; + mutable hit_guardrail : bool; + mutable heap_name : string; + mutable sampling_interval_bytes : int64; + mutable orig_sampling_interval_bytes : int64; + mutable timestamp : int64; + mutable stats : profile_packet_process_stats option; + mutable samples : profile_packet_heap_sample list; +} + +type profile_packet = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable strings : interned_string list; + mutable mappings : mapping list; + mutable frames : frame list; + mutable callstacks : callstack list; + mutable process_dumps : profile_packet_process_heap_samples list; + mutable continued : bool; + mutable index : int64; +} + +type streaming_allocation = { + mutable address : int64 list; + mutable size : int64 list; + mutable sample_size : int64 list; + mutable clock_monotonic_coarse_timestamp : int64 list; + mutable heap_id : int32 list; + mutable sequence_number : int64 list; +} + +type streaming_free = { + mutable address : int64 list; + mutable heap_id : int32 list; + mutable sequence_number : int64 list; +} + +type streaming_profile_packet = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable callstack_iid : int64 list; + mutable timestamp_delta_us : int64 list; + mutable process_priority : int32; +} + +type profiling_cpu_mode = + | Mode_unknown + | Mode_kernel + | Mode_user + | Mode_hypervisor + | Mode_guest_kernel + | Mode_guest_user + +type profiling_stack_unwind_error = + | Unwind_error_unknown + | Unwind_error_none + | Unwind_error_memory_invalid + | Unwind_error_unwind_info + | Unwind_error_unsupported + | Unwind_error_invalid_map + | Unwind_error_max_frames_exceeded + | Unwind_error_repeated_frame + | Unwind_error_invalid_elf + | Unwind_error_system_call + | Unwind_error_thread_timeout + | Unwind_error_thread_does_not_exist + | Unwind_error_bad_arch + | Unwind_error_maps_parse + | Unwind_error_invalid_parameter + | Unwind_error_ptrace_call + +type profiling = unit + +type perf_sample_sample_skip_reason = + | Profiler_skip_unknown + | Profiler_skip_read_stage + | Profiler_skip_unwind_stage + | Profiler_skip_unwind_enqueue + | Profiler_skip_not_in_scope + +type perf_sample_producer_event_data_source_stop_reason = + | Profiler_stop_unknown + | Profiler_stop_guardrail + +type perf_sample_producer_event = + | Source_stop_reason of perf_sample_producer_event_data_source_stop_reason + +type perf_sample_optional_unwind_error = + | Unwind_error of profiling_stack_unwind_error + +and perf_sample_optional_sample_skipped_reason = + | Sample_skipped_reason of perf_sample_sample_skip_reason + +and perf_sample = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable cpu : int32; + mutable pid : int32; + mutable tid : int32; + mutable cpu_mode : profiling_cpu_mode; + mutable timebase_count : int64; + mutable follower_counts : int64 list; + mutable callstack_iid : int64; + mutable optional_unwind_error : perf_sample_optional_unwind_error option; + mutable kernel_records_lost : int64; + mutable optional_sample_skipped_reason : perf_sample_optional_sample_skipped_reason option; + mutable producer_event : perf_sample_producer_event option; +} + +type smaps_entry = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 15 fields *) + mutable path : string; + mutable size_kb : int64; + mutable private_dirty_kb : int64; + mutable swap_kb : int64; + mutable file_name : string; + mutable start_address : int64; + mutable module_timestamp : int64; + mutable module_debugid : string; + mutable module_debug_path : string; + mutable protection_flags : int32; + mutable private_clean_resident_kb : int64; + mutable shared_dirty_resident_kb : int64; + mutable shared_clean_resident_kb : int64; + mutable locked_kb : int64; + mutable proportional_resident_kb : int64; +} + +type smaps_packet = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable pid : int32; + mutable entries : smaps_entry list; +} + +type process_stats_thread = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable tid : int32; +} + +type process_stats_fdinfo = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable fd : int64; + mutable path : string; +} + +type process_stats_process = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 22 fields *) + mutable pid : int32; + mutable threads : process_stats_thread list; + mutable vm_size_kb : int64; + mutable vm_rss_kb : int64; + mutable rss_anon_kb : int64; + mutable rss_file_kb : int64; + mutable rss_shmem_kb : int64; + mutable vm_swap_kb : int64; + mutable vm_locked_kb : int64; + mutable vm_hwm_kb : int64; + mutable oom_score_adj : int64; + mutable is_peak_rss_resettable : bool; + mutable chrome_private_footprint_kb : int32; + mutable chrome_peak_resident_set_kb : int32; + mutable fds : process_stats_fdinfo list; + mutable smr_rss_kb : int64; + mutable smr_pss_kb : int64; + mutable smr_pss_anon_kb : int64; + mutable smr_pss_file_kb : int64; + mutable smr_pss_shmem_kb : int64; + mutable smr_swap_pss_kb : int64; + mutable runtime_user_mode : int64; + mutable runtime_kernel_mode : int64; + mutable dmabuf_rss_kb : int64; +} + +type process_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable processes : process_stats_process list; + mutable collection_end_timestamp : int64; +} + +type process_tree_thread = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable tid : int32; + mutable tgid : int32; + mutable name : string; + mutable nstid : int32 list; +} + +type process_tree_process = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable pid : int32; + mutable ppid : int32; + mutable cmdline : string list; + mutable cmdline_is_comm : bool; + mutable uid : int32; + mutable nspid : int32 list; + mutable process_start_from_boot : int64; + mutable is_kthread : bool; +} + +type process_tree = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable processes : process_tree_process list; + mutable threads : process_tree_thread list; + mutable collection_end_timestamp : int64; +} + +type remote_clock_sync_synced_clocks = { + mutable client_clocks : clock_snapshot option; + mutable host_clocks : clock_snapshot option; +} + +type remote_clock_sync = { + mutable synced_clocks : remote_clock_sync_synced_clocks list; +} + +type atom = unit + +type statsd_atom = { + mutable atom : unit list; + mutable timestamp_nanos : int64 list; +} + +type sys_stats_meminfo_value = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable key : meminfo_counters; + mutable value : int64; +} + +type sys_stats_vmstat_value = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable key : vmstat_counters; + mutable value : int64; +} + +type sys_stats_cpu_times = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable cpu_id : int32; + mutable user_ns : int64; + mutable user_nice_ns : int64; + mutable system_mode_ns : int64; + mutable idle_ns : int64; + mutable io_wait_ns : int64; + mutable irq_ns : int64; + mutable softirq_ns : int64; + mutable steal_ns : int64; +} + +type sys_stats_interrupt_count = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable irq : int32; + mutable count : int64; +} + +type sys_stats_devfreq_value = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable key : string; + mutable value : int64; +} + +type sys_stats_buddy_info = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable node : string; + mutable zone : string; + mutable order_pages : int32 list; +} + +type sys_stats_disk_stat = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable device_name : string; + mutable read_sectors : int64; + mutable read_time_ms : int64; + mutable write_sectors : int64; + mutable write_time_ms : int64; + mutable discard_sectors : int64; + mutable discard_time_ms : int64; + mutable flush_count : int64; + mutable flush_time_ms : int64; +} + +type sys_stats_psi_sample_psi_resource = + | Psi_resource_unspecified + | Psi_resource_cpu_some + | Psi_resource_cpu_full + | Psi_resource_io_some + | Psi_resource_io_full + | Psi_resource_memory_some + | Psi_resource_memory_full + +type sys_stats_psi_sample = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable resource : sys_stats_psi_sample_psi_resource; + mutable total_ns : int64; +} + +type sys_stats_thermal_zone = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable name : string; + mutable temp : int64; + mutable type_ : string; +} + +type sys_stats_cpu_idle_state_entry = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable state : string; + mutable duration_us : int64; +} + +type sys_stats_cpu_idle_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable cpu_id : int32; + mutable cpuidle_state_entry : sys_stats_cpu_idle_state_entry list; +} + +type sys_stats = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable meminfo : sys_stats_meminfo_value list; + mutable vmstat : sys_stats_vmstat_value list; + mutable cpu_stat : sys_stats_cpu_times list; + mutable num_forks : int64; + mutable num_irq_total : int64; + mutable num_irq : sys_stats_interrupt_count list; + mutable num_softirq_total : int64; + mutable num_softirq : sys_stats_interrupt_count list; + mutable collection_end_timestamp : int64; + mutable devfreq : sys_stats_devfreq_value list; + mutable cpufreq_khz : int32 list; + mutable buddy_info : sys_stats_buddy_info list; + mutable disk_stat : sys_stats_disk_stat list; + mutable psi : sys_stats_psi_sample list; + mutable thermal_zone : sys_stats_thermal_zone list; + mutable cpuidle_state : sys_stats_cpu_idle_state list; + mutable gpufreq_mhz : int64 list; +} + +type cpu_info_arm_cpu_identifier = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable implementer : int32; + mutable architecture : int32; + mutable variant : int32; + mutable part : int32; + mutable revision : int32; +} + +type cpu_info_cpu_identifier = + | Arm_identifier of cpu_info_arm_cpu_identifier + +and cpu_info_cpu = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable processor : string; + mutable frequencies : int32 list; + mutable capacity : int32; + mutable identifier : cpu_info_cpu_identifier option; + mutable features : int64; +} + +type cpu_info = { + mutable cpus : cpu_info_cpu list; +} + +type test_event_test_payload = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable str : string list; + mutable nested : test_event_test_payload list; + mutable single_string : string; + mutable single_int : int32; + mutable repeated_ints : int32 list; + mutable remaining_nesting_depth : int32; + mutable debug_annotations : debug_annotation list; +} + +type test_event = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable str : string; + mutable seq_value : int32; + mutable counter : int64; + mutable is_last : bool; + mutable payload : test_event_test_payload option; +} + +type trace_packet_defaults = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable timestamp_clock_id : int32; + mutable track_event_defaults : track_event_defaults option; + mutable v8_code_defaults : v8_code_defaults option; +} + +type trace_uuid = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable msb : int64; + mutable lsb : int64; +} + +type process_descriptor_chrome_process_type = + | Process_unspecified + | Process_browser + | Process_renderer + | Process_utility + | Process_zygote + | Process_sandbox_helper + | Process_gpu + | Process_ppapi_plugin + | Process_ppapi_broker + +type process_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable pid : int32; + mutable cmdline : string list; + mutable process_name : string; + mutable process_priority : int32; + mutable start_timestamp_ns : int64; + mutable chrome_process_type : process_descriptor_chrome_process_type; + mutable legacy_sort_index : int32; + mutable process_labels : string list; +} + +type track_event_range_of_interest = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable start_us : int64; +} + +type thread_descriptor_chrome_thread_type = + | Chrome_thread_unspecified + | Chrome_thread_main + | Chrome_thread_io + | Chrome_thread_pool_bg_worker + | Chrome_thread_pool_fg_worker + | Chrome_thread_pool_fb_blocking + | Chrome_thread_pool_bg_blocking + | Chrome_thread_pool_service + | Chrome_thread_compositor + | Chrome_thread_viz_compositor + | Chrome_thread_compositor_worker + | Chrome_thread_service_worker + | Chrome_thread_memory_infra + | Chrome_thread_sampling_profiler + +type thread_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable pid : int32; + mutable tid : int32; + mutable thread_name : string; + mutable chrome_thread_type : thread_descriptor_chrome_thread_type; + mutable reference_timestamp_us : int64; + mutable reference_thread_time_us : int64; + mutable reference_thread_instruction_count : int64; + mutable legacy_sort_index : int32; +} + +type chrome_process_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable process_type : int32; + mutable process_priority : int32; + mutable legacy_sort_index : int32; + mutable host_app_package_name : string; + mutable crash_trace_id : int64; +} + +type chrome_thread_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable thread_type : int32; + mutable legacy_sort_index : int32; + mutable is_sandboxed_tid : bool; +} + +type counter_descriptor_builtin_counter_type = + | Counter_unspecified + | Counter_thread_time_ns + | Counter_thread_instruction_count + +type counter_descriptor_unit = + | Unit_unspecified + | Unit_time_ns + | Unit_count + | Unit_size_bytes + +type counter_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable type_ : counter_descriptor_builtin_counter_type; + mutable categories : string list; + mutable unit_ : counter_descriptor_unit; + mutable unit_name : string; + mutable unit_multiplier : int64; + mutable is_incremental : bool; + mutable y_axis_share_key : string; +} + +type track_descriptor_child_tracks_ordering = + | Unknown + | Lexicographic + | Chronological + | Explicit + +type track_descriptor_sibling_merge_behavior = + | Sibling_merge_behavior_unspecified + | Sibling_merge_behavior_by_track_name + | Sibling_merge_behavior_none + | Sibling_merge_behavior_by_sibling_merge_key + +type track_descriptor_static_or_dynamic_name = + | Name of string + | Static_name of string + | Atrace_name of string + +and track_descriptor_sibling_merge_key_field = + | Sibling_merge_key of string + | Sibling_merge_key_int of int64 + +and track_descriptor = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable uuid : int64; + mutable parent_uuid : int64; + mutable static_or_dynamic_name : track_descriptor_static_or_dynamic_name option; + mutable description : string; + mutable process : process_descriptor option; + mutable chrome_process : chrome_process_descriptor option; + mutable thread : thread_descriptor option; + mutable chrome_thread : chrome_thread_descriptor option; + mutable counter : counter_descriptor option; + mutable disallow_merging_with_system_tracks : bool; + mutable child_ordering : track_descriptor_child_tracks_ordering; + mutable sibling_order_rank : int32; + mutable sibling_merge_behavior : track_descriptor_sibling_merge_behavior; + mutable sibling_merge_key_field : track_descriptor_sibling_merge_key_field option; +} + +type chrome_historgram_translation_table = { + mutable hash_to_name : (int64 * string) list; +} + +type chrome_user_event_translation_table = { + mutable action_hash_to_name : (int64 * string) list; +} + +type chrome_performance_mark_translation_table = { + mutable site_hash_to_name : (int32 * string) list; + mutable mark_hash_to_name : (int32 * string) list; +} + +type slice_name_translation_table = { + mutable raw_to_deobfuscated_name : (string * string) list; +} + +type process_track_name_translation_table = { + mutable raw_to_deobfuscated_name : (string * string) list; +} + +type chrome_study_translation_table = { + mutable hash_to_name : (int64 * string) list; +} + +type translation_table = + | Chrome_histogram of chrome_historgram_translation_table + | Chrome_user_event of chrome_user_event_translation_table + | Chrome_performance_mark of chrome_performance_mark_translation_table + | Slice_name of slice_name_translation_table + | Process_track_name of process_track_name_translation_table + | Chrome_study of chrome_study_translation_table + +type trigger = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable trigger_name : string; + mutable producer_name : string; + mutable trusted_producer_uid : int32; + mutable stop_delay_ms : int64; +} + +type ui_state_highlight_process = + | Pid of int32 + | Cmdline of string + +type ui_state = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable timeline_start_ts : int64; + mutable timeline_end_ts : int64; + mutable highlight_process : ui_state_highlight_process option; +} + +type trace_packet_sequence_flags = + | Seq_unspecified + | Seq_incremental_state_cleared + | Seq_needs_incremental_state + +type trace_packet_data = + | Process_tree of process_tree + | Process_stats of process_stats + | Inode_file_map of inode_file_map + | Chrome_events of chrome_event_bundle + | Clock_snapshot of clock_snapshot + | Sys_stats of sys_stats + | Track_event of track_event + | Trace_uuid of trace_uuid + | Trace_config of trace_config + | Trace_stats of trace_stats + | Profile_packet of profile_packet + | Streaming_allocation of streaming_allocation + | Streaming_free of streaming_free + | Battery of battery_counters + | Power_rails of power_rails + | Android_log of android_log_packet + | System_info of system_info + | Trigger of trigger + | Chrome_trigger of chrome_trigger + | Packages_list of packages_list + | Chrome_benchmark_metadata of chrome_benchmark_metadata + | Perfetto_metatrace of perfetto_metatrace + | Chrome_metadata of chrome_metadata_packet + | Gpu_counter_event of gpu_counter_event + | Gpu_render_stage_event of gpu_render_stage_event + | Streaming_profile_packet of streaming_profile_packet + | Heap_graph of heap_graph + | Graphics_frame_event of graphics_frame_event + | Vulkan_memory_event of vulkan_memory_event + | Gpu_log of gpu_log + | Vulkan_api_event of vulkan_api_event + | Perf_sample of perf_sample + | Cpu_info of cpu_info + | Smaps_packet of smaps_packet + | Service_event of tracing_service_event + | Initial_display_state of initial_display_state + | Gpu_mem_total_event of gpu_mem_total_event + | Memory_tracker_snapshot of memory_tracker_snapshot + | Frame_timeline_event of frame_timeline_event + | Android_energy_estimation_breakdown of android_energy_estimation_breakdown + | Ui_state of ui_state + | Android_camera_frame_event of android_camera_frame_event + | Android_camera_session_stats of android_camera_session_stats + | Translation_table of translation_table + | Android_game_intervention_list of android_game_intervention_list + | Statsd_atom of statsd_atom + | Android_system_property of android_system_property + | Entity_state_residency of entity_state_residency + | Module_symbols of module_symbols + | Deobfuscation_mapping of deobfuscation_mapping + | Track_descriptor of track_descriptor + | Process_descriptor of process_descriptor + | Thread_descriptor of thread_descriptor + | Synchronization_marker of bytes + | Compressed_packets of bytes + | Extension_descriptor of extension_descriptor + | Network_packet of network_packet_event + | Network_packet_bundle of network_packet_bundle + | Track_event_range_of_interest of track_event_range_of_interest + | Surfaceflinger_layers_snapshot of layers_snapshot_proto + | Surfaceflinger_transactions of transaction_trace_entry + | Shell_transition of shell_transition + | Shell_handler_mappings of shell_handler_mappings + | Protolog_message of proto_log_message + | Protolog_viewer_config of proto_log_viewer_config + | Winscope_extensions + | Etw_events of etw_trace_event_bundle + | V8_js_code of v8_js_code + | V8_internal_code of v8_internal_code + | V8_wasm_code of v8_wasm_code + | V8_reg_exp_code of v8_reg_exp_code + | V8_code_move of v8_code_move + | Remote_clock_sync of remote_clock_sync + | Pixel_modem_events of pixel_modem_events + | Pixel_modem_token_database of pixel_modem_token_database + | Clone_snapshot_trigger of trigger + | Bluetooth_trace_event of bluetooth_trace_event + | Kernel_wakelock_data of kernel_wakelock_data + | App_wakelock_bundle of app_wakelock_bundle + | Generic_kernel_task_state_event of generic_kernel_task_state_event + | Generic_kernel_cpu_freq_event of generic_kernel_cpu_frequency_event + | Generic_kernel_task_rename_event of generic_kernel_task_rename_event + | Generic_kernel_process_tree of generic_kernel_process_tree + | Cpu_per_uid_data of cpu_per_uid_data + | Evdev_event of evdev_event + | For_testing of test_event + +and trace_packet_optional_trusted_uid = + | Trusted_uid of int32 + +and trace_packet_optional_trusted_packet_sequence_id = + | Trusted_packet_sequence_id of int32 + +and trace_packet = { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable timestamp : int64; + mutable timestamp_clock_id : int32; + mutable data : trace_packet_data option; + mutable optional_trusted_uid : trace_packet_optional_trusted_uid option; + mutable optional_trusted_packet_sequence_id : trace_packet_optional_trusted_packet_sequence_id option; + mutable trusted_pid : int32; + mutable interned_data : interned_data option; + mutable sequence_flags : int32; + mutable incremental_state_cleared : bool; + mutable trace_packet_defaults : trace_packet_defaults option; + mutable previous_packet_dropped : bool; + mutable first_packet_on_sequence : bool; + mutable machine_id : int32; +} + +type trace = { + mutable packet : trace_packet list; +} + +let default_ftrace_descriptor_atrace_category (): ftrace_descriptor_atrace_category = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + description=""; +} + +let default_ftrace_descriptor (): ftrace_descriptor = +{ + atrace_categories=[]; +} + +let default_gpu_counter_descriptor_gpu_counter_group () = (Unclassified:gpu_counter_descriptor_gpu_counter_group) + +let default_gpu_counter_descriptor_measure_unit () = (None:gpu_counter_descriptor_measure_unit) + +let default_gpu_counter_descriptor_gpu_counter_spec_peak_value (): gpu_counter_descriptor_gpu_counter_spec_peak_value = Int_peak_value (0L) + +let default_gpu_counter_descriptor_gpu_counter_spec (): gpu_counter_descriptor_gpu_counter_spec = +{ + _presence=Pbrt.Bitfield.empty; + counter_id=0l; + name=""; + description=""; + peak_value=None; + numerator_units=[]; + denominator_units=[]; + select_by_default=false; + groups=[]; +} + +let default_gpu_counter_descriptor_gpu_counter_block (): gpu_counter_descriptor_gpu_counter_block = +{ + _presence=Pbrt.Bitfield.empty; + block_id=0l; + block_capacity=0l; + name=""; + description=""; + counter_ids=[]; +} + +let default_gpu_counter_descriptor (): gpu_counter_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + specs=[]; + blocks=[]; + min_sampling_period_ns=0L; + max_sampling_period_ns=0L; + supports_instrumented_sampling=false; +} + +let default_track_event_category (): track_event_category = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + description=""; + tags=[]; +} + +let default_track_event_descriptor (): track_event_descriptor = +{ + available_categories=[]; +} + +let default_data_source_descriptor (): data_source_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + id=0L; + will_notify_on_stop=false; + will_notify_on_start=false; + handles_incremental_state_clear=false; + no_flush=false; + gpu_counter_descriptor=None; + track_event_descriptor=None; + ftrace_descriptor=None; +} + +let default_tracing_service_state_producer (): tracing_service_state_producer = +{ + _presence=Pbrt.Bitfield.empty; + id=0l; + name=""; + pid=0l; + uid=0l; + sdk_version=""; + frozen=false; +} + +let default_tracing_service_state_data_source (): tracing_service_state_data_source = +{ + _presence=Pbrt.Bitfield.empty; + ds_descriptor=None; + producer_id=0l; +} + +let default_tracing_service_state_tracing_session (): tracing_service_state_tracing_session = +{ + _presence=Pbrt.Bitfield.empty; + id=0L; + consumer_uid=0l; + state=""; + unique_session_name=""; + buffer_size_kb=[]; + duration_ms=0l; + num_data_sources=0l; + start_realtime_ns=0L; + bugreport_score=0l; + bugreport_filename=""; + is_started=false; +} + +let default_tracing_service_state (): tracing_service_state = +{ + _presence=Pbrt.Bitfield.empty; + producers=[]; + data_sources=[]; + tracing_sessions=[]; + supports_tracing_sessions=false; + num_sessions=0l; + num_sessions_started=0l; + tracing_service_version=""; +} + +let default_builtin_clock () = (Builtin_clock_unknown:builtin_clock) + +let default_android_game_intervention_list_config (): android_game_intervention_list_config = +{ + package_name_filter=[]; +} + +let default_android_input_event_config_trace_mode () = (Trace_mode_trace_all:android_input_event_config_trace_mode) + +let default_android_input_event_config_trace_level () = (Trace_level_none:android_input_event_config_trace_level) + +let default_android_input_event_config_trace_rule (): android_input_event_config_trace_rule = +{ + _presence=Pbrt.Bitfield.empty; + trace_level=default_android_input_event_config_trace_level (); + match_all_packages=[]; + match_any_packages=[]; + match_secure=false; + match_ime_connection_active=false; +} + +let default_android_input_event_config (): android_input_event_config = +{ + _presence=Pbrt.Bitfield.empty; + mode=default_android_input_event_config_trace_mode (); + rules=[]; + trace_dispatcher_input_events=false; + trace_dispatcher_window_dispatch=false; +} + +let default_android_log_id () = (Lid_default:android_log_id) + +let default_android_log_priority () = (Prio_unspecified:android_log_priority) + +let default_android_log_config (): android_log_config = +{ + _presence=Pbrt.Bitfield.empty; + log_ids=[]; + min_prio=default_android_log_priority (); + filter_tags=[]; +} + +let default_android_polled_state_config (): android_polled_state_config = +{ + _presence=Pbrt.Bitfield.empty; + poll_ms=0l; +} + +let default_android_sdk_sysprop_guard_config (): android_sdk_sysprop_guard_config = +{ + _presence=Pbrt.Bitfield.empty; + surfaceflinger_skia_track_events=false; + hwui_skia_track_events=false; + hwui_package_name_filter=[]; +} + +let default_android_system_property_config (): android_system_property_config = +{ + _presence=Pbrt.Bitfield.empty; + poll_ms=0l; + property_name=[]; +} + +let default_app_wakelocks_config (): app_wakelocks_config = +{ + _presence=Pbrt.Bitfield.empty; + write_delay_ms=0l; + filter_duration_below_ms=0l; + drop_owner_pid=false; +} + +let default_cpu_per_uid_config (): cpu_per_uid_config = +{ + _presence=Pbrt.Bitfield.empty; + poll_ms=0l; +} + +let default_kernel_wakelocks_config (): kernel_wakelocks_config = +{ + _presence=Pbrt.Bitfield.empty; + poll_ms=0l; +} + +let default_network_packet_trace_config (): network_packet_trace_config = +{ + _presence=Pbrt.Bitfield.empty; + poll_ms=0l; + aggregation_threshold=0l; + intern_limit=0l; + drop_local_port=false; + drop_remote_port=false; + drop_tcp_flags=false; +} + +let default_packages_list_config (): packages_list_config = +{ + _presence=Pbrt.Bitfield.empty; + package_name_filter=[]; + only_write_on_cpu_use_every_ms=0l; +} + +let default_pixel_modem_config_event_group () = (Event_group_unknown:pixel_modem_config_event_group) + +let default_pixel_modem_config (): pixel_modem_config = +{ + _presence=Pbrt.Bitfield.empty; + event_group=default_pixel_modem_config_event_group (); + pigweed_hash_allow_list=[]; + pigweed_hash_deny_list=[]; +} + +let default_proto_log_level () = (Protolog_level_undefined:proto_log_level) + +let default_proto_log_config_tracing_mode () = (Default:proto_log_config_tracing_mode) + +let default_proto_log_group (): proto_log_group = +{ + _presence=Pbrt.Bitfield.empty; + group_name=""; + log_from=default_proto_log_level (); + collect_stacktrace=false; +} + +let default_proto_log_config (): proto_log_config = +{ + _presence=Pbrt.Bitfield.empty; + group_overrides=[]; + tracing_mode=default_proto_log_config_tracing_mode (); + default_log_from_level=default_proto_log_level (); +} + +let default_surface_flinger_layers_config_mode () = (Mode_unspecified:surface_flinger_layers_config_mode) + +let default_surface_flinger_layers_config_trace_flag () = (Trace_flag_unspecified:surface_flinger_layers_config_trace_flag) + +let default_surface_flinger_layers_config (): surface_flinger_layers_config = +{ + _presence=Pbrt.Bitfield.empty; + mode=default_surface_flinger_layers_config_mode (); + trace_flags=[]; +} + +let default_surface_flinger_transactions_config_mode () = (Mode_unspecified:surface_flinger_transactions_config_mode) + +let default_surface_flinger_transactions_config (): surface_flinger_transactions_config = +{ + _presence=Pbrt.Bitfield.empty; + mode=default_surface_flinger_transactions_config_mode (); +} + +let default_window_manager_config_log_frequency () = (Log_frequency_unspecified:window_manager_config_log_frequency) + +let default_window_manager_config_log_level () = (Log_level_unspecified:window_manager_config_log_level) + +let default_window_manager_config (): window_manager_config = +{ + _presence=Pbrt.Bitfield.empty; + log_frequency=default_window_manager_config_log_frequency (); + log_level=default_window_manager_config_log_level (); +} + +let default_chrome_config_client_priority () = (Unknown:chrome_config_client_priority) + +let default_chrome_config (): chrome_config = +{ + _presence=Pbrt.Bitfield.empty; + trace_config=""; + privacy_filtering_enabled=false; + convert_to_legacy_json=false; + client_priority=default_chrome_config_client_priority (); + json_agent_label_filter=""; + event_package_name_filter_enabled=false; +} + +let default_chromium_histogram_samples_config_histogram_sample (): chromium_histogram_samples_config_histogram_sample = +{ + _presence=Pbrt.Bitfield.empty; + histogram_name=""; + min_value=0L; + max_value=0L; +} + +let default_chromium_histogram_samples_config (): chromium_histogram_samples_config = +{ + _presence=Pbrt.Bitfield.empty; + histograms=[]; + filter_histogram_names=false; +} + +let default_chromium_system_metrics_config (): chromium_system_metrics_config = +{ + _presence=Pbrt.Bitfield.empty; + sampling_interval_ms=0l; +} + +let default_v8_config (): v8_config = +{ + _presence=Pbrt.Bitfield.empty; + log_script_sources=false; + log_instructions=false; +} + +let default_etw_config_kernel_flag () = (Cswitch:etw_config_kernel_flag) + +let default_etw_config (): etw_config = +{ + kernel_flags=[]; + scheduler_provider_events=[]; + memory_provider_events=[]; + file_provider_events=[]; +} + +let default_frozen_ftrace_config (): frozen_ftrace_config = +{ + _presence=Pbrt.Bitfield.empty; + instance_name=""; +} + +let default_ftrace_config_compact_sched_config (): ftrace_config_compact_sched_config = +{ + _presence=Pbrt.Bitfield.empty; + enabled=false; +} + +let default_ftrace_config_print_filter_rule_atrace_message (): ftrace_config_print_filter_rule_atrace_message = +{ + _presence=Pbrt.Bitfield.empty; + type_=""; + prefix=""; +} + +let default_ftrace_config_print_filter_rule_match (): ftrace_config_print_filter_rule_match = Prefix ("") + +let default_ftrace_config_print_filter_rule (): ftrace_config_print_filter_rule = +{ + _presence=Pbrt.Bitfield.empty; + match_=None; + allow=false; +} + +let default_ftrace_config_print_filter (): ftrace_config_print_filter = +{ + rules=[]; +} + +let default_ftrace_config_ksyms_mem_policy () = (Ksyms_unspecified:ftrace_config_ksyms_mem_policy) + +let default_ftrace_config_kprobe_event_kprobe_type () = (Kprobe_type_unknown:ftrace_config_kprobe_event_kprobe_type) + +let default_ftrace_config_kprobe_event (): ftrace_config_kprobe_event = +{ + _presence=Pbrt.Bitfield.empty; + probe=""; + type_=default_ftrace_config_kprobe_event_kprobe_type (); +} + +let default_ftrace_config_tracefs_option_state () = (State_unknown:ftrace_config_tracefs_option_state) + +let default_ftrace_config_tracefs_option (): ftrace_config_tracefs_option = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + state=default_ftrace_config_tracefs_option_state (); +} + +let default_ftrace_config (): ftrace_config = +{ + _presence=Pbrt.Bitfield.empty; + ftrace_events=[]; + atrace_categories=[]; + atrace_apps=[]; + atrace_categories_prefer_sdk=[]; + atrace_userspace_only=false; + buffer_size_kb=0l; + buffer_size_lower_bound=false; + drain_period_ms=0l; + drain_buffer_percent=0l; + compact_sched=None; + print_filter=None; + symbolize_ksyms=false; + ksyms_mem_policy=default_ftrace_config_ksyms_mem_policy (); + throttle_rss_stat=false; + denser_generic_event_encoding=false; + disable_generic_events=false; + syscall_events=[]; + enable_function_graph=false; + function_filters=[]; + function_graph_roots=[]; + function_graph_max_depth=0l; + kprobe_events=[]; + preserve_ftrace_buffer=false; + use_monotonic_raw_clock=false; + instance_name=""; + debug_ftrace_abi=false; + tids_to_trace=[]; + tracefs_options=[]; + tracing_cpumask=""; + initialize_ksyms_synchronously_for_testing=false; +} + +let default_gpu_counter_config (): gpu_counter_config = +{ + _presence=Pbrt.Bitfield.empty; + counter_period_ns=0L; + counter_ids=[]; + instrumented_sampling=false; + fix_gpu_clock=false; +} + +let default_gpu_render_stages_config (): gpu_render_stages_config = +{ + _presence=Pbrt.Bitfield.empty; + full_loadstore=false; + low_overhead=false; + trace_metrics=[]; +} + +let default_vulkan_memory_config (): vulkan_memory_config = +{ + _presence=Pbrt.Bitfield.empty; + track_driver_memory_usage=false; + track_device_memory_usage=false; +} + +let default_inode_file_config_mount_point_mapping_entry (): inode_file_config_mount_point_mapping_entry = +{ + _presence=Pbrt.Bitfield.empty; + mountpoint=""; + scan_roots=[]; +} + +let default_inode_file_config (): inode_file_config = +{ + _presence=Pbrt.Bitfield.empty; + scan_interval_ms=0l; + scan_delay_ms=0l; + scan_batch_size=0l; + do_not_scan=false; + scan_mount_points=[]; + mount_point_mapping=[]; +} + +let default_console_config_output () = (Output_unspecified:console_config_output) + +let default_console_config (): console_config = +{ + _presence=Pbrt.Bitfield.empty; + output=default_console_config_output (); + enable_colors=false; +} + +let default_interceptor_config (): interceptor_config = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + console_config=None; +} + +let default_android_power_config_battery_counters () = (Battery_counter_unspecified:android_power_config_battery_counters) + +let default_android_power_config (): android_power_config = +{ + _presence=Pbrt.Bitfield.empty; + battery_poll_ms=0l; + battery_counters=[]; + collect_power_rails=false; + collect_energy_estimation_breakdown=false; + collect_entity_state_residency=false; +} + +let default_priority_boost_config_boost_policy () = (Policy_unspecified:priority_boost_config_boost_policy) + +let default_priority_boost_config (): priority_boost_config = +{ + _presence=Pbrt.Bitfield.empty; + policy=default_priority_boost_config_boost_policy (); + priority=0l; +} + +let default_process_stats_config_quirks () = (Quirks_unspecified:process_stats_config_quirks) + +let default_process_stats_config (): process_stats_config = +{ + _presence=Pbrt.Bitfield.empty; + quirks=[]; + scan_all_processes_on_start=false; + record_thread_names=false; + proc_stats_poll_ms=0l; + proc_stats_cache_ttl_ms=0l; + scan_smaps_rollup=false; + record_process_age=false; + record_process_runtime=false; + record_process_dmabuf_rss=false; + resolve_process_fds=false; +} + +let default_heapprofd_config_continuous_dump_config (): heapprofd_config_continuous_dump_config = +{ + _presence=Pbrt.Bitfield.empty; + dump_phase_ms=0l; + dump_interval_ms=0l; +} + +let default_heapprofd_config (): heapprofd_config = +{ + _presence=Pbrt.Bitfield.empty; + sampling_interval_bytes=0L; + adaptive_sampling_shmem_threshold=0L; + adaptive_sampling_max_sampling_interval_bytes=0L; + process_cmdline=[]; + pid=[]; + target_installed_by=[]; + heaps=[]; + exclude_heaps=[]; + stream_allocations=false; + heap_sampling_intervals=[]; + all_heaps=false; + all=false; + min_anonymous_memory_kb=0l; + max_heapprofd_memory_kb=0l; + max_heapprofd_cpu_secs=0L; + skip_symbol_prefix=[]; + continuous_dump_config=None; + shmem_size_bytes=0L; + block_client=false; + block_client_timeout_us=0l; + no_startup=false; + no_running=false; + dump_at_max=false; + disable_fork_teardown=false; + disable_vfork_detection=false; +} + +let default_atom_id () = (Atom_unspecified:atom_id) + +let default_statsd_pull_atom_config (): statsd_pull_atom_config = +{ + _presence=Pbrt.Bitfield.empty; + pull_atom_id=[]; + raw_pull_atom_id=[]; + pull_frequency_ms=0l; + packages=[]; +} + +let default_statsd_tracing_config (): statsd_tracing_config = +{ + push_atom_id=[]; + raw_push_atom_id=[]; + pull_config=[]; +} + +let default_meminfo_counters () = (Meminfo_unspecified:meminfo_counters) + +let default_vmstat_counters () = (Vmstat_unspecified:vmstat_counters) + +let default_sys_stats_config_stat_counters () = (Stat_unspecified:sys_stats_config_stat_counters) + +let default_sys_stats_config (): sys_stats_config = +{ + _presence=Pbrt.Bitfield.empty; + meminfo_period_ms=0l; + meminfo_counters=[]; + vmstat_period_ms=0l; + vmstat_counters=[]; + stat_period_ms=0l; + stat_counters=[]; + devfreq_period_ms=0l; + cpufreq_period_ms=0l; + buddyinfo_period_ms=0l; + diskstat_period_ms=0l; + psi_period_ms=0l; + thermal_period_ms=0l; + cpuidle_period_ms=0l; + gpufreq_period_ms=0l; +} + +let default_system_info_config : system_info_config = () + +let default_test_config_dummy_fields (): test_config_dummy_fields = +{ + _presence=Pbrt.Bitfield.empty; + field_uint32=0l; + field_int32=0l; + field_uint64=0L; + field_int64=0L; + field_fixed64=0L; + field_sfixed64=0L; + field_fixed32=0l; + field_sfixed32=0l; + field_double=0.; + field_float=0.; + field_sint64=0L; + field_sint32=0l; + field_string=""; + field_bytes=Bytes.create 0; +} + +let default_test_config (): test_config = +{ + _presence=Pbrt.Bitfield.empty; + message_count=0l; + max_messages_per_second=0l; + seed=0l; + message_size=0l; + send_batch_on_register=false; + dummy_fields=None; +} + +let default_track_event_config (): track_event_config = +{ + _presence=Pbrt.Bitfield.empty; + disabled_categories=[]; + enabled_categories=[]; + disabled_tags=[]; + enabled_tags=[]; + disable_incremental_timestamps=false; + timestamp_unit_multiplier=0L; + filter_debug_annotations=false; + enable_thread_time_sampling=false; + thread_time_subsampling_ns=0L; + filter_dynamic_event_names=false; +} + +let default_data_source_config_session_initiator () = (Session_initiator_unspecified:data_source_config_session_initiator) + +let default_data_source_config_buffer_exhausted_policy () = (Buffer_exhausted_unspecified:data_source_config_buffer_exhausted_policy) + +let default_data_source_config (): data_source_config = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + target_buffer=0l; + trace_duration_ms=0l; + prefer_suspend_clock_for_duration=false; + stop_timeout_ms=0l; + enable_extra_guardrails=false; + session_initiator=default_data_source_config_session_initiator (); + tracing_session_id=0L; + buffer_exhausted_policy=default_data_source_config_buffer_exhausted_policy (); + priority_boost=None; + ftrace_config=None; + inode_file_config=None; + process_stats_config=None; + sys_stats_config=None; + heapprofd_config=None; + android_power_config=None; + android_log_config=None; + gpu_counter_config=None; + android_game_intervention_list_config=None; + packages_list_config=None; + vulkan_memory_config=None; + track_event_config=None; + android_polled_state_config=None; + android_system_property_config=None; + statsd_tracing_config=None; + system_info_config=(); + frozen_ftrace_config=None; + chrome_config=None; + v8_config=None; + interceptor_config=None; + network_packet_trace_config=None; + surfaceflinger_layers_config=None; + surfaceflinger_transactions_config=None; + android_sdk_sysprop_guard_config=None; + etw_config=None; + protolog_config=None; + android_input_event_config=None; + pixel_modem_config=None; + windowmanager_config=None; + chromium_system_metrics=None; + kernel_wakelocks_config=None; + gpu_renderstages_config=None; + chromium_histogram_samples=None; + app_wakelocks_config=None; + cpu_per_uid_config=None; + legacy_config=""; + for_testing=None; +} + +let default_trace_config_buffer_config_fill_policy () = (Unspecified:trace_config_buffer_config_fill_policy) + +let default_trace_config_buffer_config (): trace_config_buffer_config = +{ + _presence=Pbrt.Bitfield.empty; + size_kb=0l; + fill_policy=default_trace_config_buffer_config_fill_policy (); + transfer_on_clone=false; + clear_before_clone=false; +} + +let default_trace_config_data_source (): trace_config_data_source = +{ + config=None; + producer_name_filter=[]; + producer_name_regex_filter=[]; + machine_name_filter=[]; +} + +let default_trace_config_builtin_data_source (): trace_config_builtin_data_source = +{ + _presence=Pbrt.Bitfield.empty; + disable_clock_snapshotting=false; + disable_trace_config=false; + disable_system_info=false; + disable_service_events=false; + primary_trace_clock=default_builtin_clock (); + snapshot_interval_ms=0l; + prefer_suspend_clock_for_snapshot=false; + disable_chunk_usage_histograms=false; +} + +let default_trace_config_lockdown_mode_operation () = (Lockdown_unchanged:trace_config_lockdown_mode_operation) + +let default_trace_config_producer_config (): trace_config_producer_config = +{ + _presence=Pbrt.Bitfield.empty; + producer_name=""; + shm_size_kb=0l; + page_size_kb=0l; +} + +let default_trace_config_statsd_metadata (): trace_config_statsd_metadata = +{ + _presence=Pbrt.Bitfield.empty; + triggering_alert_id=0L; + triggering_config_uid=0l; + triggering_config_id=0L; + triggering_subscription_id=0L; +} + +let default_trace_config_guardrail_overrides (): trace_config_guardrail_overrides = +{ + _presence=Pbrt.Bitfield.empty; + max_upload_per_day_bytes=0L; + max_tracing_buffer_size_kb=0l; +} + +let default_trace_config_trigger_config_trigger_mode () = (Unspecified:trace_config_trigger_config_trigger_mode) + +let default_trace_config_trigger_config_trigger (): trace_config_trigger_config_trigger = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + producer_name_regex=""; + stop_delay_ms=0l; + max_per_24_h=0l; + skip_probability=0.; +} + +let default_trace_config_trigger_config (): trace_config_trigger_config = +{ + _presence=Pbrt.Bitfield.empty; + trigger_mode=default_trace_config_trigger_config_trigger_mode (); + use_clone_snapshot_if_available=false; + triggers=[]; + trigger_timeout_ms=0l; +} + +let default_trace_config_incremental_state_config (): trace_config_incremental_state_config = +{ + _presence=Pbrt.Bitfield.empty; + clear_period_ms=0l; +} + +let default_trace_config_compression_type () = (Compression_type_unspecified:trace_config_compression_type) + +let default_trace_config_incident_report_config (): trace_config_incident_report_config = +{ + _presence=Pbrt.Bitfield.empty; + destination_package=""; + destination_class=""; + privacy_level=0l; + skip_incidentd=false; + skip_dropbox=false; +} + +let default_trace_config_statsd_logging () = (Statsd_logging_unspecified:trace_config_statsd_logging) + +let default_trace_config_trace_filter_string_filter_policy () = (Sfp_unspecified:trace_config_trace_filter_string_filter_policy) + +let default_trace_config_trace_filter_string_filter_rule (): trace_config_trace_filter_string_filter_rule = +{ + _presence=Pbrt.Bitfield.empty; + policy=default_trace_config_trace_filter_string_filter_policy (); + regex_pattern=""; + atrace_payload_starts_with=""; +} + +let default_trace_config_trace_filter_string_filter_chain (): trace_config_trace_filter_string_filter_chain = +{ + rules=[]; +} + +let default_trace_config_trace_filter (): trace_config_trace_filter = +{ + _presence=Pbrt.Bitfield.empty; + bytecode=Bytes.create 0; + bytecode_v2=Bytes.create 0; + string_filter_chain=None; +} + +let default_trace_config_android_report_config (): trace_config_android_report_config = +{ + _presence=Pbrt.Bitfield.empty; + reporter_service_package=""; + reporter_service_class=""; + skip_report=false; + use_pipe_in_framework_for_testing=false; +} + +let default_trace_config_cmd_trace_start_delay (): trace_config_cmd_trace_start_delay = +{ + _presence=Pbrt.Bitfield.empty; + min_delay_ms=0l; + max_delay_ms=0l; +} + +let default_trace_config_session_semaphore (): trace_config_session_semaphore = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + max_other_session_count=0L; +} + +let default_trace_config (): trace_config = +{ + _presence=Pbrt.Bitfield.empty; + buffers=[]; + data_sources=[]; + builtin_data_sources=None; + duration_ms=0l; + prefer_suspend_clock_for_duration=false; + enable_extra_guardrails=false; + lockdown_mode=default_trace_config_lockdown_mode_operation (); + producers=[]; + statsd_metadata=None; + write_into_file=false; + output_path=""; + file_write_period_ms=0l; + max_file_size_bytes=0L; + guardrail_overrides=None; + deferred_start=false; + flush_period_ms=0l; + flush_timeout_ms=0l; + data_source_stop_timeout_ms=0l; + notify_traceur=false; + bugreport_score=0l; + bugreport_filename=""; + trigger_config=None; + activate_triggers=[]; + incremental_state_config=None; + allow_user_build_tracing=false; + unique_session_name=""; + compression_type=default_trace_config_compression_type (); + incident_report_config=None; + statsd_logging=default_trace_config_statsd_logging (); + trace_uuid_msb=0L; + trace_uuid_lsb=0L; + trace_filter=None; + android_report_config=None; + cmd_trace_start_delay=None; + session_semaphores=[]; + priority_boost=None; + exclusive_prio=0l; + no_flush_before_write_into_file=false; +} + +let default_utsname (): utsname = +{ + _presence=Pbrt.Bitfield.empty; + sysname=""; + version=""; + release=""; + machine=""; +} + +let default_system_info (): system_info = +{ + _presence=Pbrt.Bitfield.empty; + utsname=None; + android_build_fingerprint=""; + android_device_manufacturer=""; + android_soc_model=""; + android_guest_soc_model=""; + android_hardware_revision=""; + android_storage_model=""; + android_ram_model=""; + android_serial_console=""; + tracing_service_version=""; + android_sdk_version=0L; + page_size=0l; + num_cpus=0l; + timezone_off_mins=0l; + hz=0L; +} + +let default_trace_stats_buffer_stats (): trace_stats_buffer_stats = +{ + _presence=Pbrt.Bitfield.empty; + buffer_size=0L; + bytes_written=0L; + bytes_overwritten=0L; + bytes_read=0L; + padding_bytes_written=0L; + padding_bytes_cleared=0L; + chunks_written=0L; + chunks_rewritten=0L; + chunks_overwritten=0L; + chunks_discarded=0L; + chunks_read=0L; + chunks_committed_out_of_order=0L; + write_wrap_count=0L; + patches_succeeded=0L; + patches_failed=0L; + readaheads_succeeded=0L; + readaheads_failed=0L; + abi_violations=0L; + trace_writer_packet_loss=0L; +} + +let default_trace_stats_writer_stats (): trace_stats_writer_stats = +{ + _presence=Pbrt.Bitfield.empty; + sequence_id=0L; + buffer=0l; + chunk_payload_histogram_counts=[]; + chunk_payload_histogram_sum=[]; +} + +let default_trace_stats_filter_stats (): trace_stats_filter_stats = +{ + _presence=Pbrt.Bitfield.empty; + input_packets=0L; + input_bytes=0L; + output_bytes=0L; + errors=0L; + time_taken_ns=0L; + bytes_discarded_per_buffer=[]; +} + +let default_trace_stats_final_flush_outcome () = (Final_flush_unspecified:trace_stats_final_flush_outcome) + +let default_trace_stats (): trace_stats = +{ + _presence=Pbrt.Bitfield.empty; + buffer_stats=[]; + chunk_payload_histogram_def=[]; + writer_stats=[]; + producers_connected=0l; + producers_seen=0L; + data_sources_registered=0l; + data_sources_seen=0L; + tracing_sessions=0l; + total_buffers=0l; + chunks_discarded=0L; + patches_discarded=0L; + invalid_packets=0L; + filter_stats=None; + flushes_requested=0L; + flushes_succeeded=0L; + flushes_failed=0L; + final_flush_outcome=default_trace_stats_final_flush_outcome (); +} + +let default_android_game_intervention_list_game_mode_info (): android_game_intervention_list_game_mode_info = +{ + _presence=Pbrt.Bitfield.empty; + mode=0l; + use_angle=false; + resolution_downscale=0.; + fps=0.; +} + +let default_android_game_intervention_list_game_package_info (): android_game_intervention_list_game_package_info = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + uid=0L; + current_mode=0l; + game_mode_info=[]; +} + +let default_android_game_intervention_list (): android_game_intervention_list = +{ + _presence=Pbrt.Bitfield.empty; + game_packages=[]; + parse_error=false; + read_error=false; +} + +let default_android_log_packet_log_event_arg_value (): android_log_packet_log_event_arg_value = Int_value (0L) + +let default_android_log_packet_log_event_arg (): android_log_packet_log_event_arg = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + value=None; +} + +let default_android_log_packet_log_event (): android_log_packet_log_event = +{ + _presence=Pbrt.Bitfield.empty; + log_id=default_android_log_id (); + pid=0l; + tid=0l; + uid=0l; + timestamp=0L; + tag=""; + prio=default_android_log_priority (); + message=""; + args=[]; +} + +let default_android_log_packet_stats (): android_log_packet_stats = +{ + _presence=Pbrt.Bitfield.empty; + num_total=0L; + num_failed=0L; + num_skipped=0L; +} + +let default_android_log_packet (): android_log_packet = +{ + events=[]; + stats=None; +} + +let default_android_system_property_property_value (): android_system_property_property_value = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + value=""; +} + +let default_android_system_property (): android_system_property = +{ + values=[]; +} + +let default_app_wakelock_info (): app_wakelock_info = +{ + _presence=Pbrt.Bitfield.empty; + iid=0l; + tag=""; + flags=0l; + owner_pid=0l; + owner_uid=0l; + work_uid=0l; +} + +let default_app_wakelock_bundle (): app_wakelock_bundle = +{ + _presence=Pbrt.Bitfield.empty; + intern_id=[]; + encoded_ts=[]; + info=None; + acquired=false; +} + +let default_bluetooth_trace_packet_type () = (Hci_cmd:bluetooth_trace_packet_type) + +let default_bluetooth_trace_event (): bluetooth_trace_event = +{ + _presence=Pbrt.Bitfield.empty; + packet_type=default_bluetooth_trace_packet_type (); + count=0l; + length=0l; + duration=0l; + op_code=0l; + event_code=0l; + subevent_code=0l; + connection_handle=0l; +} + +let default_android_camera_frame_event_capture_result_status () = (Status_unspecified:android_camera_frame_event_capture_result_status) + +let default_android_camera_frame_event_camera_node_processing_details (): android_camera_frame_event_camera_node_processing_details = +{ + _presence=Pbrt.Bitfield.empty; + node_id=0L; + start_processing_ns=0L; + end_processing_ns=0L; + scheduling_latency_ns=0L; +} + +let default_android_camera_frame_event (): android_camera_frame_event = +{ + _presence=Pbrt.Bitfield.empty; + session_id=0L; + camera_id=0l; + frame_number=0L; + request_id=0L; + request_received_ns=0L; + request_processing_started_ns=0L; + start_of_exposure_ns=0L; + start_of_frame_ns=0L; + responses_all_sent_ns=0L; + capture_result_status=default_android_camera_frame_event_capture_result_status (); + skipped_sensor_frames=0l; + capture_intent=0l; + num_streams=0l; + node_processing_details=[]; + vendor_data_version=0l; + vendor_data=Bytes.create 0; +} + +let default_android_camera_session_stats_camera_graph_camera_node (): android_camera_session_stats_camera_graph_camera_node = +{ + _presence=Pbrt.Bitfield.empty; + node_id=0L; + input_ids=[]; + output_ids=[]; + vendor_data_version=0l; + vendor_data=Bytes.create 0; +} + +let default_android_camera_session_stats_camera_graph_camera_edge (): android_camera_session_stats_camera_graph_camera_edge = +{ + _presence=Pbrt.Bitfield.empty; + output_node_id=0L; + output_id=0L; + input_node_id=0L; + input_id=0L; + vendor_data_version=0l; + vendor_data=Bytes.create 0; +} + +let default_android_camera_session_stats_camera_graph (): android_camera_session_stats_camera_graph = +{ + nodes=[]; + edges=[]; +} + +let default_android_camera_session_stats (): android_camera_session_stats = +{ + _presence=Pbrt.Bitfield.empty; + session_id=0L; + graph=None; +} + +let default_cpu_per_uid_data (): cpu_per_uid_data = +{ + _presence=Pbrt.Bitfield.empty; + cluster_count=0l; + uid=[]; + total_time_ms=[]; +} + +let default_frame_timeline_event_jank_type () = (Jank_unspecified:frame_timeline_event_jank_type) + +let default_frame_timeline_event_jank_severity_type () = (Severity_unknown:frame_timeline_event_jank_severity_type) + +let default_frame_timeline_event_present_type () = (Present_unspecified:frame_timeline_event_present_type) + +let default_frame_timeline_event_prediction_type () = (Prediction_unspecified:frame_timeline_event_prediction_type) + +let default_frame_timeline_event_expected_surface_frame_start (): frame_timeline_event_expected_surface_frame_start = +{ + _presence=Pbrt.Bitfield.empty; + cookie=0L; + token=0L; + display_frame_token=0L; + pid=0l; + layer_name=""; +} + +let default_frame_timeline_event_actual_surface_frame_start (): frame_timeline_event_actual_surface_frame_start = +{ + _presence=Pbrt.Bitfield.empty; + cookie=0L; + token=0L; + display_frame_token=0L; + pid=0l; + layer_name=""; + present_type=default_frame_timeline_event_present_type (); + on_time_finish=false; + gpu_composition=false; + jank_type=0l; + prediction_type=default_frame_timeline_event_prediction_type (); + is_buffer=false; + jank_severity_type=default_frame_timeline_event_jank_severity_type (); + present_delay_millis=0.; + vsync_resynced_jitter_millis=0.; + jank_severity_score=0.; + jank_type_experimental=0l; + present_type_experimental=default_frame_timeline_event_present_type (); +} + +let default_frame_timeline_event_expected_display_frame_start (): frame_timeline_event_expected_display_frame_start = +{ + _presence=Pbrt.Bitfield.empty; + cookie=0L; + token=0L; + pid=0l; +} + +let default_frame_timeline_event_actual_display_frame_start (): frame_timeline_event_actual_display_frame_start = +{ + _presence=Pbrt.Bitfield.empty; + cookie=0L; + token=0L; + pid=0l; + present_type=default_frame_timeline_event_present_type (); + on_time_finish=false; + gpu_composition=false; + jank_type=0l; + prediction_type=default_frame_timeline_event_prediction_type (); + jank_severity_type=default_frame_timeline_event_jank_severity_type (); + present_delay_millis=0.; + jank_severity_score=0.; + jank_type_experimental=0l; + present_type_experimental=default_frame_timeline_event_present_type (); +} + +let default_frame_timeline_event_frame_end (): frame_timeline_event_frame_end = +{ + _presence=Pbrt.Bitfield.empty; + cookie=0L; +} + +let default_frame_timeline_event (): frame_timeline_event = Expected_display_frame_start (default_frame_timeline_event_expected_display_frame_start ()) + +let default_gpu_mem_total_event (): gpu_mem_total_event = +{ + _presence=Pbrt.Bitfield.empty; + gpu_id=0l; + pid=0l; + size=0L; +} + +let default_graphics_frame_event_buffer_event_type () = (Unspecified:graphics_frame_event_buffer_event_type) + +let default_graphics_frame_event_buffer_event (): graphics_frame_event_buffer_event = +{ + _presence=Pbrt.Bitfield.empty; + frame_number=0l; + type_=default_graphics_frame_event_buffer_event_type (); + layer_name=""; + duration_ns=0L; + buffer_id=0l; +} + +let default_graphics_frame_event (): graphics_frame_event = +{ + buffer_event=None; +} + +let default_initial_display_state (): initial_display_state = +{ + _presence=Pbrt.Bitfield.empty; + display_state=0l; + brightness=0.; +} + +let default_kernel_wakelock_data_wakelock_type () = (Wakelock_type_unknown:kernel_wakelock_data_wakelock_type) + +let default_kernel_wakelock_data_wakelock (): kernel_wakelock_data_wakelock = +{ + _presence=Pbrt.Bitfield.empty; + wakelock_id=0l; + wakelock_name=""; + wakelock_type=default_kernel_wakelock_data_wakelock_type (); +} + +let default_kernel_wakelock_data (): kernel_wakelock_data = +{ + _presence=Pbrt.Bitfield.empty; + wakelock=[]; + wakelock_id=[]; + time_held_millis=[]; + error_flags=0L; +} + +let default_traffic_direction () = (Dir_unspecified:traffic_direction) + +let default_network_packet_event (): network_packet_event = +{ + _presence=Pbrt.Bitfield.empty; + direction=default_traffic_direction (); + network_interface=""; + length=0l; + uid=0l; + tag=0l; + ip_proto=0l; + tcp_flags=0l; + local_port=0l; + remote_port=0l; + icmp_type=0l; + icmp_code=0l; +} + +let default_network_packet_bundle_packet_context (): network_packet_bundle_packet_context = Iid (0L) + +let default_network_packet_bundle (): network_packet_bundle = +{ + _presence=Pbrt.Bitfield.empty; + packet_context=None; + packet_timestamps=[]; + packet_lengths=[]; + total_packets=0l; + total_duration=0L; + total_length=0L; +} + +let default_network_packet_context (): network_packet_context = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + ctx=None; +} + +let default_packages_list_package_info (): packages_list_package_info = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + uid=0L; + debuggable=false; + profileable_from_shell=false; + version_code=0L; +} + +let default_packages_list (): packages_list = +{ + _presence=Pbrt.Bitfield.empty; + packages=[]; + parse_error=false; + read_error=false; +} + +let default_pixel_modem_events (): pixel_modem_events = +{ + events=[]; + event_time_nanos=[]; +} + +let default_pixel_modem_token_database (): pixel_modem_token_database = +{ + _presence=Pbrt.Bitfield.empty; + database=Bytes.create 0; +} + +let default_proto_log_message (): proto_log_message = +{ + _presence=Pbrt.Bitfield.empty; + message_id=0L; + str_param_iids=[]; + sint64_params=[]; + double_params=[]; + boolean_params=[]; + stacktrace_iid=0l; +} + +let default_proto_log_viewer_config_message_data (): proto_log_viewer_config_message_data = +{ + _presence=Pbrt.Bitfield.empty; + message_id=0L; + message=""; + level=default_proto_log_level (); + group_id=0l; + location=""; +} + +let default_proto_log_viewer_config_group (): proto_log_viewer_config_group = +{ + _presence=Pbrt.Bitfield.empty; + id=0l; + name=""; + tag=""; +} + +let default_proto_log_viewer_config (): proto_log_viewer_config = +{ + messages=[]; + groups=[]; +} + +let default_shell_transition_target (): shell_transition_target = +{ + _presence=Pbrt.Bitfield.empty; + mode=0l; + layer_id=0l; + window_id=0l; + flags=0l; +} + +let default_shell_transition (): shell_transition = +{ + _presence=Pbrt.Bitfield.empty; + id=0l; + create_time_ns=0L; + send_time_ns=0L; + dispatch_time_ns=0L; + merge_time_ns=0L; + merge_request_time_ns=0L; + shell_abort_time_ns=0L; + wm_abort_time_ns=0L; + finish_time_ns=0L; + start_transaction_id=0L; + finish_transaction_id=0L; + handler=0l; + type_=0l; + targets=[]; + merge_target=0l; + flags=0l; + starting_window_remove_time_ns=0L; +} + +let default_shell_handler_mapping (): shell_handler_mapping = +{ + _presence=Pbrt.Bitfield.empty; + id=0l; + name=""; +} + +let default_shell_handler_mappings (): shell_handler_mappings = +{ + mapping=[]; +} + +let default_rect_proto (): rect_proto = +{ + _presence=Pbrt.Bitfield.empty; + left=0l; + top=0l; + right=0l; + bottom=0l; +} + +let default_region_proto (): region_proto = +{ + rect=[]; +} + +let default_size_proto (): size_proto = +{ + _presence=Pbrt.Bitfield.empty; + w=0l; + h=0l; +} + +let default_transform_proto (): transform_proto = +{ + _presence=Pbrt.Bitfield.empty; + dsdx=0.; + dtdx=0.; + dsdy=0.; + dtdy=0.; + type_=0l; +} + +let default_color_proto (): color_proto = +{ + _presence=Pbrt.Bitfield.empty; + r=0.; + g=0.; + b=0.; + a=0.; +} + +let default_input_window_info_proto (): input_window_info_proto = +{ + _presence=Pbrt.Bitfield.empty; + layout_params_flags=0l; + layout_params_type=0l; + frame=None; + touchable_region=None; + surface_inset=0l; + visible=false; + can_receive_keys=false; + focusable=false; + has_wallpaper=false; + global_scale_factor=0.; + window_x_scale=0.; + window_y_scale=0.; + crop_layer_id=0l; + replace_touchable_region_with_crop=false; + touchable_region_crop=None; + transform=None; + input_config=0l; +} + +let default_blur_region (): blur_region = +{ + _presence=Pbrt.Bitfield.empty; + blur_radius=0l; + corner_radius_tl=0l; + corner_radius_tr=0l; + corner_radius_bl=0l; + corner_radius_br=0.; + corner_radius_tlx=0.; + corner_radius_tly=0.; + corner_radius_trx=0.; + corner_radius_try=0.; + corner_radius_blx=0.; + corner_radius_bly=0.; + corner_radius_brx=0.; + corner_radius_bry=0.; + alpha=0.; + left=0l; + top=0l; + right=0l; + bottom=0l; +} + +let default_color_transform_proto (): color_transform_proto = +{ + val_=[]; +} + +let default_trusted_overlay () = (Unset:trusted_overlay) + +let default_box_shadow_settings_box_shadow_params (): box_shadow_settings_box_shadow_params = +{ + _presence=Pbrt.Bitfield.empty; + blur_radius=0.; + spread_radius=0.; + color=0l; + offset_x=0.; + offset_y=0.; +} + +let default_box_shadow_settings (): box_shadow_settings = +{ + box_shadows=[]; +} + +let default_border_settings (): border_settings = +{ + _presence=Pbrt.Bitfield.empty; + stroke_width=0.; + color=0l; +} + +let default_layers_trace_file_proto_magic_number () = (Invalid:layers_trace_file_proto_magic_number) + +let default_position_proto (): position_proto = +{ + _presence=Pbrt.Bitfield.empty; + x=0.; + y=0.; +} + +let default_active_buffer_proto (): active_buffer_proto = +{ + _presence=Pbrt.Bitfield.empty; + width=0l; + height=0l; + stride=0l; + format=0l; + usage=0L; +} + +let default_float_rect_proto (): float_rect_proto = +{ + _presence=Pbrt.Bitfield.empty; + left=0.; + top=0.; + right=0.; + bottom=0.; +} + +let default_hwc_composition_type () = (Hwc_type_unspecified:hwc_composition_type) + +let default_barrier_layer_proto (): barrier_layer_proto = +{ + _presence=Pbrt.Bitfield.empty; + id=0l; + frame_number=0L; +} + +let default_corner_radii_proto (): corner_radii_proto = +{ + _presence=Pbrt.Bitfield.empty; + tl=0.; + tr=0.; + bl=0.; + br=0.; +} + +let default_layer_proto (): layer_proto = +{ + _presence=Pbrt.Bitfield.empty; + id=0l; + name=""; + children=[]; + relatives=[]; + type_=""; + transparent_region=None; + visible_region=None; + damage_region=None; + layer_stack=0l; + z=0l; + position=None; + requested_position=None; + size=None; + crop=None; + final_crop=None; + is_opaque=false; + invalidate=false; + dataspace=""; + pixel_format=""; + color=None; + requested_color=None; + flags=0l; + transform=None; + requested_transform=None; + parent=0l; + z_order_relative_of=0l; + active_buffer=None; + queued_frames=0l; + refresh_pending=false; + hwc_frame=None; + hwc_crop=None; + hwc_transform=0l; + window_type=0l; + app_id=0l; + hwc_composition_type=default_hwc_composition_type (); + is_protected=false; + curr_frame=0L; + barrier_layer=[]; + buffer_transform=None; + effective_scaling_mode=0l; + corner_radius=0.; + metadata=[]; + effective_transform=None; + source_bounds=None; + bounds=None; + screen_bounds=None; + input_window_info=None; + corner_radius_crop=None; + shadow_radius=0.; + color_transform=None; + is_relative_of=false; + background_blur_radius=0l; + owner_uid=0l; + blur_regions=[]; + is_trusted_overlay=false; + requested_corner_radius=0.; + destination_frame=None; + original_id=0l; + trusted_overlay=default_trusted_overlay (); + background_blur_scale=0.; + corner_radii=None; + requested_corner_radii=None; + client_drawn_corner_radii=None; + system_content_priority=0l; + box_shadow_settings=None; + border_settings=None; + effective_radii=None; +} + +let default_layers_proto (): layers_proto = +{ + layers=[]; +} + +let default_display_proto (): display_proto = +{ + _presence=Pbrt.Bitfield.empty; + id=0L; + name=""; + layer_stack=0l; + size=None; + layer_stack_space_rect=None; + transform=None; + is_virtual=false; + dpi_x=0.; + dpi_y=0.; +} + +let default_layers_snapshot_proto (): layers_snapshot_proto = +{ + _presence=Pbrt.Bitfield.empty; + elapsed_realtime_nanos=0L; + where=""; + layers=None; + hwc_blob=""; + excludes_composition_state=false; + missed_entries=0l; + displays=[]; + vsync_id=0L; +} + +let default_layers_trace_file_proto (): layers_trace_file_proto = +{ + _presence=Pbrt.Bitfield.empty; + magic_number=0L; + entry=[]; + real_to_elapsed_time_offset_nanos=0L; +} + +let default_transaction_trace_file_magic_number () = (Invalid:transaction_trace_file_magic_number) + +let default_layer_state_matrix22 (): layer_state_matrix22 = +{ + _presence=Pbrt.Bitfield.empty; + dsdx=0.; + dtdx=0.; + dtdy=0.; + dsdy=0.; +} + +let default_layer_state_color3 (): layer_state_color3 = +{ + _presence=Pbrt.Bitfield.empty; + r=0.; + g=0.; + b=0.; +} + +let default_layer_state_buffer_data_pixel_format () = (Pixel_format_unknown:layer_state_buffer_data_pixel_format) + +let default_layer_state_buffer_data (): layer_state_buffer_data = +{ + _presence=Pbrt.Bitfield.empty; + buffer_id=0L; + width=0l; + height=0l; + frame_number=0L; + flags=0l; + cached_buffer_id=0L; + pixel_format=default_layer_state_buffer_data_pixel_format (); + usage=0L; +} + +let default_transform (): transform = +{ + _presence=Pbrt.Bitfield.empty; + dsdx=0.; + dtdx=0.; + dtdy=0.; + dsdy=0.; + tx=0.; + ty=0.; +} + +let default_layer_state_window_info (): layer_state_window_info = +{ + _presence=Pbrt.Bitfield.empty; + layout_params_flags=0l; + layout_params_type=0l; + touchable_region=None; + surface_inset=0l; + focusable=false; + has_wallpaper=false; + global_scale_factor=0.; + crop_layer_id=0l; + replace_touchable_region_with_crop=false; + touchable_region_crop=None; + transform=None; + input_config=0l; +} + +let default_layer_state_drop_input_mode () = (None:layer_state_drop_input_mode) + +let default_layer_state_corner_radii (): layer_state_corner_radii = +{ + _presence=Pbrt.Bitfield.empty; + tl=0.; + tr=0.; + bl=0.; + br=0.; +} + +let default_layer_state (): layer_state = +{ + _presence=Pbrt.Bitfield.empty; + layer_id=0l; + what=0L; + x=0.; + y=0.; + z=0l; + w=0l; + h=0l; + layer_stack=0l; + flags=0l; + mask=0l; + matrix=None; + corner_radius=0.; + background_blur_radius=0l; + parent_id=0l; + relative_parent_id=0l; + alpha=0.; + color=None; + transparent_region=None; + transform=0l; + transform_to_display_inverse=false; + crop=None; + buffer_data=None; + api=0l; + has_sideband_stream=false; + color_transform=None; + blur_regions=[]; + window_info_handle=None; + bg_color_alpha=0.; + bg_color_dataspace=0l; + color_space_agnostic=false; + shadow_radius=0.; + frame_rate_selection_priority=0l; + frame_rate=0.; + frame_rate_compatibility=0l; + change_frame_rate_strategy=0l; + fixed_transform_hint=0l; + frame_number=0L; + auto_refresh=false; + is_trusted_overlay=false; + buffer_crop=None; + destination_frame=None; + drop_input_mode=default_layer_state_drop_input_mode (); + trusted_overlay=default_trusted_overlay (); + background_blur_scale=0.; + corner_radii=None; + client_drawn_corner_radii=None; + system_content_priority=0l; + box_shadow_settings=None; + border_settings=None; +} + +let default_display_state (): display_state = +{ + _presence=Pbrt.Bitfield.empty; + id=0l; + what=0l; + flags=0l; + layer_stack=0l; + orientation=0l; + layer_stack_space_rect=None; + oriented_display_space_rect=None; + width=0l; + height=0l; +} + +let default_transaction_barrier (): transaction_barrier = +{ + _presence=Pbrt.Bitfield.empty; + barrier_token=""; + kind=0l; +} + +let default_transaction_state (): transaction_state = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + uid=0l; + vsync_id=0L; + input_event_id=0l; + post_time=0L; + transaction_id=0L; + layer_changes=[]; + display_changes=[]; + merged_transaction_ids=[]; + apply_token=0L; + transaction_barriers=[]; +} + +let default_layer_creation_args (): layer_creation_args = +{ + _presence=Pbrt.Bitfield.empty; + layer_id=0l; + name=""; + flags=0l; + parent_id=0l; + mirror_from_id=0l; + add_to_root=false; + layer_stack_to_mirror=0l; +} + +let default_display_info (): display_info = +{ + _presence=Pbrt.Bitfield.empty; + layer_stack=0l; + display_id=0l; + logical_width=0l; + logical_height=0l; + transform_inverse=None; + transform=None; + receives_input=false; + is_secure=false; + is_primary=false; + is_virtual=false; + rotation_flags=0l; + transform_hint=0l; +} + +let default_transaction_trace_entry (): transaction_trace_entry = +{ + _presence=Pbrt.Bitfield.empty; + elapsed_realtime_nanos=0L; + vsync_id=0L; + transactions=[]; + added_layers=[]; + destroyed_layers=[]; + added_displays=[]; + removed_displays=[]; + destroyed_layer_handles=[]; + displays_changed=false; + displays=[]; +} + +let default_transaction_trace_file (): transaction_trace_file = +{ + _presence=Pbrt.Bitfield.empty; + magic_number=0L; + entry=[]; + real_to_elapsed_time_offset_nanos=0L; + version=0l; +} + +let default_layer_state_changes_lsb () = (E_changes_lsb_none:layer_state_changes_lsb) + +let default_layer_state_changes_msb () = (E_changes_msb_none:layer_state_changes_msb) + +let default_layer_state_flags () = (E_flags_none:layer_state_flags) + +let default_layer_state_buffer_data_buffer_data_change () = (Buffer_data_change_none:layer_state_buffer_data_buffer_data_change) + +let default_display_state_changes () = (E_changes_none:display_state_changes) + +let default_winscope_extensions : winscope_extensions = () + +let default_chrome_benchmark_metadata (): chrome_benchmark_metadata = +{ + _presence=Pbrt.Bitfield.empty; + benchmark_start_time_us=0L; + story_run_time_us=0L; + benchmark_name=""; + benchmark_description=""; + label=""; + story_name=""; + story_tags=[]; + story_run_index=0l; + had_failures=false; +} + +let default_chrome_metadata_packet_finch_hash (): chrome_metadata_packet_finch_hash = +{ + _presence=Pbrt.Bitfield.empty; + name=0l; + group=0l; +} + +let default_background_tracing_metadata_trigger_rule_trigger_type () = (Trigger_unspecified:background_tracing_metadata_trigger_rule_trigger_type) + +let default_background_tracing_metadata_trigger_rule_histogram_rule (): background_tracing_metadata_trigger_rule_histogram_rule = +{ + _presence=Pbrt.Bitfield.empty; + histogram_name_hash=0L; + histogram_min_trigger=0L; + histogram_max_trigger=0L; +} + +let default_background_tracing_metadata_trigger_rule_named_rule_event_type () = (Unspecified:background_tracing_metadata_trigger_rule_named_rule_event_type) + +let default_background_tracing_metadata_trigger_rule_named_rule (): background_tracing_metadata_trigger_rule_named_rule = +{ + _presence=Pbrt.Bitfield.empty; + event_type=default_background_tracing_metadata_trigger_rule_named_rule_event_type (); + content_trigger_name_hash=0L; +} + +let default_background_tracing_metadata_trigger_rule (): background_tracing_metadata_trigger_rule = +{ + _presence=Pbrt.Bitfield.empty; + trigger_type=default_background_tracing_metadata_trigger_rule_trigger_type (); + histogram_rule=None; + named_rule=None; + name_hash=0l; +} + +let default_background_tracing_metadata (): background_tracing_metadata = +{ + _presence=Pbrt.Bitfield.empty; + triggered_rule=None; + active_rules=[]; + scenario_name_hash=0l; +} + +let default_chrome_metadata_packet (): chrome_metadata_packet = +{ + _presence=Pbrt.Bitfield.empty; + background_tracing_metadata=None; + chrome_version_code=0l; + enabled_categories=""; + field_trial_hashes=[]; +} + +let default_chrome_traced_value_nested_type () = (Dict:chrome_traced_value_nested_type) + +let default_chrome_traced_value (): chrome_traced_value = +{ + _presence=Pbrt.Bitfield.empty; + nested_type=default_chrome_traced_value_nested_type (); + dict_keys=[]; + dict_values=[]; + array_values=[]; + int_value=0l; + double_value=0.; + bool_value=false; + string_value=""; +} + +let default_chrome_string_table_entry (): chrome_string_table_entry = +{ + _presence=Pbrt.Bitfield.empty; + value=""; + index=0l; +} + +let default_chrome_trace_event_arg_value (): chrome_trace_event_arg_value = Bool_value (false) + +let default_chrome_trace_event_arg (): chrome_trace_event_arg = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + value=None; + name_index=0l; +} + +let default_chrome_trace_event (): chrome_trace_event = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + timestamp=0L; + phase=0l; + thread_id=0l; + duration=0L; + thread_duration=0L; + scope=""; + id=0L; + flags=0l; + category_group_name=""; + process_id=0l; + thread_timestamp=0L; + bind_id=0L; + args=[]; + name_index=0l; + category_group_name_index=0l; +} + +let default_chrome_metadata_value (): chrome_metadata_value = String_value ("") + +let default_chrome_metadata (): chrome_metadata = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + value=None; +} + +let default_chrome_legacy_json_trace_trace_type () = (User_trace:chrome_legacy_json_trace_trace_type) + +let default_chrome_legacy_json_trace (): chrome_legacy_json_trace = +{ + _presence=Pbrt.Bitfield.empty; + type_=default_chrome_legacy_json_trace_trace_type (); + data=""; +} + +let default_chrome_event_bundle (): chrome_event_bundle = +{ + trace_events=[]; + metadata=[]; + legacy_ftrace_output=[]; + legacy_json_trace=[]; + string_table=[]; +} + +let default_chrome_trigger (): chrome_trigger = +{ + _presence=Pbrt.Bitfield.empty; + trigger_name=""; + trigger_name_hash=0l; + flow_id=0L; +} + +let default_v8_string (): v8_string = Latin1 (Bytes.create 0) + +let default_interned_v8_string_encoded_string (): interned_v8_string_encoded_string = Latin1 (Bytes.create 0) + +let default_interned_v8_string (): interned_v8_string = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + encoded_string=None; +} + +let default_interned_v8_js_script_type () = (Type_unknown:interned_v8_js_script_type) + +let default_interned_v8_js_script (): interned_v8_js_script = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + script_id=0l; + type_=default_interned_v8_js_script_type (); + name=None; + source=None; +} + +let default_interned_v8_wasm_script (): interned_v8_wasm_script = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + script_id=0l; + url=""; + wire_bytes=Bytes.create 0; +} + +let default_interned_v8_js_function_kind () = (Kind_unknown:interned_v8_js_function_kind) + +let default_interned_v8_js_function (): interned_v8_js_function = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + v8_js_function_name_iid=0L; + v8_js_script_iid=0L; + is_toplevel=false; + kind=default_interned_v8_js_function_kind (); + byte_offset=0l; + line=0l; + column=0l; +} + +let default_interned_v8_isolate_code_range (): interned_v8_isolate_code_range = +{ + _presence=Pbrt.Bitfield.empty; + base_address=0L; + size=0L; + embedded_blob_code_copy_start_address=0L; + is_process_wide=false; +} + +let default_interned_v8_isolate (): interned_v8_isolate = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + pid=0l; + isolate_id=0l; + code_range=None; + embedded_blob_code_start_address=0L; + embedded_blob_code_size=0L; +} + +let default_v8_js_code_tier () = (Tier_unknown:v8_js_code_tier) + +let default_v8_js_code_instructions (): v8_js_code_instructions = Machine_code (Bytes.create 0) + +let default_v8_js_code (): v8_js_code = +{ + _presence=Pbrt.Bitfield.empty; + v8_isolate_iid=0L; + tid=0l; + v8_js_function_iid=0L; + tier=default_v8_js_code_tier (); + instruction_start=0L; + instruction_size_bytes=0L; + instructions=None; +} + +let default_v8_internal_code_type () = (Type_unknown:v8_internal_code_type) + +let default_v8_internal_code (): v8_internal_code = +{ + _presence=Pbrt.Bitfield.empty; + v8_isolate_iid=0L; + tid=0l; + name=""; + type_=default_v8_internal_code_type (); + builtin_id=0l; + instruction_start=0L; + instruction_size_bytes=0L; + machine_code=Bytes.create 0; +} + +let default_v8_wasm_code_tier () = (Tier_unknown:v8_wasm_code_tier) + +let default_v8_wasm_code (): v8_wasm_code = +{ + _presence=Pbrt.Bitfield.empty; + v8_isolate_iid=0L; + tid=0l; + v8_wasm_script_iid=0L; + function_name=""; + tier=default_v8_wasm_code_tier (); + code_offset_in_module=0l; + instruction_start=0L; + instruction_size_bytes=0L; + machine_code=Bytes.create 0; +} + +let default_v8_reg_exp_code (): v8_reg_exp_code = +{ + _presence=Pbrt.Bitfield.empty; + v8_isolate_iid=0L; + tid=0l; + pattern=None; + instruction_start=0L; + instruction_size_bytes=0L; + machine_code=Bytes.create 0; +} + +let default_v8_code_move_to_instructions (): v8_code_move_to_instructions = To_machine_code (Bytes.create 0) + +let default_v8_code_move (): v8_code_move = +{ + _presence=Pbrt.Bitfield.empty; + isolate_iid=0L; + tid=0l; + from_instruction_start_address=0L; + to_instruction_start_address=0L; + instruction_size_bytes=0L; + to_instructions=None; +} + +let default_v8_code_defaults (): v8_code_defaults = +{ + _presence=Pbrt.Bitfield.empty; + tid=0l; +} + +let default_clock_snapshot_clock_builtin_clocks () = (Unknown:clock_snapshot_clock_builtin_clocks) + +let default_clock_snapshot_clock (): clock_snapshot_clock = +{ + _presence=Pbrt.Bitfield.empty; + clock_id=0l; + timestamp=0L; + is_incremental=false; + unit_multiplier_ns=0L; +} + +let default_clock_snapshot (): clock_snapshot = +{ + _presence=Pbrt.Bitfield.empty; + clocks=[]; + primary_trace_clock=default_builtin_clock (); +} + +let default_cswitch_etw_event_old_thread_wait_reason () = (Executive:cswitch_etw_event_old_thread_wait_reason) + +let default_cswitch_etw_event_old_thread_wait_mode () = (Kernel_mode:cswitch_etw_event_old_thread_wait_mode) + +let default_cswitch_etw_event_old_thread_state () = (Initialized:cswitch_etw_event_old_thread_state) + +let default_cswitch_etw_event_old_thread_wait_reason_enum_or_int (): cswitch_etw_event_old_thread_wait_reason_enum_or_int = Old_thread_wait_reason (default_cswitch_etw_event_old_thread_wait_reason ()) + +let default_cswitch_etw_event_old_thread_wait_mode_enum_or_int (): cswitch_etw_event_old_thread_wait_mode_enum_or_int = Old_thread_wait_mode (default_cswitch_etw_event_old_thread_wait_mode ()) + +let default_cswitch_etw_event_old_thread_state_enum_or_int (): cswitch_etw_event_old_thread_state_enum_or_int = Old_thread_state (default_cswitch_etw_event_old_thread_state ()) + +let default_cswitch_etw_event (): cswitch_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + new_thread_id=0l; + old_thread_id=0l; + new_thread_priority=0l; + old_thread_priority=0l; + previous_c_state=0l; + old_thread_wait_reason_enum_or_int=None; + old_thread_wait_mode_enum_or_int=None; + old_thread_state_enum_or_int=None; + old_thread_wait_ideal_processor=0l; + new_thread_wait_time=0l; +} + +let default_ready_thread_etw_event_adjust_reason () = (Ignore_the_increment:ready_thread_etw_event_adjust_reason) + +let default_ready_thread_etw_event_trace_flag () = (Trace_flag_unspecified:ready_thread_etw_event_trace_flag) + +let default_ready_thread_etw_event_adjust_reason_enum_or_int (): ready_thread_etw_event_adjust_reason_enum_or_int = Adjust_reason (default_ready_thread_etw_event_adjust_reason ()) + +let default_ready_thread_etw_event_flag_enum_or_int (): ready_thread_etw_event_flag_enum_or_int = Flag (default_ready_thread_etw_event_trace_flag ()) + +let default_ready_thread_etw_event (): ready_thread_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + t_thread_id=0l; + adjust_reason_enum_or_int=None; + adjust_increment=0l; + flag_enum_or_int=None; +} + +let default_mem_info_etw_event (): mem_info_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + priority_levels=0l; + zero_page_count=0L; + free_page_count=0L; + modified_page_count=0L; + modified_no_write_page_count=0L; + bad_page_count=0L; + standby_page_counts=[]; + repurposed_page_counts=[]; + modified_page_count_page_file=0L; + paged_pool_page_count=0L; + non_paged_pool_page_count=0L; + mdl_page_count=0L; + commit_page_count=0L; +} + +let default_file_io_create_etw_event (): file_io_create_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + irp_ptr=0L; + file_object=0L; + ttid=0l; + create_options=0l; + file_attributes=0l; + share_access=0l; + open_path=""; +} + +let default_file_io_dir_enum_etw_event (): file_io_dir_enum_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + irp_ptr=0L; + file_object=0L; + file_key=0L; + ttid=0l; + length=0l; + info_class=0l; + file_index=0l; + file_name=""; +} + +let default_file_io_info_etw_event (): file_io_info_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + irp_ptr=0L; + file_object=0L; + file_key=0L; + extra_info=0L; + ttid=0l; + info_class=0l; +} + +let default_file_io_read_write_etw_event (): file_io_read_write_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + offset=0L; + irp_ptr=0L; + file_object=0L; + file_key=0L; + ttid=0l; + io_size=0l; + io_flags=0l; +} + +let default_file_io_simple_op_etw_event (): file_io_simple_op_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + irp_ptr=0L; + file_object=0L; + file_key=0L; + ttid=0l; +} + +let default_file_io_op_end_etw_event (): file_io_op_end_etw_event = +{ + _presence=Pbrt.Bitfield.empty; + irp_ptr=0L; + extra_info=0L; + nt_status=0l; +} + +let default_etw_trace_event_event (): etw_trace_event_event = C_switch (default_cswitch_etw_event ()) + +let default_etw_trace_event (): etw_trace_event = +{ + _presence=Pbrt.Bitfield.empty; + timestamp=0L; + cpu=0l; + thread_id=0l; + event=None; +} + +let default_etw_trace_event_bundle (): etw_trace_event_bundle = +{ + _presence=Pbrt.Bitfield.empty; + cpu=0l; + event=[]; +} + +let default_evdev_event_input_event (): evdev_event_input_event = +{ + _presence=Pbrt.Bitfield.empty; + kernel_timestamp=0L; + type_=0l; + code=0l; + value=0l; +} + +let default_evdev_event_event (): evdev_event_event = Input_event (default_evdev_event_input_event ()) + +let default_evdev_event (): evdev_event = +{ + _presence=Pbrt.Bitfield.empty; + device_id=0l; + event=None; +} + +let default_field_descriptor_proto_label () = (Label_optional:field_descriptor_proto_label) + +let default_field_descriptor_proto_type () = (Type_double:field_descriptor_proto_type) + +let default_uninterpreted_option_name_part (): uninterpreted_option_name_part = +{ + _presence=Pbrt.Bitfield.empty; + name_part=""; + is_extension=false; +} + +let default_uninterpreted_option (): uninterpreted_option = +{ + _presence=Pbrt.Bitfield.empty; + name=[]; + identifier_value=""; + positive_int_value=0L; + negative_int_value=0L; + double_value=0.; + string_value=Bytes.create 0; + aggregate_value=""; +} + +let default_field_options (): field_options = +{ + _presence=Pbrt.Bitfield.empty; + packed=false; + uninterpreted_option=[]; +} + +let default_field_descriptor_proto (): field_descriptor_proto = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + number=0l; + label=default_field_descriptor_proto_label (); + type_=default_field_descriptor_proto_type (); + type_name=""; + extendee=""; + default_value=""; + options=None; + oneof_index=0l; +} + +let default_enum_value_descriptor_proto (): enum_value_descriptor_proto = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + number=0l; +} + +let default_enum_descriptor_proto (): enum_descriptor_proto = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + value=[]; + reserved_name=[]; +} + +let default_oneof_options : oneof_options = () + +let default_oneof_descriptor_proto (): oneof_descriptor_proto = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + options=(); +} + +let default_descriptor_proto_reserved_range (): descriptor_proto_reserved_range = +{ + _presence=Pbrt.Bitfield.empty; + start=0l; + end_=0l; +} + +let default_descriptor_proto (): descriptor_proto = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + field=[]; + extension=[]; + nested_type=[]; + enum_type=[]; + oneof_decl=[]; + reserved_range=[]; + reserved_name=[]; +} + +let default_file_descriptor_proto (): file_descriptor_proto = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + package=""; + dependency=[]; + public_dependency=[]; + weak_dependency=[]; + message_type=[]; + enum_type=[]; + extension=[]; +} + +let default_file_descriptor_set (): file_descriptor_set = +{ + file=[]; +} + +let default_extension_descriptor (): extension_descriptor = +{ + extension_set=None; +} + +let default_inode_file_map_entry_type () = (Unknown:inode_file_map_entry_type) + +let default_inode_file_map_entry (): inode_file_map_entry = +{ + _presence=Pbrt.Bitfield.empty; + inode_number=0L; + paths=[]; + type_=default_inode_file_map_entry_type (); +} + +let default_inode_file_map (): inode_file_map = +{ + _presence=Pbrt.Bitfield.empty; + block_device_id=0L; + mount_points=[]; + entries=[]; +} + +let default_generic_kernel_cpu_frequency_event (): generic_kernel_cpu_frequency_event = +{ + _presence=Pbrt.Bitfield.empty; + cpu=0l; + freq_hz=0L; +} + +let default_generic_kernel_task_state_event_task_state_enum () = (Task_state_unknown:generic_kernel_task_state_event_task_state_enum) + +let default_generic_kernel_task_state_event (): generic_kernel_task_state_event = +{ + _presence=Pbrt.Bitfield.empty; + cpu=0l; + comm=""; + tid=0L; + state=default_generic_kernel_task_state_event_task_state_enum (); + prio=0l; +} + +let default_generic_kernel_task_rename_event (): generic_kernel_task_rename_event = +{ + _presence=Pbrt.Bitfield.empty; + tid=0L; + comm=""; +} + +let default_generic_kernel_process_tree_thread (): generic_kernel_process_tree_thread = +{ + _presence=Pbrt.Bitfield.empty; + tid=0L; + pid=0L; + comm=""; + is_main_thread=false; +} + +let default_generic_kernel_process_tree_process (): generic_kernel_process_tree_process = +{ + _presence=Pbrt.Bitfield.empty; + pid=0L; + ppid=0L; + cmdline=""; +} + +let default_generic_kernel_process_tree (): generic_kernel_process_tree = +{ + processes=[]; + threads=[]; +} + +let default_gpu_counter_event_gpu_counter_value (): gpu_counter_event_gpu_counter_value = Int_value (0L) + +let default_gpu_counter_event_gpu_counter (): gpu_counter_event_gpu_counter = +{ + _presence=Pbrt.Bitfield.empty; + counter_id=0l; + value=None; +} + +let default_gpu_counter_event (): gpu_counter_event = +{ + _presence=Pbrt.Bitfield.empty; + counter_descriptor=None; + counters=[]; + gpu_id=0l; +} + +let default_gpu_log_severity () = (Log_severity_unspecified:gpu_log_severity) + +let default_gpu_log (): gpu_log = +{ + _presence=Pbrt.Bitfield.empty; + severity=default_gpu_log_severity (); + tag=""; + log_message=""; +} + +let default_gpu_render_stage_event_extra_data (): gpu_render_stage_event_extra_data = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + value=""; +} + +let default_gpu_render_stage_event_specifications_context_spec (): gpu_render_stage_event_specifications_context_spec = +{ + _presence=Pbrt.Bitfield.empty; + context=0L; + pid=0l; +} + +let default_gpu_render_stage_event_specifications_description (): gpu_render_stage_event_specifications_description = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + description=""; +} + +let default_gpu_render_stage_event_specifications (): gpu_render_stage_event_specifications = +{ + context_spec=None; + hw_queue=[]; + stage=[]; +} + +let default_gpu_render_stage_event (): gpu_render_stage_event = +{ + _presence=Pbrt.Bitfield.empty; + event_id=0L; + duration=0L; + hw_queue_iid=0L; + stage_iid=0L; + gpu_id=0l; + context=0L; + render_target_handle=0L; + submission_id=0l; + extra_data=[]; + render_pass_handle=0L; + render_pass_instance_id=0L; + render_subpass_index_mask=[]; + command_buffer_handle=0L; + specifications=None; + hw_queue_id=0l; + stage_id=0l; +} + +let default_interned_graphics_context_api () = (Undefined:interned_graphics_context_api) + +let default_interned_graphics_context (): interned_graphics_context = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + pid=0l; + api=default_interned_graphics_context_api (); +} + +let default_interned_gpu_render_stage_specification_render_stage_category () = (Other:interned_gpu_render_stage_specification_render_stage_category) + +let default_interned_gpu_render_stage_specification (): interned_gpu_render_stage_specification = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + name=""; + description=""; + category=default_interned_gpu_render_stage_specification_render_stage_category (); +} + +let default_vulkan_api_event_vk_debug_utils_object_name (): vulkan_api_event_vk_debug_utils_object_name = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + vk_device=0L; + object_type=0l; + object_=0L; + object_name=""; +} + +let default_vulkan_api_event_vk_queue_submit (): vulkan_api_event_vk_queue_submit = +{ + _presence=Pbrt.Bitfield.empty; + duration_ns=0L; + pid=0l; + tid=0l; + vk_queue=0L; + vk_command_buffers=[]; + submission_id=0l; +} + +let default_vulkan_api_event (): vulkan_api_event = Vk_debug_utils_object_name (default_vulkan_api_event_vk_debug_utils_object_name ()) + +let default_vulkan_memory_event_annotation_value (): vulkan_memory_event_annotation_value = Int_value (0L) + +let default_vulkan_memory_event_annotation (): vulkan_memory_event_annotation = +{ + _presence=Pbrt.Bitfield.empty; + key_iid=0L; + value=None; +} + +let default_vulkan_memory_event_source () = (Source_unspecified:vulkan_memory_event_source) + +let default_vulkan_memory_event_operation () = (Op_unspecified:vulkan_memory_event_operation) + +let default_vulkan_memory_event_allocation_scope () = (Scope_unspecified:vulkan_memory_event_allocation_scope) + +let default_vulkan_memory_event (): vulkan_memory_event = +{ + _presence=Pbrt.Bitfield.empty; + source=default_vulkan_memory_event_source (); + operation=default_vulkan_memory_event_operation (); + timestamp=0L; + pid=0l; + memory_address=0L; + memory_size=0L; + caller_iid=0L; + allocation_scope=default_vulkan_memory_event_allocation_scope (); + annotations=[]; + device=0L; + device_memory=0L; + memory_type=0l; + heap=0l; + object_handle=0L; +} + +let default_interned_string (): interned_string = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + str=Bytes.create 0; +} + +let default_line (): line = +{ + _presence=Pbrt.Bitfield.empty; + function_name=""; + source_file_name=""; + line_number=0l; +} + +let default_address_symbols (): address_symbols = +{ + _presence=Pbrt.Bitfield.empty; + address=0L; + lines=[]; +} + +let default_module_symbols (): module_symbols = +{ + _presence=Pbrt.Bitfield.empty; + path=""; + build_id=""; + address_symbols=[]; +} + +let default_mapping (): mapping = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + build_id=0L; + exact_offset=0L; + start_offset=0L; + start=0L; + end_=0L; + load_bias=0L; + path_string_ids=[]; +} + +let default_frame (): frame = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + function_name_id=0L; + mapping_id=0L; + rel_pc=0L; + source_path_iid=0L; + line_number=0l; +} + +let default_callstack (): callstack = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + frame_ids=[]; +} + +let default_histogram_name (): histogram_name = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + name=""; +} + +let default_chrome_histogram_sample (): chrome_histogram_sample = +{ + _presence=Pbrt.Bitfield.empty; + name_hash=0L; + name=""; + sample=0L; + name_iid=0L; +} + +let default_debug_annotation_nested_value_nested_type () = (Unspecified:debug_annotation_nested_value_nested_type) + +let default_debug_annotation_nested_value (): debug_annotation_nested_value = +{ + _presence=Pbrt.Bitfield.empty; + nested_type=default_debug_annotation_nested_value_nested_type (); + dict_keys=[]; + dict_values=[]; + array_values=[]; + int_value=0L; + double_value=0.; + bool_value=false; + string_value=""; +} + +let default_debug_annotation_name_field (): debug_annotation_name_field = Name_iid (0L) + +let default_debug_annotation_value (): debug_annotation_value = Bool_value (false) + +let default_debug_annotation_proto_type_descriptor (): debug_annotation_proto_type_descriptor = Proto_type_name ("") + +let default_debug_annotation (): debug_annotation = +{ + _presence=Pbrt.Bitfield.empty; + name_field=None; + value=None; + proto_type_descriptor=None; + proto_value=Bytes.create 0; + dict_entries=[]; + array_values=[]; +} + +let default_debug_annotation_name (): debug_annotation_name = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + name=""; +} + +let default_debug_annotation_value_type_name (): debug_annotation_value_type_name = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + name=""; +} + +let default_log_message_priority () = (Prio_unspecified:log_message_priority) + +let default_log_message (): log_message = +{ + _presence=Pbrt.Bitfield.empty; + source_location_iid=0L; + body_iid=0L; + prio=default_log_message_priority (); +} + +let default_log_message_body (): log_message_body = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + body=""; +} + +let default_unsymbolized_source_location (): unsymbolized_source_location = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + mapping_id=0L; + rel_pc=0L; +} + +let default_source_location (): source_location = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + file_name=""; + function_name=""; + line_number=0l; +} + +let default_chrome_active_processes (): chrome_active_processes = +{ + pid=[]; +} + +let default_chrome_application_state_info_chrome_application_state () = (Application_state_unknown:chrome_application_state_info_chrome_application_state) + +let default_chrome_application_state_info (): chrome_application_state_info = +{ + _presence=Pbrt.Bitfield.empty; + application_state=default_chrome_application_state_info_chrome_application_state (); +} + +let default_chrome_compositor_scheduler_action () = (Cc_scheduler_action_unspecified:chrome_compositor_scheduler_action) + +let default_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode () = (Deadline_mode_unspecified:chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode) + +let default_chrome_compositor_state_machine_major_state_begin_impl_frame_state () = (Begin_impl_frame_unspecified:chrome_compositor_state_machine_major_state_begin_impl_frame_state) + +let default_chrome_compositor_state_machine_major_state_begin_main_frame_state () = (Begin_main_frame_unspecified:chrome_compositor_state_machine_major_state_begin_main_frame_state) + +let default_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state () = (Layer_tree_frame_unspecified:chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state) + +let default_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state () = (Forced_redraw_unspecified:chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state) + +let default_chrome_compositor_state_machine_major_state (): chrome_compositor_state_machine_major_state = +{ + _presence=Pbrt.Bitfield.empty; + next_action=default_chrome_compositor_scheduler_action (); + begin_impl_frame_state=default_chrome_compositor_state_machine_major_state_begin_impl_frame_state (); + begin_main_frame_state=default_chrome_compositor_state_machine_major_state_begin_main_frame_state (); + layer_tree_frame_sink_state=default_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state (); + forced_redraw_state=default_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state (); +} + +let default_chrome_compositor_state_machine_minor_state_tree_priority () = (Tree_priority_unspecified:chrome_compositor_state_machine_minor_state_tree_priority) + +let default_chrome_compositor_state_machine_minor_state_scroll_handler_state () = (Scroll_handler_unspecified:chrome_compositor_state_machine_minor_state_scroll_handler_state) + +let default_chrome_compositor_state_machine_minor_state (): chrome_compositor_state_machine_minor_state = +{ + _presence=Pbrt.Bitfield.empty; + commit_count=0l; + current_frame_number=0l; + last_frame_number_submit_performed=0l; + last_frame_number_draw_performed=0l; + last_frame_number_begin_main_frame_sent=0l; + did_draw=false; + did_send_begin_main_frame_for_current_frame=false; + did_notify_begin_main_frame_not_expected_until=false; + did_notify_begin_main_frame_not_expected_soon=false; + wants_begin_main_frame_not_expected=false; + did_commit_during_frame=false; + did_invalidate_layer_tree_frame_sink=false; + did_perform_impl_side_invalidaion=false; + did_prepare_tiles=false; + consecutive_checkerboard_animations=0l; + pending_submit_frames=0l; + submit_frames_with_current_layer_tree_frame_sink=0l; + needs_redraw=false; + needs_prepare_tiles=false; + needs_begin_main_frame=false; + needs_one_begin_impl_frame=false; + visible=false; + begin_frame_source_paused=false; + can_draw=false; + resourceless_draw=false; + has_pending_tree=false; + pending_tree_is_ready_for_activation=false; + active_tree_needs_first_draw=false; + active_tree_is_ready_to_draw=false; + did_create_and_initialize_first_layer_tree_frame_sink=false; + tree_priority=default_chrome_compositor_state_machine_minor_state_tree_priority (); + scroll_handler_state=default_chrome_compositor_state_machine_minor_state_scroll_handler_state (); + critical_begin_main_frame_to_activate_is_fast=false; + main_thread_missed_last_deadline=false; + video_needs_begin_frames=false; + defer_begin_main_frame=false; + last_commit_had_no_updates=false; + did_draw_in_last_frame=false; + did_submit_in_last_frame=false; + needs_impl_side_invalidation=false; + current_pending_tree_is_impl_side=false; + previous_pending_tree_was_impl_side=false; + processing_animation_worklets_for_active_tree=false; + processing_animation_worklets_for_pending_tree=false; + processing_paint_worklets_for_pending_tree=false; +} + +let default_chrome_compositor_state_machine (): chrome_compositor_state_machine = +{ + major_state=None; + minor_state=None; +} + +let default_begin_impl_frame_args_state () = (Begin_frame_finished:begin_impl_frame_args_state) + +let default_begin_frame_args_begin_frame_args_type () = (Begin_frame_args_type_unspecified:begin_frame_args_begin_frame_args_type) + +let default_begin_frame_args_created_from (): begin_frame_args_created_from = Source_location_iid (0L) + +let default_begin_frame_args (): begin_frame_args = +{ + _presence=Pbrt.Bitfield.empty; + type_=default_begin_frame_args_begin_frame_args_type (); + source_id=0L; + sequence_number=0L; + frame_time_us=0L; + deadline_us=0L; + interval_delta_us=0L; + on_critical_path=false; + animate_only=false; + created_from=None; + frames_throttled_since_last=0L; +} + +let default_begin_impl_frame_args_timestamps_in_us (): begin_impl_frame_args_timestamps_in_us = +{ + _presence=Pbrt.Bitfield.empty; + interval_delta=0L; + now_to_deadline_delta=0L; + frame_time_to_now_delta=0L; + frame_time_to_deadline_delta=0L; + now=0L; + frame_time=0L; + deadline=0L; +} + +let default_begin_impl_frame_args_args (): begin_impl_frame_args_args = Current_args (default_begin_frame_args ()) + +let default_begin_impl_frame_args (): begin_impl_frame_args = +{ + _presence=Pbrt.Bitfield.empty; + updated_at_us=0L; + finished_at_us=0L; + state=default_begin_impl_frame_args_state (); + args=None; + timestamps_in_us=None; +} + +let default_begin_frame_observer_state (): begin_frame_observer_state = +{ + _presence=Pbrt.Bitfield.empty; + dropped_begin_frame_args=0L; + last_begin_frame_args=None; +} + +let default_begin_frame_source_state (): begin_frame_source_state = +{ + _presence=Pbrt.Bitfield.empty; + source_id=0l; + paused=false; + num_observers=0l; + last_begin_frame_args=None; +} + +let default_compositor_timing_history (): compositor_timing_history = +{ + _presence=Pbrt.Bitfield.empty; + begin_main_frame_queue_critical_estimate_delta_us=0L; + begin_main_frame_queue_not_critical_estimate_delta_us=0L; + begin_main_frame_start_to_ready_to_commit_estimate_delta_us=0L; + commit_to_ready_to_activate_estimate_delta_us=0L; + prepare_tiles_estimate_delta_us=0L; + activate_estimate_delta_us=0L; + draw_estimate_delta_us=0L; +} + +let default_chrome_compositor_scheduler_state (): chrome_compositor_scheduler_state = +{ + _presence=Pbrt.Bitfield.empty; + state_machine=None; + observing_begin_frame_source=false; + begin_impl_frame_deadline_task=false; + pending_begin_frame_task=false; + skipped_last_frame_missed_exceeded_deadline=false; + inside_action=default_chrome_compositor_scheduler_action (); + deadline_mode=default_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode (); + deadline_us=0L; + deadline_scheduled_at_us=0L; + now_us=0L; + now_to_deadline_delta_us=0L; + now_to_deadline_scheduled_at_delta_us=0L; + begin_impl_frame_args=None; + begin_frame_observer_state=None; + begin_frame_source_state=None; + compositor_timing_history=None; +} + +let default_chrome_content_settings_event_info (): chrome_content_settings_event_info = +{ + _presence=Pbrt.Bitfield.empty; + number_of_exceptions=0l; +} + +let default_chrome_frame_reporter_state () = (State_no_update_desired:chrome_frame_reporter_state) + +let default_chrome_frame_reporter_frame_drop_reason () = (Reason_unspecified:chrome_frame_reporter_frame_drop_reason) + +let default_chrome_frame_reporter_scroll_state () = (Scroll_none:chrome_frame_reporter_scroll_state) + +let default_chrome_frame_reporter_frame_type () = (Forked:chrome_frame_reporter_frame_type) + +let default_chrome_frame_reporter (): chrome_frame_reporter = +{ + _presence=Pbrt.Bitfield.empty; + state=default_chrome_frame_reporter_state (); + reason=default_chrome_frame_reporter_frame_drop_reason (); + frame_source=0L; + frame_sequence=0L; + affects_smoothness=false; + scroll_state=default_chrome_frame_reporter_scroll_state (); + has_main_animation=false; + has_compositor_animation=false; + has_smooth_input_main=false; + has_missing_content=false; + layer_tree_host_id=0L; + has_high_latency=false; + frame_type=default_chrome_frame_reporter_frame_type (); + high_latency_contribution_stage=[]; + checkerboarded_needs_raster=false; + checkerboarded_needs_record=false; + surface_frame_trace_id=0L; + display_trace_id=0L; +} + +let default_chrome_keyed_service (): chrome_keyed_service = +{ + _presence=Pbrt.Bitfield.empty; + name=""; +} + +let default_chrome_latency_info_step () = (Step_unspecified:chrome_latency_info_step) + +let default_chrome_latency_info_latency_component_type () = (Component_unspecified:chrome_latency_info_latency_component_type) + +let default_chrome_latency_info_component_info (): chrome_latency_info_component_info = +{ + _presence=Pbrt.Bitfield.empty; + component_type=default_chrome_latency_info_latency_component_type (); + time_us=0L; +} + +let default_chrome_latency_info_input_type () = (Unspecified_or_other:chrome_latency_info_input_type) + +let default_chrome_latency_info (): chrome_latency_info = +{ + _presence=Pbrt.Bitfield.empty; + trace_id=0L; + step=default_chrome_latency_info_step (); + frame_tree_node_id=0l; + component_info=[]; + is_coalesced=false; + gesture_scroll_id=0L; + touch_id=0L; + input_type=default_chrome_latency_info_input_type (); +} + +let default_chrome_legacy_ipc_message_class () = (Class_unspecified:chrome_legacy_ipc_message_class) + +let default_chrome_legacy_ipc (): chrome_legacy_ipc = +{ + _presence=Pbrt.Bitfield.empty; + message_class=default_chrome_legacy_ipc_message_class (); + message_line=0l; +} + +let default_chrome_message_pump (): chrome_message_pump = +{ + _presence=Pbrt.Bitfield.empty; + sent_messages_in_queue=false; + io_handler_location_iid=0L; +} + +let default_chrome_mojo_event_info (): chrome_mojo_event_info = +{ + _presence=Pbrt.Bitfield.empty; + watcher_notify_interface_tag=""; + ipc_hash=0l; + mojo_interface_tag=""; + mojo_interface_method_iid=0L; + is_reply=false; + payload_size=0L; + data_num_bytes=0L; +} + +let default_chrome_railmode () = (Rail_mode_none:chrome_railmode) + +let default_chrome_renderer_scheduler_state (): chrome_renderer_scheduler_state = +{ + _presence=Pbrt.Bitfield.empty; + rail_mode=default_chrome_railmode (); + is_backgrounded=false; + is_hidden=false; +} + +let default_chrome_user_event (): chrome_user_event = +{ + _presence=Pbrt.Bitfield.empty; + action=""; + action_hash=0L; +} + +let default_chrome_window_handle_event_info (): chrome_window_handle_event_info = +{ + _presence=Pbrt.Bitfield.empty; + dpi=0l; + message_id=0l; + hwnd_ptr=0L; +} + +let default_screenshot (): screenshot = +{ + _presence=Pbrt.Bitfield.empty; + jpg_image=Bytes.create 0; +} + +let default_task_execution (): task_execution = +{ + _presence=Pbrt.Bitfield.empty; + posted_from_iid=0L; +} + +let default_track_event_type () = (Type_unspecified:track_event_type) + +let default_track_event_callstack_frame (): track_event_callstack_frame = +{ + _presence=Pbrt.Bitfield.empty; + function_name=""; + source_file=""; + line_number=0l; +} + +let default_track_event_callstack (): track_event_callstack = +{ + frames=[]; +} + +let default_track_event_legacy_event_flow_direction () = (Flow_unspecified:track_event_legacy_event_flow_direction) + +let default_track_event_legacy_event_instant_event_scope () = (Scope_unspecified:track_event_legacy_event_instant_event_scope) + +let default_track_event_legacy_event_id (): track_event_legacy_event_id = Unscoped_id (0L) + +let default_track_event_legacy_event (): track_event_legacy_event = +{ + _presence=Pbrt.Bitfield.empty; + name_iid=0L; + phase=0l; + duration_us=0L; + thread_duration_us=0L; + thread_instruction_delta=0L; + id=None; + id_scope=""; + use_async_tts=false; + bind_id=0L; + bind_to_enclosing=false; + flow_direction=default_track_event_legacy_event_flow_direction (); + instant_event_scope=default_track_event_legacy_event_instant_event_scope (); + pid_override=0l; + tid_override=0l; +} + +let default_track_event_name_field (): track_event_name_field = Name_iid (0L) + +let default_track_event_counter_value_field (): track_event_counter_value_field = Counter_value (0L) + +let default_track_event_correlation_id_field (): track_event_correlation_id_field = Correlation_id (0L) + +let default_track_event_callstack_field (): track_event_callstack_field = Callstack (default_track_event_callstack ()) + +let default_track_event_source_location_field (): track_event_source_location_field = Source_location (default_source_location ()) + +let default_track_event_timestamp (): track_event_timestamp = Timestamp_delta_us (0L) + +let default_track_event_thread_time (): track_event_thread_time = Thread_time_delta_us (0L) + +let default_track_event_thread_instruction_count (): track_event_thread_instruction_count = Thread_instruction_count_delta (0L) + +let default_track_event (): track_event = +{ + _presence=Pbrt.Bitfield.empty; + category_iids=[]; + categories=[]; + name_field=None; + type_=default_track_event_type (); + track_uuid=0L; + counter_value_field=None; + extra_counter_track_uuids=[]; + extra_counter_values=[]; + extra_double_counter_track_uuids=[]; + extra_double_counter_values=[]; + flow_ids_old=[]; + flow_ids=[]; + terminating_flow_ids_old=[]; + terminating_flow_ids=[]; + correlation_id_field=None; + callstack_field=None; + debug_annotations=[]; + task_execution=None; + log_message=None; + cc_scheduler_state=None; + chrome_user_event=None; + chrome_keyed_service=None; + chrome_legacy_ipc=None; + chrome_histogram_sample=None; + chrome_latency_info=None; + chrome_frame_reporter=None; + chrome_application_state_info=None; + chrome_renderer_scheduler_state=None; + chrome_window_handle_event_info=None; + chrome_content_settings_event_info=None; + chrome_active_processes=None; + screenshot=None; + source_location_field=None; + chrome_message_pump=None; + chrome_mojo_event_info=None; + timestamp=None; + thread_time=None; + thread_instruction_count=None; + legacy_event=None; +} + +let default_track_event_defaults (): track_event_defaults = +{ + _presence=Pbrt.Bitfield.empty; + track_uuid=0L; + extra_counter_track_uuids=[]; + extra_double_counter_track_uuids=[]; +} + +let default_event_category (): event_category = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + name=""; +} + +let default_event_name (): event_name = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + name=""; +} + +let default_interned_data (): interned_data = +{ + event_categories=[]; + event_names=[]; + debug_annotation_names=[]; + debug_annotation_value_type_names=[]; + source_locations=[]; + unsymbolized_source_locations=[]; + log_message_body=[]; + histogram_names=[]; + build_ids=[]; + mapping_paths=[]; + source_paths=[]; + function_names=[]; + mappings=[]; + frames=[]; + callstacks=[]; + vulkan_memory_keys=[]; + graphics_contexts=[]; + gpu_specifications=[]; + kernel_symbols=[]; + debug_annotation_string_values=[]; + packet_context=[]; + v8_js_function_name=[]; + v8_js_function=[]; + v8_js_script=[]; + v8_wasm_script=[]; + v8_isolate=[]; + protolog_string_args=[]; + protolog_stacktrace=[]; + viewcapture_package_name=[]; + viewcapture_window_name=[]; + viewcapture_view_id=[]; + viewcapture_class_name=[]; + app_wakelock_info=[]; + correlation_id_str=[]; +} + +let default_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units () = (Unspecified:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units) + +let default_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry (): memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + units=default_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units (); + value_uint64=0L; + value_string=""; +} + +let default_memory_tracker_snapshot_process_snapshot_memory_node (): memory_tracker_snapshot_process_snapshot_memory_node = +{ + _presence=Pbrt.Bitfield.empty; + id=0L; + absolute_name=""; + weak=false; + size_bytes=0L; + entries=[]; +} + +let default_memory_tracker_snapshot_process_snapshot_memory_edge (): memory_tracker_snapshot_process_snapshot_memory_edge = +{ + _presence=Pbrt.Bitfield.empty; + source_id=0L; + target_id=0L; + importance=0l; + overridable=false; +} + +let default_memory_tracker_snapshot_process_snapshot (): memory_tracker_snapshot_process_snapshot = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + allocator_dumps=[]; + memory_edges=[]; +} + +let default_memory_tracker_snapshot_level_of_detail () = (Detail_full:memory_tracker_snapshot_level_of_detail) + +let default_memory_tracker_snapshot (): memory_tracker_snapshot = +{ + _presence=Pbrt.Bitfield.empty; + global_dump_id=0L; + level_of_detail=default_memory_tracker_snapshot_level_of_detail (); + process_memory_dumps=[]; +} + +let default_perfetto_metatrace_arg_key_or_interned_key (): perfetto_metatrace_arg_key_or_interned_key = Key ("") + +let default_perfetto_metatrace_arg_value_or_interned_value (): perfetto_metatrace_arg_value_or_interned_value = Value ("") + +let default_perfetto_metatrace_arg (): perfetto_metatrace_arg = +{ + key_or_interned_key=None; + value_or_interned_value=None; +} + +let default_perfetto_metatrace_interned_string (): perfetto_metatrace_interned_string = +{ + _presence=Pbrt.Bitfield.empty; + iid=0L; + value=""; +} + +let default_perfetto_metatrace_record_type (): perfetto_metatrace_record_type = Event_id (0l) + +let default_perfetto_metatrace (): perfetto_metatrace = +{ + _presence=Pbrt.Bitfield.empty; + record_type=None; + event_duration_ns=0L; + counter_value=0l; + thread_id=0l; + has_overruns=false; + args=[]; + interned_strings=[]; +} + +let default_tracing_service_event_data_sources_data_source (): tracing_service_event_data_sources_data_source = +{ + _presence=Pbrt.Bitfield.empty; + producer_name=""; + data_source_name=""; +} + +let default_tracing_service_event_data_sources (): tracing_service_event_data_sources = +{ + data_source=[]; +} + +let default_tracing_service_event (): tracing_service_event = Tracing_started (false) + +let default_android_energy_consumer (): android_energy_consumer = +{ + _presence=Pbrt.Bitfield.empty; + energy_consumer_id=0l; + ordinal=0l; + type_=""; + name=""; +} + +let default_android_energy_consumer_descriptor (): android_energy_consumer_descriptor = +{ + energy_consumers=[]; +} + +let default_android_energy_estimation_breakdown_energy_uid_breakdown (): android_energy_estimation_breakdown_energy_uid_breakdown = +{ + _presence=Pbrt.Bitfield.empty; + uid=0l; + energy_uws=0L; +} + +let default_android_energy_estimation_breakdown (): android_energy_estimation_breakdown = +{ + _presence=Pbrt.Bitfield.empty; + energy_consumer_descriptor=None; + energy_consumer_id=0l; + energy_uws=0L; + per_uid_breakdown=[]; +} + +let default_entity_state_residency_power_entity_state (): entity_state_residency_power_entity_state = +{ + _presence=Pbrt.Bitfield.empty; + entity_index=0l; + state_index=0l; + entity_name=""; + state_name=""; +} + +let default_entity_state_residency_state_residency (): entity_state_residency_state_residency = +{ + _presence=Pbrt.Bitfield.empty; + entity_index=0l; + state_index=0l; + total_time_in_state_ms=0L; + total_state_entry_count=0L; + last_entry_timestamp_ms=0L; +} + +let default_entity_state_residency (): entity_state_residency = +{ + power_entity_state=[]; + residency=[]; +} + +let default_battery_counters (): battery_counters = +{ + _presence=Pbrt.Bitfield.empty; + charge_counter_uah=0L; + capacity_percent=0.; + current_ua=0L; + current_avg_ua=0L; + name=""; + energy_counter_uwh=0L; + voltage_uv=0L; +} + +let default_power_rails_rail_descriptor (): power_rails_rail_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + index=0l; + rail_name=""; + subsys_name=""; + sampling_rate=0l; +} + +let default_power_rails_energy_data (): power_rails_energy_data = +{ + _presence=Pbrt.Bitfield.empty; + index=0l; + timestamp_ms=0L; + energy=0L; +} + +let default_power_rails (): power_rails = +{ + _presence=Pbrt.Bitfield.empty; + rail_descriptor=[]; + energy_data=[]; + session_uuid=0L; +} + +let default_obfuscated_member (): obfuscated_member = +{ + _presence=Pbrt.Bitfield.empty; + obfuscated_name=""; + deobfuscated_name=""; +} + +let default_obfuscated_class (): obfuscated_class = +{ + _presence=Pbrt.Bitfield.empty; + obfuscated_name=""; + deobfuscated_name=""; + obfuscated_members=[]; + obfuscated_methods=[]; +} + +let default_deobfuscation_mapping (): deobfuscation_mapping = +{ + _presence=Pbrt.Bitfield.empty; + package_name=""; + version_code=0L; + obfuscated_classes=[]; +} + +let default_heap_graph_root_type () = (Root_unknown:heap_graph_root_type) + +let default_heap_graph_root (): heap_graph_root = +{ + _presence=Pbrt.Bitfield.empty; + object_ids=[]; + root_type=default_heap_graph_root_type (); +} + +let default_heap_graph_type_kind () = (Kind_unknown:heap_graph_type_kind) + +let default_heap_graph_type (): heap_graph_type = +{ + _presence=Pbrt.Bitfield.empty; + id=0L; + location_id=0L; + class_name=""; + object_size=0L; + superclass_id=0L; + reference_field_id=[]; + kind=default_heap_graph_type_kind (); + classloader_id=0L; +} + +let default_heap_graph_object_heap_type () = (Heap_type_unknown:heap_graph_object_heap_type) + +let default_heap_graph_object_identifier (): heap_graph_object_identifier = Id (0L) + +let default_heap_graph_object (): heap_graph_object = +{ + _presence=Pbrt.Bitfield.empty; + identifier=None; + type_id=0L; + self_size=0L; + reference_field_id_base=0L; + reference_field_id=[]; + reference_object_id=[]; + native_allocation_registry_size_field=0L; + heap_type_delta=default_heap_graph_object_heap_type (); + runtime_internal_object_id=[]; +} + +let default_heap_graph (): heap_graph = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + objects=[]; + roots=[]; + types=[]; + field_names=[]; + location_names=[]; + continued=false; + index=0L; +} + +let default_profile_packet_heap_sample (): profile_packet_heap_sample = +{ + _presence=Pbrt.Bitfield.empty; + callstack_id=0L; + self_allocated=0L; + self_freed=0L; + self_max=0L; + self_max_count=0L; + timestamp=0L; + alloc_count=0L; + free_count=0L; +} + +let default_profile_packet_histogram_bucket (): profile_packet_histogram_bucket = +{ + _presence=Pbrt.Bitfield.empty; + upper_limit=0L; + max_bucket=false; + count=0L; +} + +let default_profile_packet_histogram (): profile_packet_histogram = +{ + buckets=[]; +} + +let default_profile_packet_process_stats (): profile_packet_process_stats = +{ + _presence=Pbrt.Bitfield.empty; + unwinding_errors=0L; + heap_samples=0L; + map_reparses=0L; + unwinding_time_us=None; + total_unwinding_time_us=0L; + client_spinlock_blocked_us=0L; +} + +let default_profile_packet_process_heap_samples_client_error () = (Client_error_none:profile_packet_process_heap_samples_client_error) + +let default_profile_packet_process_heap_samples (): profile_packet_process_heap_samples = +{ + _presence=Pbrt.Bitfield.empty; + pid=0L; + from_startup=false; + rejected_concurrent=false; + disconnected=false; + buffer_overran=false; + client_error=default_profile_packet_process_heap_samples_client_error (); + buffer_corrupted=false; + hit_guardrail=false; + heap_name=""; + sampling_interval_bytes=0L; + orig_sampling_interval_bytes=0L; + timestamp=0L; + stats=None; + samples=[]; +} + +let default_profile_packet (): profile_packet = +{ + _presence=Pbrt.Bitfield.empty; + strings=[]; + mappings=[]; + frames=[]; + callstacks=[]; + process_dumps=[]; + continued=false; + index=0L; +} + +let default_streaming_allocation (): streaming_allocation = +{ + address=[]; + size=[]; + sample_size=[]; + clock_monotonic_coarse_timestamp=[]; + heap_id=[]; + sequence_number=[]; +} + +let default_streaming_free (): streaming_free = +{ + address=[]; + heap_id=[]; + sequence_number=[]; +} + +let default_streaming_profile_packet (): streaming_profile_packet = +{ + _presence=Pbrt.Bitfield.empty; + callstack_iid=[]; + timestamp_delta_us=[]; + process_priority=0l; +} + +let default_profiling_cpu_mode () = (Mode_unknown:profiling_cpu_mode) + +let default_profiling_stack_unwind_error () = (Unwind_error_unknown:profiling_stack_unwind_error) + +let default_profiling : profiling = () + +let default_perf_sample_sample_skip_reason () = (Profiler_skip_unknown:perf_sample_sample_skip_reason) + +let default_perf_sample_producer_event_data_source_stop_reason () = (Profiler_stop_unknown:perf_sample_producer_event_data_source_stop_reason) + +let default_perf_sample_producer_event (): perf_sample_producer_event = Source_stop_reason (default_perf_sample_producer_event_data_source_stop_reason ()) + +let default_perf_sample_optional_unwind_error (): perf_sample_optional_unwind_error = Unwind_error (default_profiling_stack_unwind_error ()) + +let default_perf_sample_optional_sample_skipped_reason (): perf_sample_optional_sample_skipped_reason = Sample_skipped_reason (default_perf_sample_sample_skip_reason ()) + +let default_perf_sample (): perf_sample = +{ + _presence=Pbrt.Bitfield.empty; + cpu=0l; + pid=0l; + tid=0l; + cpu_mode=default_profiling_cpu_mode (); + timebase_count=0L; + follower_counts=[]; + callstack_iid=0L; + optional_unwind_error=None; + kernel_records_lost=0L; + optional_sample_skipped_reason=None; + producer_event=None; +} + +let default_smaps_entry (): smaps_entry = +{ + _presence=Pbrt.Bitfield.empty; + path=""; + size_kb=0L; + private_dirty_kb=0L; + swap_kb=0L; + file_name=""; + start_address=0L; + module_timestamp=0L; + module_debugid=""; + module_debug_path=""; + protection_flags=0l; + private_clean_resident_kb=0L; + shared_dirty_resident_kb=0L; + shared_clean_resident_kb=0L; + locked_kb=0L; + proportional_resident_kb=0L; +} + +let default_smaps_packet (): smaps_packet = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + entries=[]; +} + +let default_process_stats_thread (): process_stats_thread = +{ + _presence=Pbrt.Bitfield.empty; + tid=0l; +} + +let default_process_stats_fdinfo (): process_stats_fdinfo = +{ + _presence=Pbrt.Bitfield.empty; + fd=0L; + path=""; +} + +let default_process_stats_process (): process_stats_process = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + threads=[]; + vm_size_kb=0L; + vm_rss_kb=0L; + rss_anon_kb=0L; + rss_file_kb=0L; + rss_shmem_kb=0L; + vm_swap_kb=0L; + vm_locked_kb=0L; + vm_hwm_kb=0L; + oom_score_adj=0L; + is_peak_rss_resettable=false; + chrome_private_footprint_kb=0l; + chrome_peak_resident_set_kb=0l; + fds=[]; + smr_rss_kb=0L; + smr_pss_kb=0L; + smr_pss_anon_kb=0L; + smr_pss_file_kb=0L; + smr_pss_shmem_kb=0L; + smr_swap_pss_kb=0L; + runtime_user_mode=0L; + runtime_kernel_mode=0L; + dmabuf_rss_kb=0L; +} + +let default_process_stats (): process_stats = +{ + _presence=Pbrt.Bitfield.empty; + processes=[]; + collection_end_timestamp=0L; +} + +let default_process_tree_thread (): process_tree_thread = +{ + _presence=Pbrt.Bitfield.empty; + tid=0l; + tgid=0l; + name=""; + nstid=[]; +} + +let default_process_tree_process (): process_tree_process = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + ppid=0l; + cmdline=[]; + cmdline_is_comm=false; + uid=0l; + nspid=[]; + process_start_from_boot=0L; + is_kthread=false; +} + +let default_process_tree (): process_tree = +{ + _presence=Pbrt.Bitfield.empty; + processes=[]; + threads=[]; + collection_end_timestamp=0L; +} + +let default_remote_clock_sync_synced_clocks (): remote_clock_sync_synced_clocks = +{ + client_clocks=None; + host_clocks=None; +} + +let default_remote_clock_sync (): remote_clock_sync = +{ + synced_clocks=[]; +} + +let default_atom : atom = () + +let default_statsd_atom (): statsd_atom = +{ + atom=[]; + timestamp_nanos=[]; +} + +let default_sys_stats_meminfo_value (): sys_stats_meminfo_value = +{ + _presence=Pbrt.Bitfield.empty; + key=default_meminfo_counters (); + value=0L; +} + +let default_sys_stats_vmstat_value (): sys_stats_vmstat_value = +{ + _presence=Pbrt.Bitfield.empty; + key=default_vmstat_counters (); + value=0L; +} + +let default_sys_stats_cpu_times (): sys_stats_cpu_times = +{ + _presence=Pbrt.Bitfield.empty; + cpu_id=0l; + user_ns=0L; + user_nice_ns=0L; + system_mode_ns=0L; + idle_ns=0L; + io_wait_ns=0L; + irq_ns=0L; + softirq_ns=0L; + steal_ns=0L; +} + +let default_sys_stats_interrupt_count (): sys_stats_interrupt_count = +{ + _presence=Pbrt.Bitfield.empty; + irq=0l; + count=0L; +} + +let default_sys_stats_devfreq_value (): sys_stats_devfreq_value = +{ + _presence=Pbrt.Bitfield.empty; + key=""; + value=0L; +} + +let default_sys_stats_buddy_info (): sys_stats_buddy_info = +{ + _presence=Pbrt.Bitfield.empty; + node=""; + zone=""; + order_pages=[]; +} + +let default_sys_stats_disk_stat (): sys_stats_disk_stat = +{ + _presence=Pbrt.Bitfield.empty; + device_name=""; + read_sectors=0L; + read_time_ms=0L; + write_sectors=0L; + write_time_ms=0L; + discard_sectors=0L; + discard_time_ms=0L; + flush_count=0L; + flush_time_ms=0L; +} + +let default_sys_stats_psi_sample_psi_resource () = (Psi_resource_unspecified:sys_stats_psi_sample_psi_resource) + +let default_sys_stats_psi_sample (): sys_stats_psi_sample = +{ + _presence=Pbrt.Bitfield.empty; + resource=default_sys_stats_psi_sample_psi_resource (); + total_ns=0L; +} + +let default_sys_stats_thermal_zone (): sys_stats_thermal_zone = +{ + _presence=Pbrt.Bitfield.empty; + name=""; + temp=0L; + type_=""; +} + +let default_sys_stats_cpu_idle_state_entry (): sys_stats_cpu_idle_state_entry = +{ + _presence=Pbrt.Bitfield.empty; + state=""; + duration_us=0L; +} + +let default_sys_stats_cpu_idle_state (): sys_stats_cpu_idle_state = +{ + _presence=Pbrt.Bitfield.empty; + cpu_id=0l; + cpuidle_state_entry=[]; +} + +let default_sys_stats (): sys_stats = +{ + _presence=Pbrt.Bitfield.empty; + meminfo=[]; + vmstat=[]; + cpu_stat=[]; + num_forks=0L; + num_irq_total=0L; + num_irq=[]; + num_softirq_total=0L; + num_softirq=[]; + collection_end_timestamp=0L; + devfreq=[]; + cpufreq_khz=[]; + buddy_info=[]; + disk_stat=[]; + psi=[]; + thermal_zone=[]; + cpuidle_state=[]; + gpufreq_mhz=[]; +} + +let default_cpu_info_arm_cpu_identifier (): cpu_info_arm_cpu_identifier = +{ + _presence=Pbrt.Bitfield.empty; + implementer=0l; + architecture=0l; + variant=0l; + part=0l; + revision=0l; +} + +let default_cpu_info_cpu_identifier (): cpu_info_cpu_identifier = Arm_identifier (default_cpu_info_arm_cpu_identifier ()) + +let default_cpu_info_cpu (): cpu_info_cpu = +{ + _presence=Pbrt.Bitfield.empty; + processor=""; + frequencies=[]; + capacity=0l; + identifier=None; + features=0L; +} + +let default_cpu_info (): cpu_info = +{ + cpus=[]; +} + +let default_test_event_test_payload (): test_event_test_payload = +{ + _presence=Pbrt.Bitfield.empty; + str=[]; + nested=[]; + single_string=""; + single_int=0l; + repeated_ints=[]; + remaining_nesting_depth=0l; + debug_annotations=[]; +} + +let default_test_event (): test_event = +{ + _presence=Pbrt.Bitfield.empty; + str=""; + seq_value=0l; + counter=0L; + is_last=false; + payload=None; +} + +let default_trace_packet_defaults (): trace_packet_defaults = +{ + _presence=Pbrt.Bitfield.empty; + timestamp_clock_id=0l; + track_event_defaults=None; + v8_code_defaults=None; +} + +let default_trace_uuid (): trace_uuid = +{ + _presence=Pbrt.Bitfield.empty; + msb=0L; + lsb=0L; +} + +let default_process_descriptor_chrome_process_type () = (Process_unspecified:process_descriptor_chrome_process_type) + +let default_process_descriptor (): process_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + cmdline=[]; + process_name=""; + process_priority=0l; + start_timestamp_ns=0L; + chrome_process_type=default_process_descriptor_chrome_process_type (); + legacy_sort_index=0l; + process_labels=[]; +} + +let default_track_event_range_of_interest (): track_event_range_of_interest = +{ + _presence=Pbrt.Bitfield.empty; + start_us=0L; +} + +let default_thread_descriptor_chrome_thread_type () = (Chrome_thread_unspecified:thread_descriptor_chrome_thread_type) + +let default_thread_descriptor (): thread_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + pid=0l; + tid=0l; + thread_name=""; + chrome_thread_type=default_thread_descriptor_chrome_thread_type (); + reference_timestamp_us=0L; + reference_thread_time_us=0L; + reference_thread_instruction_count=0L; + legacy_sort_index=0l; +} + +let default_chrome_process_descriptor (): chrome_process_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + process_type=0l; + process_priority=0l; + legacy_sort_index=0l; + host_app_package_name=""; + crash_trace_id=0L; +} + +let default_chrome_thread_descriptor (): chrome_thread_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + thread_type=0l; + legacy_sort_index=0l; + is_sandboxed_tid=false; +} + +let default_counter_descriptor_builtin_counter_type () = (Counter_unspecified:counter_descriptor_builtin_counter_type) + +let default_counter_descriptor_unit () = (Unit_unspecified:counter_descriptor_unit) + +let default_counter_descriptor (): counter_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + type_=default_counter_descriptor_builtin_counter_type (); + categories=[]; + unit_=default_counter_descriptor_unit (); + unit_name=""; + unit_multiplier=0L; + is_incremental=false; + y_axis_share_key=""; +} + +let default_track_descriptor_child_tracks_ordering () = (Unknown:track_descriptor_child_tracks_ordering) + +let default_track_descriptor_sibling_merge_behavior () = (Sibling_merge_behavior_unspecified:track_descriptor_sibling_merge_behavior) + +let default_track_descriptor_static_or_dynamic_name (): track_descriptor_static_or_dynamic_name = Name ("") + +let default_track_descriptor_sibling_merge_key_field (): track_descriptor_sibling_merge_key_field = Sibling_merge_key ("") + +let default_track_descriptor (): track_descriptor = +{ + _presence=Pbrt.Bitfield.empty; + uuid=0L; + parent_uuid=0L; + static_or_dynamic_name=None; + description=""; + process=None; + chrome_process=None; + thread=None; + chrome_thread=None; + counter=None; + disallow_merging_with_system_tracks=false; + child_ordering=default_track_descriptor_child_tracks_ordering (); + sibling_order_rank=0l; + sibling_merge_behavior=default_track_descriptor_sibling_merge_behavior (); + sibling_merge_key_field=None; +} + +let default_chrome_historgram_translation_table (): chrome_historgram_translation_table = +{ + hash_to_name=[]; +} + +let default_chrome_user_event_translation_table (): chrome_user_event_translation_table = +{ + action_hash_to_name=[]; +} + +let default_chrome_performance_mark_translation_table (): chrome_performance_mark_translation_table = +{ + site_hash_to_name=[]; + mark_hash_to_name=[]; +} + +let default_slice_name_translation_table (): slice_name_translation_table = +{ + raw_to_deobfuscated_name=[]; +} + +let default_process_track_name_translation_table (): process_track_name_translation_table = +{ + raw_to_deobfuscated_name=[]; +} + +let default_chrome_study_translation_table (): chrome_study_translation_table = +{ + hash_to_name=[]; +} + +let default_translation_table (): translation_table = Chrome_histogram (default_chrome_historgram_translation_table ()) + +let default_trigger (): trigger = +{ + _presence=Pbrt.Bitfield.empty; + trigger_name=""; + producer_name=""; + trusted_producer_uid=0l; + stop_delay_ms=0L; +} + +let default_ui_state_highlight_process (): ui_state_highlight_process = Pid (0l) + +let default_ui_state (): ui_state = +{ + _presence=Pbrt.Bitfield.empty; + timeline_start_ts=0L; + timeline_end_ts=0L; + highlight_process=None; +} + +let default_trace_packet_sequence_flags () = (Seq_unspecified:trace_packet_sequence_flags) + +let default_trace_packet_data (): trace_packet_data = Process_tree (default_process_tree ()) + +let default_trace_packet_optional_trusted_uid (): trace_packet_optional_trusted_uid = Trusted_uid (0l) + +let default_trace_packet_optional_trusted_packet_sequence_id (): trace_packet_optional_trusted_packet_sequence_id = Trusted_packet_sequence_id (0l) + +let default_trace_packet (): trace_packet = +{ + _presence=Pbrt.Bitfield.empty; + timestamp=0L; + timestamp_clock_id=0l; + data=None; + optional_trusted_uid=None; + optional_trusted_packet_sequence_id=None; + trusted_pid=0l; + interned_data=None; + sequence_flags=0l; + incremental_state_cleared=false; + trace_packet_defaults=None; + previous_packet_dropped=false; + first_packet_on_sequence=false; + machine_id=0l; +} + +let default_trace (): trace = +{ + packet=[]; +} + + +(** {2 Make functions} *) + +let[@inline] ftrace_descriptor_atrace_category_has_name (self:ftrace_descriptor_atrace_category) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] ftrace_descriptor_atrace_category_has_description (self:ftrace_descriptor_atrace_category) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] ftrace_descriptor_atrace_category_set_name (self:ftrace_descriptor_atrace_category) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] ftrace_descriptor_atrace_category_set_description (self:ftrace_descriptor_atrace_category) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.description <- x + +let copy_ftrace_descriptor_atrace_category (self:ftrace_descriptor_atrace_category) : ftrace_descriptor_atrace_category = + { self with name = self.name } + +let make_ftrace_descriptor_atrace_category + ?(name:string option) + ?(description:string option) + () : ftrace_descriptor_atrace_category = + let _res = default_ftrace_descriptor_atrace_category () in + (match name with + | None -> () + | Some v -> ftrace_descriptor_atrace_category_set_name _res v); + (match description with + | None -> () + | Some v -> ftrace_descriptor_atrace_category_set_description _res v); + _res + + +let[@inline] ftrace_descriptor_set_atrace_categories (self:ftrace_descriptor) (x:ftrace_descriptor_atrace_category list) : unit = + self.atrace_categories <- x + +let copy_ftrace_descriptor (self:ftrace_descriptor) : ftrace_descriptor = + { self with atrace_categories = self.atrace_categories } + +let make_ftrace_descriptor + ?(atrace_categories=[]) + () : ftrace_descriptor = + let _res = default_ftrace_descriptor () in + ftrace_descriptor_set_atrace_categories _res atrace_categories; + _res + +let[@inline] gpu_counter_descriptor_gpu_counter_spec_has_counter_id (self:gpu_counter_descriptor_gpu_counter_spec) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_counter_descriptor_gpu_counter_spec_has_name (self:gpu_counter_descriptor_gpu_counter_spec) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] gpu_counter_descriptor_gpu_counter_spec_has_description (self:gpu_counter_descriptor_gpu_counter_spec) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] gpu_counter_descriptor_gpu_counter_spec_has_select_by_default (self:gpu_counter_descriptor_gpu_counter_spec) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] gpu_counter_descriptor_gpu_counter_spec_set_counter_id (self:gpu_counter_descriptor_gpu_counter_spec) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.counter_id <- x +let[@inline] gpu_counter_descriptor_gpu_counter_spec_set_name (self:gpu_counter_descriptor_gpu_counter_spec) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x +let[@inline] gpu_counter_descriptor_gpu_counter_spec_set_description (self:gpu_counter_descriptor_gpu_counter_spec) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.description <- x +let[@inline] gpu_counter_descriptor_gpu_counter_spec_set_peak_value (self:gpu_counter_descriptor_gpu_counter_spec) (x:gpu_counter_descriptor_gpu_counter_spec_peak_value) : unit = + self.peak_value <- Some x +let[@inline] gpu_counter_descriptor_gpu_counter_spec_set_numerator_units (self:gpu_counter_descriptor_gpu_counter_spec) (x:gpu_counter_descriptor_measure_unit list) : unit = + self.numerator_units <- x +let[@inline] gpu_counter_descriptor_gpu_counter_spec_set_denominator_units (self:gpu_counter_descriptor_gpu_counter_spec) (x:gpu_counter_descriptor_measure_unit list) : unit = + self.denominator_units <- x +let[@inline] gpu_counter_descriptor_gpu_counter_spec_set_select_by_default (self:gpu_counter_descriptor_gpu_counter_spec) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.select_by_default <- x +let[@inline] gpu_counter_descriptor_gpu_counter_spec_set_groups (self:gpu_counter_descriptor_gpu_counter_spec) (x:gpu_counter_descriptor_gpu_counter_group list) : unit = + self.groups <- x + +let copy_gpu_counter_descriptor_gpu_counter_spec (self:gpu_counter_descriptor_gpu_counter_spec) : gpu_counter_descriptor_gpu_counter_spec = + { self with counter_id = self.counter_id } + +let make_gpu_counter_descriptor_gpu_counter_spec + ?(counter_id:int32 option) + ?(name:string option) + ?(description:string option) + ?(peak_value:gpu_counter_descriptor_gpu_counter_spec_peak_value option) + ?(numerator_units=[]) + ?(denominator_units=[]) + ?(select_by_default:bool option) + ?(groups=[]) + () : gpu_counter_descriptor_gpu_counter_spec = + let _res = default_gpu_counter_descriptor_gpu_counter_spec () in + (match counter_id with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_spec_set_counter_id _res v); + (match name with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_spec_set_name _res v); + (match description with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_spec_set_description _res v); + (match peak_value with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_spec_set_peak_value _res v); + gpu_counter_descriptor_gpu_counter_spec_set_numerator_units _res numerator_units; + gpu_counter_descriptor_gpu_counter_spec_set_denominator_units _res denominator_units; + (match select_by_default with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_spec_set_select_by_default _res v); + gpu_counter_descriptor_gpu_counter_spec_set_groups _res groups; + _res + +let[@inline] gpu_counter_descriptor_gpu_counter_block_has_block_id (self:gpu_counter_descriptor_gpu_counter_block) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_counter_descriptor_gpu_counter_block_has_block_capacity (self:gpu_counter_descriptor_gpu_counter_block) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] gpu_counter_descriptor_gpu_counter_block_has_name (self:gpu_counter_descriptor_gpu_counter_block) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] gpu_counter_descriptor_gpu_counter_block_has_description (self:gpu_counter_descriptor_gpu_counter_block) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] gpu_counter_descriptor_gpu_counter_block_set_block_id (self:gpu_counter_descriptor_gpu_counter_block) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.block_id <- x +let[@inline] gpu_counter_descriptor_gpu_counter_block_set_block_capacity (self:gpu_counter_descriptor_gpu_counter_block) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.block_capacity <- x +let[@inline] gpu_counter_descriptor_gpu_counter_block_set_name (self:gpu_counter_descriptor_gpu_counter_block) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.name <- x +let[@inline] gpu_counter_descriptor_gpu_counter_block_set_description (self:gpu_counter_descriptor_gpu_counter_block) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.description <- x +let[@inline] gpu_counter_descriptor_gpu_counter_block_set_counter_ids (self:gpu_counter_descriptor_gpu_counter_block) (x:int32 list) : unit = + self.counter_ids <- x + +let copy_gpu_counter_descriptor_gpu_counter_block (self:gpu_counter_descriptor_gpu_counter_block) : gpu_counter_descriptor_gpu_counter_block = + { self with block_id = self.block_id } + +let make_gpu_counter_descriptor_gpu_counter_block + ?(block_id:int32 option) + ?(block_capacity:int32 option) + ?(name:string option) + ?(description:string option) + ?(counter_ids=[]) + () : gpu_counter_descriptor_gpu_counter_block = + let _res = default_gpu_counter_descriptor_gpu_counter_block () in + (match block_id with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_block_set_block_id _res v); + (match block_capacity with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_block_set_block_capacity _res v); + (match name with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_block_set_name _res v); + (match description with + | None -> () + | Some v -> gpu_counter_descriptor_gpu_counter_block_set_description _res v); + gpu_counter_descriptor_gpu_counter_block_set_counter_ids _res counter_ids; + _res + +let[@inline] gpu_counter_descriptor_has_min_sampling_period_ns (self:gpu_counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_counter_descriptor_has_max_sampling_period_ns (self:gpu_counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] gpu_counter_descriptor_has_supports_instrumented_sampling (self:gpu_counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] gpu_counter_descriptor_set_specs (self:gpu_counter_descriptor) (x:gpu_counter_descriptor_gpu_counter_spec list) : unit = + self.specs <- x +let[@inline] gpu_counter_descriptor_set_blocks (self:gpu_counter_descriptor) (x:gpu_counter_descriptor_gpu_counter_block list) : unit = + self.blocks <- x +let[@inline] gpu_counter_descriptor_set_min_sampling_period_ns (self:gpu_counter_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.min_sampling_period_ns <- x +let[@inline] gpu_counter_descriptor_set_max_sampling_period_ns (self:gpu_counter_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.max_sampling_period_ns <- x +let[@inline] gpu_counter_descriptor_set_supports_instrumented_sampling (self:gpu_counter_descriptor) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.supports_instrumented_sampling <- x + +let copy_gpu_counter_descriptor (self:gpu_counter_descriptor) : gpu_counter_descriptor = + { self with specs = self.specs } + +let make_gpu_counter_descriptor + ?(specs=[]) + ?(blocks=[]) + ?(min_sampling_period_ns:int64 option) + ?(max_sampling_period_ns:int64 option) + ?(supports_instrumented_sampling:bool option) + () : gpu_counter_descriptor = + let _res = default_gpu_counter_descriptor () in + gpu_counter_descriptor_set_specs _res specs; + gpu_counter_descriptor_set_blocks _res blocks; + (match min_sampling_period_ns with + | None -> () + | Some v -> gpu_counter_descriptor_set_min_sampling_period_ns _res v); + (match max_sampling_period_ns with + | None -> () + | Some v -> gpu_counter_descriptor_set_max_sampling_period_ns _res v); + (match supports_instrumented_sampling with + | None -> () + | Some v -> gpu_counter_descriptor_set_supports_instrumented_sampling _res v); + _res + +let[@inline] track_event_category_has_name (self:track_event_category) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] track_event_category_has_description (self:track_event_category) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] track_event_category_set_name (self:track_event_category) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] track_event_category_set_description (self:track_event_category) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.description <- x +let[@inline] track_event_category_set_tags (self:track_event_category) (x:string list) : unit = + self.tags <- x + +let copy_track_event_category (self:track_event_category) : track_event_category = + { self with name = self.name } + +let make_track_event_category + ?(name:string option) + ?(description:string option) + ?(tags=[]) + () : track_event_category = + let _res = default_track_event_category () in + (match name with + | None -> () + | Some v -> track_event_category_set_name _res v); + (match description with + | None -> () + | Some v -> track_event_category_set_description _res v); + track_event_category_set_tags _res tags; + _res + + +let[@inline] track_event_descriptor_set_available_categories (self:track_event_descriptor) (x:track_event_category list) : unit = + self.available_categories <- x + +let copy_track_event_descriptor (self:track_event_descriptor) : track_event_descriptor = + { self with available_categories = self.available_categories } + +let make_track_event_descriptor + ?(available_categories=[]) + () : track_event_descriptor = + let _res = default_track_event_descriptor () in + track_event_descriptor_set_available_categories _res available_categories; + _res + +let[@inline] data_source_descriptor_has_name (self:data_source_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] data_source_descriptor_has_id (self:data_source_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] data_source_descriptor_has_will_notify_on_stop (self:data_source_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] data_source_descriptor_has_will_notify_on_start (self:data_source_descriptor) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] data_source_descriptor_has_handles_incremental_state_clear (self:data_source_descriptor) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] data_source_descriptor_has_no_flush (self:data_source_descriptor) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] data_source_descriptor_set_name (self:data_source_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] data_source_descriptor_set_id (self:data_source_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.id <- x +let[@inline] data_source_descriptor_set_will_notify_on_stop (self:data_source_descriptor) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.will_notify_on_stop <- x +let[@inline] data_source_descriptor_set_will_notify_on_start (self:data_source_descriptor) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.will_notify_on_start <- x +let[@inline] data_source_descriptor_set_handles_incremental_state_clear (self:data_source_descriptor) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.handles_incremental_state_clear <- x +let[@inline] data_source_descriptor_set_no_flush (self:data_source_descriptor) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.no_flush <- x +let[@inline] data_source_descriptor_set_gpu_counter_descriptor (self:data_source_descriptor) (x:gpu_counter_descriptor) : unit = + self.gpu_counter_descriptor <- Some x +let[@inline] data_source_descriptor_set_track_event_descriptor (self:data_source_descriptor) (x:track_event_descriptor) : unit = + self.track_event_descriptor <- Some x +let[@inline] data_source_descriptor_set_ftrace_descriptor (self:data_source_descriptor) (x:ftrace_descriptor) : unit = + self.ftrace_descriptor <- Some x + +let copy_data_source_descriptor (self:data_source_descriptor) : data_source_descriptor = + { self with name = self.name } + +let make_data_source_descriptor + ?(name:string option) + ?(id:int64 option) + ?(will_notify_on_stop:bool option) + ?(will_notify_on_start:bool option) + ?(handles_incremental_state_clear:bool option) + ?(no_flush:bool option) + ?(gpu_counter_descriptor:gpu_counter_descriptor option) + ?(track_event_descriptor:track_event_descriptor option) + ?(ftrace_descriptor:ftrace_descriptor option) + () : data_source_descriptor = + let _res = default_data_source_descriptor () in + (match name with + | None -> () + | Some v -> data_source_descriptor_set_name _res v); + (match id with + | None -> () + | Some v -> data_source_descriptor_set_id _res v); + (match will_notify_on_stop with + | None -> () + | Some v -> data_source_descriptor_set_will_notify_on_stop _res v); + (match will_notify_on_start with + | None -> () + | Some v -> data_source_descriptor_set_will_notify_on_start _res v); + (match handles_incremental_state_clear with + | None -> () + | Some v -> data_source_descriptor_set_handles_incremental_state_clear _res v); + (match no_flush with + | None -> () + | Some v -> data_source_descriptor_set_no_flush _res v); + (match gpu_counter_descriptor with + | None -> () + | Some v -> data_source_descriptor_set_gpu_counter_descriptor _res v); + (match track_event_descriptor with + | None -> () + | Some v -> data_source_descriptor_set_track_event_descriptor _res v); + (match ftrace_descriptor with + | None -> () + | Some v -> data_source_descriptor_set_ftrace_descriptor _res v); + _res + +let[@inline] tracing_service_state_producer_has_id (self:tracing_service_state_producer) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] tracing_service_state_producer_has_name (self:tracing_service_state_producer) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] tracing_service_state_producer_has_pid (self:tracing_service_state_producer) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] tracing_service_state_producer_has_uid (self:tracing_service_state_producer) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] tracing_service_state_producer_has_sdk_version (self:tracing_service_state_producer) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] tracing_service_state_producer_has_frozen (self:tracing_service_state_producer) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] tracing_service_state_producer_set_id (self:tracing_service_state_producer) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] tracing_service_state_producer_set_name (self:tracing_service_state_producer) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x +let[@inline] tracing_service_state_producer_set_pid (self:tracing_service_state_producer) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.pid <- x +let[@inline] tracing_service_state_producer_set_uid (self:tracing_service_state_producer) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.uid <- x +let[@inline] tracing_service_state_producer_set_sdk_version (self:tracing_service_state_producer) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.sdk_version <- x +let[@inline] tracing_service_state_producer_set_frozen (self:tracing_service_state_producer) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.frozen <- x + +let copy_tracing_service_state_producer (self:tracing_service_state_producer) : tracing_service_state_producer = + { self with id = self.id } + +let make_tracing_service_state_producer + ?(id:int32 option) + ?(name:string option) + ?(pid:int32 option) + ?(uid:int32 option) + ?(sdk_version:string option) + ?(frozen:bool option) + () : tracing_service_state_producer = + let _res = default_tracing_service_state_producer () in + (match id with + | None -> () + | Some v -> tracing_service_state_producer_set_id _res v); + (match name with + | None -> () + | Some v -> tracing_service_state_producer_set_name _res v); + (match pid with + | None -> () + | Some v -> tracing_service_state_producer_set_pid _res v); + (match uid with + | None -> () + | Some v -> tracing_service_state_producer_set_uid _res v); + (match sdk_version with + | None -> () + | Some v -> tracing_service_state_producer_set_sdk_version _res v); + (match frozen with + | None -> () + | Some v -> tracing_service_state_producer_set_frozen _res v); + _res + +let[@inline] tracing_service_state_data_source_has_producer_id (self:tracing_service_state_data_source) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] tracing_service_state_data_source_set_ds_descriptor (self:tracing_service_state_data_source) (x:data_source_descriptor) : unit = + self.ds_descriptor <- Some x +let[@inline] tracing_service_state_data_source_set_producer_id (self:tracing_service_state_data_source) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.producer_id <- x + +let copy_tracing_service_state_data_source (self:tracing_service_state_data_source) : tracing_service_state_data_source = + { self with ds_descriptor = self.ds_descriptor } + +let make_tracing_service_state_data_source + ?(ds_descriptor:data_source_descriptor option) + ?(producer_id:int32 option) + () : tracing_service_state_data_source = + let _res = default_tracing_service_state_data_source () in + (match ds_descriptor with + | None -> () + | Some v -> tracing_service_state_data_source_set_ds_descriptor _res v); + (match producer_id with + | None -> () + | Some v -> tracing_service_state_data_source_set_producer_id _res v); + _res + +let[@inline] tracing_service_state_tracing_session_has_id (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] tracing_service_state_tracing_session_has_consumer_uid (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] tracing_service_state_tracing_session_has_state (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] tracing_service_state_tracing_session_has_unique_session_name (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] tracing_service_state_tracing_session_has_duration_ms (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] tracing_service_state_tracing_session_has_num_data_sources (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] tracing_service_state_tracing_session_has_start_realtime_ns (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] tracing_service_state_tracing_session_has_bugreport_score (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] tracing_service_state_tracing_session_has_bugreport_filename (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] tracing_service_state_tracing_session_has_is_started (self:tracing_service_state_tracing_session) : bool = (Pbrt.Bitfield.get self._presence 9) + +let[@inline] tracing_service_state_tracing_session_set_id (self:tracing_service_state_tracing_session) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] tracing_service_state_tracing_session_set_consumer_uid (self:tracing_service_state_tracing_session) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.consumer_uid <- x +let[@inline] tracing_service_state_tracing_session_set_state (self:tracing_service_state_tracing_session) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.state <- x +let[@inline] tracing_service_state_tracing_session_set_unique_session_name (self:tracing_service_state_tracing_session) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.unique_session_name <- x +let[@inline] tracing_service_state_tracing_session_set_buffer_size_kb (self:tracing_service_state_tracing_session) (x:int32 list) : unit = + self.buffer_size_kb <- x +let[@inline] tracing_service_state_tracing_session_set_duration_ms (self:tracing_service_state_tracing_session) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.duration_ms <- x +let[@inline] tracing_service_state_tracing_session_set_num_data_sources (self:tracing_service_state_tracing_session) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.num_data_sources <- x +let[@inline] tracing_service_state_tracing_session_set_start_realtime_ns (self:tracing_service_state_tracing_session) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.start_realtime_ns <- x +let[@inline] tracing_service_state_tracing_session_set_bugreport_score (self:tracing_service_state_tracing_session) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.bugreport_score <- x +let[@inline] tracing_service_state_tracing_session_set_bugreport_filename (self:tracing_service_state_tracing_session) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.bugreport_filename <- x +let[@inline] tracing_service_state_tracing_session_set_is_started (self:tracing_service_state_tracing_session) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.is_started <- x + +let copy_tracing_service_state_tracing_session (self:tracing_service_state_tracing_session) : tracing_service_state_tracing_session = + { self with id = self.id } + +let make_tracing_service_state_tracing_session + ?(id:int64 option) + ?(consumer_uid:int32 option) + ?(state:string option) + ?(unique_session_name:string option) + ?(buffer_size_kb=[]) + ?(duration_ms:int32 option) + ?(num_data_sources:int32 option) + ?(start_realtime_ns:int64 option) + ?(bugreport_score:int32 option) + ?(bugreport_filename:string option) + ?(is_started:bool option) + () : tracing_service_state_tracing_session = + let _res = default_tracing_service_state_tracing_session () in + (match id with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_id _res v); + (match consumer_uid with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_consumer_uid _res v); + (match state with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_state _res v); + (match unique_session_name with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_unique_session_name _res v); + tracing_service_state_tracing_session_set_buffer_size_kb _res buffer_size_kb; + (match duration_ms with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_duration_ms _res v); + (match num_data_sources with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_num_data_sources _res v); + (match start_realtime_ns with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_start_realtime_ns _res v); + (match bugreport_score with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_bugreport_score _res v); + (match bugreport_filename with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_bugreport_filename _res v); + (match is_started with + | None -> () + | Some v -> tracing_service_state_tracing_session_set_is_started _res v); + _res + +let[@inline] tracing_service_state_has_supports_tracing_sessions (self:tracing_service_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] tracing_service_state_has_num_sessions (self:tracing_service_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] tracing_service_state_has_num_sessions_started (self:tracing_service_state) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] tracing_service_state_has_tracing_service_version (self:tracing_service_state) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] tracing_service_state_set_producers (self:tracing_service_state) (x:tracing_service_state_producer list) : unit = + self.producers <- x +let[@inline] tracing_service_state_set_data_sources (self:tracing_service_state) (x:tracing_service_state_data_source list) : unit = + self.data_sources <- x +let[@inline] tracing_service_state_set_tracing_sessions (self:tracing_service_state) (x:tracing_service_state_tracing_session list) : unit = + self.tracing_sessions <- x +let[@inline] tracing_service_state_set_supports_tracing_sessions (self:tracing_service_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.supports_tracing_sessions <- x +let[@inline] tracing_service_state_set_num_sessions (self:tracing_service_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.num_sessions <- x +let[@inline] tracing_service_state_set_num_sessions_started (self:tracing_service_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.num_sessions_started <- x +let[@inline] tracing_service_state_set_tracing_service_version (self:tracing_service_state) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.tracing_service_version <- x + +let copy_tracing_service_state (self:tracing_service_state) : tracing_service_state = + { self with producers = self.producers } + +let make_tracing_service_state + ?(producers=[]) + ?(data_sources=[]) + ?(tracing_sessions=[]) + ?(supports_tracing_sessions:bool option) + ?(num_sessions:int32 option) + ?(num_sessions_started:int32 option) + ?(tracing_service_version:string option) + () : tracing_service_state = + let _res = default_tracing_service_state () in + tracing_service_state_set_producers _res producers; + tracing_service_state_set_data_sources _res data_sources; + tracing_service_state_set_tracing_sessions _res tracing_sessions; + (match supports_tracing_sessions with + | None -> () + | Some v -> tracing_service_state_set_supports_tracing_sessions _res v); + (match num_sessions with + | None -> () + | Some v -> tracing_service_state_set_num_sessions _res v); + (match num_sessions_started with + | None -> () + | Some v -> tracing_service_state_set_num_sessions_started _res v); + (match tracing_service_version with + | None -> () + | Some v -> tracing_service_state_set_tracing_service_version _res v); + _res + + +let[@inline] android_game_intervention_list_config_set_package_name_filter (self:android_game_intervention_list_config) (x:string list) : unit = + self.package_name_filter <- x + +let copy_android_game_intervention_list_config (self:android_game_intervention_list_config) : android_game_intervention_list_config = + { self with package_name_filter = self.package_name_filter } + +let make_android_game_intervention_list_config + ?(package_name_filter=[]) + () : android_game_intervention_list_config = + let _res = default_android_game_intervention_list_config () in + android_game_intervention_list_config_set_package_name_filter _res package_name_filter; + _res + +let[@inline] android_input_event_config_trace_rule_has_trace_level (self:android_input_event_config_trace_rule) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_input_event_config_trace_rule_has_match_secure (self:android_input_event_config_trace_rule) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_input_event_config_trace_rule_has_match_ime_connection_active (self:android_input_event_config_trace_rule) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] android_input_event_config_trace_rule_set_trace_level (self:android_input_event_config_trace_rule) (x:android_input_event_config_trace_level) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.trace_level <- x +let[@inline] android_input_event_config_trace_rule_set_match_all_packages (self:android_input_event_config_trace_rule) (x:string list) : unit = + self.match_all_packages <- x +let[@inline] android_input_event_config_trace_rule_set_match_any_packages (self:android_input_event_config_trace_rule) (x:string list) : unit = + self.match_any_packages <- x +let[@inline] android_input_event_config_trace_rule_set_match_secure (self:android_input_event_config_trace_rule) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.match_secure <- x +let[@inline] android_input_event_config_trace_rule_set_match_ime_connection_active (self:android_input_event_config_trace_rule) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.match_ime_connection_active <- x + +let copy_android_input_event_config_trace_rule (self:android_input_event_config_trace_rule) : android_input_event_config_trace_rule = + { self with trace_level = self.trace_level } + +let make_android_input_event_config_trace_rule + ?(trace_level:android_input_event_config_trace_level option) + ?(match_all_packages=[]) + ?(match_any_packages=[]) + ?(match_secure:bool option) + ?(match_ime_connection_active:bool option) + () : android_input_event_config_trace_rule = + let _res = default_android_input_event_config_trace_rule () in + (match trace_level with + | None -> () + | Some v -> android_input_event_config_trace_rule_set_trace_level _res v); + android_input_event_config_trace_rule_set_match_all_packages _res match_all_packages; + android_input_event_config_trace_rule_set_match_any_packages _res match_any_packages; + (match match_secure with + | None -> () + | Some v -> android_input_event_config_trace_rule_set_match_secure _res v); + (match match_ime_connection_active with + | None -> () + | Some v -> android_input_event_config_trace_rule_set_match_ime_connection_active _res v); + _res + +let[@inline] android_input_event_config_has_mode (self:android_input_event_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_input_event_config_has_trace_dispatcher_input_events (self:android_input_event_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_input_event_config_has_trace_dispatcher_window_dispatch (self:android_input_event_config) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] android_input_event_config_set_mode (self:android_input_event_config) (x:android_input_event_config_trace_mode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.mode <- x +let[@inline] android_input_event_config_set_rules (self:android_input_event_config) (x:android_input_event_config_trace_rule list) : unit = + self.rules <- x +let[@inline] android_input_event_config_set_trace_dispatcher_input_events (self:android_input_event_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.trace_dispatcher_input_events <- x +let[@inline] android_input_event_config_set_trace_dispatcher_window_dispatch (self:android_input_event_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.trace_dispatcher_window_dispatch <- x + +let copy_android_input_event_config (self:android_input_event_config) : android_input_event_config = + { self with mode = self.mode } + +let make_android_input_event_config + ?(mode:android_input_event_config_trace_mode option) + ?(rules=[]) + ?(trace_dispatcher_input_events:bool option) + ?(trace_dispatcher_window_dispatch:bool option) + () : android_input_event_config = + let _res = default_android_input_event_config () in + (match mode with + | None -> () + | Some v -> android_input_event_config_set_mode _res v); + android_input_event_config_set_rules _res rules; + (match trace_dispatcher_input_events with + | None -> () + | Some v -> android_input_event_config_set_trace_dispatcher_input_events _res v); + (match trace_dispatcher_window_dispatch with + | None -> () + | Some v -> android_input_event_config_set_trace_dispatcher_window_dispatch _res v); + _res + +let[@inline] android_log_config_has_min_prio (self:android_log_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] android_log_config_set_log_ids (self:android_log_config) (x:android_log_id list) : unit = + self.log_ids <- x +let[@inline] android_log_config_set_min_prio (self:android_log_config) (x:android_log_priority) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.min_prio <- x +let[@inline] android_log_config_set_filter_tags (self:android_log_config) (x:string list) : unit = + self.filter_tags <- x + +let copy_android_log_config (self:android_log_config) : android_log_config = + { self with log_ids = self.log_ids } + +let make_android_log_config + ?(log_ids=[]) + ?(min_prio:android_log_priority option) + ?(filter_tags=[]) + () : android_log_config = + let _res = default_android_log_config () in + android_log_config_set_log_ids _res log_ids; + (match min_prio with + | None -> () + | Some v -> android_log_config_set_min_prio _res v); + android_log_config_set_filter_tags _res filter_tags; + _res + +let[@inline] android_polled_state_config_has_poll_ms (self:android_polled_state_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] android_polled_state_config_set_poll_ms (self:android_polled_state_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.poll_ms <- x + +let copy_android_polled_state_config (self:android_polled_state_config) : android_polled_state_config = + { self with poll_ms = self.poll_ms } + +let make_android_polled_state_config + ?(poll_ms:int32 option) + () : android_polled_state_config = + let _res = default_android_polled_state_config () in + (match poll_ms with + | None -> () + | Some v -> android_polled_state_config_set_poll_ms _res v); + _res + +let[@inline] android_sdk_sysprop_guard_config_has_surfaceflinger_skia_track_events (self:android_sdk_sysprop_guard_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_sdk_sysprop_guard_config_has_hwui_skia_track_events (self:android_sdk_sysprop_guard_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] android_sdk_sysprop_guard_config_set_surfaceflinger_skia_track_events (self:android_sdk_sysprop_guard_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.surfaceflinger_skia_track_events <- x +let[@inline] android_sdk_sysprop_guard_config_set_hwui_skia_track_events (self:android_sdk_sysprop_guard_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.hwui_skia_track_events <- x +let[@inline] android_sdk_sysprop_guard_config_set_hwui_package_name_filter (self:android_sdk_sysprop_guard_config) (x:string list) : unit = + self.hwui_package_name_filter <- x + +let copy_android_sdk_sysprop_guard_config (self:android_sdk_sysprop_guard_config) : android_sdk_sysprop_guard_config = + { self with surfaceflinger_skia_track_events = self.surfaceflinger_skia_track_events } + +let make_android_sdk_sysprop_guard_config + ?(surfaceflinger_skia_track_events:bool option) + ?(hwui_skia_track_events:bool option) + ?(hwui_package_name_filter=[]) + () : android_sdk_sysprop_guard_config = + let _res = default_android_sdk_sysprop_guard_config () in + (match surfaceflinger_skia_track_events with + | None -> () + | Some v -> android_sdk_sysprop_guard_config_set_surfaceflinger_skia_track_events _res v); + (match hwui_skia_track_events with + | None -> () + | Some v -> android_sdk_sysprop_guard_config_set_hwui_skia_track_events _res v); + android_sdk_sysprop_guard_config_set_hwui_package_name_filter _res hwui_package_name_filter; + _res + +let[@inline] android_system_property_config_has_poll_ms (self:android_system_property_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] android_system_property_config_set_poll_ms (self:android_system_property_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.poll_ms <- x +let[@inline] android_system_property_config_set_property_name (self:android_system_property_config) (x:string list) : unit = + self.property_name <- x + +let copy_android_system_property_config (self:android_system_property_config) : android_system_property_config = + { self with poll_ms = self.poll_ms } + +let make_android_system_property_config + ?(poll_ms:int32 option) + ?(property_name=[]) + () : android_system_property_config = + let _res = default_android_system_property_config () in + (match poll_ms with + | None -> () + | Some v -> android_system_property_config_set_poll_ms _res v); + android_system_property_config_set_property_name _res property_name; + _res + +let[@inline] app_wakelocks_config_has_write_delay_ms (self:app_wakelocks_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] app_wakelocks_config_has_filter_duration_below_ms (self:app_wakelocks_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] app_wakelocks_config_has_drop_owner_pid (self:app_wakelocks_config) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] app_wakelocks_config_set_write_delay_ms (self:app_wakelocks_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.write_delay_ms <- x +let[@inline] app_wakelocks_config_set_filter_duration_below_ms (self:app_wakelocks_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.filter_duration_below_ms <- x +let[@inline] app_wakelocks_config_set_drop_owner_pid (self:app_wakelocks_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.drop_owner_pid <- x + +let copy_app_wakelocks_config (self:app_wakelocks_config) : app_wakelocks_config = + { self with write_delay_ms = self.write_delay_ms } + +let make_app_wakelocks_config + ?(write_delay_ms:int32 option) + ?(filter_duration_below_ms:int32 option) + ?(drop_owner_pid:bool option) + () : app_wakelocks_config = + let _res = default_app_wakelocks_config () in + (match write_delay_ms with + | None -> () + | Some v -> app_wakelocks_config_set_write_delay_ms _res v); + (match filter_duration_below_ms with + | None -> () + | Some v -> app_wakelocks_config_set_filter_duration_below_ms _res v); + (match drop_owner_pid with + | None -> () + | Some v -> app_wakelocks_config_set_drop_owner_pid _res v); + _res + +let[@inline] cpu_per_uid_config_has_poll_ms (self:cpu_per_uid_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] cpu_per_uid_config_set_poll_ms (self:cpu_per_uid_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.poll_ms <- x + +let copy_cpu_per_uid_config (self:cpu_per_uid_config) : cpu_per_uid_config = + { self with poll_ms = self.poll_ms } + +let make_cpu_per_uid_config + ?(poll_ms:int32 option) + () : cpu_per_uid_config = + let _res = default_cpu_per_uid_config () in + (match poll_ms with + | None -> () + | Some v -> cpu_per_uid_config_set_poll_ms _res v); + _res + +let[@inline] kernel_wakelocks_config_has_poll_ms (self:kernel_wakelocks_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] kernel_wakelocks_config_set_poll_ms (self:kernel_wakelocks_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.poll_ms <- x + +let copy_kernel_wakelocks_config (self:kernel_wakelocks_config) : kernel_wakelocks_config = + { self with poll_ms = self.poll_ms } + +let make_kernel_wakelocks_config + ?(poll_ms:int32 option) + () : kernel_wakelocks_config = + let _res = default_kernel_wakelocks_config () in + (match poll_ms with + | None -> () + | Some v -> kernel_wakelocks_config_set_poll_ms _res v); + _res + +let[@inline] network_packet_trace_config_has_poll_ms (self:network_packet_trace_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] network_packet_trace_config_has_aggregation_threshold (self:network_packet_trace_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] network_packet_trace_config_has_intern_limit (self:network_packet_trace_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] network_packet_trace_config_has_drop_local_port (self:network_packet_trace_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] network_packet_trace_config_has_drop_remote_port (self:network_packet_trace_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] network_packet_trace_config_has_drop_tcp_flags (self:network_packet_trace_config) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] network_packet_trace_config_set_poll_ms (self:network_packet_trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.poll_ms <- x +let[@inline] network_packet_trace_config_set_aggregation_threshold (self:network_packet_trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.aggregation_threshold <- x +let[@inline] network_packet_trace_config_set_intern_limit (self:network_packet_trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.intern_limit <- x +let[@inline] network_packet_trace_config_set_drop_local_port (self:network_packet_trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.drop_local_port <- x +let[@inline] network_packet_trace_config_set_drop_remote_port (self:network_packet_trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.drop_remote_port <- x +let[@inline] network_packet_trace_config_set_drop_tcp_flags (self:network_packet_trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.drop_tcp_flags <- x + +let copy_network_packet_trace_config (self:network_packet_trace_config) : network_packet_trace_config = + { self with poll_ms = self.poll_ms } + +let make_network_packet_trace_config + ?(poll_ms:int32 option) + ?(aggregation_threshold:int32 option) + ?(intern_limit:int32 option) + ?(drop_local_port:bool option) + ?(drop_remote_port:bool option) + ?(drop_tcp_flags:bool option) + () : network_packet_trace_config = + let _res = default_network_packet_trace_config () in + (match poll_ms with + | None -> () + | Some v -> network_packet_trace_config_set_poll_ms _res v); + (match aggregation_threshold with + | None -> () + | Some v -> network_packet_trace_config_set_aggregation_threshold _res v); + (match intern_limit with + | None -> () + | Some v -> network_packet_trace_config_set_intern_limit _res v); + (match drop_local_port with + | None -> () + | Some v -> network_packet_trace_config_set_drop_local_port _res v); + (match drop_remote_port with + | None -> () + | Some v -> network_packet_trace_config_set_drop_remote_port _res v); + (match drop_tcp_flags with + | None -> () + | Some v -> network_packet_trace_config_set_drop_tcp_flags _res v); + _res + +let[@inline] packages_list_config_has_only_write_on_cpu_use_every_ms (self:packages_list_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] packages_list_config_set_package_name_filter (self:packages_list_config) (x:string list) : unit = + self.package_name_filter <- x +let[@inline] packages_list_config_set_only_write_on_cpu_use_every_ms (self:packages_list_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.only_write_on_cpu_use_every_ms <- x + +let copy_packages_list_config (self:packages_list_config) : packages_list_config = + { self with package_name_filter = self.package_name_filter } + +let make_packages_list_config + ?(package_name_filter=[]) + ?(only_write_on_cpu_use_every_ms:int32 option) + () : packages_list_config = + let _res = default_packages_list_config () in + packages_list_config_set_package_name_filter _res package_name_filter; + (match only_write_on_cpu_use_every_ms with + | None -> () + | Some v -> packages_list_config_set_only_write_on_cpu_use_every_ms _res v); + _res + +let[@inline] pixel_modem_config_has_event_group (self:pixel_modem_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] pixel_modem_config_set_event_group (self:pixel_modem_config) (x:pixel_modem_config_event_group) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.event_group <- x +let[@inline] pixel_modem_config_set_pigweed_hash_allow_list (self:pixel_modem_config) (x:int64 list) : unit = + self.pigweed_hash_allow_list <- x +let[@inline] pixel_modem_config_set_pigweed_hash_deny_list (self:pixel_modem_config) (x:int64 list) : unit = + self.pigweed_hash_deny_list <- x + +let copy_pixel_modem_config (self:pixel_modem_config) : pixel_modem_config = + { self with event_group = self.event_group } + +let make_pixel_modem_config + ?(event_group:pixel_modem_config_event_group option) + ?(pigweed_hash_allow_list=[]) + ?(pigweed_hash_deny_list=[]) + () : pixel_modem_config = + let _res = default_pixel_modem_config () in + (match event_group with + | None -> () + | Some v -> pixel_modem_config_set_event_group _res v); + pixel_modem_config_set_pigweed_hash_allow_list _res pigweed_hash_allow_list; + pixel_modem_config_set_pigweed_hash_deny_list _res pigweed_hash_deny_list; + _res + +let[@inline] proto_log_group_has_group_name (self:proto_log_group) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] proto_log_group_has_log_from (self:proto_log_group) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] proto_log_group_has_collect_stacktrace (self:proto_log_group) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] proto_log_group_set_group_name (self:proto_log_group) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.group_name <- x +let[@inline] proto_log_group_set_log_from (self:proto_log_group) (x:proto_log_level) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.log_from <- x +let[@inline] proto_log_group_set_collect_stacktrace (self:proto_log_group) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.collect_stacktrace <- x + +let copy_proto_log_group (self:proto_log_group) : proto_log_group = + { self with group_name = self.group_name } + +let make_proto_log_group + ?(group_name:string option) + ?(log_from:proto_log_level option) + ?(collect_stacktrace:bool option) + () : proto_log_group = + let _res = default_proto_log_group () in + (match group_name with + | None -> () + | Some v -> proto_log_group_set_group_name _res v); + (match log_from with + | None -> () + | Some v -> proto_log_group_set_log_from _res v); + (match collect_stacktrace with + | None -> () + | Some v -> proto_log_group_set_collect_stacktrace _res v); + _res + +let[@inline] proto_log_config_has_tracing_mode (self:proto_log_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] proto_log_config_has_default_log_from_level (self:proto_log_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] proto_log_config_set_group_overrides (self:proto_log_config) (x:proto_log_group list) : unit = + self.group_overrides <- x +let[@inline] proto_log_config_set_tracing_mode (self:proto_log_config) (x:proto_log_config_tracing_mode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.tracing_mode <- x +let[@inline] proto_log_config_set_default_log_from_level (self:proto_log_config) (x:proto_log_level) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.default_log_from_level <- x + +let copy_proto_log_config (self:proto_log_config) : proto_log_config = + { self with group_overrides = self.group_overrides } + +let make_proto_log_config + ?(group_overrides=[]) + ?(tracing_mode:proto_log_config_tracing_mode option) + ?(default_log_from_level:proto_log_level option) + () : proto_log_config = + let _res = default_proto_log_config () in + proto_log_config_set_group_overrides _res group_overrides; + (match tracing_mode with + | None -> () + | Some v -> proto_log_config_set_tracing_mode _res v); + (match default_log_from_level with + | None -> () + | Some v -> proto_log_config_set_default_log_from_level _res v); + _res + +let[@inline] surface_flinger_layers_config_has_mode (self:surface_flinger_layers_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] surface_flinger_layers_config_set_mode (self:surface_flinger_layers_config) (x:surface_flinger_layers_config_mode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.mode <- x +let[@inline] surface_flinger_layers_config_set_trace_flags (self:surface_flinger_layers_config) (x:surface_flinger_layers_config_trace_flag list) : unit = + self.trace_flags <- x + +let copy_surface_flinger_layers_config (self:surface_flinger_layers_config) : surface_flinger_layers_config = + { self with mode = self.mode } + +let make_surface_flinger_layers_config + ?(mode:surface_flinger_layers_config_mode option) + ?(trace_flags=[]) + () : surface_flinger_layers_config = + let _res = default_surface_flinger_layers_config () in + (match mode with + | None -> () + | Some v -> surface_flinger_layers_config_set_mode _res v); + surface_flinger_layers_config_set_trace_flags _res trace_flags; + _res + +let[@inline] surface_flinger_transactions_config_has_mode (self:surface_flinger_transactions_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] surface_flinger_transactions_config_set_mode (self:surface_flinger_transactions_config) (x:surface_flinger_transactions_config_mode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.mode <- x + +let copy_surface_flinger_transactions_config (self:surface_flinger_transactions_config) : surface_flinger_transactions_config = + { self with mode = self.mode } + +let make_surface_flinger_transactions_config + ?(mode:surface_flinger_transactions_config_mode option) + () : surface_flinger_transactions_config = + let _res = default_surface_flinger_transactions_config () in + (match mode with + | None -> () + | Some v -> surface_flinger_transactions_config_set_mode _res v); + _res + +let[@inline] window_manager_config_has_log_frequency (self:window_manager_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] window_manager_config_has_log_level (self:window_manager_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] window_manager_config_set_log_frequency (self:window_manager_config) (x:window_manager_config_log_frequency) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.log_frequency <- x +let[@inline] window_manager_config_set_log_level (self:window_manager_config) (x:window_manager_config_log_level) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.log_level <- x + +let copy_window_manager_config (self:window_manager_config) : window_manager_config = + { self with log_frequency = self.log_frequency } + +let make_window_manager_config + ?(log_frequency:window_manager_config_log_frequency option) + ?(log_level:window_manager_config_log_level option) + () : window_manager_config = + let _res = default_window_manager_config () in + (match log_frequency with + | None -> () + | Some v -> window_manager_config_set_log_frequency _res v); + (match log_level with + | None -> () + | Some v -> window_manager_config_set_log_level _res v); + _res + +let[@inline] chrome_config_has_trace_config (self:chrome_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_config_has_privacy_filtering_enabled (self:chrome_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_config_has_convert_to_legacy_json (self:chrome_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_config_has_client_priority (self:chrome_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_config_has_json_agent_label_filter (self:chrome_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] chrome_config_has_event_package_name_filter_enabled (self:chrome_config) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] chrome_config_set_trace_config (self:chrome_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.trace_config <- x +let[@inline] chrome_config_set_privacy_filtering_enabled (self:chrome_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.privacy_filtering_enabled <- x +let[@inline] chrome_config_set_convert_to_legacy_json (self:chrome_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.convert_to_legacy_json <- x +let[@inline] chrome_config_set_client_priority (self:chrome_config) (x:chrome_config_client_priority) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.client_priority <- x +let[@inline] chrome_config_set_json_agent_label_filter (self:chrome_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.json_agent_label_filter <- x +let[@inline] chrome_config_set_event_package_name_filter_enabled (self:chrome_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.event_package_name_filter_enabled <- x + +let copy_chrome_config (self:chrome_config) : chrome_config = + { self with trace_config = self.trace_config } + +let make_chrome_config + ?(trace_config:string option) + ?(privacy_filtering_enabled:bool option) + ?(convert_to_legacy_json:bool option) + ?(client_priority:chrome_config_client_priority option) + ?(json_agent_label_filter:string option) + ?(event_package_name_filter_enabled:bool option) + () : chrome_config = + let _res = default_chrome_config () in + (match trace_config with + | None -> () + | Some v -> chrome_config_set_trace_config _res v); + (match privacy_filtering_enabled with + | None -> () + | Some v -> chrome_config_set_privacy_filtering_enabled _res v); + (match convert_to_legacy_json with + | None -> () + | Some v -> chrome_config_set_convert_to_legacy_json _res v); + (match client_priority with + | None -> () + | Some v -> chrome_config_set_client_priority _res v); + (match json_agent_label_filter with + | None -> () + | Some v -> chrome_config_set_json_agent_label_filter _res v); + (match event_package_name_filter_enabled with + | None -> () + | Some v -> chrome_config_set_event_package_name_filter_enabled _res v); + _res + +let[@inline] chromium_histogram_samples_config_histogram_sample_has_histogram_name (self:chromium_histogram_samples_config_histogram_sample) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chromium_histogram_samples_config_histogram_sample_has_min_value (self:chromium_histogram_samples_config_histogram_sample) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chromium_histogram_samples_config_histogram_sample_has_max_value (self:chromium_histogram_samples_config_histogram_sample) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] chromium_histogram_samples_config_histogram_sample_set_histogram_name (self:chromium_histogram_samples_config_histogram_sample) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.histogram_name <- x +let[@inline] chromium_histogram_samples_config_histogram_sample_set_min_value (self:chromium_histogram_samples_config_histogram_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.min_value <- x +let[@inline] chromium_histogram_samples_config_histogram_sample_set_max_value (self:chromium_histogram_samples_config_histogram_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.max_value <- x + +let copy_chromium_histogram_samples_config_histogram_sample (self:chromium_histogram_samples_config_histogram_sample) : chromium_histogram_samples_config_histogram_sample = + { self with histogram_name = self.histogram_name } + +let make_chromium_histogram_samples_config_histogram_sample + ?(histogram_name:string option) + ?(min_value:int64 option) + ?(max_value:int64 option) + () : chromium_histogram_samples_config_histogram_sample = + let _res = default_chromium_histogram_samples_config_histogram_sample () in + (match histogram_name with + | None -> () + | Some v -> chromium_histogram_samples_config_histogram_sample_set_histogram_name _res v); + (match min_value with + | None -> () + | Some v -> chromium_histogram_samples_config_histogram_sample_set_min_value _res v); + (match max_value with + | None -> () + | Some v -> chromium_histogram_samples_config_histogram_sample_set_max_value _res v); + _res + +let[@inline] chromium_histogram_samples_config_has_filter_histogram_names (self:chromium_histogram_samples_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] chromium_histogram_samples_config_set_histograms (self:chromium_histogram_samples_config) (x:chromium_histogram_samples_config_histogram_sample list) : unit = + self.histograms <- x +let[@inline] chromium_histogram_samples_config_set_filter_histogram_names (self:chromium_histogram_samples_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.filter_histogram_names <- x + +let copy_chromium_histogram_samples_config (self:chromium_histogram_samples_config) : chromium_histogram_samples_config = + { self with histograms = self.histograms } + +let make_chromium_histogram_samples_config + ?(histograms=[]) + ?(filter_histogram_names:bool option) + () : chromium_histogram_samples_config = + let _res = default_chromium_histogram_samples_config () in + chromium_histogram_samples_config_set_histograms _res histograms; + (match filter_histogram_names with + | None -> () + | Some v -> chromium_histogram_samples_config_set_filter_histogram_names _res v); + _res + +let[@inline] chromium_system_metrics_config_has_sampling_interval_ms (self:chromium_system_metrics_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] chromium_system_metrics_config_set_sampling_interval_ms (self:chromium_system_metrics_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.sampling_interval_ms <- x + +let copy_chromium_system_metrics_config (self:chromium_system_metrics_config) : chromium_system_metrics_config = + { self with sampling_interval_ms = self.sampling_interval_ms } + +let make_chromium_system_metrics_config + ?(sampling_interval_ms:int32 option) + () : chromium_system_metrics_config = + let _res = default_chromium_system_metrics_config () in + (match sampling_interval_ms with + | None -> () + | Some v -> chromium_system_metrics_config_set_sampling_interval_ms _res v); + _res + +let[@inline] v8_config_has_log_script_sources (self:v8_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] v8_config_has_log_instructions (self:v8_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] v8_config_set_log_script_sources (self:v8_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.log_script_sources <- x +let[@inline] v8_config_set_log_instructions (self:v8_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.log_instructions <- x + +let copy_v8_config (self:v8_config) : v8_config = + { self with log_script_sources = self.log_script_sources } + +let make_v8_config + ?(log_script_sources:bool option) + ?(log_instructions:bool option) + () : v8_config = + let _res = default_v8_config () in + (match log_script_sources with + | None -> () + | Some v -> v8_config_set_log_script_sources _res v); + (match log_instructions with + | None -> () + | Some v -> v8_config_set_log_instructions _res v); + _res + + +let[@inline] etw_config_set_kernel_flags (self:etw_config) (x:etw_config_kernel_flag list) : unit = + self.kernel_flags <- x +let[@inline] etw_config_set_scheduler_provider_events (self:etw_config) (x:string list) : unit = + self.scheduler_provider_events <- x +let[@inline] etw_config_set_memory_provider_events (self:etw_config) (x:string list) : unit = + self.memory_provider_events <- x +let[@inline] etw_config_set_file_provider_events (self:etw_config) (x:string list) : unit = + self.file_provider_events <- x + +let copy_etw_config (self:etw_config) : etw_config = + { self with kernel_flags = self.kernel_flags } + +let make_etw_config + ?(kernel_flags=[]) + ?(scheduler_provider_events=[]) + ?(memory_provider_events=[]) + ?(file_provider_events=[]) + () : etw_config = + let _res = default_etw_config () in + etw_config_set_kernel_flags _res kernel_flags; + etw_config_set_scheduler_provider_events _res scheduler_provider_events; + etw_config_set_memory_provider_events _res memory_provider_events; + etw_config_set_file_provider_events _res file_provider_events; + _res + +let[@inline] frozen_ftrace_config_has_instance_name (self:frozen_ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] frozen_ftrace_config_set_instance_name (self:frozen_ftrace_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.instance_name <- x + +let copy_frozen_ftrace_config (self:frozen_ftrace_config) : frozen_ftrace_config = + { self with instance_name = self.instance_name } + +let make_frozen_ftrace_config + ?(instance_name:string option) + () : frozen_ftrace_config = + let _res = default_frozen_ftrace_config () in + (match instance_name with + | None -> () + | Some v -> frozen_ftrace_config_set_instance_name _res v); + _res + +let[@inline] ftrace_config_compact_sched_config_has_enabled (self:ftrace_config_compact_sched_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] ftrace_config_compact_sched_config_set_enabled (self:ftrace_config_compact_sched_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.enabled <- x + +let copy_ftrace_config_compact_sched_config (self:ftrace_config_compact_sched_config) : ftrace_config_compact_sched_config = + { self with enabled = self.enabled } + +let make_ftrace_config_compact_sched_config + ?(enabled:bool option) + () : ftrace_config_compact_sched_config = + let _res = default_ftrace_config_compact_sched_config () in + (match enabled with + | None -> () + | Some v -> ftrace_config_compact_sched_config_set_enabled _res v); + _res + +let[@inline] ftrace_config_print_filter_rule_atrace_message_has_type_ (self:ftrace_config_print_filter_rule_atrace_message) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] ftrace_config_print_filter_rule_atrace_message_has_prefix (self:ftrace_config_print_filter_rule_atrace_message) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] ftrace_config_print_filter_rule_atrace_message_set_type_ (self:ftrace_config_print_filter_rule_atrace_message) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.type_ <- x +let[@inline] ftrace_config_print_filter_rule_atrace_message_set_prefix (self:ftrace_config_print_filter_rule_atrace_message) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.prefix <- x + +let copy_ftrace_config_print_filter_rule_atrace_message (self:ftrace_config_print_filter_rule_atrace_message) : ftrace_config_print_filter_rule_atrace_message = + { self with type_ = self.type_ } + +let make_ftrace_config_print_filter_rule_atrace_message + ?(type_:string option) + ?(prefix:string option) + () : ftrace_config_print_filter_rule_atrace_message = + let _res = default_ftrace_config_print_filter_rule_atrace_message () in + (match type_ with + | None -> () + | Some v -> ftrace_config_print_filter_rule_atrace_message_set_type_ _res v); + (match prefix with + | None -> () + | Some v -> ftrace_config_print_filter_rule_atrace_message_set_prefix _res v); + _res + +let[@inline] ftrace_config_print_filter_rule_has_allow (self:ftrace_config_print_filter_rule) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] ftrace_config_print_filter_rule_set_match_ (self:ftrace_config_print_filter_rule) (x:ftrace_config_print_filter_rule_match) : unit = + self.match_ <- Some x +let[@inline] ftrace_config_print_filter_rule_set_allow (self:ftrace_config_print_filter_rule) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.allow <- x + +let copy_ftrace_config_print_filter_rule (self:ftrace_config_print_filter_rule) : ftrace_config_print_filter_rule = + { self with match_ = self.match_ } + +let make_ftrace_config_print_filter_rule + ?(match_:ftrace_config_print_filter_rule_match option) + ?(allow:bool option) + () : ftrace_config_print_filter_rule = + let _res = default_ftrace_config_print_filter_rule () in + (match match_ with + | None -> () + | Some v -> ftrace_config_print_filter_rule_set_match_ _res v); + (match allow with + | None -> () + | Some v -> ftrace_config_print_filter_rule_set_allow _res v); + _res + + +let[@inline] ftrace_config_print_filter_set_rules (self:ftrace_config_print_filter) (x:ftrace_config_print_filter_rule list) : unit = + self.rules <- x + +let copy_ftrace_config_print_filter (self:ftrace_config_print_filter) : ftrace_config_print_filter = + { self with rules = self.rules } + +let make_ftrace_config_print_filter + ?(rules=[]) + () : ftrace_config_print_filter = + let _res = default_ftrace_config_print_filter () in + ftrace_config_print_filter_set_rules _res rules; + _res + +let[@inline] ftrace_config_kprobe_event_has_probe (self:ftrace_config_kprobe_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] ftrace_config_kprobe_event_has_type_ (self:ftrace_config_kprobe_event) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] ftrace_config_kprobe_event_set_probe (self:ftrace_config_kprobe_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.probe <- x +let[@inline] ftrace_config_kprobe_event_set_type_ (self:ftrace_config_kprobe_event) (x:ftrace_config_kprobe_event_kprobe_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.type_ <- x + +let copy_ftrace_config_kprobe_event (self:ftrace_config_kprobe_event) : ftrace_config_kprobe_event = + { self with probe = self.probe } + +let make_ftrace_config_kprobe_event + ?(probe:string option) + ?(type_:ftrace_config_kprobe_event_kprobe_type option) + () : ftrace_config_kprobe_event = + let _res = default_ftrace_config_kprobe_event () in + (match probe with + | None -> () + | Some v -> ftrace_config_kprobe_event_set_probe _res v); + (match type_ with + | None -> () + | Some v -> ftrace_config_kprobe_event_set_type_ _res v); + _res + +let[@inline] ftrace_config_tracefs_option_has_name (self:ftrace_config_tracefs_option) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] ftrace_config_tracefs_option_has_state (self:ftrace_config_tracefs_option) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] ftrace_config_tracefs_option_set_name (self:ftrace_config_tracefs_option) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] ftrace_config_tracefs_option_set_state (self:ftrace_config_tracefs_option) (x:ftrace_config_tracefs_option_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.state <- x + +let copy_ftrace_config_tracefs_option (self:ftrace_config_tracefs_option) : ftrace_config_tracefs_option = + { self with name = self.name } + +let make_ftrace_config_tracefs_option + ?(name:string option) + ?(state:ftrace_config_tracefs_option_state option) + () : ftrace_config_tracefs_option = + let _res = default_ftrace_config_tracefs_option () in + (match name with + | None -> () + | Some v -> ftrace_config_tracefs_option_set_name _res v); + (match state with + | None -> () + | Some v -> ftrace_config_tracefs_option_set_state _res v); + _res + +let[@inline] ftrace_config_has_atrace_userspace_only (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] ftrace_config_has_buffer_size_kb (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] ftrace_config_has_buffer_size_lower_bound (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] ftrace_config_has_drain_period_ms (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] ftrace_config_has_drain_buffer_percent (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] ftrace_config_has_symbolize_ksyms (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] ftrace_config_has_ksyms_mem_policy (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] ftrace_config_has_throttle_rss_stat (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] ftrace_config_has_denser_generic_event_encoding (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] ftrace_config_has_disable_generic_events (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] ftrace_config_has_enable_function_graph (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] ftrace_config_has_function_graph_max_depth (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] ftrace_config_has_preserve_ftrace_buffer (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] ftrace_config_has_use_monotonic_raw_clock (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] ftrace_config_has_instance_name (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] ftrace_config_has_debug_ftrace_abi (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] ftrace_config_has_tracing_cpumask (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 16) +let[@inline] ftrace_config_has_initialize_ksyms_synchronously_for_testing (self:ftrace_config) : bool = (Pbrt.Bitfield.get self._presence 17) + +let[@inline] ftrace_config_set_ftrace_events (self:ftrace_config) (x:string list) : unit = + self.ftrace_events <- x +let[@inline] ftrace_config_set_atrace_categories (self:ftrace_config) (x:string list) : unit = + self.atrace_categories <- x +let[@inline] ftrace_config_set_atrace_apps (self:ftrace_config) (x:string list) : unit = + self.atrace_apps <- x +let[@inline] ftrace_config_set_atrace_categories_prefer_sdk (self:ftrace_config) (x:string list) : unit = + self.atrace_categories_prefer_sdk <- x +let[@inline] ftrace_config_set_atrace_userspace_only (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.atrace_userspace_only <- x +let[@inline] ftrace_config_set_buffer_size_kb (self:ftrace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.buffer_size_kb <- x +let[@inline] ftrace_config_set_buffer_size_lower_bound (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.buffer_size_lower_bound <- x +let[@inline] ftrace_config_set_drain_period_ms (self:ftrace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.drain_period_ms <- x +let[@inline] ftrace_config_set_drain_buffer_percent (self:ftrace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.drain_buffer_percent <- x +let[@inline] ftrace_config_set_compact_sched (self:ftrace_config) (x:ftrace_config_compact_sched_config) : unit = + self.compact_sched <- Some x +let[@inline] ftrace_config_set_print_filter (self:ftrace_config) (x:ftrace_config_print_filter) : unit = + self.print_filter <- Some x +let[@inline] ftrace_config_set_symbolize_ksyms (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.symbolize_ksyms <- x +let[@inline] ftrace_config_set_ksyms_mem_policy (self:ftrace_config) (x:ftrace_config_ksyms_mem_policy) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.ksyms_mem_policy <- x +let[@inline] ftrace_config_set_throttle_rss_stat (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.throttle_rss_stat <- x +let[@inline] ftrace_config_set_denser_generic_event_encoding (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.denser_generic_event_encoding <- x +let[@inline] ftrace_config_set_disable_generic_events (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.disable_generic_events <- x +let[@inline] ftrace_config_set_syscall_events (self:ftrace_config) (x:string list) : unit = + self.syscall_events <- x +let[@inline] ftrace_config_set_enable_function_graph (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.enable_function_graph <- x +let[@inline] ftrace_config_set_function_filters (self:ftrace_config) (x:string list) : unit = + self.function_filters <- x +let[@inline] ftrace_config_set_function_graph_roots (self:ftrace_config) (x:string list) : unit = + self.function_graph_roots <- x +let[@inline] ftrace_config_set_function_graph_max_depth (self:ftrace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.function_graph_max_depth <- x +let[@inline] ftrace_config_set_kprobe_events (self:ftrace_config) (x:ftrace_config_kprobe_event list) : unit = + self.kprobe_events <- x +let[@inline] ftrace_config_set_preserve_ftrace_buffer (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.preserve_ftrace_buffer <- x +let[@inline] ftrace_config_set_use_monotonic_raw_clock (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.use_monotonic_raw_clock <- x +let[@inline] ftrace_config_set_instance_name (self:ftrace_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.instance_name <- x +let[@inline] ftrace_config_set_debug_ftrace_abi (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.debug_ftrace_abi <- x +let[@inline] ftrace_config_set_tids_to_trace (self:ftrace_config) (x:int32 list) : unit = + self.tids_to_trace <- x +let[@inline] ftrace_config_set_tracefs_options (self:ftrace_config) (x:ftrace_config_tracefs_option list) : unit = + self.tracefs_options <- x +let[@inline] ftrace_config_set_tracing_cpumask (self:ftrace_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.tracing_cpumask <- x +let[@inline] ftrace_config_set_initialize_ksyms_synchronously_for_testing (self:ftrace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 17); self.initialize_ksyms_synchronously_for_testing <- x + +let copy_ftrace_config (self:ftrace_config) : ftrace_config = + { self with ftrace_events = self.ftrace_events } + +let make_ftrace_config + ?(ftrace_events=[]) + ?(atrace_categories=[]) + ?(atrace_apps=[]) + ?(atrace_categories_prefer_sdk=[]) + ?(atrace_userspace_only:bool option) + ?(buffer_size_kb:int32 option) + ?(buffer_size_lower_bound:bool option) + ?(drain_period_ms:int32 option) + ?(drain_buffer_percent:int32 option) + ?(compact_sched:ftrace_config_compact_sched_config option) + ?(print_filter:ftrace_config_print_filter option) + ?(symbolize_ksyms:bool option) + ?(ksyms_mem_policy:ftrace_config_ksyms_mem_policy option) + ?(throttle_rss_stat:bool option) + ?(denser_generic_event_encoding:bool option) + ?(disable_generic_events:bool option) + ?(syscall_events=[]) + ?(enable_function_graph:bool option) + ?(function_filters=[]) + ?(function_graph_roots=[]) + ?(function_graph_max_depth:int32 option) + ?(kprobe_events=[]) + ?(preserve_ftrace_buffer:bool option) + ?(use_monotonic_raw_clock:bool option) + ?(instance_name:string option) + ?(debug_ftrace_abi:bool option) + ?(tids_to_trace=[]) + ?(tracefs_options=[]) + ?(tracing_cpumask:string option) + ?(initialize_ksyms_synchronously_for_testing:bool option) + () : ftrace_config = + let _res = default_ftrace_config () in + ftrace_config_set_ftrace_events _res ftrace_events; + ftrace_config_set_atrace_categories _res atrace_categories; + ftrace_config_set_atrace_apps _res atrace_apps; + ftrace_config_set_atrace_categories_prefer_sdk _res atrace_categories_prefer_sdk; + (match atrace_userspace_only with + | None -> () + | Some v -> ftrace_config_set_atrace_userspace_only _res v); + (match buffer_size_kb with + | None -> () + | Some v -> ftrace_config_set_buffer_size_kb _res v); + (match buffer_size_lower_bound with + | None -> () + | Some v -> ftrace_config_set_buffer_size_lower_bound _res v); + (match drain_period_ms with + | None -> () + | Some v -> ftrace_config_set_drain_period_ms _res v); + (match drain_buffer_percent with + | None -> () + | Some v -> ftrace_config_set_drain_buffer_percent _res v); + (match compact_sched with + | None -> () + | Some v -> ftrace_config_set_compact_sched _res v); + (match print_filter with + | None -> () + | Some v -> ftrace_config_set_print_filter _res v); + (match symbolize_ksyms with + | None -> () + | Some v -> ftrace_config_set_symbolize_ksyms _res v); + (match ksyms_mem_policy with + | None -> () + | Some v -> ftrace_config_set_ksyms_mem_policy _res v); + (match throttle_rss_stat with + | None -> () + | Some v -> ftrace_config_set_throttle_rss_stat _res v); + (match denser_generic_event_encoding with + | None -> () + | Some v -> ftrace_config_set_denser_generic_event_encoding _res v); + (match disable_generic_events with + | None -> () + | Some v -> ftrace_config_set_disable_generic_events _res v); + ftrace_config_set_syscall_events _res syscall_events; + (match enable_function_graph with + | None -> () + | Some v -> ftrace_config_set_enable_function_graph _res v); + ftrace_config_set_function_filters _res function_filters; + ftrace_config_set_function_graph_roots _res function_graph_roots; + (match function_graph_max_depth with + | None -> () + | Some v -> ftrace_config_set_function_graph_max_depth _res v); + ftrace_config_set_kprobe_events _res kprobe_events; + (match preserve_ftrace_buffer with + | None -> () + | Some v -> ftrace_config_set_preserve_ftrace_buffer _res v); + (match use_monotonic_raw_clock with + | None -> () + | Some v -> ftrace_config_set_use_monotonic_raw_clock _res v); + (match instance_name with + | None -> () + | Some v -> ftrace_config_set_instance_name _res v); + (match debug_ftrace_abi with + | None -> () + | Some v -> ftrace_config_set_debug_ftrace_abi _res v); + ftrace_config_set_tids_to_trace _res tids_to_trace; + ftrace_config_set_tracefs_options _res tracefs_options; + (match tracing_cpumask with + | None -> () + | Some v -> ftrace_config_set_tracing_cpumask _res v); + (match initialize_ksyms_synchronously_for_testing with + | None -> () + | Some v -> ftrace_config_set_initialize_ksyms_synchronously_for_testing _res v); + _res + +let[@inline] gpu_counter_config_has_counter_period_ns (self:gpu_counter_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_counter_config_has_instrumented_sampling (self:gpu_counter_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] gpu_counter_config_has_fix_gpu_clock (self:gpu_counter_config) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] gpu_counter_config_set_counter_period_ns (self:gpu_counter_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.counter_period_ns <- x +let[@inline] gpu_counter_config_set_counter_ids (self:gpu_counter_config) (x:int32 list) : unit = + self.counter_ids <- x +let[@inline] gpu_counter_config_set_instrumented_sampling (self:gpu_counter_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.instrumented_sampling <- x +let[@inline] gpu_counter_config_set_fix_gpu_clock (self:gpu_counter_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.fix_gpu_clock <- x + +let copy_gpu_counter_config (self:gpu_counter_config) : gpu_counter_config = + { self with counter_period_ns = self.counter_period_ns } + +let make_gpu_counter_config + ?(counter_period_ns:int64 option) + ?(counter_ids=[]) + ?(instrumented_sampling:bool option) + ?(fix_gpu_clock:bool option) + () : gpu_counter_config = + let _res = default_gpu_counter_config () in + (match counter_period_ns with + | None -> () + | Some v -> gpu_counter_config_set_counter_period_ns _res v); + gpu_counter_config_set_counter_ids _res counter_ids; + (match instrumented_sampling with + | None -> () + | Some v -> gpu_counter_config_set_instrumented_sampling _res v); + (match fix_gpu_clock with + | None -> () + | Some v -> gpu_counter_config_set_fix_gpu_clock _res v); + _res + +let[@inline] gpu_render_stages_config_has_full_loadstore (self:gpu_render_stages_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_render_stages_config_has_low_overhead (self:gpu_render_stages_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] gpu_render_stages_config_set_full_loadstore (self:gpu_render_stages_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.full_loadstore <- x +let[@inline] gpu_render_stages_config_set_low_overhead (self:gpu_render_stages_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.low_overhead <- x +let[@inline] gpu_render_stages_config_set_trace_metrics (self:gpu_render_stages_config) (x:string list) : unit = + self.trace_metrics <- x + +let copy_gpu_render_stages_config (self:gpu_render_stages_config) : gpu_render_stages_config = + { self with full_loadstore = self.full_loadstore } + +let make_gpu_render_stages_config + ?(full_loadstore:bool option) + ?(low_overhead:bool option) + ?(trace_metrics=[]) + () : gpu_render_stages_config = + let _res = default_gpu_render_stages_config () in + (match full_loadstore with + | None -> () + | Some v -> gpu_render_stages_config_set_full_loadstore _res v); + (match low_overhead with + | None -> () + | Some v -> gpu_render_stages_config_set_low_overhead _res v); + gpu_render_stages_config_set_trace_metrics _res trace_metrics; + _res + +let[@inline] vulkan_memory_config_has_track_driver_memory_usage (self:vulkan_memory_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] vulkan_memory_config_has_track_device_memory_usage (self:vulkan_memory_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] vulkan_memory_config_set_track_driver_memory_usage (self:vulkan_memory_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.track_driver_memory_usage <- x +let[@inline] vulkan_memory_config_set_track_device_memory_usage (self:vulkan_memory_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.track_device_memory_usage <- x + +let copy_vulkan_memory_config (self:vulkan_memory_config) : vulkan_memory_config = + { self with track_driver_memory_usage = self.track_driver_memory_usage } + +let make_vulkan_memory_config + ?(track_driver_memory_usage:bool option) + ?(track_device_memory_usage:bool option) + () : vulkan_memory_config = + let _res = default_vulkan_memory_config () in + (match track_driver_memory_usage with + | None -> () + | Some v -> vulkan_memory_config_set_track_driver_memory_usage _res v); + (match track_device_memory_usage with + | None -> () + | Some v -> vulkan_memory_config_set_track_device_memory_usage _res v); + _res + +let[@inline] inode_file_config_mount_point_mapping_entry_has_mountpoint (self:inode_file_config_mount_point_mapping_entry) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] inode_file_config_mount_point_mapping_entry_set_mountpoint (self:inode_file_config_mount_point_mapping_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.mountpoint <- x +let[@inline] inode_file_config_mount_point_mapping_entry_set_scan_roots (self:inode_file_config_mount_point_mapping_entry) (x:string list) : unit = + self.scan_roots <- x + +let copy_inode_file_config_mount_point_mapping_entry (self:inode_file_config_mount_point_mapping_entry) : inode_file_config_mount_point_mapping_entry = + { self with mountpoint = self.mountpoint } + +let make_inode_file_config_mount_point_mapping_entry + ?(mountpoint:string option) + ?(scan_roots=[]) + () : inode_file_config_mount_point_mapping_entry = + let _res = default_inode_file_config_mount_point_mapping_entry () in + (match mountpoint with + | None -> () + | Some v -> inode_file_config_mount_point_mapping_entry_set_mountpoint _res v); + inode_file_config_mount_point_mapping_entry_set_scan_roots _res scan_roots; + _res + +let[@inline] inode_file_config_has_scan_interval_ms (self:inode_file_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] inode_file_config_has_scan_delay_ms (self:inode_file_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] inode_file_config_has_scan_batch_size (self:inode_file_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] inode_file_config_has_do_not_scan (self:inode_file_config) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] inode_file_config_set_scan_interval_ms (self:inode_file_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.scan_interval_ms <- x +let[@inline] inode_file_config_set_scan_delay_ms (self:inode_file_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.scan_delay_ms <- x +let[@inline] inode_file_config_set_scan_batch_size (self:inode_file_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.scan_batch_size <- x +let[@inline] inode_file_config_set_do_not_scan (self:inode_file_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.do_not_scan <- x +let[@inline] inode_file_config_set_scan_mount_points (self:inode_file_config) (x:string list) : unit = + self.scan_mount_points <- x +let[@inline] inode_file_config_set_mount_point_mapping (self:inode_file_config) (x:inode_file_config_mount_point_mapping_entry list) : unit = + self.mount_point_mapping <- x + +let copy_inode_file_config (self:inode_file_config) : inode_file_config = + { self with scan_interval_ms = self.scan_interval_ms } + +let make_inode_file_config + ?(scan_interval_ms:int32 option) + ?(scan_delay_ms:int32 option) + ?(scan_batch_size:int32 option) + ?(do_not_scan:bool option) + ?(scan_mount_points=[]) + ?(mount_point_mapping=[]) + () : inode_file_config = + let _res = default_inode_file_config () in + (match scan_interval_ms with + | None -> () + | Some v -> inode_file_config_set_scan_interval_ms _res v); + (match scan_delay_ms with + | None -> () + | Some v -> inode_file_config_set_scan_delay_ms _res v); + (match scan_batch_size with + | None -> () + | Some v -> inode_file_config_set_scan_batch_size _res v); + (match do_not_scan with + | None -> () + | Some v -> inode_file_config_set_do_not_scan _res v); + inode_file_config_set_scan_mount_points _res scan_mount_points; + inode_file_config_set_mount_point_mapping _res mount_point_mapping; + _res + +let[@inline] console_config_has_output (self:console_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] console_config_has_enable_colors (self:console_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] console_config_set_output (self:console_config) (x:console_config_output) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.output <- x +let[@inline] console_config_set_enable_colors (self:console_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.enable_colors <- x + +let copy_console_config (self:console_config) : console_config = + { self with output = self.output } + +let make_console_config + ?(output:console_config_output option) + ?(enable_colors:bool option) + () : console_config = + let _res = default_console_config () in + (match output with + | None -> () + | Some v -> console_config_set_output _res v); + (match enable_colors with + | None -> () + | Some v -> console_config_set_enable_colors _res v); + _res + +let[@inline] interceptor_config_has_name (self:interceptor_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] interceptor_config_set_name (self:interceptor_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] interceptor_config_set_console_config (self:interceptor_config) (x:console_config) : unit = + self.console_config <- Some x + +let copy_interceptor_config (self:interceptor_config) : interceptor_config = + { self with name = self.name } + +let make_interceptor_config + ?(name:string option) + ?(console_config:console_config option) + () : interceptor_config = + let _res = default_interceptor_config () in + (match name with + | None -> () + | Some v -> interceptor_config_set_name _res v); + (match console_config with + | None -> () + | Some v -> interceptor_config_set_console_config _res v); + _res + +let[@inline] android_power_config_has_battery_poll_ms (self:android_power_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_power_config_has_collect_power_rails (self:android_power_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_power_config_has_collect_energy_estimation_breakdown (self:android_power_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] android_power_config_has_collect_entity_state_residency (self:android_power_config) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] android_power_config_set_battery_poll_ms (self:android_power_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.battery_poll_ms <- x +let[@inline] android_power_config_set_battery_counters (self:android_power_config) (x:android_power_config_battery_counters list) : unit = + self.battery_counters <- x +let[@inline] android_power_config_set_collect_power_rails (self:android_power_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.collect_power_rails <- x +let[@inline] android_power_config_set_collect_energy_estimation_breakdown (self:android_power_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.collect_energy_estimation_breakdown <- x +let[@inline] android_power_config_set_collect_entity_state_residency (self:android_power_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.collect_entity_state_residency <- x + +let copy_android_power_config (self:android_power_config) : android_power_config = + { self with battery_poll_ms = self.battery_poll_ms } + +let make_android_power_config + ?(battery_poll_ms:int32 option) + ?(battery_counters=[]) + ?(collect_power_rails:bool option) + ?(collect_energy_estimation_breakdown:bool option) + ?(collect_entity_state_residency:bool option) + () : android_power_config = + let _res = default_android_power_config () in + (match battery_poll_ms with + | None -> () + | Some v -> android_power_config_set_battery_poll_ms _res v); + android_power_config_set_battery_counters _res battery_counters; + (match collect_power_rails with + | None -> () + | Some v -> android_power_config_set_collect_power_rails _res v); + (match collect_energy_estimation_breakdown with + | None -> () + | Some v -> android_power_config_set_collect_energy_estimation_breakdown _res v); + (match collect_entity_state_residency with + | None -> () + | Some v -> android_power_config_set_collect_entity_state_residency _res v); + _res + +let[@inline] priority_boost_config_has_policy (self:priority_boost_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] priority_boost_config_has_priority (self:priority_boost_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] priority_boost_config_set_policy (self:priority_boost_config) (x:priority_boost_config_boost_policy) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.policy <- x +let[@inline] priority_boost_config_set_priority (self:priority_boost_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.priority <- x + +let copy_priority_boost_config (self:priority_boost_config) : priority_boost_config = + { self with policy = self.policy } + +let make_priority_boost_config + ?(policy:priority_boost_config_boost_policy option) + ?(priority:int32 option) + () : priority_boost_config = + let _res = default_priority_boost_config () in + (match policy with + | None -> () + | Some v -> priority_boost_config_set_policy _res v); + (match priority with + | None -> () + | Some v -> priority_boost_config_set_priority _res v); + _res + +let[@inline] process_stats_config_has_scan_all_processes_on_start (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] process_stats_config_has_record_thread_names (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] process_stats_config_has_proc_stats_poll_ms (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] process_stats_config_has_proc_stats_cache_ttl_ms (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] process_stats_config_has_scan_smaps_rollup (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] process_stats_config_has_record_process_age (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] process_stats_config_has_record_process_runtime (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] process_stats_config_has_record_process_dmabuf_rss (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] process_stats_config_has_resolve_process_fds (self:process_stats_config) : bool = (Pbrt.Bitfield.get self._presence 8) + +let[@inline] process_stats_config_set_quirks (self:process_stats_config) (x:process_stats_config_quirks list) : unit = + self.quirks <- x +let[@inline] process_stats_config_set_scan_all_processes_on_start (self:process_stats_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.scan_all_processes_on_start <- x +let[@inline] process_stats_config_set_record_thread_names (self:process_stats_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.record_thread_names <- x +let[@inline] process_stats_config_set_proc_stats_poll_ms (self:process_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.proc_stats_poll_ms <- x +let[@inline] process_stats_config_set_proc_stats_cache_ttl_ms (self:process_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.proc_stats_cache_ttl_ms <- x +let[@inline] process_stats_config_set_scan_smaps_rollup (self:process_stats_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.scan_smaps_rollup <- x +let[@inline] process_stats_config_set_record_process_age (self:process_stats_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.record_process_age <- x +let[@inline] process_stats_config_set_record_process_runtime (self:process_stats_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.record_process_runtime <- x +let[@inline] process_stats_config_set_record_process_dmabuf_rss (self:process_stats_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.record_process_dmabuf_rss <- x +let[@inline] process_stats_config_set_resolve_process_fds (self:process_stats_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.resolve_process_fds <- x + +let copy_process_stats_config (self:process_stats_config) : process_stats_config = + { self with quirks = self.quirks } + +let make_process_stats_config + ?(quirks=[]) + ?(scan_all_processes_on_start:bool option) + ?(record_thread_names:bool option) + ?(proc_stats_poll_ms:int32 option) + ?(proc_stats_cache_ttl_ms:int32 option) + ?(scan_smaps_rollup:bool option) + ?(record_process_age:bool option) + ?(record_process_runtime:bool option) + ?(record_process_dmabuf_rss:bool option) + ?(resolve_process_fds:bool option) + () : process_stats_config = + let _res = default_process_stats_config () in + process_stats_config_set_quirks _res quirks; + (match scan_all_processes_on_start with + | None -> () + | Some v -> process_stats_config_set_scan_all_processes_on_start _res v); + (match record_thread_names with + | None -> () + | Some v -> process_stats_config_set_record_thread_names _res v); + (match proc_stats_poll_ms with + | None -> () + | Some v -> process_stats_config_set_proc_stats_poll_ms _res v); + (match proc_stats_cache_ttl_ms with + | None -> () + | Some v -> process_stats_config_set_proc_stats_cache_ttl_ms _res v); + (match scan_smaps_rollup with + | None -> () + | Some v -> process_stats_config_set_scan_smaps_rollup _res v); + (match record_process_age with + | None -> () + | Some v -> process_stats_config_set_record_process_age _res v); + (match record_process_runtime with + | None -> () + | Some v -> process_stats_config_set_record_process_runtime _res v); + (match record_process_dmabuf_rss with + | None -> () + | Some v -> process_stats_config_set_record_process_dmabuf_rss _res v); + (match resolve_process_fds with + | None -> () + | Some v -> process_stats_config_set_resolve_process_fds _res v); + _res + +let[@inline] heapprofd_config_continuous_dump_config_has_dump_phase_ms (self:heapprofd_config_continuous_dump_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] heapprofd_config_continuous_dump_config_has_dump_interval_ms (self:heapprofd_config_continuous_dump_config) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] heapprofd_config_continuous_dump_config_set_dump_phase_ms (self:heapprofd_config_continuous_dump_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.dump_phase_ms <- x +let[@inline] heapprofd_config_continuous_dump_config_set_dump_interval_ms (self:heapprofd_config_continuous_dump_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.dump_interval_ms <- x + +let copy_heapprofd_config_continuous_dump_config (self:heapprofd_config_continuous_dump_config) : heapprofd_config_continuous_dump_config = + { self with dump_phase_ms = self.dump_phase_ms } + +let make_heapprofd_config_continuous_dump_config + ?(dump_phase_ms:int32 option) + ?(dump_interval_ms:int32 option) + () : heapprofd_config_continuous_dump_config = + let _res = default_heapprofd_config_continuous_dump_config () in + (match dump_phase_ms with + | None -> () + | Some v -> heapprofd_config_continuous_dump_config_set_dump_phase_ms _res v); + (match dump_interval_ms with + | None -> () + | Some v -> heapprofd_config_continuous_dump_config_set_dump_interval_ms _res v); + _res + +let[@inline] heapprofd_config_has_sampling_interval_bytes (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] heapprofd_config_has_adaptive_sampling_shmem_threshold (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] heapprofd_config_has_adaptive_sampling_max_sampling_interval_bytes (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] heapprofd_config_has_stream_allocations (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] heapprofd_config_has_all_heaps (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] heapprofd_config_has_all (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] heapprofd_config_has_min_anonymous_memory_kb (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] heapprofd_config_has_max_heapprofd_memory_kb (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] heapprofd_config_has_max_heapprofd_cpu_secs (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] heapprofd_config_has_shmem_size_bytes (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] heapprofd_config_has_block_client (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] heapprofd_config_has_block_client_timeout_us (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] heapprofd_config_has_no_startup (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] heapprofd_config_has_no_running (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] heapprofd_config_has_dump_at_max (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] heapprofd_config_has_disable_fork_teardown (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] heapprofd_config_has_disable_vfork_detection (self:heapprofd_config) : bool = (Pbrt.Bitfield.get self._presence 16) + +let[@inline] heapprofd_config_set_sampling_interval_bytes (self:heapprofd_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.sampling_interval_bytes <- x +let[@inline] heapprofd_config_set_adaptive_sampling_shmem_threshold (self:heapprofd_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.adaptive_sampling_shmem_threshold <- x +let[@inline] heapprofd_config_set_adaptive_sampling_max_sampling_interval_bytes (self:heapprofd_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.adaptive_sampling_max_sampling_interval_bytes <- x +let[@inline] heapprofd_config_set_process_cmdline (self:heapprofd_config) (x:string list) : unit = + self.process_cmdline <- x +let[@inline] heapprofd_config_set_pid (self:heapprofd_config) (x:int64 list) : unit = + self.pid <- x +let[@inline] heapprofd_config_set_target_installed_by (self:heapprofd_config) (x:string list) : unit = + self.target_installed_by <- x +let[@inline] heapprofd_config_set_heaps (self:heapprofd_config) (x:string list) : unit = + self.heaps <- x +let[@inline] heapprofd_config_set_exclude_heaps (self:heapprofd_config) (x:string list) : unit = + self.exclude_heaps <- x +let[@inline] heapprofd_config_set_stream_allocations (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.stream_allocations <- x +let[@inline] heapprofd_config_set_heap_sampling_intervals (self:heapprofd_config) (x:int64 list) : unit = + self.heap_sampling_intervals <- x +let[@inline] heapprofd_config_set_all_heaps (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.all_heaps <- x +let[@inline] heapprofd_config_set_all (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.all <- x +let[@inline] heapprofd_config_set_min_anonymous_memory_kb (self:heapprofd_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.min_anonymous_memory_kb <- x +let[@inline] heapprofd_config_set_max_heapprofd_memory_kb (self:heapprofd_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.max_heapprofd_memory_kb <- x +let[@inline] heapprofd_config_set_max_heapprofd_cpu_secs (self:heapprofd_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.max_heapprofd_cpu_secs <- x +let[@inline] heapprofd_config_set_skip_symbol_prefix (self:heapprofd_config) (x:string list) : unit = + self.skip_symbol_prefix <- x +let[@inline] heapprofd_config_set_continuous_dump_config (self:heapprofd_config) (x:heapprofd_config_continuous_dump_config) : unit = + self.continuous_dump_config <- Some x +let[@inline] heapprofd_config_set_shmem_size_bytes (self:heapprofd_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.shmem_size_bytes <- x +let[@inline] heapprofd_config_set_block_client (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.block_client <- x +let[@inline] heapprofd_config_set_block_client_timeout_us (self:heapprofd_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.block_client_timeout_us <- x +let[@inline] heapprofd_config_set_no_startup (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.no_startup <- x +let[@inline] heapprofd_config_set_no_running (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.no_running <- x +let[@inline] heapprofd_config_set_dump_at_max (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.dump_at_max <- x +let[@inline] heapprofd_config_set_disable_fork_teardown (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.disable_fork_teardown <- x +let[@inline] heapprofd_config_set_disable_vfork_detection (self:heapprofd_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.disable_vfork_detection <- x + +let copy_heapprofd_config (self:heapprofd_config) : heapprofd_config = + { self with sampling_interval_bytes = self.sampling_interval_bytes } + +let make_heapprofd_config + ?(sampling_interval_bytes:int64 option) + ?(adaptive_sampling_shmem_threshold:int64 option) + ?(adaptive_sampling_max_sampling_interval_bytes:int64 option) + ?(process_cmdline=[]) + ?(pid=[]) + ?(target_installed_by=[]) + ?(heaps=[]) + ?(exclude_heaps=[]) + ?(stream_allocations:bool option) + ?(heap_sampling_intervals=[]) + ?(all_heaps:bool option) + ?(all:bool option) + ?(min_anonymous_memory_kb:int32 option) + ?(max_heapprofd_memory_kb:int32 option) + ?(max_heapprofd_cpu_secs:int64 option) + ?(skip_symbol_prefix=[]) + ?(continuous_dump_config:heapprofd_config_continuous_dump_config option) + ?(shmem_size_bytes:int64 option) + ?(block_client:bool option) + ?(block_client_timeout_us:int32 option) + ?(no_startup:bool option) + ?(no_running:bool option) + ?(dump_at_max:bool option) + ?(disable_fork_teardown:bool option) + ?(disable_vfork_detection:bool option) + () : heapprofd_config = + let _res = default_heapprofd_config () in + (match sampling_interval_bytes with + | None -> () + | Some v -> heapprofd_config_set_sampling_interval_bytes _res v); + (match adaptive_sampling_shmem_threshold with + | None -> () + | Some v -> heapprofd_config_set_adaptive_sampling_shmem_threshold _res v); + (match adaptive_sampling_max_sampling_interval_bytes with + | None -> () + | Some v -> heapprofd_config_set_adaptive_sampling_max_sampling_interval_bytes _res v); + heapprofd_config_set_process_cmdline _res process_cmdline; + heapprofd_config_set_pid _res pid; + heapprofd_config_set_target_installed_by _res target_installed_by; + heapprofd_config_set_heaps _res heaps; + heapprofd_config_set_exclude_heaps _res exclude_heaps; + (match stream_allocations with + | None -> () + | Some v -> heapprofd_config_set_stream_allocations _res v); + heapprofd_config_set_heap_sampling_intervals _res heap_sampling_intervals; + (match all_heaps with + | None -> () + | Some v -> heapprofd_config_set_all_heaps _res v); + (match all with + | None -> () + | Some v -> heapprofd_config_set_all _res v); + (match min_anonymous_memory_kb with + | None -> () + | Some v -> heapprofd_config_set_min_anonymous_memory_kb _res v); + (match max_heapprofd_memory_kb with + | None -> () + | Some v -> heapprofd_config_set_max_heapprofd_memory_kb _res v); + (match max_heapprofd_cpu_secs with + | None -> () + | Some v -> heapprofd_config_set_max_heapprofd_cpu_secs _res v); + heapprofd_config_set_skip_symbol_prefix _res skip_symbol_prefix; + (match continuous_dump_config with + | None -> () + | Some v -> heapprofd_config_set_continuous_dump_config _res v); + (match shmem_size_bytes with + | None -> () + | Some v -> heapprofd_config_set_shmem_size_bytes _res v); + (match block_client with + | None -> () + | Some v -> heapprofd_config_set_block_client _res v); + (match block_client_timeout_us with + | None -> () + | Some v -> heapprofd_config_set_block_client_timeout_us _res v); + (match no_startup with + | None -> () + | Some v -> heapprofd_config_set_no_startup _res v); + (match no_running with + | None -> () + | Some v -> heapprofd_config_set_no_running _res v); + (match dump_at_max with + | None -> () + | Some v -> heapprofd_config_set_dump_at_max _res v); + (match disable_fork_teardown with + | None -> () + | Some v -> heapprofd_config_set_disable_fork_teardown _res v); + (match disable_vfork_detection with + | None -> () + | Some v -> heapprofd_config_set_disable_vfork_detection _res v); + _res + +let[@inline] statsd_pull_atom_config_has_pull_frequency_ms (self:statsd_pull_atom_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] statsd_pull_atom_config_set_pull_atom_id (self:statsd_pull_atom_config) (x:atom_id list) : unit = + self.pull_atom_id <- x +let[@inline] statsd_pull_atom_config_set_raw_pull_atom_id (self:statsd_pull_atom_config) (x:int32 list) : unit = + self.raw_pull_atom_id <- x +let[@inline] statsd_pull_atom_config_set_pull_frequency_ms (self:statsd_pull_atom_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pull_frequency_ms <- x +let[@inline] statsd_pull_atom_config_set_packages (self:statsd_pull_atom_config) (x:string list) : unit = + self.packages <- x + +let copy_statsd_pull_atom_config (self:statsd_pull_atom_config) : statsd_pull_atom_config = + { self with pull_atom_id = self.pull_atom_id } + +let make_statsd_pull_atom_config + ?(pull_atom_id=[]) + ?(raw_pull_atom_id=[]) + ?(pull_frequency_ms:int32 option) + ?(packages=[]) + () : statsd_pull_atom_config = + let _res = default_statsd_pull_atom_config () in + statsd_pull_atom_config_set_pull_atom_id _res pull_atom_id; + statsd_pull_atom_config_set_raw_pull_atom_id _res raw_pull_atom_id; + (match pull_frequency_ms with + | None -> () + | Some v -> statsd_pull_atom_config_set_pull_frequency_ms _res v); + statsd_pull_atom_config_set_packages _res packages; + _res + + +let[@inline] statsd_tracing_config_set_push_atom_id (self:statsd_tracing_config) (x:atom_id list) : unit = + self.push_atom_id <- x +let[@inline] statsd_tracing_config_set_raw_push_atom_id (self:statsd_tracing_config) (x:int32 list) : unit = + self.raw_push_atom_id <- x +let[@inline] statsd_tracing_config_set_pull_config (self:statsd_tracing_config) (x:statsd_pull_atom_config list) : unit = + self.pull_config <- x + +let copy_statsd_tracing_config (self:statsd_tracing_config) : statsd_tracing_config = + { self with push_atom_id = self.push_atom_id } + +let make_statsd_tracing_config + ?(push_atom_id=[]) + ?(raw_push_atom_id=[]) + ?(pull_config=[]) + () : statsd_tracing_config = + let _res = default_statsd_tracing_config () in + statsd_tracing_config_set_push_atom_id _res push_atom_id; + statsd_tracing_config_set_raw_push_atom_id _res raw_push_atom_id; + statsd_tracing_config_set_pull_config _res pull_config; + _res + +let[@inline] sys_stats_config_has_meminfo_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_config_has_vmstat_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] sys_stats_config_has_stat_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] sys_stats_config_has_devfreq_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] sys_stats_config_has_cpufreq_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] sys_stats_config_has_buddyinfo_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] sys_stats_config_has_diskstat_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] sys_stats_config_has_psi_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] sys_stats_config_has_thermal_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] sys_stats_config_has_cpuidle_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] sys_stats_config_has_gpufreq_period_ms (self:sys_stats_config) : bool = (Pbrt.Bitfield.get self._presence 10) + +let[@inline] sys_stats_config_set_meminfo_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.meminfo_period_ms <- x +let[@inline] sys_stats_config_set_meminfo_counters (self:sys_stats_config) (x:meminfo_counters list) : unit = + self.meminfo_counters <- x +let[@inline] sys_stats_config_set_vmstat_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.vmstat_period_ms <- x +let[@inline] sys_stats_config_set_vmstat_counters (self:sys_stats_config) (x:vmstat_counters list) : unit = + self.vmstat_counters <- x +let[@inline] sys_stats_config_set_stat_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.stat_period_ms <- x +let[@inline] sys_stats_config_set_stat_counters (self:sys_stats_config) (x:sys_stats_config_stat_counters list) : unit = + self.stat_counters <- x +let[@inline] sys_stats_config_set_devfreq_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.devfreq_period_ms <- x +let[@inline] sys_stats_config_set_cpufreq_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.cpufreq_period_ms <- x +let[@inline] sys_stats_config_set_buddyinfo_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.buddyinfo_period_ms <- x +let[@inline] sys_stats_config_set_diskstat_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.diskstat_period_ms <- x +let[@inline] sys_stats_config_set_psi_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.psi_period_ms <- x +let[@inline] sys_stats_config_set_thermal_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.thermal_period_ms <- x +let[@inline] sys_stats_config_set_cpuidle_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.cpuidle_period_ms <- x +let[@inline] sys_stats_config_set_gpufreq_period_ms (self:sys_stats_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.gpufreq_period_ms <- x + +let copy_sys_stats_config (self:sys_stats_config) : sys_stats_config = + { self with meminfo_period_ms = self.meminfo_period_ms } + +let make_sys_stats_config + ?(meminfo_period_ms:int32 option) + ?(meminfo_counters=[]) + ?(vmstat_period_ms:int32 option) + ?(vmstat_counters=[]) + ?(stat_period_ms:int32 option) + ?(stat_counters=[]) + ?(devfreq_period_ms:int32 option) + ?(cpufreq_period_ms:int32 option) + ?(buddyinfo_period_ms:int32 option) + ?(diskstat_period_ms:int32 option) + ?(psi_period_ms:int32 option) + ?(thermal_period_ms:int32 option) + ?(cpuidle_period_ms:int32 option) + ?(gpufreq_period_ms:int32 option) + () : sys_stats_config = + let _res = default_sys_stats_config () in + (match meminfo_period_ms with + | None -> () + | Some v -> sys_stats_config_set_meminfo_period_ms _res v); + sys_stats_config_set_meminfo_counters _res meminfo_counters; + (match vmstat_period_ms with + | None -> () + | Some v -> sys_stats_config_set_vmstat_period_ms _res v); + sys_stats_config_set_vmstat_counters _res vmstat_counters; + (match stat_period_ms with + | None -> () + | Some v -> sys_stats_config_set_stat_period_ms _res v); + sys_stats_config_set_stat_counters _res stat_counters; + (match devfreq_period_ms with + | None -> () + | Some v -> sys_stats_config_set_devfreq_period_ms _res v); + (match cpufreq_period_ms with + | None -> () + | Some v -> sys_stats_config_set_cpufreq_period_ms _res v); + (match buddyinfo_period_ms with + | None -> () + | Some v -> sys_stats_config_set_buddyinfo_period_ms _res v); + (match diskstat_period_ms with + | None -> () + | Some v -> sys_stats_config_set_diskstat_period_ms _res v); + (match psi_period_ms with + | None -> () + | Some v -> sys_stats_config_set_psi_period_ms _res v); + (match thermal_period_ms with + | None -> () + | Some v -> sys_stats_config_set_thermal_period_ms _res v); + (match cpuidle_period_ms with + | None -> () + | Some v -> sys_stats_config_set_cpuidle_period_ms _res v); + (match gpufreq_period_ms with + | None -> () + | Some v -> sys_stats_config_set_gpufreq_period_ms _res v); + _res + +let[@inline] test_config_dummy_fields_has_field_uint32 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] test_config_dummy_fields_has_field_int32 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] test_config_dummy_fields_has_field_uint64 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] test_config_dummy_fields_has_field_int64 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] test_config_dummy_fields_has_field_fixed64 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] test_config_dummy_fields_has_field_sfixed64 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] test_config_dummy_fields_has_field_fixed32 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] test_config_dummy_fields_has_field_sfixed32 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] test_config_dummy_fields_has_field_double (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] test_config_dummy_fields_has_field_float (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] test_config_dummy_fields_has_field_sint64 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] test_config_dummy_fields_has_field_sint32 (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] test_config_dummy_fields_has_field_string (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] test_config_dummy_fields_has_field_bytes (self:test_config_dummy_fields) : bool = (Pbrt.Bitfield.get self._presence 13) + +let[@inline] test_config_dummy_fields_set_field_uint32 (self:test_config_dummy_fields) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.field_uint32 <- x +let[@inline] test_config_dummy_fields_set_field_int32 (self:test_config_dummy_fields) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.field_int32 <- x +let[@inline] test_config_dummy_fields_set_field_uint64 (self:test_config_dummy_fields) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.field_uint64 <- x +let[@inline] test_config_dummy_fields_set_field_int64 (self:test_config_dummy_fields) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.field_int64 <- x +let[@inline] test_config_dummy_fields_set_field_fixed64 (self:test_config_dummy_fields) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.field_fixed64 <- x +let[@inline] test_config_dummy_fields_set_field_sfixed64 (self:test_config_dummy_fields) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.field_sfixed64 <- x +let[@inline] test_config_dummy_fields_set_field_fixed32 (self:test_config_dummy_fields) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.field_fixed32 <- x +let[@inline] test_config_dummy_fields_set_field_sfixed32 (self:test_config_dummy_fields) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.field_sfixed32 <- x +let[@inline] test_config_dummy_fields_set_field_double (self:test_config_dummy_fields) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.field_double <- x +let[@inline] test_config_dummy_fields_set_field_float (self:test_config_dummy_fields) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.field_float <- x +let[@inline] test_config_dummy_fields_set_field_sint64 (self:test_config_dummy_fields) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.field_sint64 <- x +let[@inline] test_config_dummy_fields_set_field_sint32 (self:test_config_dummy_fields) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.field_sint32 <- x +let[@inline] test_config_dummy_fields_set_field_string (self:test_config_dummy_fields) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.field_string <- x +let[@inline] test_config_dummy_fields_set_field_bytes (self:test_config_dummy_fields) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.field_bytes <- x + +let copy_test_config_dummy_fields (self:test_config_dummy_fields) : test_config_dummy_fields = + { self with field_uint32 = self.field_uint32 } + +let make_test_config_dummy_fields + ?(field_uint32:int32 option) + ?(field_int32:int32 option) + ?(field_uint64:int64 option) + ?(field_int64:int64 option) + ?(field_fixed64:int64 option) + ?(field_sfixed64:int64 option) + ?(field_fixed32:int32 option) + ?(field_sfixed32:int32 option) + ?(field_double:float option) + ?(field_float:float option) + ?(field_sint64:int64 option) + ?(field_sint32:int32 option) + ?(field_string:string option) + ?(field_bytes:bytes option) + () : test_config_dummy_fields = + let _res = default_test_config_dummy_fields () in + (match field_uint32 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_uint32 _res v); + (match field_int32 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_int32 _res v); + (match field_uint64 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_uint64 _res v); + (match field_int64 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_int64 _res v); + (match field_fixed64 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_fixed64 _res v); + (match field_sfixed64 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_sfixed64 _res v); + (match field_fixed32 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_fixed32 _res v); + (match field_sfixed32 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_sfixed32 _res v); + (match field_double with + | None -> () + | Some v -> test_config_dummy_fields_set_field_double _res v); + (match field_float with + | None -> () + | Some v -> test_config_dummy_fields_set_field_float _res v); + (match field_sint64 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_sint64 _res v); + (match field_sint32 with + | None -> () + | Some v -> test_config_dummy_fields_set_field_sint32 _res v); + (match field_string with + | None -> () + | Some v -> test_config_dummy_fields_set_field_string _res v); + (match field_bytes with + | None -> () + | Some v -> test_config_dummy_fields_set_field_bytes _res v); + _res + +let[@inline] test_config_has_message_count (self:test_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] test_config_has_max_messages_per_second (self:test_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] test_config_has_seed (self:test_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] test_config_has_message_size (self:test_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] test_config_has_send_batch_on_register (self:test_config) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] test_config_set_message_count (self:test_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.message_count <- x +let[@inline] test_config_set_max_messages_per_second (self:test_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.max_messages_per_second <- x +let[@inline] test_config_set_seed (self:test_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.seed <- x +let[@inline] test_config_set_message_size (self:test_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.message_size <- x +let[@inline] test_config_set_send_batch_on_register (self:test_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.send_batch_on_register <- x +let[@inline] test_config_set_dummy_fields (self:test_config) (x:test_config_dummy_fields) : unit = + self.dummy_fields <- Some x + +let copy_test_config (self:test_config) : test_config = + { self with message_count = self.message_count } + +let make_test_config + ?(message_count:int32 option) + ?(max_messages_per_second:int32 option) + ?(seed:int32 option) + ?(message_size:int32 option) + ?(send_batch_on_register:bool option) + ?(dummy_fields:test_config_dummy_fields option) + () : test_config = + let _res = default_test_config () in + (match message_count with + | None -> () + | Some v -> test_config_set_message_count _res v); + (match max_messages_per_second with + | None -> () + | Some v -> test_config_set_max_messages_per_second _res v); + (match seed with + | None -> () + | Some v -> test_config_set_seed _res v); + (match message_size with + | None -> () + | Some v -> test_config_set_message_size _res v); + (match send_batch_on_register with + | None -> () + | Some v -> test_config_set_send_batch_on_register _res v); + (match dummy_fields with + | None -> () + | Some v -> test_config_set_dummy_fields _res v); + _res + +let[@inline] track_event_config_has_disable_incremental_timestamps (self:track_event_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] track_event_config_has_timestamp_unit_multiplier (self:track_event_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] track_event_config_has_filter_debug_annotations (self:track_event_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] track_event_config_has_enable_thread_time_sampling (self:track_event_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] track_event_config_has_thread_time_subsampling_ns (self:track_event_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] track_event_config_has_filter_dynamic_event_names (self:track_event_config) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] track_event_config_set_disabled_categories (self:track_event_config) (x:string list) : unit = + self.disabled_categories <- x +let[@inline] track_event_config_set_enabled_categories (self:track_event_config) (x:string list) : unit = + self.enabled_categories <- x +let[@inline] track_event_config_set_disabled_tags (self:track_event_config) (x:string list) : unit = + self.disabled_tags <- x +let[@inline] track_event_config_set_enabled_tags (self:track_event_config) (x:string list) : unit = + self.enabled_tags <- x +let[@inline] track_event_config_set_disable_incremental_timestamps (self:track_event_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.disable_incremental_timestamps <- x +let[@inline] track_event_config_set_timestamp_unit_multiplier (self:track_event_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.timestamp_unit_multiplier <- x +let[@inline] track_event_config_set_filter_debug_annotations (self:track_event_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.filter_debug_annotations <- x +let[@inline] track_event_config_set_enable_thread_time_sampling (self:track_event_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.enable_thread_time_sampling <- x +let[@inline] track_event_config_set_thread_time_subsampling_ns (self:track_event_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.thread_time_subsampling_ns <- x +let[@inline] track_event_config_set_filter_dynamic_event_names (self:track_event_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.filter_dynamic_event_names <- x + +let copy_track_event_config (self:track_event_config) : track_event_config = + { self with disabled_categories = self.disabled_categories } + +let make_track_event_config + ?(disabled_categories=[]) + ?(enabled_categories=[]) + ?(disabled_tags=[]) + ?(enabled_tags=[]) + ?(disable_incremental_timestamps:bool option) + ?(timestamp_unit_multiplier:int64 option) + ?(filter_debug_annotations:bool option) + ?(enable_thread_time_sampling:bool option) + ?(thread_time_subsampling_ns:int64 option) + ?(filter_dynamic_event_names:bool option) + () : track_event_config = + let _res = default_track_event_config () in + track_event_config_set_disabled_categories _res disabled_categories; + track_event_config_set_enabled_categories _res enabled_categories; + track_event_config_set_disabled_tags _res disabled_tags; + track_event_config_set_enabled_tags _res enabled_tags; + (match disable_incremental_timestamps with + | None -> () + | Some v -> track_event_config_set_disable_incremental_timestamps _res v); + (match timestamp_unit_multiplier with + | None -> () + | Some v -> track_event_config_set_timestamp_unit_multiplier _res v); + (match filter_debug_annotations with + | None -> () + | Some v -> track_event_config_set_filter_debug_annotations _res v); + (match enable_thread_time_sampling with + | None -> () + | Some v -> track_event_config_set_enable_thread_time_sampling _res v); + (match thread_time_subsampling_ns with + | None -> () + | Some v -> track_event_config_set_thread_time_subsampling_ns _res v); + (match filter_dynamic_event_names with + | None -> () + | Some v -> track_event_config_set_filter_dynamic_event_names _res v); + _res + +let[@inline] data_source_config_has_name (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] data_source_config_has_target_buffer (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] data_source_config_has_trace_duration_ms (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] data_source_config_has_prefer_suspend_clock_for_duration (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] data_source_config_has_stop_timeout_ms (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] data_source_config_has_enable_extra_guardrails (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] data_source_config_has_session_initiator (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] data_source_config_has_tracing_session_id (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] data_source_config_has_buffer_exhausted_policy (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] data_source_config_has_system_info_config (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] data_source_config_has_legacy_config (self:data_source_config) : bool = (Pbrt.Bitfield.get self._presence 10) + +let[@inline] data_source_config_set_name (self:data_source_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] data_source_config_set_target_buffer (self:data_source_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.target_buffer <- x +let[@inline] data_source_config_set_trace_duration_ms (self:data_source_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.trace_duration_ms <- x +let[@inline] data_source_config_set_prefer_suspend_clock_for_duration (self:data_source_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.prefer_suspend_clock_for_duration <- x +let[@inline] data_source_config_set_stop_timeout_ms (self:data_source_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.stop_timeout_ms <- x +let[@inline] data_source_config_set_enable_extra_guardrails (self:data_source_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.enable_extra_guardrails <- x +let[@inline] data_source_config_set_session_initiator (self:data_source_config) (x:data_source_config_session_initiator) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.session_initiator <- x +let[@inline] data_source_config_set_tracing_session_id (self:data_source_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.tracing_session_id <- x +let[@inline] data_source_config_set_buffer_exhausted_policy (self:data_source_config) (x:data_source_config_buffer_exhausted_policy) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.buffer_exhausted_policy <- x +let[@inline] data_source_config_set_priority_boost (self:data_source_config) (x:priority_boost_config) : unit = + self.priority_boost <- Some x +let[@inline] data_source_config_set_ftrace_config (self:data_source_config) (x:ftrace_config) : unit = + self.ftrace_config <- Some x +let[@inline] data_source_config_set_inode_file_config (self:data_source_config) (x:inode_file_config) : unit = + self.inode_file_config <- Some x +let[@inline] data_source_config_set_process_stats_config (self:data_source_config) (x:process_stats_config) : unit = + self.process_stats_config <- Some x +let[@inline] data_source_config_set_sys_stats_config (self:data_source_config) (x:sys_stats_config) : unit = + self.sys_stats_config <- Some x +let[@inline] data_source_config_set_heapprofd_config (self:data_source_config) (x:heapprofd_config) : unit = + self.heapprofd_config <- Some x +let[@inline] data_source_config_set_android_power_config (self:data_source_config) (x:android_power_config) : unit = + self.android_power_config <- Some x +let[@inline] data_source_config_set_android_log_config (self:data_source_config) (x:android_log_config) : unit = + self.android_log_config <- Some x +let[@inline] data_source_config_set_gpu_counter_config (self:data_source_config) (x:gpu_counter_config) : unit = + self.gpu_counter_config <- Some x +let[@inline] data_source_config_set_android_game_intervention_list_config (self:data_source_config) (x:android_game_intervention_list_config) : unit = + self.android_game_intervention_list_config <- Some x +let[@inline] data_source_config_set_packages_list_config (self:data_source_config) (x:packages_list_config) : unit = + self.packages_list_config <- Some x +let[@inline] data_source_config_set_vulkan_memory_config (self:data_source_config) (x:vulkan_memory_config) : unit = + self.vulkan_memory_config <- Some x +let[@inline] data_source_config_set_track_event_config (self:data_source_config) (x:track_event_config) : unit = + self.track_event_config <- Some x +let[@inline] data_source_config_set_android_polled_state_config (self:data_source_config) (x:android_polled_state_config) : unit = + self.android_polled_state_config <- Some x +let[@inline] data_source_config_set_android_system_property_config (self:data_source_config) (x:android_system_property_config) : unit = + self.android_system_property_config <- Some x +let[@inline] data_source_config_set_statsd_tracing_config (self:data_source_config) (x:statsd_tracing_config) : unit = + self.statsd_tracing_config <- Some x +let[@inline] data_source_config_set_system_info_config (self:data_source_config) (x:unit) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.system_info_config <- x +let[@inline] data_source_config_set_frozen_ftrace_config (self:data_source_config) (x:frozen_ftrace_config) : unit = + self.frozen_ftrace_config <- Some x +let[@inline] data_source_config_set_chrome_config (self:data_source_config) (x:chrome_config) : unit = + self.chrome_config <- Some x +let[@inline] data_source_config_set_v8_config (self:data_source_config) (x:v8_config) : unit = + self.v8_config <- Some x +let[@inline] data_source_config_set_interceptor_config (self:data_source_config) (x:interceptor_config) : unit = + self.interceptor_config <- Some x +let[@inline] data_source_config_set_network_packet_trace_config (self:data_source_config) (x:network_packet_trace_config) : unit = + self.network_packet_trace_config <- Some x +let[@inline] data_source_config_set_surfaceflinger_layers_config (self:data_source_config) (x:surface_flinger_layers_config) : unit = + self.surfaceflinger_layers_config <- Some x +let[@inline] data_source_config_set_surfaceflinger_transactions_config (self:data_source_config) (x:surface_flinger_transactions_config) : unit = + self.surfaceflinger_transactions_config <- Some x +let[@inline] data_source_config_set_android_sdk_sysprop_guard_config (self:data_source_config) (x:android_sdk_sysprop_guard_config) : unit = + self.android_sdk_sysprop_guard_config <- Some x +let[@inline] data_source_config_set_etw_config (self:data_source_config) (x:etw_config) : unit = + self.etw_config <- Some x +let[@inline] data_source_config_set_protolog_config (self:data_source_config) (x:proto_log_config) : unit = + self.protolog_config <- Some x +let[@inline] data_source_config_set_android_input_event_config (self:data_source_config) (x:android_input_event_config) : unit = + self.android_input_event_config <- Some x +let[@inline] data_source_config_set_pixel_modem_config (self:data_source_config) (x:pixel_modem_config) : unit = + self.pixel_modem_config <- Some x +let[@inline] data_source_config_set_windowmanager_config (self:data_source_config) (x:window_manager_config) : unit = + self.windowmanager_config <- Some x +let[@inline] data_source_config_set_chromium_system_metrics (self:data_source_config) (x:chromium_system_metrics_config) : unit = + self.chromium_system_metrics <- Some x +let[@inline] data_source_config_set_kernel_wakelocks_config (self:data_source_config) (x:kernel_wakelocks_config) : unit = + self.kernel_wakelocks_config <- Some x +let[@inline] data_source_config_set_gpu_renderstages_config (self:data_source_config) (x:gpu_render_stages_config) : unit = + self.gpu_renderstages_config <- Some x +let[@inline] data_source_config_set_chromium_histogram_samples (self:data_source_config) (x:chromium_histogram_samples_config) : unit = + self.chromium_histogram_samples <- Some x +let[@inline] data_source_config_set_app_wakelocks_config (self:data_source_config) (x:app_wakelocks_config) : unit = + self.app_wakelocks_config <- Some x +let[@inline] data_source_config_set_cpu_per_uid_config (self:data_source_config) (x:cpu_per_uid_config) : unit = + self.cpu_per_uid_config <- Some x +let[@inline] data_source_config_set_legacy_config (self:data_source_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.legacy_config <- x +let[@inline] data_source_config_set_for_testing (self:data_source_config) (x:test_config) : unit = + self.for_testing <- Some x + +let copy_data_source_config (self:data_source_config) : data_source_config = + { self with name = self.name } + +let make_data_source_config + ?(name:string option) + ?(target_buffer:int32 option) + ?(trace_duration_ms:int32 option) + ?(prefer_suspend_clock_for_duration:bool option) + ?(stop_timeout_ms:int32 option) + ?(enable_extra_guardrails:bool option) + ?(session_initiator:data_source_config_session_initiator option) + ?(tracing_session_id:int64 option) + ?(buffer_exhausted_policy:data_source_config_buffer_exhausted_policy option) + ?(priority_boost:priority_boost_config option) + ?(ftrace_config:ftrace_config option) + ?(inode_file_config:inode_file_config option) + ?(process_stats_config:process_stats_config option) + ?(sys_stats_config:sys_stats_config option) + ?(heapprofd_config:heapprofd_config option) + ?(android_power_config:android_power_config option) + ?(android_log_config:android_log_config option) + ?(gpu_counter_config:gpu_counter_config option) + ?(android_game_intervention_list_config:android_game_intervention_list_config option) + ?(packages_list_config:packages_list_config option) + ?(vulkan_memory_config:vulkan_memory_config option) + ?(track_event_config:track_event_config option) + ?(android_polled_state_config:android_polled_state_config option) + ?(android_system_property_config:android_system_property_config option) + ?(statsd_tracing_config:statsd_tracing_config option) + ?(system_info_config:unit option) + ?(frozen_ftrace_config:frozen_ftrace_config option) + ?(chrome_config:chrome_config option) + ?(v8_config:v8_config option) + ?(interceptor_config:interceptor_config option) + ?(network_packet_trace_config:network_packet_trace_config option) + ?(surfaceflinger_layers_config:surface_flinger_layers_config option) + ?(surfaceflinger_transactions_config:surface_flinger_transactions_config option) + ?(android_sdk_sysprop_guard_config:android_sdk_sysprop_guard_config option) + ?(etw_config:etw_config option) + ?(protolog_config:proto_log_config option) + ?(android_input_event_config:android_input_event_config option) + ?(pixel_modem_config:pixel_modem_config option) + ?(windowmanager_config:window_manager_config option) + ?(chromium_system_metrics:chromium_system_metrics_config option) + ?(kernel_wakelocks_config:kernel_wakelocks_config option) + ?(gpu_renderstages_config:gpu_render_stages_config option) + ?(chromium_histogram_samples:chromium_histogram_samples_config option) + ?(app_wakelocks_config:app_wakelocks_config option) + ?(cpu_per_uid_config:cpu_per_uid_config option) + ?(legacy_config:string option) + ?(for_testing:test_config option) + () : data_source_config = + let _res = default_data_source_config () in + (match name with + | None -> () + | Some v -> data_source_config_set_name _res v); + (match target_buffer with + | None -> () + | Some v -> data_source_config_set_target_buffer _res v); + (match trace_duration_ms with + | None -> () + | Some v -> data_source_config_set_trace_duration_ms _res v); + (match prefer_suspend_clock_for_duration with + | None -> () + | Some v -> data_source_config_set_prefer_suspend_clock_for_duration _res v); + (match stop_timeout_ms with + | None -> () + | Some v -> data_source_config_set_stop_timeout_ms _res v); + (match enable_extra_guardrails with + | None -> () + | Some v -> data_source_config_set_enable_extra_guardrails _res v); + (match session_initiator with + | None -> () + | Some v -> data_source_config_set_session_initiator _res v); + (match tracing_session_id with + | None -> () + | Some v -> data_source_config_set_tracing_session_id _res v); + (match buffer_exhausted_policy with + | None -> () + | Some v -> data_source_config_set_buffer_exhausted_policy _res v); + (match priority_boost with + | None -> () + | Some v -> data_source_config_set_priority_boost _res v); + (match ftrace_config with + | None -> () + | Some v -> data_source_config_set_ftrace_config _res v); + (match inode_file_config with + | None -> () + | Some v -> data_source_config_set_inode_file_config _res v); + (match process_stats_config with + | None -> () + | Some v -> data_source_config_set_process_stats_config _res v); + (match sys_stats_config with + | None -> () + | Some v -> data_source_config_set_sys_stats_config _res v); + (match heapprofd_config with + | None -> () + | Some v -> data_source_config_set_heapprofd_config _res v); + (match android_power_config with + | None -> () + | Some v -> data_source_config_set_android_power_config _res v); + (match android_log_config with + | None -> () + | Some v -> data_source_config_set_android_log_config _res v); + (match gpu_counter_config with + | None -> () + | Some v -> data_source_config_set_gpu_counter_config _res v); + (match android_game_intervention_list_config with + | None -> () + | Some v -> data_source_config_set_android_game_intervention_list_config _res v); + (match packages_list_config with + | None -> () + | Some v -> data_source_config_set_packages_list_config _res v); + (match vulkan_memory_config with + | None -> () + | Some v -> data_source_config_set_vulkan_memory_config _res v); + (match track_event_config with + | None -> () + | Some v -> data_source_config_set_track_event_config _res v); + (match android_polled_state_config with + | None -> () + | Some v -> data_source_config_set_android_polled_state_config _res v); + (match android_system_property_config with + | None -> () + | Some v -> data_source_config_set_android_system_property_config _res v); + (match statsd_tracing_config with + | None -> () + | Some v -> data_source_config_set_statsd_tracing_config _res v); + (match system_info_config with + | None -> () + | Some v -> data_source_config_set_system_info_config _res v); + (match frozen_ftrace_config with + | None -> () + | Some v -> data_source_config_set_frozen_ftrace_config _res v); + (match chrome_config with + | None -> () + | Some v -> data_source_config_set_chrome_config _res v); + (match v8_config with + | None -> () + | Some v -> data_source_config_set_v8_config _res v); + (match interceptor_config with + | None -> () + | Some v -> data_source_config_set_interceptor_config _res v); + (match network_packet_trace_config with + | None -> () + | Some v -> data_source_config_set_network_packet_trace_config _res v); + (match surfaceflinger_layers_config with + | None -> () + | Some v -> data_source_config_set_surfaceflinger_layers_config _res v); + (match surfaceflinger_transactions_config with + | None -> () + | Some v -> data_source_config_set_surfaceflinger_transactions_config _res v); + (match android_sdk_sysprop_guard_config with + | None -> () + | Some v -> data_source_config_set_android_sdk_sysprop_guard_config _res v); + (match etw_config with + | None -> () + | Some v -> data_source_config_set_etw_config _res v); + (match protolog_config with + | None -> () + | Some v -> data_source_config_set_protolog_config _res v); + (match android_input_event_config with + | None -> () + | Some v -> data_source_config_set_android_input_event_config _res v); + (match pixel_modem_config with + | None -> () + | Some v -> data_source_config_set_pixel_modem_config _res v); + (match windowmanager_config with + | None -> () + | Some v -> data_source_config_set_windowmanager_config _res v); + (match chromium_system_metrics with + | None -> () + | Some v -> data_source_config_set_chromium_system_metrics _res v); + (match kernel_wakelocks_config with + | None -> () + | Some v -> data_source_config_set_kernel_wakelocks_config _res v); + (match gpu_renderstages_config with + | None -> () + | Some v -> data_source_config_set_gpu_renderstages_config _res v); + (match chromium_histogram_samples with + | None -> () + | Some v -> data_source_config_set_chromium_histogram_samples _res v); + (match app_wakelocks_config with + | None -> () + | Some v -> data_source_config_set_app_wakelocks_config _res v); + (match cpu_per_uid_config with + | None -> () + | Some v -> data_source_config_set_cpu_per_uid_config _res v); + (match legacy_config with + | None -> () + | Some v -> data_source_config_set_legacy_config _res v); + (match for_testing with + | None -> () + | Some v -> data_source_config_set_for_testing _res v); + _res + +let[@inline] trace_config_buffer_config_has_size_kb (self:trace_config_buffer_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_buffer_config_has_fill_policy (self:trace_config_buffer_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_buffer_config_has_transfer_on_clone (self:trace_config_buffer_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_config_buffer_config_has_clear_before_clone (self:trace_config_buffer_config) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] trace_config_buffer_config_set_size_kb (self:trace_config_buffer_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.size_kb <- x +let[@inline] trace_config_buffer_config_set_fill_policy (self:trace_config_buffer_config) (x:trace_config_buffer_config_fill_policy) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.fill_policy <- x +let[@inline] trace_config_buffer_config_set_transfer_on_clone (self:trace_config_buffer_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.transfer_on_clone <- x +let[@inline] trace_config_buffer_config_set_clear_before_clone (self:trace_config_buffer_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.clear_before_clone <- x + +let copy_trace_config_buffer_config (self:trace_config_buffer_config) : trace_config_buffer_config = + { self with size_kb = self.size_kb } + +let make_trace_config_buffer_config + ?(size_kb:int32 option) + ?(fill_policy:trace_config_buffer_config_fill_policy option) + ?(transfer_on_clone:bool option) + ?(clear_before_clone:bool option) + () : trace_config_buffer_config = + let _res = default_trace_config_buffer_config () in + (match size_kb with + | None -> () + | Some v -> trace_config_buffer_config_set_size_kb _res v); + (match fill_policy with + | None -> () + | Some v -> trace_config_buffer_config_set_fill_policy _res v); + (match transfer_on_clone with + | None -> () + | Some v -> trace_config_buffer_config_set_transfer_on_clone _res v); + (match clear_before_clone with + | None -> () + | Some v -> trace_config_buffer_config_set_clear_before_clone _res v); + _res + + +let[@inline] trace_config_data_source_set_config (self:trace_config_data_source) (x:data_source_config) : unit = + self.config <- Some x +let[@inline] trace_config_data_source_set_producer_name_filter (self:trace_config_data_source) (x:string list) : unit = + self.producer_name_filter <- x +let[@inline] trace_config_data_source_set_producer_name_regex_filter (self:trace_config_data_source) (x:string list) : unit = + self.producer_name_regex_filter <- x +let[@inline] trace_config_data_source_set_machine_name_filter (self:trace_config_data_source) (x:string list) : unit = + self.machine_name_filter <- x + +let copy_trace_config_data_source (self:trace_config_data_source) : trace_config_data_source = + { self with config = self.config } + +let make_trace_config_data_source + ?(config:data_source_config option) + ?(producer_name_filter=[]) + ?(producer_name_regex_filter=[]) + ?(machine_name_filter=[]) + () : trace_config_data_source = + let _res = default_trace_config_data_source () in + (match config with + | None -> () + | Some v -> trace_config_data_source_set_config _res v); + trace_config_data_source_set_producer_name_filter _res producer_name_filter; + trace_config_data_source_set_producer_name_regex_filter _res producer_name_regex_filter; + trace_config_data_source_set_machine_name_filter _res machine_name_filter; + _res + +let[@inline] trace_config_builtin_data_source_has_disable_clock_snapshotting (self:trace_config_builtin_data_source) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_builtin_data_source_has_disable_trace_config (self:trace_config_builtin_data_source) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_builtin_data_source_has_disable_system_info (self:trace_config_builtin_data_source) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_config_builtin_data_source_has_disable_service_events (self:trace_config_builtin_data_source) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] trace_config_builtin_data_source_has_primary_trace_clock (self:trace_config_builtin_data_source) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] trace_config_builtin_data_source_has_snapshot_interval_ms (self:trace_config_builtin_data_source) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] trace_config_builtin_data_source_has_prefer_suspend_clock_for_snapshot (self:trace_config_builtin_data_source) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] trace_config_builtin_data_source_has_disable_chunk_usage_histograms (self:trace_config_builtin_data_source) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] trace_config_builtin_data_source_set_disable_clock_snapshotting (self:trace_config_builtin_data_source) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.disable_clock_snapshotting <- x +let[@inline] trace_config_builtin_data_source_set_disable_trace_config (self:trace_config_builtin_data_source) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.disable_trace_config <- x +let[@inline] trace_config_builtin_data_source_set_disable_system_info (self:trace_config_builtin_data_source) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.disable_system_info <- x +let[@inline] trace_config_builtin_data_source_set_disable_service_events (self:trace_config_builtin_data_source) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.disable_service_events <- x +let[@inline] trace_config_builtin_data_source_set_primary_trace_clock (self:trace_config_builtin_data_source) (x:builtin_clock) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.primary_trace_clock <- x +let[@inline] trace_config_builtin_data_source_set_snapshot_interval_ms (self:trace_config_builtin_data_source) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.snapshot_interval_ms <- x +let[@inline] trace_config_builtin_data_source_set_prefer_suspend_clock_for_snapshot (self:trace_config_builtin_data_source) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.prefer_suspend_clock_for_snapshot <- x +let[@inline] trace_config_builtin_data_source_set_disable_chunk_usage_histograms (self:trace_config_builtin_data_source) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.disable_chunk_usage_histograms <- x + +let copy_trace_config_builtin_data_source (self:trace_config_builtin_data_source) : trace_config_builtin_data_source = + { self with disable_clock_snapshotting = self.disable_clock_snapshotting } + +let make_trace_config_builtin_data_source + ?(disable_clock_snapshotting:bool option) + ?(disable_trace_config:bool option) + ?(disable_system_info:bool option) + ?(disable_service_events:bool option) + ?(primary_trace_clock:builtin_clock option) + ?(snapshot_interval_ms:int32 option) + ?(prefer_suspend_clock_for_snapshot:bool option) + ?(disable_chunk_usage_histograms:bool option) + () : trace_config_builtin_data_source = + let _res = default_trace_config_builtin_data_source () in + (match disable_clock_snapshotting with + | None -> () + | Some v -> trace_config_builtin_data_source_set_disable_clock_snapshotting _res v); + (match disable_trace_config with + | None -> () + | Some v -> trace_config_builtin_data_source_set_disable_trace_config _res v); + (match disable_system_info with + | None -> () + | Some v -> trace_config_builtin_data_source_set_disable_system_info _res v); + (match disable_service_events with + | None -> () + | Some v -> trace_config_builtin_data_source_set_disable_service_events _res v); + (match primary_trace_clock with + | None -> () + | Some v -> trace_config_builtin_data_source_set_primary_trace_clock _res v); + (match snapshot_interval_ms with + | None -> () + | Some v -> trace_config_builtin_data_source_set_snapshot_interval_ms _res v); + (match prefer_suspend_clock_for_snapshot with + | None -> () + | Some v -> trace_config_builtin_data_source_set_prefer_suspend_clock_for_snapshot _res v); + (match disable_chunk_usage_histograms with + | None -> () + | Some v -> trace_config_builtin_data_source_set_disable_chunk_usage_histograms _res v); + _res + +let[@inline] trace_config_producer_config_has_producer_name (self:trace_config_producer_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_producer_config_has_shm_size_kb (self:trace_config_producer_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_producer_config_has_page_size_kb (self:trace_config_producer_config) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] trace_config_producer_config_set_producer_name (self:trace_config_producer_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.producer_name <- x +let[@inline] trace_config_producer_config_set_shm_size_kb (self:trace_config_producer_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.shm_size_kb <- x +let[@inline] trace_config_producer_config_set_page_size_kb (self:trace_config_producer_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.page_size_kb <- x + +let copy_trace_config_producer_config (self:trace_config_producer_config) : trace_config_producer_config = + { self with producer_name = self.producer_name } + +let make_trace_config_producer_config + ?(producer_name:string option) + ?(shm_size_kb:int32 option) + ?(page_size_kb:int32 option) + () : trace_config_producer_config = + let _res = default_trace_config_producer_config () in + (match producer_name with + | None -> () + | Some v -> trace_config_producer_config_set_producer_name _res v); + (match shm_size_kb with + | None -> () + | Some v -> trace_config_producer_config_set_shm_size_kb _res v); + (match page_size_kb with + | None -> () + | Some v -> trace_config_producer_config_set_page_size_kb _res v); + _res + +let[@inline] trace_config_statsd_metadata_has_triggering_alert_id (self:trace_config_statsd_metadata) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_statsd_metadata_has_triggering_config_uid (self:trace_config_statsd_metadata) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_statsd_metadata_has_triggering_config_id (self:trace_config_statsd_metadata) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_config_statsd_metadata_has_triggering_subscription_id (self:trace_config_statsd_metadata) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] trace_config_statsd_metadata_set_triggering_alert_id (self:trace_config_statsd_metadata) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.triggering_alert_id <- x +let[@inline] trace_config_statsd_metadata_set_triggering_config_uid (self:trace_config_statsd_metadata) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.triggering_config_uid <- x +let[@inline] trace_config_statsd_metadata_set_triggering_config_id (self:trace_config_statsd_metadata) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.triggering_config_id <- x +let[@inline] trace_config_statsd_metadata_set_triggering_subscription_id (self:trace_config_statsd_metadata) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.triggering_subscription_id <- x + +let copy_trace_config_statsd_metadata (self:trace_config_statsd_metadata) : trace_config_statsd_metadata = + { self with triggering_alert_id = self.triggering_alert_id } + +let make_trace_config_statsd_metadata + ?(triggering_alert_id:int64 option) + ?(triggering_config_uid:int32 option) + ?(triggering_config_id:int64 option) + ?(triggering_subscription_id:int64 option) + () : trace_config_statsd_metadata = + let _res = default_trace_config_statsd_metadata () in + (match triggering_alert_id with + | None -> () + | Some v -> trace_config_statsd_metadata_set_triggering_alert_id _res v); + (match triggering_config_uid with + | None -> () + | Some v -> trace_config_statsd_metadata_set_triggering_config_uid _res v); + (match triggering_config_id with + | None -> () + | Some v -> trace_config_statsd_metadata_set_triggering_config_id _res v); + (match triggering_subscription_id with + | None -> () + | Some v -> trace_config_statsd_metadata_set_triggering_subscription_id _res v); + _res + +let[@inline] trace_config_guardrail_overrides_has_max_upload_per_day_bytes (self:trace_config_guardrail_overrides) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_guardrail_overrides_has_max_tracing_buffer_size_kb (self:trace_config_guardrail_overrides) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] trace_config_guardrail_overrides_set_max_upload_per_day_bytes (self:trace_config_guardrail_overrides) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.max_upload_per_day_bytes <- x +let[@inline] trace_config_guardrail_overrides_set_max_tracing_buffer_size_kb (self:trace_config_guardrail_overrides) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.max_tracing_buffer_size_kb <- x + +let copy_trace_config_guardrail_overrides (self:trace_config_guardrail_overrides) : trace_config_guardrail_overrides = + { self with max_upload_per_day_bytes = self.max_upload_per_day_bytes } + +let make_trace_config_guardrail_overrides + ?(max_upload_per_day_bytes:int64 option) + ?(max_tracing_buffer_size_kb:int32 option) + () : trace_config_guardrail_overrides = + let _res = default_trace_config_guardrail_overrides () in + (match max_upload_per_day_bytes with + | None -> () + | Some v -> trace_config_guardrail_overrides_set_max_upload_per_day_bytes _res v); + (match max_tracing_buffer_size_kb with + | None -> () + | Some v -> trace_config_guardrail_overrides_set_max_tracing_buffer_size_kb _res v); + _res + +let[@inline] trace_config_trigger_config_trigger_has_name (self:trace_config_trigger_config_trigger) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_trigger_config_trigger_has_producer_name_regex (self:trace_config_trigger_config_trigger) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_trigger_config_trigger_has_stop_delay_ms (self:trace_config_trigger_config_trigger) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_config_trigger_config_trigger_has_max_per_24_h (self:trace_config_trigger_config_trigger) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] trace_config_trigger_config_trigger_has_skip_probability (self:trace_config_trigger_config_trigger) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] trace_config_trigger_config_trigger_set_name (self:trace_config_trigger_config_trigger) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] trace_config_trigger_config_trigger_set_producer_name_regex (self:trace_config_trigger_config_trigger) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.producer_name_regex <- x +let[@inline] trace_config_trigger_config_trigger_set_stop_delay_ms (self:trace_config_trigger_config_trigger) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.stop_delay_ms <- x +let[@inline] trace_config_trigger_config_trigger_set_max_per_24_h (self:trace_config_trigger_config_trigger) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.max_per_24_h <- x +let[@inline] trace_config_trigger_config_trigger_set_skip_probability (self:trace_config_trigger_config_trigger) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.skip_probability <- x + +let copy_trace_config_trigger_config_trigger (self:trace_config_trigger_config_trigger) : trace_config_trigger_config_trigger = + { self with name = self.name } + +let make_trace_config_trigger_config_trigger + ?(name:string option) + ?(producer_name_regex:string option) + ?(stop_delay_ms:int32 option) + ?(max_per_24_h:int32 option) + ?(skip_probability:float option) + () : trace_config_trigger_config_trigger = + let _res = default_trace_config_trigger_config_trigger () in + (match name with + | None -> () + | Some v -> trace_config_trigger_config_trigger_set_name _res v); + (match producer_name_regex with + | None -> () + | Some v -> trace_config_trigger_config_trigger_set_producer_name_regex _res v); + (match stop_delay_ms with + | None -> () + | Some v -> trace_config_trigger_config_trigger_set_stop_delay_ms _res v); + (match max_per_24_h with + | None -> () + | Some v -> trace_config_trigger_config_trigger_set_max_per_24_h _res v); + (match skip_probability with + | None -> () + | Some v -> trace_config_trigger_config_trigger_set_skip_probability _res v); + _res + +let[@inline] trace_config_trigger_config_has_trigger_mode (self:trace_config_trigger_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_trigger_config_has_use_clone_snapshot_if_available (self:trace_config_trigger_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_trigger_config_has_trigger_timeout_ms (self:trace_config_trigger_config) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] trace_config_trigger_config_set_trigger_mode (self:trace_config_trigger_config) (x:trace_config_trigger_config_trigger_mode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.trigger_mode <- x +let[@inline] trace_config_trigger_config_set_use_clone_snapshot_if_available (self:trace_config_trigger_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.use_clone_snapshot_if_available <- x +let[@inline] trace_config_trigger_config_set_triggers (self:trace_config_trigger_config) (x:trace_config_trigger_config_trigger list) : unit = + self.triggers <- x +let[@inline] trace_config_trigger_config_set_trigger_timeout_ms (self:trace_config_trigger_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.trigger_timeout_ms <- x + +let copy_trace_config_trigger_config (self:trace_config_trigger_config) : trace_config_trigger_config = + { self with trigger_mode = self.trigger_mode } + +let make_trace_config_trigger_config + ?(trigger_mode:trace_config_trigger_config_trigger_mode option) + ?(use_clone_snapshot_if_available:bool option) + ?(triggers=[]) + ?(trigger_timeout_ms:int32 option) + () : trace_config_trigger_config = + let _res = default_trace_config_trigger_config () in + (match trigger_mode with + | None -> () + | Some v -> trace_config_trigger_config_set_trigger_mode _res v); + (match use_clone_snapshot_if_available with + | None -> () + | Some v -> trace_config_trigger_config_set_use_clone_snapshot_if_available _res v); + trace_config_trigger_config_set_triggers _res triggers; + (match trigger_timeout_ms with + | None -> () + | Some v -> trace_config_trigger_config_set_trigger_timeout_ms _res v); + _res + +let[@inline] trace_config_incremental_state_config_has_clear_period_ms (self:trace_config_incremental_state_config) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] trace_config_incremental_state_config_set_clear_period_ms (self:trace_config_incremental_state_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.clear_period_ms <- x + +let copy_trace_config_incremental_state_config (self:trace_config_incremental_state_config) : trace_config_incremental_state_config = + { self with clear_period_ms = self.clear_period_ms } + +let make_trace_config_incremental_state_config + ?(clear_period_ms:int32 option) + () : trace_config_incremental_state_config = + let _res = default_trace_config_incremental_state_config () in + (match clear_period_ms with + | None -> () + | Some v -> trace_config_incremental_state_config_set_clear_period_ms _res v); + _res + +let[@inline] trace_config_incident_report_config_has_destination_package (self:trace_config_incident_report_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_incident_report_config_has_destination_class (self:trace_config_incident_report_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_incident_report_config_has_privacy_level (self:trace_config_incident_report_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_config_incident_report_config_has_skip_incidentd (self:trace_config_incident_report_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] trace_config_incident_report_config_has_skip_dropbox (self:trace_config_incident_report_config) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] trace_config_incident_report_config_set_destination_package (self:trace_config_incident_report_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.destination_package <- x +let[@inline] trace_config_incident_report_config_set_destination_class (self:trace_config_incident_report_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.destination_class <- x +let[@inline] trace_config_incident_report_config_set_privacy_level (self:trace_config_incident_report_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.privacy_level <- x +let[@inline] trace_config_incident_report_config_set_skip_incidentd (self:trace_config_incident_report_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.skip_incidentd <- x +let[@inline] trace_config_incident_report_config_set_skip_dropbox (self:trace_config_incident_report_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.skip_dropbox <- x + +let copy_trace_config_incident_report_config (self:trace_config_incident_report_config) : trace_config_incident_report_config = + { self with destination_package = self.destination_package } + +let make_trace_config_incident_report_config + ?(destination_package:string option) + ?(destination_class:string option) + ?(privacy_level:int32 option) + ?(skip_incidentd:bool option) + ?(skip_dropbox:bool option) + () : trace_config_incident_report_config = + let _res = default_trace_config_incident_report_config () in + (match destination_package with + | None -> () + | Some v -> trace_config_incident_report_config_set_destination_package _res v); + (match destination_class with + | None -> () + | Some v -> trace_config_incident_report_config_set_destination_class _res v); + (match privacy_level with + | None -> () + | Some v -> trace_config_incident_report_config_set_privacy_level _res v); + (match skip_incidentd with + | None -> () + | Some v -> trace_config_incident_report_config_set_skip_incidentd _res v); + (match skip_dropbox with + | None -> () + | Some v -> trace_config_incident_report_config_set_skip_dropbox _res v); + _res + +let[@inline] trace_config_trace_filter_string_filter_rule_has_policy (self:trace_config_trace_filter_string_filter_rule) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_trace_filter_string_filter_rule_has_regex_pattern (self:trace_config_trace_filter_string_filter_rule) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_trace_filter_string_filter_rule_has_atrace_payload_starts_with (self:trace_config_trace_filter_string_filter_rule) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] trace_config_trace_filter_string_filter_rule_set_policy (self:trace_config_trace_filter_string_filter_rule) (x:trace_config_trace_filter_string_filter_policy) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.policy <- x +let[@inline] trace_config_trace_filter_string_filter_rule_set_regex_pattern (self:trace_config_trace_filter_string_filter_rule) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.regex_pattern <- x +let[@inline] trace_config_trace_filter_string_filter_rule_set_atrace_payload_starts_with (self:trace_config_trace_filter_string_filter_rule) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.atrace_payload_starts_with <- x + +let copy_trace_config_trace_filter_string_filter_rule (self:trace_config_trace_filter_string_filter_rule) : trace_config_trace_filter_string_filter_rule = + { self with policy = self.policy } + +let make_trace_config_trace_filter_string_filter_rule + ?(policy:trace_config_trace_filter_string_filter_policy option) + ?(regex_pattern:string option) + ?(atrace_payload_starts_with:string option) + () : trace_config_trace_filter_string_filter_rule = + let _res = default_trace_config_trace_filter_string_filter_rule () in + (match policy with + | None -> () + | Some v -> trace_config_trace_filter_string_filter_rule_set_policy _res v); + (match regex_pattern with + | None -> () + | Some v -> trace_config_trace_filter_string_filter_rule_set_regex_pattern _res v); + (match atrace_payload_starts_with with + | None -> () + | Some v -> trace_config_trace_filter_string_filter_rule_set_atrace_payload_starts_with _res v); + _res + + +let[@inline] trace_config_trace_filter_string_filter_chain_set_rules (self:trace_config_trace_filter_string_filter_chain) (x:trace_config_trace_filter_string_filter_rule list) : unit = + self.rules <- x + +let copy_trace_config_trace_filter_string_filter_chain (self:trace_config_trace_filter_string_filter_chain) : trace_config_trace_filter_string_filter_chain = + { self with rules = self.rules } + +let make_trace_config_trace_filter_string_filter_chain + ?(rules=[]) + () : trace_config_trace_filter_string_filter_chain = + let _res = default_trace_config_trace_filter_string_filter_chain () in + trace_config_trace_filter_string_filter_chain_set_rules _res rules; + _res + +let[@inline] trace_config_trace_filter_has_bytecode (self:trace_config_trace_filter) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_trace_filter_has_bytecode_v2 (self:trace_config_trace_filter) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] trace_config_trace_filter_set_bytecode (self:trace_config_trace_filter) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.bytecode <- x +let[@inline] trace_config_trace_filter_set_bytecode_v2 (self:trace_config_trace_filter) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.bytecode_v2 <- x +let[@inline] trace_config_trace_filter_set_string_filter_chain (self:trace_config_trace_filter) (x:trace_config_trace_filter_string_filter_chain) : unit = + self.string_filter_chain <- Some x + +let copy_trace_config_trace_filter (self:trace_config_trace_filter) : trace_config_trace_filter = + { self with bytecode = self.bytecode } + +let make_trace_config_trace_filter + ?(bytecode:bytes option) + ?(bytecode_v2:bytes option) + ?(string_filter_chain:trace_config_trace_filter_string_filter_chain option) + () : trace_config_trace_filter = + let _res = default_trace_config_trace_filter () in + (match bytecode with + | None -> () + | Some v -> trace_config_trace_filter_set_bytecode _res v); + (match bytecode_v2 with + | None -> () + | Some v -> trace_config_trace_filter_set_bytecode_v2 _res v); + (match string_filter_chain with + | None -> () + | Some v -> trace_config_trace_filter_set_string_filter_chain _res v); + _res + +let[@inline] trace_config_android_report_config_has_reporter_service_package (self:trace_config_android_report_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_android_report_config_has_reporter_service_class (self:trace_config_android_report_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_android_report_config_has_skip_report (self:trace_config_android_report_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_config_android_report_config_has_use_pipe_in_framework_for_testing (self:trace_config_android_report_config) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] trace_config_android_report_config_set_reporter_service_package (self:trace_config_android_report_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.reporter_service_package <- x +let[@inline] trace_config_android_report_config_set_reporter_service_class (self:trace_config_android_report_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.reporter_service_class <- x +let[@inline] trace_config_android_report_config_set_skip_report (self:trace_config_android_report_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.skip_report <- x +let[@inline] trace_config_android_report_config_set_use_pipe_in_framework_for_testing (self:trace_config_android_report_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.use_pipe_in_framework_for_testing <- x + +let copy_trace_config_android_report_config (self:trace_config_android_report_config) : trace_config_android_report_config = + { self with reporter_service_package = self.reporter_service_package } + +let make_trace_config_android_report_config + ?(reporter_service_package:string option) + ?(reporter_service_class:string option) + ?(skip_report:bool option) + ?(use_pipe_in_framework_for_testing:bool option) + () : trace_config_android_report_config = + let _res = default_trace_config_android_report_config () in + (match reporter_service_package with + | None -> () + | Some v -> trace_config_android_report_config_set_reporter_service_package _res v); + (match reporter_service_class with + | None -> () + | Some v -> trace_config_android_report_config_set_reporter_service_class _res v); + (match skip_report with + | None -> () + | Some v -> trace_config_android_report_config_set_skip_report _res v); + (match use_pipe_in_framework_for_testing with + | None -> () + | Some v -> trace_config_android_report_config_set_use_pipe_in_framework_for_testing _res v); + _res + +let[@inline] trace_config_cmd_trace_start_delay_has_min_delay_ms (self:trace_config_cmd_trace_start_delay) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_cmd_trace_start_delay_has_max_delay_ms (self:trace_config_cmd_trace_start_delay) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] trace_config_cmd_trace_start_delay_set_min_delay_ms (self:trace_config_cmd_trace_start_delay) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.min_delay_ms <- x +let[@inline] trace_config_cmd_trace_start_delay_set_max_delay_ms (self:trace_config_cmd_trace_start_delay) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.max_delay_ms <- x + +let copy_trace_config_cmd_trace_start_delay (self:trace_config_cmd_trace_start_delay) : trace_config_cmd_trace_start_delay = + { self with min_delay_ms = self.min_delay_ms } + +let make_trace_config_cmd_trace_start_delay + ?(min_delay_ms:int32 option) + ?(max_delay_ms:int32 option) + () : trace_config_cmd_trace_start_delay = + let _res = default_trace_config_cmd_trace_start_delay () in + (match min_delay_ms with + | None -> () + | Some v -> trace_config_cmd_trace_start_delay_set_min_delay_ms _res v); + (match max_delay_ms with + | None -> () + | Some v -> trace_config_cmd_trace_start_delay_set_max_delay_ms _res v); + _res + +let[@inline] trace_config_session_semaphore_has_name (self:trace_config_session_semaphore) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_session_semaphore_has_max_other_session_count (self:trace_config_session_semaphore) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] trace_config_session_semaphore_set_name (self:trace_config_session_semaphore) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] trace_config_session_semaphore_set_max_other_session_count (self:trace_config_session_semaphore) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.max_other_session_count <- x + +let copy_trace_config_session_semaphore (self:trace_config_session_semaphore) : trace_config_session_semaphore = + { self with name = self.name } + +let make_trace_config_session_semaphore + ?(name:string option) + ?(max_other_session_count:int64 option) + () : trace_config_session_semaphore = + let _res = default_trace_config_session_semaphore () in + (match name with + | None -> () + | Some v -> trace_config_session_semaphore_set_name _res v); + (match max_other_session_count with + | None -> () + | Some v -> trace_config_session_semaphore_set_max_other_session_count _res v); + _res + +let[@inline] trace_config_has_duration_ms (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_config_has_prefer_suspend_clock_for_duration (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_config_has_enable_extra_guardrails (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_config_has_lockdown_mode (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] trace_config_has_write_into_file (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] trace_config_has_output_path (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] trace_config_has_file_write_period_ms (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] trace_config_has_max_file_size_bytes (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] trace_config_has_deferred_start (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] trace_config_has_flush_period_ms (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] trace_config_has_flush_timeout_ms (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] trace_config_has_data_source_stop_timeout_ms (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] trace_config_has_notify_traceur (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] trace_config_has_bugreport_score (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] trace_config_has_bugreport_filename (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] trace_config_has_allow_user_build_tracing (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] trace_config_has_unique_session_name (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 16) +let[@inline] trace_config_has_compression_type (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 17) +let[@inline] trace_config_has_statsd_logging (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 18) +let[@inline] trace_config_has_trace_uuid_msb (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 19) +let[@inline] trace_config_has_trace_uuid_lsb (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 20) +let[@inline] trace_config_has_exclusive_prio (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 21) +let[@inline] trace_config_has_no_flush_before_write_into_file (self:trace_config) : bool = (Pbrt.Bitfield.get self._presence 22) + +let[@inline] trace_config_set_buffers (self:trace_config) (x:trace_config_buffer_config list) : unit = + self.buffers <- x +let[@inline] trace_config_set_data_sources (self:trace_config) (x:trace_config_data_source list) : unit = + self.data_sources <- x +let[@inline] trace_config_set_builtin_data_sources (self:trace_config) (x:trace_config_builtin_data_source) : unit = + self.builtin_data_sources <- Some x +let[@inline] trace_config_set_duration_ms (self:trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.duration_ms <- x +let[@inline] trace_config_set_prefer_suspend_clock_for_duration (self:trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.prefer_suspend_clock_for_duration <- x +let[@inline] trace_config_set_enable_extra_guardrails (self:trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.enable_extra_guardrails <- x +let[@inline] trace_config_set_lockdown_mode (self:trace_config) (x:trace_config_lockdown_mode_operation) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.lockdown_mode <- x +let[@inline] trace_config_set_producers (self:trace_config) (x:trace_config_producer_config list) : unit = + self.producers <- x +let[@inline] trace_config_set_statsd_metadata (self:trace_config) (x:trace_config_statsd_metadata) : unit = + self.statsd_metadata <- Some x +let[@inline] trace_config_set_write_into_file (self:trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.write_into_file <- x +let[@inline] trace_config_set_output_path (self:trace_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.output_path <- x +let[@inline] trace_config_set_file_write_period_ms (self:trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.file_write_period_ms <- x +let[@inline] trace_config_set_max_file_size_bytes (self:trace_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.max_file_size_bytes <- x +let[@inline] trace_config_set_guardrail_overrides (self:trace_config) (x:trace_config_guardrail_overrides) : unit = + self.guardrail_overrides <- Some x +let[@inline] trace_config_set_deferred_start (self:trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.deferred_start <- x +let[@inline] trace_config_set_flush_period_ms (self:trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.flush_period_ms <- x +let[@inline] trace_config_set_flush_timeout_ms (self:trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.flush_timeout_ms <- x +let[@inline] trace_config_set_data_source_stop_timeout_ms (self:trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.data_source_stop_timeout_ms <- x +let[@inline] trace_config_set_notify_traceur (self:trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.notify_traceur <- x +let[@inline] trace_config_set_bugreport_score (self:trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.bugreport_score <- x +let[@inline] trace_config_set_bugreport_filename (self:trace_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.bugreport_filename <- x +let[@inline] trace_config_set_trigger_config (self:trace_config) (x:trace_config_trigger_config) : unit = + self.trigger_config <- Some x +let[@inline] trace_config_set_activate_triggers (self:trace_config) (x:string list) : unit = + self.activate_triggers <- x +let[@inline] trace_config_set_incremental_state_config (self:trace_config) (x:trace_config_incremental_state_config) : unit = + self.incremental_state_config <- Some x +let[@inline] trace_config_set_allow_user_build_tracing (self:trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.allow_user_build_tracing <- x +let[@inline] trace_config_set_unique_session_name (self:trace_config) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.unique_session_name <- x +let[@inline] trace_config_set_compression_type (self:trace_config) (x:trace_config_compression_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 17); self.compression_type <- x +let[@inline] trace_config_set_incident_report_config (self:trace_config) (x:trace_config_incident_report_config) : unit = + self.incident_report_config <- Some x +let[@inline] trace_config_set_statsd_logging (self:trace_config) (x:trace_config_statsd_logging) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 18); self.statsd_logging <- x +let[@inline] trace_config_set_trace_uuid_msb (self:trace_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 19); self.trace_uuid_msb <- x +let[@inline] trace_config_set_trace_uuid_lsb (self:trace_config) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 20); self.trace_uuid_lsb <- x +let[@inline] trace_config_set_trace_filter (self:trace_config) (x:trace_config_trace_filter) : unit = + self.trace_filter <- Some x +let[@inline] trace_config_set_android_report_config (self:trace_config) (x:trace_config_android_report_config) : unit = + self.android_report_config <- Some x +let[@inline] trace_config_set_cmd_trace_start_delay (self:trace_config) (x:trace_config_cmd_trace_start_delay) : unit = + self.cmd_trace_start_delay <- Some x +let[@inline] trace_config_set_session_semaphores (self:trace_config) (x:trace_config_session_semaphore list) : unit = + self.session_semaphores <- x +let[@inline] trace_config_set_priority_boost (self:trace_config) (x:priority_boost_config) : unit = + self.priority_boost <- Some x +let[@inline] trace_config_set_exclusive_prio (self:trace_config) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 21); self.exclusive_prio <- x +let[@inline] trace_config_set_no_flush_before_write_into_file (self:trace_config) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 22); self.no_flush_before_write_into_file <- x + +let copy_trace_config (self:trace_config) : trace_config = + { self with buffers = self.buffers } + +let make_trace_config + ?(buffers=[]) + ?(data_sources=[]) + ?(builtin_data_sources:trace_config_builtin_data_source option) + ?(duration_ms:int32 option) + ?(prefer_suspend_clock_for_duration:bool option) + ?(enable_extra_guardrails:bool option) + ?(lockdown_mode:trace_config_lockdown_mode_operation option) + ?(producers=[]) + ?(statsd_metadata:trace_config_statsd_metadata option) + ?(write_into_file:bool option) + ?(output_path:string option) + ?(file_write_period_ms:int32 option) + ?(max_file_size_bytes:int64 option) + ?(guardrail_overrides:trace_config_guardrail_overrides option) + ?(deferred_start:bool option) + ?(flush_period_ms:int32 option) + ?(flush_timeout_ms:int32 option) + ?(data_source_stop_timeout_ms:int32 option) + ?(notify_traceur:bool option) + ?(bugreport_score:int32 option) + ?(bugreport_filename:string option) + ?(trigger_config:trace_config_trigger_config option) + ?(activate_triggers=[]) + ?(incremental_state_config:trace_config_incremental_state_config option) + ?(allow_user_build_tracing:bool option) + ?(unique_session_name:string option) + ?(compression_type:trace_config_compression_type option) + ?(incident_report_config:trace_config_incident_report_config option) + ?(statsd_logging:trace_config_statsd_logging option) + ?(trace_uuid_msb:int64 option) + ?(trace_uuid_lsb:int64 option) + ?(trace_filter:trace_config_trace_filter option) + ?(android_report_config:trace_config_android_report_config option) + ?(cmd_trace_start_delay:trace_config_cmd_trace_start_delay option) + ?(session_semaphores=[]) + ?(priority_boost:priority_boost_config option) + ?(exclusive_prio:int32 option) + ?(no_flush_before_write_into_file:bool option) + () : trace_config = + let _res = default_trace_config () in + trace_config_set_buffers _res buffers; + trace_config_set_data_sources _res data_sources; + (match builtin_data_sources with + | None -> () + | Some v -> trace_config_set_builtin_data_sources _res v); + (match duration_ms with + | None -> () + | Some v -> trace_config_set_duration_ms _res v); + (match prefer_suspend_clock_for_duration with + | None -> () + | Some v -> trace_config_set_prefer_suspend_clock_for_duration _res v); + (match enable_extra_guardrails with + | None -> () + | Some v -> trace_config_set_enable_extra_guardrails _res v); + (match lockdown_mode with + | None -> () + | Some v -> trace_config_set_lockdown_mode _res v); + trace_config_set_producers _res producers; + (match statsd_metadata with + | None -> () + | Some v -> trace_config_set_statsd_metadata _res v); + (match write_into_file with + | None -> () + | Some v -> trace_config_set_write_into_file _res v); + (match output_path with + | None -> () + | Some v -> trace_config_set_output_path _res v); + (match file_write_period_ms with + | None -> () + | Some v -> trace_config_set_file_write_period_ms _res v); + (match max_file_size_bytes with + | None -> () + | Some v -> trace_config_set_max_file_size_bytes _res v); + (match guardrail_overrides with + | None -> () + | Some v -> trace_config_set_guardrail_overrides _res v); + (match deferred_start with + | None -> () + | Some v -> trace_config_set_deferred_start _res v); + (match flush_period_ms with + | None -> () + | Some v -> trace_config_set_flush_period_ms _res v); + (match flush_timeout_ms with + | None -> () + | Some v -> trace_config_set_flush_timeout_ms _res v); + (match data_source_stop_timeout_ms with + | None -> () + | Some v -> trace_config_set_data_source_stop_timeout_ms _res v); + (match notify_traceur with + | None -> () + | Some v -> trace_config_set_notify_traceur _res v); + (match bugreport_score with + | None -> () + | Some v -> trace_config_set_bugreport_score _res v); + (match bugreport_filename with + | None -> () + | Some v -> trace_config_set_bugreport_filename _res v); + (match trigger_config with + | None -> () + | Some v -> trace_config_set_trigger_config _res v); + trace_config_set_activate_triggers _res activate_triggers; + (match incremental_state_config with + | None -> () + | Some v -> trace_config_set_incremental_state_config _res v); + (match allow_user_build_tracing with + | None -> () + | Some v -> trace_config_set_allow_user_build_tracing _res v); + (match unique_session_name with + | None -> () + | Some v -> trace_config_set_unique_session_name _res v); + (match compression_type with + | None -> () + | Some v -> trace_config_set_compression_type _res v); + (match incident_report_config with + | None -> () + | Some v -> trace_config_set_incident_report_config _res v); + (match statsd_logging with + | None -> () + | Some v -> trace_config_set_statsd_logging _res v); + (match trace_uuid_msb with + | None -> () + | Some v -> trace_config_set_trace_uuid_msb _res v); + (match trace_uuid_lsb with + | None -> () + | Some v -> trace_config_set_trace_uuid_lsb _res v); + (match trace_filter with + | None -> () + | Some v -> trace_config_set_trace_filter _res v); + (match android_report_config with + | None -> () + | Some v -> trace_config_set_android_report_config _res v); + (match cmd_trace_start_delay with + | None -> () + | Some v -> trace_config_set_cmd_trace_start_delay _res v); + trace_config_set_session_semaphores _res session_semaphores; + (match priority_boost with + | None -> () + | Some v -> trace_config_set_priority_boost _res v); + (match exclusive_prio with + | None -> () + | Some v -> trace_config_set_exclusive_prio _res v); + (match no_flush_before_write_into_file with + | None -> () + | Some v -> trace_config_set_no_flush_before_write_into_file _res v); + _res + +let[@inline] utsname_has_sysname (self:utsname) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] utsname_has_version (self:utsname) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] utsname_has_release (self:utsname) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] utsname_has_machine (self:utsname) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] utsname_set_sysname (self:utsname) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.sysname <- x +let[@inline] utsname_set_version (self:utsname) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.version <- x +let[@inline] utsname_set_release (self:utsname) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.release <- x +let[@inline] utsname_set_machine (self:utsname) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.machine <- x + +let copy_utsname (self:utsname) : utsname = + { self with sysname = self.sysname } + +let make_utsname + ?(sysname:string option) + ?(version:string option) + ?(release:string option) + ?(machine:string option) + () : utsname = + let _res = default_utsname () in + (match sysname with + | None -> () + | Some v -> utsname_set_sysname _res v); + (match version with + | None -> () + | Some v -> utsname_set_version _res v); + (match release with + | None -> () + | Some v -> utsname_set_release _res v); + (match machine with + | None -> () + | Some v -> utsname_set_machine _res v); + _res + +let[@inline] system_info_has_android_build_fingerprint (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] system_info_has_android_device_manufacturer (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] system_info_has_android_soc_model (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] system_info_has_android_guest_soc_model (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] system_info_has_android_hardware_revision (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] system_info_has_android_storage_model (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] system_info_has_android_ram_model (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] system_info_has_android_serial_console (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] system_info_has_tracing_service_version (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] system_info_has_android_sdk_version (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] system_info_has_page_size (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] system_info_has_num_cpus (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] system_info_has_timezone_off_mins (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] system_info_has_hz (self:system_info) : bool = (Pbrt.Bitfield.get self._presence 13) + +let[@inline] system_info_set_utsname (self:system_info) (x:utsname) : unit = + self.utsname <- Some x +let[@inline] system_info_set_android_build_fingerprint (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.android_build_fingerprint <- x +let[@inline] system_info_set_android_device_manufacturer (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.android_device_manufacturer <- x +let[@inline] system_info_set_android_soc_model (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.android_soc_model <- x +let[@inline] system_info_set_android_guest_soc_model (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.android_guest_soc_model <- x +let[@inline] system_info_set_android_hardware_revision (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.android_hardware_revision <- x +let[@inline] system_info_set_android_storage_model (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.android_storage_model <- x +let[@inline] system_info_set_android_ram_model (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.android_ram_model <- x +let[@inline] system_info_set_android_serial_console (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.android_serial_console <- x +let[@inline] system_info_set_tracing_service_version (self:system_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.tracing_service_version <- x +let[@inline] system_info_set_android_sdk_version (self:system_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.android_sdk_version <- x +let[@inline] system_info_set_page_size (self:system_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.page_size <- x +let[@inline] system_info_set_num_cpus (self:system_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.num_cpus <- x +let[@inline] system_info_set_timezone_off_mins (self:system_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.timezone_off_mins <- x +let[@inline] system_info_set_hz (self:system_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.hz <- x + +let copy_system_info (self:system_info) : system_info = + { self with utsname = self.utsname } + +let make_system_info + ?(utsname:utsname option) + ?(android_build_fingerprint:string option) + ?(android_device_manufacturer:string option) + ?(android_soc_model:string option) + ?(android_guest_soc_model:string option) + ?(android_hardware_revision:string option) + ?(android_storage_model:string option) + ?(android_ram_model:string option) + ?(android_serial_console:string option) + ?(tracing_service_version:string option) + ?(android_sdk_version:int64 option) + ?(page_size:int32 option) + ?(num_cpus:int32 option) + ?(timezone_off_mins:int32 option) + ?(hz:int64 option) + () : system_info = + let _res = default_system_info () in + (match utsname with + | None -> () + | Some v -> system_info_set_utsname _res v); + (match android_build_fingerprint with + | None -> () + | Some v -> system_info_set_android_build_fingerprint _res v); + (match android_device_manufacturer with + | None -> () + | Some v -> system_info_set_android_device_manufacturer _res v); + (match android_soc_model with + | None -> () + | Some v -> system_info_set_android_soc_model _res v); + (match android_guest_soc_model with + | None -> () + | Some v -> system_info_set_android_guest_soc_model _res v); + (match android_hardware_revision with + | None -> () + | Some v -> system_info_set_android_hardware_revision _res v); + (match android_storage_model with + | None -> () + | Some v -> system_info_set_android_storage_model _res v); + (match android_ram_model with + | None -> () + | Some v -> system_info_set_android_ram_model _res v); + (match android_serial_console with + | None -> () + | Some v -> system_info_set_android_serial_console _res v); + (match tracing_service_version with + | None -> () + | Some v -> system_info_set_tracing_service_version _res v); + (match android_sdk_version with + | None -> () + | Some v -> system_info_set_android_sdk_version _res v); + (match page_size with + | None -> () + | Some v -> system_info_set_page_size _res v); + (match num_cpus with + | None -> () + | Some v -> system_info_set_num_cpus _res v); + (match timezone_off_mins with + | None -> () + | Some v -> system_info_set_timezone_off_mins _res v); + (match hz with + | None -> () + | Some v -> system_info_set_hz _res v); + _res + +let[@inline] trace_stats_buffer_stats_has_buffer_size (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_stats_buffer_stats_has_bytes_written (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_stats_buffer_stats_has_bytes_overwritten (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_stats_buffer_stats_has_bytes_read (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] trace_stats_buffer_stats_has_padding_bytes_written (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] trace_stats_buffer_stats_has_padding_bytes_cleared (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] trace_stats_buffer_stats_has_chunks_written (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] trace_stats_buffer_stats_has_chunks_rewritten (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] trace_stats_buffer_stats_has_chunks_overwritten (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] trace_stats_buffer_stats_has_chunks_discarded (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] trace_stats_buffer_stats_has_chunks_read (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] trace_stats_buffer_stats_has_chunks_committed_out_of_order (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] trace_stats_buffer_stats_has_write_wrap_count (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] trace_stats_buffer_stats_has_patches_succeeded (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] trace_stats_buffer_stats_has_patches_failed (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] trace_stats_buffer_stats_has_readaheads_succeeded (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] trace_stats_buffer_stats_has_readaheads_failed (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 16) +let[@inline] trace_stats_buffer_stats_has_abi_violations (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 17) +let[@inline] trace_stats_buffer_stats_has_trace_writer_packet_loss (self:trace_stats_buffer_stats) : bool = (Pbrt.Bitfield.get self._presence 18) + +let[@inline] trace_stats_buffer_stats_set_buffer_size (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.buffer_size <- x +let[@inline] trace_stats_buffer_stats_set_bytes_written (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.bytes_written <- x +let[@inline] trace_stats_buffer_stats_set_bytes_overwritten (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.bytes_overwritten <- x +let[@inline] trace_stats_buffer_stats_set_bytes_read (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.bytes_read <- x +let[@inline] trace_stats_buffer_stats_set_padding_bytes_written (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.padding_bytes_written <- x +let[@inline] trace_stats_buffer_stats_set_padding_bytes_cleared (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.padding_bytes_cleared <- x +let[@inline] trace_stats_buffer_stats_set_chunks_written (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.chunks_written <- x +let[@inline] trace_stats_buffer_stats_set_chunks_rewritten (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.chunks_rewritten <- x +let[@inline] trace_stats_buffer_stats_set_chunks_overwritten (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.chunks_overwritten <- x +let[@inline] trace_stats_buffer_stats_set_chunks_discarded (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.chunks_discarded <- x +let[@inline] trace_stats_buffer_stats_set_chunks_read (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.chunks_read <- x +let[@inline] trace_stats_buffer_stats_set_chunks_committed_out_of_order (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.chunks_committed_out_of_order <- x +let[@inline] trace_stats_buffer_stats_set_write_wrap_count (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.write_wrap_count <- x +let[@inline] trace_stats_buffer_stats_set_patches_succeeded (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.patches_succeeded <- x +let[@inline] trace_stats_buffer_stats_set_patches_failed (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.patches_failed <- x +let[@inline] trace_stats_buffer_stats_set_readaheads_succeeded (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.readaheads_succeeded <- x +let[@inline] trace_stats_buffer_stats_set_readaheads_failed (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.readaheads_failed <- x +let[@inline] trace_stats_buffer_stats_set_abi_violations (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 17); self.abi_violations <- x +let[@inline] trace_stats_buffer_stats_set_trace_writer_packet_loss (self:trace_stats_buffer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 18); self.trace_writer_packet_loss <- x + +let copy_trace_stats_buffer_stats (self:trace_stats_buffer_stats) : trace_stats_buffer_stats = + { self with buffer_size = self.buffer_size } + +let make_trace_stats_buffer_stats + ?(buffer_size:int64 option) + ?(bytes_written:int64 option) + ?(bytes_overwritten:int64 option) + ?(bytes_read:int64 option) + ?(padding_bytes_written:int64 option) + ?(padding_bytes_cleared:int64 option) + ?(chunks_written:int64 option) + ?(chunks_rewritten:int64 option) + ?(chunks_overwritten:int64 option) + ?(chunks_discarded:int64 option) + ?(chunks_read:int64 option) + ?(chunks_committed_out_of_order:int64 option) + ?(write_wrap_count:int64 option) + ?(patches_succeeded:int64 option) + ?(patches_failed:int64 option) + ?(readaheads_succeeded:int64 option) + ?(readaheads_failed:int64 option) + ?(abi_violations:int64 option) + ?(trace_writer_packet_loss:int64 option) + () : trace_stats_buffer_stats = + let _res = default_trace_stats_buffer_stats () in + (match buffer_size with + | None -> () + | Some v -> trace_stats_buffer_stats_set_buffer_size _res v); + (match bytes_written with + | None -> () + | Some v -> trace_stats_buffer_stats_set_bytes_written _res v); + (match bytes_overwritten with + | None -> () + | Some v -> trace_stats_buffer_stats_set_bytes_overwritten _res v); + (match bytes_read with + | None -> () + | Some v -> trace_stats_buffer_stats_set_bytes_read _res v); + (match padding_bytes_written with + | None -> () + | Some v -> trace_stats_buffer_stats_set_padding_bytes_written _res v); + (match padding_bytes_cleared with + | None -> () + | Some v -> trace_stats_buffer_stats_set_padding_bytes_cleared _res v); + (match chunks_written with + | None -> () + | Some v -> trace_stats_buffer_stats_set_chunks_written _res v); + (match chunks_rewritten with + | None -> () + | Some v -> trace_stats_buffer_stats_set_chunks_rewritten _res v); + (match chunks_overwritten with + | None -> () + | Some v -> trace_stats_buffer_stats_set_chunks_overwritten _res v); + (match chunks_discarded with + | None -> () + | Some v -> trace_stats_buffer_stats_set_chunks_discarded _res v); + (match chunks_read with + | None -> () + | Some v -> trace_stats_buffer_stats_set_chunks_read _res v); + (match chunks_committed_out_of_order with + | None -> () + | Some v -> trace_stats_buffer_stats_set_chunks_committed_out_of_order _res v); + (match write_wrap_count with + | None -> () + | Some v -> trace_stats_buffer_stats_set_write_wrap_count _res v); + (match patches_succeeded with + | None -> () + | Some v -> trace_stats_buffer_stats_set_patches_succeeded _res v); + (match patches_failed with + | None -> () + | Some v -> trace_stats_buffer_stats_set_patches_failed _res v); + (match readaheads_succeeded with + | None -> () + | Some v -> trace_stats_buffer_stats_set_readaheads_succeeded _res v); + (match readaheads_failed with + | None -> () + | Some v -> trace_stats_buffer_stats_set_readaheads_failed _res v); + (match abi_violations with + | None -> () + | Some v -> trace_stats_buffer_stats_set_abi_violations _res v); + (match trace_writer_packet_loss with + | None -> () + | Some v -> trace_stats_buffer_stats_set_trace_writer_packet_loss _res v); + _res + +let[@inline] trace_stats_writer_stats_has_sequence_id (self:trace_stats_writer_stats) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_stats_writer_stats_has_buffer (self:trace_stats_writer_stats) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] trace_stats_writer_stats_set_sequence_id (self:trace_stats_writer_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.sequence_id <- x +let[@inline] trace_stats_writer_stats_set_buffer (self:trace_stats_writer_stats) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.buffer <- x +let[@inline] trace_stats_writer_stats_set_chunk_payload_histogram_counts (self:trace_stats_writer_stats) (x:int64 list) : unit = + self.chunk_payload_histogram_counts <- x +let[@inline] trace_stats_writer_stats_set_chunk_payload_histogram_sum (self:trace_stats_writer_stats) (x:int64 list) : unit = + self.chunk_payload_histogram_sum <- x + +let copy_trace_stats_writer_stats (self:trace_stats_writer_stats) : trace_stats_writer_stats = + { self with sequence_id = self.sequence_id } + +let make_trace_stats_writer_stats + ?(sequence_id:int64 option) + ?(buffer:int32 option) + ?(chunk_payload_histogram_counts=[]) + ?(chunk_payload_histogram_sum=[]) + () : trace_stats_writer_stats = + let _res = default_trace_stats_writer_stats () in + (match sequence_id with + | None -> () + | Some v -> trace_stats_writer_stats_set_sequence_id _res v); + (match buffer with + | None -> () + | Some v -> trace_stats_writer_stats_set_buffer _res v); + trace_stats_writer_stats_set_chunk_payload_histogram_counts _res chunk_payload_histogram_counts; + trace_stats_writer_stats_set_chunk_payload_histogram_sum _res chunk_payload_histogram_sum; + _res + +let[@inline] trace_stats_filter_stats_has_input_packets (self:trace_stats_filter_stats) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_stats_filter_stats_has_input_bytes (self:trace_stats_filter_stats) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_stats_filter_stats_has_output_bytes (self:trace_stats_filter_stats) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_stats_filter_stats_has_errors (self:trace_stats_filter_stats) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] trace_stats_filter_stats_has_time_taken_ns (self:trace_stats_filter_stats) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] trace_stats_filter_stats_set_input_packets (self:trace_stats_filter_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.input_packets <- x +let[@inline] trace_stats_filter_stats_set_input_bytes (self:trace_stats_filter_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.input_bytes <- x +let[@inline] trace_stats_filter_stats_set_output_bytes (self:trace_stats_filter_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.output_bytes <- x +let[@inline] trace_stats_filter_stats_set_errors (self:trace_stats_filter_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.errors <- x +let[@inline] trace_stats_filter_stats_set_time_taken_ns (self:trace_stats_filter_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.time_taken_ns <- x +let[@inline] trace_stats_filter_stats_set_bytes_discarded_per_buffer (self:trace_stats_filter_stats) (x:int64 list) : unit = + self.bytes_discarded_per_buffer <- x + +let copy_trace_stats_filter_stats (self:trace_stats_filter_stats) : trace_stats_filter_stats = + { self with input_packets = self.input_packets } + +let make_trace_stats_filter_stats + ?(input_packets:int64 option) + ?(input_bytes:int64 option) + ?(output_bytes:int64 option) + ?(errors:int64 option) + ?(time_taken_ns:int64 option) + ?(bytes_discarded_per_buffer=[]) + () : trace_stats_filter_stats = + let _res = default_trace_stats_filter_stats () in + (match input_packets with + | None -> () + | Some v -> trace_stats_filter_stats_set_input_packets _res v); + (match input_bytes with + | None -> () + | Some v -> trace_stats_filter_stats_set_input_bytes _res v); + (match output_bytes with + | None -> () + | Some v -> trace_stats_filter_stats_set_output_bytes _res v); + (match errors with + | None -> () + | Some v -> trace_stats_filter_stats_set_errors _res v); + (match time_taken_ns with + | None -> () + | Some v -> trace_stats_filter_stats_set_time_taken_ns _res v); + trace_stats_filter_stats_set_bytes_discarded_per_buffer _res bytes_discarded_per_buffer; + _res + +let[@inline] trace_stats_has_producers_connected (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_stats_has_producers_seen (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_stats_has_data_sources_registered (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_stats_has_data_sources_seen (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] trace_stats_has_tracing_sessions (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] trace_stats_has_total_buffers (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] trace_stats_has_chunks_discarded (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] trace_stats_has_patches_discarded (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] trace_stats_has_invalid_packets (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] trace_stats_has_flushes_requested (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] trace_stats_has_flushes_succeeded (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] trace_stats_has_flushes_failed (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] trace_stats_has_final_flush_outcome (self:trace_stats) : bool = (Pbrt.Bitfield.get self._presence 12) + +let[@inline] trace_stats_set_buffer_stats (self:trace_stats) (x:trace_stats_buffer_stats list) : unit = + self.buffer_stats <- x +let[@inline] trace_stats_set_chunk_payload_histogram_def (self:trace_stats) (x:int64 list) : unit = + self.chunk_payload_histogram_def <- x +let[@inline] trace_stats_set_writer_stats (self:trace_stats) (x:trace_stats_writer_stats list) : unit = + self.writer_stats <- x +let[@inline] trace_stats_set_producers_connected (self:trace_stats) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.producers_connected <- x +let[@inline] trace_stats_set_producers_seen (self:trace_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.producers_seen <- x +let[@inline] trace_stats_set_data_sources_registered (self:trace_stats) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.data_sources_registered <- x +let[@inline] trace_stats_set_data_sources_seen (self:trace_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.data_sources_seen <- x +let[@inline] trace_stats_set_tracing_sessions (self:trace_stats) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.tracing_sessions <- x +let[@inline] trace_stats_set_total_buffers (self:trace_stats) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.total_buffers <- x +let[@inline] trace_stats_set_chunks_discarded (self:trace_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.chunks_discarded <- x +let[@inline] trace_stats_set_patches_discarded (self:trace_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.patches_discarded <- x +let[@inline] trace_stats_set_invalid_packets (self:trace_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.invalid_packets <- x +let[@inline] trace_stats_set_filter_stats (self:trace_stats) (x:trace_stats_filter_stats) : unit = + self.filter_stats <- Some x +let[@inline] trace_stats_set_flushes_requested (self:trace_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.flushes_requested <- x +let[@inline] trace_stats_set_flushes_succeeded (self:trace_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.flushes_succeeded <- x +let[@inline] trace_stats_set_flushes_failed (self:trace_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.flushes_failed <- x +let[@inline] trace_stats_set_final_flush_outcome (self:trace_stats) (x:trace_stats_final_flush_outcome) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.final_flush_outcome <- x + +let copy_trace_stats (self:trace_stats) : trace_stats = + { self with buffer_stats = self.buffer_stats } + +let make_trace_stats + ?(buffer_stats=[]) + ?(chunk_payload_histogram_def=[]) + ?(writer_stats=[]) + ?(producers_connected:int32 option) + ?(producers_seen:int64 option) + ?(data_sources_registered:int32 option) + ?(data_sources_seen:int64 option) + ?(tracing_sessions:int32 option) + ?(total_buffers:int32 option) + ?(chunks_discarded:int64 option) + ?(patches_discarded:int64 option) + ?(invalid_packets:int64 option) + ?(filter_stats:trace_stats_filter_stats option) + ?(flushes_requested:int64 option) + ?(flushes_succeeded:int64 option) + ?(flushes_failed:int64 option) + ?(final_flush_outcome:trace_stats_final_flush_outcome option) + () : trace_stats = + let _res = default_trace_stats () in + trace_stats_set_buffer_stats _res buffer_stats; + trace_stats_set_chunk_payload_histogram_def _res chunk_payload_histogram_def; + trace_stats_set_writer_stats _res writer_stats; + (match producers_connected with + | None -> () + | Some v -> trace_stats_set_producers_connected _res v); + (match producers_seen with + | None -> () + | Some v -> trace_stats_set_producers_seen _res v); + (match data_sources_registered with + | None -> () + | Some v -> trace_stats_set_data_sources_registered _res v); + (match data_sources_seen with + | None -> () + | Some v -> trace_stats_set_data_sources_seen _res v); + (match tracing_sessions with + | None -> () + | Some v -> trace_stats_set_tracing_sessions _res v); + (match total_buffers with + | None -> () + | Some v -> trace_stats_set_total_buffers _res v); + (match chunks_discarded with + | None -> () + | Some v -> trace_stats_set_chunks_discarded _res v); + (match patches_discarded with + | None -> () + | Some v -> trace_stats_set_patches_discarded _res v); + (match invalid_packets with + | None -> () + | Some v -> trace_stats_set_invalid_packets _res v); + (match filter_stats with + | None -> () + | Some v -> trace_stats_set_filter_stats _res v); + (match flushes_requested with + | None -> () + | Some v -> trace_stats_set_flushes_requested _res v); + (match flushes_succeeded with + | None -> () + | Some v -> trace_stats_set_flushes_succeeded _res v); + (match flushes_failed with + | None -> () + | Some v -> trace_stats_set_flushes_failed _res v); + (match final_flush_outcome with + | None -> () + | Some v -> trace_stats_set_final_flush_outcome _res v); + _res + +let[@inline] android_game_intervention_list_game_mode_info_has_mode (self:android_game_intervention_list_game_mode_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_game_intervention_list_game_mode_info_has_use_angle (self:android_game_intervention_list_game_mode_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_game_intervention_list_game_mode_info_has_resolution_downscale (self:android_game_intervention_list_game_mode_info) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] android_game_intervention_list_game_mode_info_has_fps (self:android_game_intervention_list_game_mode_info) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] android_game_intervention_list_game_mode_info_set_mode (self:android_game_intervention_list_game_mode_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.mode <- x +let[@inline] android_game_intervention_list_game_mode_info_set_use_angle (self:android_game_intervention_list_game_mode_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.use_angle <- x +let[@inline] android_game_intervention_list_game_mode_info_set_resolution_downscale (self:android_game_intervention_list_game_mode_info) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.resolution_downscale <- x +let[@inline] android_game_intervention_list_game_mode_info_set_fps (self:android_game_intervention_list_game_mode_info) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.fps <- x + +let copy_android_game_intervention_list_game_mode_info (self:android_game_intervention_list_game_mode_info) : android_game_intervention_list_game_mode_info = + { self with mode = self.mode } + +let make_android_game_intervention_list_game_mode_info + ?(mode:int32 option) + ?(use_angle:bool option) + ?(resolution_downscale:float option) + ?(fps:float option) + () : android_game_intervention_list_game_mode_info = + let _res = default_android_game_intervention_list_game_mode_info () in + (match mode with + | None -> () + | Some v -> android_game_intervention_list_game_mode_info_set_mode _res v); + (match use_angle with + | None -> () + | Some v -> android_game_intervention_list_game_mode_info_set_use_angle _res v); + (match resolution_downscale with + | None -> () + | Some v -> android_game_intervention_list_game_mode_info_set_resolution_downscale _res v); + (match fps with + | None -> () + | Some v -> android_game_intervention_list_game_mode_info_set_fps _res v); + _res + +let[@inline] android_game_intervention_list_game_package_info_has_name (self:android_game_intervention_list_game_package_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_game_intervention_list_game_package_info_has_uid (self:android_game_intervention_list_game_package_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_game_intervention_list_game_package_info_has_current_mode (self:android_game_intervention_list_game_package_info) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] android_game_intervention_list_game_package_info_set_name (self:android_game_intervention_list_game_package_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] android_game_intervention_list_game_package_info_set_uid (self:android_game_intervention_list_game_package_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.uid <- x +let[@inline] android_game_intervention_list_game_package_info_set_current_mode (self:android_game_intervention_list_game_package_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.current_mode <- x +let[@inline] android_game_intervention_list_game_package_info_set_game_mode_info (self:android_game_intervention_list_game_package_info) (x:android_game_intervention_list_game_mode_info list) : unit = + self.game_mode_info <- x + +let copy_android_game_intervention_list_game_package_info (self:android_game_intervention_list_game_package_info) : android_game_intervention_list_game_package_info = + { self with name = self.name } + +let make_android_game_intervention_list_game_package_info + ?(name:string option) + ?(uid:int64 option) + ?(current_mode:int32 option) + ?(game_mode_info=[]) + () : android_game_intervention_list_game_package_info = + let _res = default_android_game_intervention_list_game_package_info () in + (match name with + | None -> () + | Some v -> android_game_intervention_list_game_package_info_set_name _res v); + (match uid with + | None -> () + | Some v -> android_game_intervention_list_game_package_info_set_uid _res v); + (match current_mode with + | None -> () + | Some v -> android_game_intervention_list_game_package_info_set_current_mode _res v); + android_game_intervention_list_game_package_info_set_game_mode_info _res game_mode_info; + _res + +let[@inline] android_game_intervention_list_has_parse_error (self:android_game_intervention_list) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_game_intervention_list_has_read_error (self:android_game_intervention_list) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] android_game_intervention_list_set_game_packages (self:android_game_intervention_list) (x:android_game_intervention_list_game_package_info list) : unit = + self.game_packages <- x +let[@inline] android_game_intervention_list_set_parse_error (self:android_game_intervention_list) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.parse_error <- x +let[@inline] android_game_intervention_list_set_read_error (self:android_game_intervention_list) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.read_error <- x + +let copy_android_game_intervention_list (self:android_game_intervention_list) : android_game_intervention_list = + { self with game_packages = self.game_packages } + +let make_android_game_intervention_list + ?(game_packages=[]) + ?(parse_error:bool option) + ?(read_error:bool option) + () : android_game_intervention_list = + let _res = default_android_game_intervention_list () in + android_game_intervention_list_set_game_packages _res game_packages; + (match parse_error with + | None -> () + | Some v -> android_game_intervention_list_set_parse_error _res v); + (match read_error with + | None -> () + | Some v -> android_game_intervention_list_set_read_error _res v); + _res + +let[@inline] android_log_packet_log_event_arg_has_name (self:android_log_packet_log_event_arg) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] android_log_packet_log_event_arg_set_name (self:android_log_packet_log_event_arg) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] android_log_packet_log_event_arg_set_value (self:android_log_packet_log_event_arg) (x:android_log_packet_log_event_arg_value) : unit = + self.value <- Some x + +let copy_android_log_packet_log_event_arg (self:android_log_packet_log_event_arg) : android_log_packet_log_event_arg = + { self with name = self.name } + +let make_android_log_packet_log_event_arg + ?(name:string option) + ?(value:android_log_packet_log_event_arg_value option) + () : android_log_packet_log_event_arg = + let _res = default_android_log_packet_log_event_arg () in + (match name with + | None -> () + | Some v -> android_log_packet_log_event_arg_set_name _res v); + (match value with + | None -> () + | Some v -> android_log_packet_log_event_arg_set_value _res v); + _res + +let[@inline] android_log_packet_log_event_has_log_id (self:android_log_packet_log_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_log_packet_log_event_has_pid (self:android_log_packet_log_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_log_packet_log_event_has_tid (self:android_log_packet_log_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] android_log_packet_log_event_has_uid (self:android_log_packet_log_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] android_log_packet_log_event_has_timestamp (self:android_log_packet_log_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] android_log_packet_log_event_has_tag (self:android_log_packet_log_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] android_log_packet_log_event_has_prio (self:android_log_packet_log_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] android_log_packet_log_event_has_message (self:android_log_packet_log_event) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] android_log_packet_log_event_set_log_id (self:android_log_packet_log_event) (x:android_log_id) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.log_id <- x +let[@inline] android_log_packet_log_event_set_pid (self:android_log_packet_log_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.pid <- x +let[@inline] android_log_packet_log_event_set_tid (self:android_log_packet_log_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.tid <- x +let[@inline] android_log_packet_log_event_set_uid (self:android_log_packet_log_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.uid <- x +let[@inline] android_log_packet_log_event_set_timestamp (self:android_log_packet_log_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.timestamp <- x +let[@inline] android_log_packet_log_event_set_tag (self:android_log_packet_log_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.tag <- x +let[@inline] android_log_packet_log_event_set_prio (self:android_log_packet_log_event) (x:android_log_priority) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.prio <- x +let[@inline] android_log_packet_log_event_set_message (self:android_log_packet_log_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.message <- x +let[@inline] android_log_packet_log_event_set_args (self:android_log_packet_log_event) (x:android_log_packet_log_event_arg list) : unit = + self.args <- x + +let copy_android_log_packet_log_event (self:android_log_packet_log_event) : android_log_packet_log_event = + { self with log_id = self.log_id } + +let make_android_log_packet_log_event + ?(log_id:android_log_id option) + ?(pid:int32 option) + ?(tid:int32 option) + ?(uid:int32 option) + ?(timestamp:int64 option) + ?(tag:string option) + ?(prio:android_log_priority option) + ?(message:string option) + ?(args=[]) + () : android_log_packet_log_event = + let _res = default_android_log_packet_log_event () in + (match log_id with + | None -> () + | Some v -> android_log_packet_log_event_set_log_id _res v); + (match pid with + | None -> () + | Some v -> android_log_packet_log_event_set_pid _res v); + (match tid with + | None -> () + | Some v -> android_log_packet_log_event_set_tid _res v); + (match uid with + | None -> () + | Some v -> android_log_packet_log_event_set_uid _res v); + (match timestamp with + | None -> () + | Some v -> android_log_packet_log_event_set_timestamp _res v); + (match tag with + | None -> () + | Some v -> android_log_packet_log_event_set_tag _res v); + (match prio with + | None -> () + | Some v -> android_log_packet_log_event_set_prio _res v); + (match message with + | None -> () + | Some v -> android_log_packet_log_event_set_message _res v); + android_log_packet_log_event_set_args _res args; + _res + +let[@inline] android_log_packet_stats_has_num_total (self:android_log_packet_stats) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_log_packet_stats_has_num_failed (self:android_log_packet_stats) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_log_packet_stats_has_num_skipped (self:android_log_packet_stats) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] android_log_packet_stats_set_num_total (self:android_log_packet_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.num_total <- x +let[@inline] android_log_packet_stats_set_num_failed (self:android_log_packet_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.num_failed <- x +let[@inline] android_log_packet_stats_set_num_skipped (self:android_log_packet_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.num_skipped <- x + +let copy_android_log_packet_stats (self:android_log_packet_stats) : android_log_packet_stats = + { self with num_total = self.num_total } + +let make_android_log_packet_stats + ?(num_total:int64 option) + ?(num_failed:int64 option) + ?(num_skipped:int64 option) + () : android_log_packet_stats = + let _res = default_android_log_packet_stats () in + (match num_total with + | None -> () + | Some v -> android_log_packet_stats_set_num_total _res v); + (match num_failed with + | None -> () + | Some v -> android_log_packet_stats_set_num_failed _res v); + (match num_skipped with + | None -> () + | Some v -> android_log_packet_stats_set_num_skipped _res v); + _res + + +let[@inline] android_log_packet_set_events (self:android_log_packet) (x:android_log_packet_log_event list) : unit = + self.events <- x +let[@inline] android_log_packet_set_stats (self:android_log_packet) (x:android_log_packet_stats) : unit = + self.stats <- Some x + +let copy_android_log_packet (self:android_log_packet) : android_log_packet = + { self with events = self.events } + +let make_android_log_packet + ?(events=[]) + ?(stats:android_log_packet_stats option) + () : android_log_packet = + let _res = default_android_log_packet () in + android_log_packet_set_events _res events; + (match stats with + | None -> () + | Some v -> android_log_packet_set_stats _res v); + _res + +let[@inline] android_system_property_property_value_has_name (self:android_system_property_property_value) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_system_property_property_value_has_value (self:android_system_property_property_value) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] android_system_property_property_value_set_name (self:android_system_property_property_value) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] android_system_property_property_value_set_value (self:android_system_property_property_value) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.value <- x + +let copy_android_system_property_property_value (self:android_system_property_property_value) : android_system_property_property_value = + { self with name = self.name } + +let make_android_system_property_property_value + ?(name:string option) + ?(value:string option) + () : android_system_property_property_value = + let _res = default_android_system_property_property_value () in + (match name with + | None -> () + | Some v -> android_system_property_property_value_set_name _res v); + (match value with + | None -> () + | Some v -> android_system_property_property_value_set_value _res v); + _res + + +let[@inline] android_system_property_set_values (self:android_system_property) (x:android_system_property_property_value list) : unit = + self.values <- x + +let copy_android_system_property (self:android_system_property) : android_system_property = + { self with values = self.values } + +let make_android_system_property + ?(values=[]) + () : android_system_property = + let _res = default_android_system_property () in + android_system_property_set_values _res values; + _res + +let[@inline] app_wakelock_info_has_iid (self:app_wakelock_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] app_wakelock_info_has_tag (self:app_wakelock_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] app_wakelock_info_has_flags (self:app_wakelock_info) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] app_wakelock_info_has_owner_pid (self:app_wakelock_info) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] app_wakelock_info_has_owner_uid (self:app_wakelock_info) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] app_wakelock_info_has_work_uid (self:app_wakelock_info) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] app_wakelock_info_set_iid (self:app_wakelock_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] app_wakelock_info_set_tag (self:app_wakelock_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tag <- x +let[@inline] app_wakelock_info_set_flags (self:app_wakelock_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.flags <- x +let[@inline] app_wakelock_info_set_owner_pid (self:app_wakelock_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.owner_pid <- x +let[@inline] app_wakelock_info_set_owner_uid (self:app_wakelock_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.owner_uid <- x +let[@inline] app_wakelock_info_set_work_uid (self:app_wakelock_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.work_uid <- x + +let copy_app_wakelock_info (self:app_wakelock_info) : app_wakelock_info = + { self with iid = self.iid } + +let make_app_wakelock_info + ?(iid:int32 option) + ?(tag:string option) + ?(flags:int32 option) + ?(owner_pid:int32 option) + ?(owner_uid:int32 option) + ?(work_uid:int32 option) + () : app_wakelock_info = + let _res = default_app_wakelock_info () in + (match iid with + | None -> () + | Some v -> app_wakelock_info_set_iid _res v); + (match tag with + | None -> () + | Some v -> app_wakelock_info_set_tag _res v); + (match flags with + | None -> () + | Some v -> app_wakelock_info_set_flags _res v); + (match owner_pid with + | None -> () + | Some v -> app_wakelock_info_set_owner_pid _res v); + (match owner_uid with + | None -> () + | Some v -> app_wakelock_info_set_owner_uid _res v); + (match work_uid with + | None -> () + | Some v -> app_wakelock_info_set_work_uid _res v); + _res + +let[@inline] app_wakelock_bundle_has_acquired (self:app_wakelock_bundle) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] app_wakelock_bundle_set_intern_id (self:app_wakelock_bundle) (x:int32 list) : unit = + self.intern_id <- x +let[@inline] app_wakelock_bundle_set_encoded_ts (self:app_wakelock_bundle) (x:int64 list) : unit = + self.encoded_ts <- x +let[@inline] app_wakelock_bundle_set_info (self:app_wakelock_bundle) (x:app_wakelock_info) : unit = + self.info <- Some x +let[@inline] app_wakelock_bundle_set_acquired (self:app_wakelock_bundle) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.acquired <- x + +let copy_app_wakelock_bundle (self:app_wakelock_bundle) : app_wakelock_bundle = + { self with intern_id = self.intern_id } + +let make_app_wakelock_bundle + ?(intern_id=[]) + ?(encoded_ts=[]) + ?(info:app_wakelock_info option) + ?(acquired:bool option) + () : app_wakelock_bundle = + let _res = default_app_wakelock_bundle () in + app_wakelock_bundle_set_intern_id _res intern_id; + app_wakelock_bundle_set_encoded_ts _res encoded_ts; + (match info with + | None -> () + | Some v -> app_wakelock_bundle_set_info _res v); + (match acquired with + | None -> () + | Some v -> app_wakelock_bundle_set_acquired _res v); + _res + +let[@inline] bluetooth_trace_event_has_packet_type (self:bluetooth_trace_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] bluetooth_trace_event_has_count (self:bluetooth_trace_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] bluetooth_trace_event_has_length (self:bluetooth_trace_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] bluetooth_trace_event_has_duration (self:bluetooth_trace_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] bluetooth_trace_event_has_op_code (self:bluetooth_trace_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] bluetooth_trace_event_has_event_code (self:bluetooth_trace_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] bluetooth_trace_event_has_subevent_code (self:bluetooth_trace_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] bluetooth_trace_event_has_connection_handle (self:bluetooth_trace_event) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] bluetooth_trace_event_set_packet_type (self:bluetooth_trace_event) (x:bluetooth_trace_packet_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.packet_type <- x +let[@inline] bluetooth_trace_event_set_count (self:bluetooth_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.count <- x +let[@inline] bluetooth_trace_event_set_length (self:bluetooth_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.length <- x +let[@inline] bluetooth_trace_event_set_duration (self:bluetooth_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.duration <- x +let[@inline] bluetooth_trace_event_set_op_code (self:bluetooth_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.op_code <- x +let[@inline] bluetooth_trace_event_set_event_code (self:bluetooth_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.event_code <- x +let[@inline] bluetooth_trace_event_set_subevent_code (self:bluetooth_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.subevent_code <- x +let[@inline] bluetooth_trace_event_set_connection_handle (self:bluetooth_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.connection_handle <- x + +let copy_bluetooth_trace_event (self:bluetooth_trace_event) : bluetooth_trace_event = + { self with packet_type = self.packet_type } + +let make_bluetooth_trace_event + ?(packet_type:bluetooth_trace_packet_type option) + ?(count:int32 option) + ?(length:int32 option) + ?(duration:int32 option) + ?(op_code:int32 option) + ?(event_code:int32 option) + ?(subevent_code:int32 option) + ?(connection_handle:int32 option) + () : bluetooth_trace_event = + let _res = default_bluetooth_trace_event () in + (match packet_type with + | None -> () + | Some v -> bluetooth_trace_event_set_packet_type _res v); + (match count with + | None -> () + | Some v -> bluetooth_trace_event_set_count _res v); + (match length with + | None -> () + | Some v -> bluetooth_trace_event_set_length _res v); + (match duration with + | None -> () + | Some v -> bluetooth_trace_event_set_duration _res v); + (match op_code with + | None -> () + | Some v -> bluetooth_trace_event_set_op_code _res v); + (match event_code with + | None -> () + | Some v -> bluetooth_trace_event_set_event_code _res v); + (match subevent_code with + | None -> () + | Some v -> bluetooth_trace_event_set_subevent_code _res v); + (match connection_handle with + | None -> () + | Some v -> bluetooth_trace_event_set_connection_handle _res v); + _res + +let[@inline] android_camera_frame_event_camera_node_processing_details_has_node_id (self:android_camera_frame_event_camera_node_processing_details) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_camera_frame_event_camera_node_processing_details_has_start_processing_ns (self:android_camera_frame_event_camera_node_processing_details) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_camera_frame_event_camera_node_processing_details_has_end_processing_ns (self:android_camera_frame_event_camera_node_processing_details) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] android_camera_frame_event_camera_node_processing_details_has_scheduling_latency_ns (self:android_camera_frame_event_camera_node_processing_details) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] android_camera_frame_event_camera_node_processing_details_set_node_id (self:android_camera_frame_event_camera_node_processing_details) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.node_id <- x +let[@inline] android_camera_frame_event_camera_node_processing_details_set_start_processing_ns (self:android_camera_frame_event_camera_node_processing_details) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.start_processing_ns <- x +let[@inline] android_camera_frame_event_camera_node_processing_details_set_end_processing_ns (self:android_camera_frame_event_camera_node_processing_details) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.end_processing_ns <- x +let[@inline] android_camera_frame_event_camera_node_processing_details_set_scheduling_latency_ns (self:android_camera_frame_event_camera_node_processing_details) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.scheduling_latency_ns <- x + +let copy_android_camera_frame_event_camera_node_processing_details (self:android_camera_frame_event_camera_node_processing_details) : android_camera_frame_event_camera_node_processing_details = + { self with node_id = self.node_id } + +let make_android_camera_frame_event_camera_node_processing_details + ?(node_id:int64 option) + ?(start_processing_ns:int64 option) + ?(end_processing_ns:int64 option) + ?(scheduling_latency_ns:int64 option) + () : android_camera_frame_event_camera_node_processing_details = + let _res = default_android_camera_frame_event_camera_node_processing_details () in + (match node_id with + | None -> () + | Some v -> android_camera_frame_event_camera_node_processing_details_set_node_id _res v); + (match start_processing_ns with + | None -> () + | Some v -> android_camera_frame_event_camera_node_processing_details_set_start_processing_ns _res v); + (match end_processing_ns with + | None -> () + | Some v -> android_camera_frame_event_camera_node_processing_details_set_end_processing_ns _res v); + (match scheduling_latency_ns with + | None -> () + | Some v -> android_camera_frame_event_camera_node_processing_details_set_scheduling_latency_ns _res v); + _res + +let[@inline] android_camera_frame_event_has_session_id (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_camera_frame_event_has_camera_id (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_camera_frame_event_has_frame_number (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] android_camera_frame_event_has_request_id (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] android_camera_frame_event_has_request_received_ns (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] android_camera_frame_event_has_request_processing_started_ns (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] android_camera_frame_event_has_start_of_exposure_ns (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] android_camera_frame_event_has_start_of_frame_ns (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] android_camera_frame_event_has_responses_all_sent_ns (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] android_camera_frame_event_has_capture_result_status (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] android_camera_frame_event_has_skipped_sensor_frames (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] android_camera_frame_event_has_capture_intent (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] android_camera_frame_event_has_num_streams (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] android_camera_frame_event_has_vendor_data_version (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] android_camera_frame_event_has_vendor_data (self:android_camera_frame_event) : bool = (Pbrt.Bitfield.get self._presence 14) + +let[@inline] android_camera_frame_event_set_session_id (self:android_camera_frame_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.session_id <- x +let[@inline] android_camera_frame_event_set_camera_id (self:android_camera_frame_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.camera_id <- x +let[@inline] android_camera_frame_event_set_frame_number (self:android_camera_frame_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.frame_number <- x +let[@inline] android_camera_frame_event_set_request_id (self:android_camera_frame_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.request_id <- x +let[@inline] android_camera_frame_event_set_request_received_ns (self:android_camera_frame_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.request_received_ns <- x +let[@inline] android_camera_frame_event_set_request_processing_started_ns (self:android_camera_frame_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.request_processing_started_ns <- x +let[@inline] android_camera_frame_event_set_start_of_exposure_ns (self:android_camera_frame_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.start_of_exposure_ns <- x +let[@inline] android_camera_frame_event_set_start_of_frame_ns (self:android_camera_frame_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.start_of_frame_ns <- x +let[@inline] android_camera_frame_event_set_responses_all_sent_ns (self:android_camera_frame_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.responses_all_sent_ns <- x +let[@inline] android_camera_frame_event_set_capture_result_status (self:android_camera_frame_event) (x:android_camera_frame_event_capture_result_status) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.capture_result_status <- x +let[@inline] android_camera_frame_event_set_skipped_sensor_frames (self:android_camera_frame_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.skipped_sensor_frames <- x +let[@inline] android_camera_frame_event_set_capture_intent (self:android_camera_frame_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.capture_intent <- x +let[@inline] android_camera_frame_event_set_num_streams (self:android_camera_frame_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.num_streams <- x +let[@inline] android_camera_frame_event_set_node_processing_details (self:android_camera_frame_event) (x:android_camera_frame_event_camera_node_processing_details list) : unit = + self.node_processing_details <- x +let[@inline] android_camera_frame_event_set_vendor_data_version (self:android_camera_frame_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.vendor_data_version <- x +let[@inline] android_camera_frame_event_set_vendor_data (self:android_camera_frame_event) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.vendor_data <- x + +let copy_android_camera_frame_event (self:android_camera_frame_event) : android_camera_frame_event = + { self with session_id = self.session_id } + +let make_android_camera_frame_event + ?(session_id:int64 option) + ?(camera_id:int32 option) + ?(frame_number:int64 option) + ?(request_id:int64 option) + ?(request_received_ns:int64 option) + ?(request_processing_started_ns:int64 option) + ?(start_of_exposure_ns:int64 option) + ?(start_of_frame_ns:int64 option) + ?(responses_all_sent_ns:int64 option) + ?(capture_result_status:android_camera_frame_event_capture_result_status option) + ?(skipped_sensor_frames:int32 option) + ?(capture_intent:int32 option) + ?(num_streams:int32 option) + ?(node_processing_details=[]) + ?(vendor_data_version:int32 option) + ?(vendor_data:bytes option) + () : android_camera_frame_event = + let _res = default_android_camera_frame_event () in + (match session_id with + | None -> () + | Some v -> android_camera_frame_event_set_session_id _res v); + (match camera_id with + | None -> () + | Some v -> android_camera_frame_event_set_camera_id _res v); + (match frame_number with + | None -> () + | Some v -> android_camera_frame_event_set_frame_number _res v); + (match request_id with + | None -> () + | Some v -> android_camera_frame_event_set_request_id _res v); + (match request_received_ns with + | None -> () + | Some v -> android_camera_frame_event_set_request_received_ns _res v); + (match request_processing_started_ns with + | None -> () + | Some v -> android_camera_frame_event_set_request_processing_started_ns _res v); + (match start_of_exposure_ns with + | None -> () + | Some v -> android_camera_frame_event_set_start_of_exposure_ns _res v); + (match start_of_frame_ns with + | None -> () + | Some v -> android_camera_frame_event_set_start_of_frame_ns _res v); + (match responses_all_sent_ns with + | None -> () + | Some v -> android_camera_frame_event_set_responses_all_sent_ns _res v); + (match capture_result_status with + | None -> () + | Some v -> android_camera_frame_event_set_capture_result_status _res v); + (match skipped_sensor_frames with + | None -> () + | Some v -> android_camera_frame_event_set_skipped_sensor_frames _res v); + (match capture_intent with + | None -> () + | Some v -> android_camera_frame_event_set_capture_intent _res v); + (match num_streams with + | None -> () + | Some v -> android_camera_frame_event_set_num_streams _res v); + android_camera_frame_event_set_node_processing_details _res node_processing_details; + (match vendor_data_version with + | None -> () + | Some v -> android_camera_frame_event_set_vendor_data_version _res v); + (match vendor_data with + | None -> () + | Some v -> android_camera_frame_event_set_vendor_data _res v); + _res + +let[@inline] android_camera_session_stats_camera_graph_camera_node_has_node_id (self:android_camera_session_stats_camera_graph_camera_node) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_camera_session_stats_camera_graph_camera_node_has_vendor_data_version (self:android_camera_session_stats_camera_graph_camera_node) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_camera_session_stats_camera_graph_camera_node_has_vendor_data (self:android_camera_session_stats_camera_graph_camera_node) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] android_camera_session_stats_camera_graph_camera_node_set_node_id (self:android_camera_session_stats_camera_graph_camera_node) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.node_id <- x +let[@inline] android_camera_session_stats_camera_graph_camera_node_set_input_ids (self:android_camera_session_stats_camera_graph_camera_node) (x:int64 list) : unit = + self.input_ids <- x +let[@inline] android_camera_session_stats_camera_graph_camera_node_set_output_ids (self:android_camera_session_stats_camera_graph_camera_node) (x:int64 list) : unit = + self.output_ids <- x +let[@inline] android_camera_session_stats_camera_graph_camera_node_set_vendor_data_version (self:android_camera_session_stats_camera_graph_camera_node) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.vendor_data_version <- x +let[@inline] android_camera_session_stats_camera_graph_camera_node_set_vendor_data (self:android_camera_session_stats_camera_graph_camera_node) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.vendor_data <- x + +let copy_android_camera_session_stats_camera_graph_camera_node (self:android_camera_session_stats_camera_graph_camera_node) : android_camera_session_stats_camera_graph_camera_node = + { self with node_id = self.node_id } + +let make_android_camera_session_stats_camera_graph_camera_node + ?(node_id:int64 option) + ?(input_ids=[]) + ?(output_ids=[]) + ?(vendor_data_version:int32 option) + ?(vendor_data:bytes option) + () : android_camera_session_stats_camera_graph_camera_node = + let _res = default_android_camera_session_stats_camera_graph_camera_node () in + (match node_id with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_node_set_node_id _res v); + android_camera_session_stats_camera_graph_camera_node_set_input_ids _res input_ids; + android_camera_session_stats_camera_graph_camera_node_set_output_ids _res output_ids; + (match vendor_data_version with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_node_set_vendor_data_version _res v); + (match vendor_data with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_node_set_vendor_data _res v); + _res + +let[@inline] android_camera_session_stats_camera_graph_camera_edge_has_output_node_id (self:android_camera_session_stats_camera_graph_camera_edge) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_camera_session_stats_camera_graph_camera_edge_has_output_id (self:android_camera_session_stats_camera_graph_camera_edge) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_camera_session_stats_camera_graph_camera_edge_has_input_node_id (self:android_camera_session_stats_camera_graph_camera_edge) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] android_camera_session_stats_camera_graph_camera_edge_has_input_id (self:android_camera_session_stats_camera_graph_camera_edge) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] android_camera_session_stats_camera_graph_camera_edge_has_vendor_data_version (self:android_camera_session_stats_camera_graph_camera_edge) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] android_camera_session_stats_camera_graph_camera_edge_has_vendor_data (self:android_camera_session_stats_camera_graph_camera_edge) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] android_camera_session_stats_camera_graph_camera_edge_set_output_node_id (self:android_camera_session_stats_camera_graph_camera_edge) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.output_node_id <- x +let[@inline] android_camera_session_stats_camera_graph_camera_edge_set_output_id (self:android_camera_session_stats_camera_graph_camera_edge) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.output_id <- x +let[@inline] android_camera_session_stats_camera_graph_camera_edge_set_input_node_id (self:android_camera_session_stats_camera_graph_camera_edge) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.input_node_id <- x +let[@inline] android_camera_session_stats_camera_graph_camera_edge_set_input_id (self:android_camera_session_stats_camera_graph_camera_edge) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.input_id <- x +let[@inline] android_camera_session_stats_camera_graph_camera_edge_set_vendor_data_version (self:android_camera_session_stats_camera_graph_camera_edge) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.vendor_data_version <- x +let[@inline] android_camera_session_stats_camera_graph_camera_edge_set_vendor_data (self:android_camera_session_stats_camera_graph_camera_edge) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.vendor_data <- x + +let copy_android_camera_session_stats_camera_graph_camera_edge (self:android_camera_session_stats_camera_graph_camera_edge) : android_camera_session_stats_camera_graph_camera_edge = + { self with output_node_id = self.output_node_id } + +let make_android_camera_session_stats_camera_graph_camera_edge + ?(output_node_id:int64 option) + ?(output_id:int64 option) + ?(input_node_id:int64 option) + ?(input_id:int64 option) + ?(vendor_data_version:int32 option) + ?(vendor_data:bytes option) + () : android_camera_session_stats_camera_graph_camera_edge = + let _res = default_android_camera_session_stats_camera_graph_camera_edge () in + (match output_node_id with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_edge_set_output_node_id _res v); + (match output_id with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_edge_set_output_id _res v); + (match input_node_id with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_edge_set_input_node_id _res v); + (match input_id with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_edge_set_input_id _res v); + (match vendor_data_version with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_edge_set_vendor_data_version _res v); + (match vendor_data with + | None -> () + | Some v -> android_camera_session_stats_camera_graph_camera_edge_set_vendor_data _res v); + _res + + +let[@inline] android_camera_session_stats_camera_graph_set_nodes (self:android_camera_session_stats_camera_graph) (x:android_camera_session_stats_camera_graph_camera_node list) : unit = + self.nodes <- x +let[@inline] android_camera_session_stats_camera_graph_set_edges (self:android_camera_session_stats_camera_graph) (x:android_camera_session_stats_camera_graph_camera_edge list) : unit = + self.edges <- x + +let copy_android_camera_session_stats_camera_graph (self:android_camera_session_stats_camera_graph) : android_camera_session_stats_camera_graph = + { self with nodes = self.nodes } + +let make_android_camera_session_stats_camera_graph + ?(nodes=[]) + ?(edges=[]) + () : android_camera_session_stats_camera_graph = + let _res = default_android_camera_session_stats_camera_graph () in + android_camera_session_stats_camera_graph_set_nodes _res nodes; + android_camera_session_stats_camera_graph_set_edges _res edges; + _res + +let[@inline] android_camera_session_stats_has_session_id (self:android_camera_session_stats) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] android_camera_session_stats_set_session_id (self:android_camera_session_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.session_id <- x +let[@inline] android_camera_session_stats_set_graph (self:android_camera_session_stats) (x:android_camera_session_stats_camera_graph) : unit = + self.graph <- Some x + +let copy_android_camera_session_stats (self:android_camera_session_stats) : android_camera_session_stats = + { self with session_id = self.session_id } + +let make_android_camera_session_stats + ?(session_id:int64 option) + ?(graph:android_camera_session_stats_camera_graph option) + () : android_camera_session_stats = + let _res = default_android_camera_session_stats () in + (match session_id with + | None -> () + | Some v -> android_camera_session_stats_set_session_id _res v); + (match graph with + | None -> () + | Some v -> android_camera_session_stats_set_graph _res v); + _res + +let[@inline] cpu_per_uid_data_has_cluster_count (self:cpu_per_uid_data) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] cpu_per_uid_data_set_cluster_count (self:cpu_per_uid_data) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cluster_count <- x +let[@inline] cpu_per_uid_data_set_uid (self:cpu_per_uid_data) (x:int32 list) : unit = + self.uid <- x +let[@inline] cpu_per_uid_data_set_total_time_ms (self:cpu_per_uid_data) (x:int64 list) : unit = + self.total_time_ms <- x + +let copy_cpu_per_uid_data (self:cpu_per_uid_data) : cpu_per_uid_data = + { self with cluster_count = self.cluster_count } + +let make_cpu_per_uid_data + ?(cluster_count:int32 option) + ?(uid=[]) + ?(total_time_ms=[]) + () : cpu_per_uid_data = + let _res = default_cpu_per_uid_data () in + (match cluster_count with + | None -> () + | Some v -> cpu_per_uid_data_set_cluster_count _res v); + cpu_per_uid_data_set_uid _res uid; + cpu_per_uid_data_set_total_time_ms _res total_time_ms; + _res + +let[@inline] frame_timeline_event_expected_surface_frame_start_has_cookie (self:frame_timeline_event_expected_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] frame_timeline_event_expected_surface_frame_start_has_token (self:frame_timeline_event_expected_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] frame_timeline_event_expected_surface_frame_start_has_display_frame_token (self:frame_timeline_event_expected_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] frame_timeline_event_expected_surface_frame_start_has_pid (self:frame_timeline_event_expected_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] frame_timeline_event_expected_surface_frame_start_has_layer_name (self:frame_timeline_event_expected_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] frame_timeline_event_expected_surface_frame_start_set_cookie (self:frame_timeline_event_expected_surface_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cookie <- x +let[@inline] frame_timeline_event_expected_surface_frame_start_set_token (self:frame_timeline_event_expected_surface_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.token <- x +let[@inline] frame_timeline_event_expected_surface_frame_start_set_display_frame_token (self:frame_timeline_event_expected_surface_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.display_frame_token <- x +let[@inline] frame_timeline_event_expected_surface_frame_start_set_pid (self:frame_timeline_event_expected_surface_frame_start) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.pid <- x +let[@inline] frame_timeline_event_expected_surface_frame_start_set_layer_name (self:frame_timeline_event_expected_surface_frame_start) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.layer_name <- x + +let copy_frame_timeline_event_expected_surface_frame_start (self:frame_timeline_event_expected_surface_frame_start) : frame_timeline_event_expected_surface_frame_start = + { self with cookie = self.cookie } + +let make_frame_timeline_event_expected_surface_frame_start + ?(cookie:int64 option) + ?(token:int64 option) + ?(display_frame_token:int64 option) + ?(pid:int32 option) + ?(layer_name:string option) + () : frame_timeline_event_expected_surface_frame_start = + let _res = default_frame_timeline_event_expected_surface_frame_start () in + (match cookie with + | None -> () + | Some v -> frame_timeline_event_expected_surface_frame_start_set_cookie _res v); + (match token with + | None -> () + | Some v -> frame_timeline_event_expected_surface_frame_start_set_token _res v); + (match display_frame_token with + | None -> () + | Some v -> frame_timeline_event_expected_surface_frame_start_set_display_frame_token _res v); + (match pid with + | None -> () + | Some v -> frame_timeline_event_expected_surface_frame_start_set_pid _res v); + (match layer_name with + | None -> () + | Some v -> frame_timeline_event_expected_surface_frame_start_set_layer_name _res v); + _res + +let[@inline] frame_timeline_event_actual_surface_frame_start_has_cookie (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_token (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_display_frame_token (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_pid (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_layer_name (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_present_type (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_on_time_finish (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_gpu_composition (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_jank_type (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_prediction_type (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_is_buffer (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_jank_severity_type (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_present_delay_millis (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_vsync_resynced_jitter_millis (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_jank_severity_score (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_jank_type_experimental (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] frame_timeline_event_actual_surface_frame_start_has_present_type_experimental (self:frame_timeline_event_actual_surface_frame_start) : bool = (Pbrt.Bitfield.get self._presence 16) + +let[@inline] frame_timeline_event_actual_surface_frame_start_set_cookie (self:frame_timeline_event_actual_surface_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cookie <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_token (self:frame_timeline_event_actual_surface_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.token <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_display_frame_token (self:frame_timeline_event_actual_surface_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.display_frame_token <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_pid (self:frame_timeline_event_actual_surface_frame_start) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.pid <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_layer_name (self:frame_timeline_event_actual_surface_frame_start) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.layer_name <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_present_type (self:frame_timeline_event_actual_surface_frame_start) (x:frame_timeline_event_present_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.present_type <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_on_time_finish (self:frame_timeline_event_actual_surface_frame_start) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.on_time_finish <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_gpu_composition (self:frame_timeline_event_actual_surface_frame_start) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.gpu_composition <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_jank_type (self:frame_timeline_event_actual_surface_frame_start) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.jank_type <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_prediction_type (self:frame_timeline_event_actual_surface_frame_start) (x:frame_timeline_event_prediction_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.prediction_type <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_is_buffer (self:frame_timeline_event_actual_surface_frame_start) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.is_buffer <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_jank_severity_type (self:frame_timeline_event_actual_surface_frame_start) (x:frame_timeline_event_jank_severity_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.jank_severity_type <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_present_delay_millis (self:frame_timeline_event_actual_surface_frame_start) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.present_delay_millis <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_vsync_resynced_jitter_millis (self:frame_timeline_event_actual_surface_frame_start) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.vsync_resynced_jitter_millis <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_jank_severity_score (self:frame_timeline_event_actual_surface_frame_start) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.jank_severity_score <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_jank_type_experimental (self:frame_timeline_event_actual_surface_frame_start) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.jank_type_experimental <- x +let[@inline] frame_timeline_event_actual_surface_frame_start_set_present_type_experimental (self:frame_timeline_event_actual_surface_frame_start) (x:frame_timeline_event_present_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.present_type_experimental <- x + +let copy_frame_timeline_event_actual_surface_frame_start (self:frame_timeline_event_actual_surface_frame_start) : frame_timeline_event_actual_surface_frame_start = + { self with cookie = self.cookie } + +let make_frame_timeline_event_actual_surface_frame_start + ?(cookie:int64 option) + ?(token:int64 option) + ?(display_frame_token:int64 option) + ?(pid:int32 option) + ?(layer_name:string option) + ?(present_type:frame_timeline_event_present_type option) + ?(on_time_finish:bool option) + ?(gpu_composition:bool option) + ?(jank_type:int32 option) + ?(prediction_type:frame_timeline_event_prediction_type option) + ?(is_buffer:bool option) + ?(jank_severity_type:frame_timeline_event_jank_severity_type option) + ?(present_delay_millis:float option) + ?(vsync_resynced_jitter_millis:float option) + ?(jank_severity_score:float option) + ?(jank_type_experimental:int32 option) + ?(present_type_experimental:frame_timeline_event_present_type option) + () : frame_timeline_event_actual_surface_frame_start = + let _res = default_frame_timeline_event_actual_surface_frame_start () in + (match cookie with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_cookie _res v); + (match token with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_token _res v); + (match display_frame_token with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_display_frame_token _res v); + (match pid with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_pid _res v); + (match layer_name with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_layer_name _res v); + (match present_type with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_present_type _res v); + (match on_time_finish with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_on_time_finish _res v); + (match gpu_composition with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_gpu_composition _res v); + (match jank_type with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_jank_type _res v); + (match prediction_type with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_prediction_type _res v); + (match is_buffer with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_is_buffer _res v); + (match jank_severity_type with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_jank_severity_type _res v); + (match present_delay_millis with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_present_delay_millis _res v); + (match vsync_resynced_jitter_millis with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_vsync_resynced_jitter_millis _res v); + (match jank_severity_score with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_jank_severity_score _res v); + (match jank_type_experimental with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_jank_type_experimental _res v); + (match present_type_experimental with + | None -> () + | Some v -> frame_timeline_event_actual_surface_frame_start_set_present_type_experimental _res v); + _res + +let[@inline] frame_timeline_event_expected_display_frame_start_has_cookie (self:frame_timeline_event_expected_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] frame_timeline_event_expected_display_frame_start_has_token (self:frame_timeline_event_expected_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] frame_timeline_event_expected_display_frame_start_has_pid (self:frame_timeline_event_expected_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] frame_timeline_event_expected_display_frame_start_set_cookie (self:frame_timeline_event_expected_display_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cookie <- x +let[@inline] frame_timeline_event_expected_display_frame_start_set_token (self:frame_timeline_event_expected_display_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.token <- x +let[@inline] frame_timeline_event_expected_display_frame_start_set_pid (self:frame_timeline_event_expected_display_frame_start) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.pid <- x + +let copy_frame_timeline_event_expected_display_frame_start (self:frame_timeline_event_expected_display_frame_start) : frame_timeline_event_expected_display_frame_start = + { self with cookie = self.cookie } + +let make_frame_timeline_event_expected_display_frame_start + ?(cookie:int64 option) + ?(token:int64 option) + ?(pid:int32 option) + () : frame_timeline_event_expected_display_frame_start = + let _res = default_frame_timeline_event_expected_display_frame_start () in + (match cookie with + | None -> () + | Some v -> frame_timeline_event_expected_display_frame_start_set_cookie _res v); + (match token with + | None -> () + | Some v -> frame_timeline_event_expected_display_frame_start_set_token _res v); + (match pid with + | None -> () + | Some v -> frame_timeline_event_expected_display_frame_start_set_pid _res v); + _res + +let[@inline] frame_timeline_event_actual_display_frame_start_has_cookie (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] frame_timeline_event_actual_display_frame_start_has_token (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] frame_timeline_event_actual_display_frame_start_has_pid (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] frame_timeline_event_actual_display_frame_start_has_present_type (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] frame_timeline_event_actual_display_frame_start_has_on_time_finish (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] frame_timeline_event_actual_display_frame_start_has_gpu_composition (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] frame_timeline_event_actual_display_frame_start_has_jank_type (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] frame_timeline_event_actual_display_frame_start_has_prediction_type (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] frame_timeline_event_actual_display_frame_start_has_jank_severity_type (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] frame_timeline_event_actual_display_frame_start_has_present_delay_millis (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] frame_timeline_event_actual_display_frame_start_has_jank_severity_score (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] frame_timeline_event_actual_display_frame_start_has_jank_type_experimental (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] frame_timeline_event_actual_display_frame_start_has_present_type_experimental (self:frame_timeline_event_actual_display_frame_start) : bool = (Pbrt.Bitfield.get self._presence 12) + +let[@inline] frame_timeline_event_actual_display_frame_start_set_cookie (self:frame_timeline_event_actual_display_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cookie <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_token (self:frame_timeline_event_actual_display_frame_start) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.token <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_pid (self:frame_timeline_event_actual_display_frame_start) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.pid <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_present_type (self:frame_timeline_event_actual_display_frame_start) (x:frame_timeline_event_present_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.present_type <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_on_time_finish (self:frame_timeline_event_actual_display_frame_start) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.on_time_finish <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_gpu_composition (self:frame_timeline_event_actual_display_frame_start) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.gpu_composition <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_jank_type (self:frame_timeline_event_actual_display_frame_start) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.jank_type <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_prediction_type (self:frame_timeline_event_actual_display_frame_start) (x:frame_timeline_event_prediction_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.prediction_type <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_jank_severity_type (self:frame_timeline_event_actual_display_frame_start) (x:frame_timeline_event_jank_severity_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.jank_severity_type <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_present_delay_millis (self:frame_timeline_event_actual_display_frame_start) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.present_delay_millis <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_jank_severity_score (self:frame_timeline_event_actual_display_frame_start) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.jank_severity_score <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_jank_type_experimental (self:frame_timeline_event_actual_display_frame_start) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.jank_type_experimental <- x +let[@inline] frame_timeline_event_actual_display_frame_start_set_present_type_experimental (self:frame_timeline_event_actual_display_frame_start) (x:frame_timeline_event_present_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.present_type_experimental <- x + +let copy_frame_timeline_event_actual_display_frame_start (self:frame_timeline_event_actual_display_frame_start) : frame_timeline_event_actual_display_frame_start = + { self with cookie = self.cookie } + +let make_frame_timeline_event_actual_display_frame_start + ?(cookie:int64 option) + ?(token:int64 option) + ?(pid:int32 option) + ?(present_type:frame_timeline_event_present_type option) + ?(on_time_finish:bool option) + ?(gpu_composition:bool option) + ?(jank_type:int32 option) + ?(prediction_type:frame_timeline_event_prediction_type option) + ?(jank_severity_type:frame_timeline_event_jank_severity_type option) + ?(present_delay_millis:float option) + ?(jank_severity_score:float option) + ?(jank_type_experimental:int32 option) + ?(present_type_experimental:frame_timeline_event_present_type option) + () : frame_timeline_event_actual_display_frame_start = + let _res = default_frame_timeline_event_actual_display_frame_start () in + (match cookie with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_cookie _res v); + (match token with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_token _res v); + (match pid with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_pid _res v); + (match present_type with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_present_type _res v); + (match on_time_finish with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_on_time_finish _res v); + (match gpu_composition with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_gpu_composition _res v); + (match jank_type with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_jank_type _res v); + (match prediction_type with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_prediction_type _res v); + (match jank_severity_type with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_jank_severity_type _res v); + (match present_delay_millis with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_present_delay_millis _res v); + (match jank_severity_score with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_jank_severity_score _res v); + (match jank_type_experimental with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_jank_type_experimental _res v); + (match present_type_experimental with + | None -> () + | Some v -> frame_timeline_event_actual_display_frame_start_set_present_type_experimental _res v); + _res + +let[@inline] frame_timeline_event_frame_end_has_cookie (self:frame_timeline_event_frame_end) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] frame_timeline_event_frame_end_set_cookie (self:frame_timeline_event_frame_end) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cookie <- x + +let copy_frame_timeline_event_frame_end (self:frame_timeline_event_frame_end) : frame_timeline_event_frame_end = + { self with cookie = self.cookie } + +let make_frame_timeline_event_frame_end + ?(cookie:int64 option) + () : frame_timeline_event_frame_end = + let _res = default_frame_timeline_event_frame_end () in + (match cookie with + | None -> () + | Some v -> frame_timeline_event_frame_end_set_cookie _res v); + _res + +let[@inline] gpu_mem_total_event_has_gpu_id (self:gpu_mem_total_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_mem_total_event_has_pid (self:gpu_mem_total_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] gpu_mem_total_event_has_size (self:gpu_mem_total_event) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] gpu_mem_total_event_set_gpu_id (self:gpu_mem_total_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.gpu_id <- x +let[@inline] gpu_mem_total_event_set_pid (self:gpu_mem_total_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.pid <- x +let[@inline] gpu_mem_total_event_set_size (self:gpu_mem_total_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.size <- x + +let copy_gpu_mem_total_event (self:gpu_mem_total_event) : gpu_mem_total_event = + { self with gpu_id = self.gpu_id } + +let make_gpu_mem_total_event + ?(gpu_id:int32 option) + ?(pid:int32 option) + ?(size:int64 option) + () : gpu_mem_total_event = + let _res = default_gpu_mem_total_event () in + (match gpu_id with + | None -> () + | Some v -> gpu_mem_total_event_set_gpu_id _res v); + (match pid with + | None -> () + | Some v -> gpu_mem_total_event_set_pid _res v); + (match size with + | None -> () + | Some v -> gpu_mem_total_event_set_size _res v); + _res + +let[@inline] graphics_frame_event_buffer_event_has_frame_number (self:graphics_frame_event_buffer_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] graphics_frame_event_buffer_event_has_type_ (self:graphics_frame_event_buffer_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] graphics_frame_event_buffer_event_has_layer_name (self:graphics_frame_event_buffer_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] graphics_frame_event_buffer_event_has_duration_ns (self:graphics_frame_event_buffer_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] graphics_frame_event_buffer_event_has_buffer_id (self:graphics_frame_event_buffer_event) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] graphics_frame_event_buffer_event_set_frame_number (self:graphics_frame_event_buffer_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.frame_number <- x +let[@inline] graphics_frame_event_buffer_event_set_type_ (self:graphics_frame_event_buffer_event) (x:graphics_frame_event_buffer_event_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.type_ <- x +let[@inline] graphics_frame_event_buffer_event_set_layer_name (self:graphics_frame_event_buffer_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.layer_name <- x +let[@inline] graphics_frame_event_buffer_event_set_duration_ns (self:graphics_frame_event_buffer_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.duration_ns <- x +let[@inline] graphics_frame_event_buffer_event_set_buffer_id (self:graphics_frame_event_buffer_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.buffer_id <- x + +let copy_graphics_frame_event_buffer_event (self:graphics_frame_event_buffer_event) : graphics_frame_event_buffer_event = + { self with frame_number = self.frame_number } + +let make_graphics_frame_event_buffer_event + ?(frame_number:int32 option) + ?(type_:graphics_frame_event_buffer_event_type option) + ?(layer_name:string option) + ?(duration_ns:int64 option) + ?(buffer_id:int32 option) + () : graphics_frame_event_buffer_event = + let _res = default_graphics_frame_event_buffer_event () in + (match frame_number with + | None -> () + | Some v -> graphics_frame_event_buffer_event_set_frame_number _res v); + (match type_ with + | None -> () + | Some v -> graphics_frame_event_buffer_event_set_type_ _res v); + (match layer_name with + | None -> () + | Some v -> graphics_frame_event_buffer_event_set_layer_name _res v); + (match duration_ns with + | None -> () + | Some v -> graphics_frame_event_buffer_event_set_duration_ns _res v); + (match buffer_id with + | None -> () + | Some v -> graphics_frame_event_buffer_event_set_buffer_id _res v); + _res + + +let[@inline] graphics_frame_event_set_buffer_event (self:graphics_frame_event) (x:graphics_frame_event_buffer_event) : unit = + self.buffer_event <- Some x + +let copy_graphics_frame_event (self:graphics_frame_event) : graphics_frame_event = + { self with buffer_event = self.buffer_event } + +let make_graphics_frame_event + ?(buffer_event:graphics_frame_event_buffer_event option) + () : graphics_frame_event = + let _res = default_graphics_frame_event () in + (match buffer_event with + | None -> () + | Some v -> graphics_frame_event_set_buffer_event _res v); + _res + +let[@inline] initial_display_state_has_display_state (self:initial_display_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] initial_display_state_has_brightness (self:initial_display_state) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] initial_display_state_set_display_state (self:initial_display_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.display_state <- x +let[@inline] initial_display_state_set_brightness (self:initial_display_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.brightness <- x + +let copy_initial_display_state (self:initial_display_state) : initial_display_state = + { self with display_state = self.display_state } + +let make_initial_display_state + ?(display_state:int32 option) + ?(brightness:float option) + () : initial_display_state = + let _res = default_initial_display_state () in + (match display_state with + | None -> () + | Some v -> initial_display_state_set_display_state _res v); + (match brightness with + | None -> () + | Some v -> initial_display_state_set_brightness _res v); + _res + +let[@inline] kernel_wakelock_data_wakelock_has_wakelock_id (self:kernel_wakelock_data_wakelock) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] kernel_wakelock_data_wakelock_has_wakelock_name (self:kernel_wakelock_data_wakelock) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] kernel_wakelock_data_wakelock_has_wakelock_type (self:kernel_wakelock_data_wakelock) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] kernel_wakelock_data_wakelock_set_wakelock_id (self:kernel_wakelock_data_wakelock) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.wakelock_id <- x +let[@inline] kernel_wakelock_data_wakelock_set_wakelock_name (self:kernel_wakelock_data_wakelock) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.wakelock_name <- x +let[@inline] kernel_wakelock_data_wakelock_set_wakelock_type (self:kernel_wakelock_data_wakelock) (x:kernel_wakelock_data_wakelock_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.wakelock_type <- x + +let copy_kernel_wakelock_data_wakelock (self:kernel_wakelock_data_wakelock) : kernel_wakelock_data_wakelock = + { self with wakelock_id = self.wakelock_id } + +let make_kernel_wakelock_data_wakelock + ?(wakelock_id:int32 option) + ?(wakelock_name:string option) + ?(wakelock_type:kernel_wakelock_data_wakelock_type option) + () : kernel_wakelock_data_wakelock = + let _res = default_kernel_wakelock_data_wakelock () in + (match wakelock_id with + | None -> () + | Some v -> kernel_wakelock_data_wakelock_set_wakelock_id _res v); + (match wakelock_name with + | None -> () + | Some v -> kernel_wakelock_data_wakelock_set_wakelock_name _res v); + (match wakelock_type with + | None -> () + | Some v -> kernel_wakelock_data_wakelock_set_wakelock_type _res v); + _res + +let[@inline] kernel_wakelock_data_has_error_flags (self:kernel_wakelock_data) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] kernel_wakelock_data_set_wakelock (self:kernel_wakelock_data) (x:kernel_wakelock_data_wakelock list) : unit = + self.wakelock <- x +let[@inline] kernel_wakelock_data_set_wakelock_id (self:kernel_wakelock_data) (x:int32 list) : unit = + self.wakelock_id <- x +let[@inline] kernel_wakelock_data_set_time_held_millis (self:kernel_wakelock_data) (x:int64 list) : unit = + self.time_held_millis <- x +let[@inline] kernel_wakelock_data_set_error_flags (self:kernel_wakelock_data) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.error_flags <- x + +let copy_kernel_wakelock_data (self:kernel_wakelock_data) : kernel_wakelock_data = + { self with wakelock = self.wakelock } + +let make_kernel_wakelock_data + ?(wakelock=[]) + ?(wakelock_id=[]) + ?(time_held_millis=[]) + ?(error_flags:int64 option) + () : kernel_wakelock_data = + let _res = default_kernel_wakelock_data () in + kernel_wakelock_data_set_wakelock _res wakelock; + kernel_wakelock_data_set_wakelock_id _res wakelock_id; + kernel_wakelock_data_set_time_held_millis _res time_held_millis; + (match error_flags with + | None -> () + | Some v -> kernel_wakelock_data_set_error_flags _res v); + _res + +let[@inline] network_packet_event_has_direction (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] network_packet_event_has_network_interface (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] network_packet_event_has_length (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] network_packet_event_has_uid (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] network_packet_event_has_tag (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] network_packet_event_has_ip_proto (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] network_packet_event_has_tcp_flags (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] network_packet_event_has_local_port (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] network_packet_event_has_remote_port (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] network_packet_event_has_icmp_type (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] network_packet_event_has_icmp_code (self:network_packet_event) : bool = (Pbrt.Bitfield.get self._presence 10) + +let[@inline] network_packet_event_set_direction (self:network_packet_event) (x:traffic_direction) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.direction <- x +let[@inline] network_packet_event_set_network_interface (self:network_packet_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.network_interface <- x +let[@inline] network_packet_event_set_length (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.length <- x +let[@inline] network_packet_event_set_uid (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.uid <- x +let[@inline] network_packet_event_set_tag (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.tag <- x +let[@inline] network_packet_event_set_ip_proto (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.ip_proto <- x +let[@inline] network_packet_event_set_tcp_flags (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.tcp_flags <- x +let[@inline] network_packet_event_set_local_port (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.local_port <- x +let[@inline] network_packet_event_set_remote_port (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.remote_port <- x +let[@inline] network_packet_event_set_icmp_type (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.icmp_type <- x +let[@inline] network_packet_event_set_icmp_code (self:network_packet_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.icmp_code <- x + +let copy_network_packet_event (self:network_packet_event) : network_packet_event = + { self with direction = self.direction } + +let make_network_packet_event + ?(direction:traffic_direction option) + ?(network_interface:string option) + ?(length:int32 option) + ?(uid:int32 option) + ?(tag:int32 option) + ?(ip_proto:int32 option) + ?(tcp_flags:int32 option) + ?(local_port:int32 option) + ?(remote_port:int32 option) + ?(icmp_type:int32 option) + ?(icmp_code:int32 option) + () : network_packet_event = + let _res = default_network_packet_event () in + (match direction with + | None -> () + | Some v -> network_packet_event_set_direction _res v); + (match network_interface with + | None -> () + | Some v -> network_packet_event_set_network_interface _res v); + (match length with + | None -> () + | Some v -> network_packet_event_set_length _res v); + (match uid with + | None -> () + | Some v -> network_packet_event_set_uid _res v); + (match tag with + | None -> () + | Some v -> network_packet_event_set_tag _res v); + (match ip_proto with + | None -> () + | Some v -> network_packet_event_set_ip_proto _res v); + (match tcp_flags with + | None -> () + | Some v -> network_packet_event_set_tcp_flags _res v); + (match local_port with + | None -> () + | Some v -> network_packet_event_set_local_port _res v); + (match remote_port with + | None -> () + | Some v -> network_packet_event_set_remote_port _res v); + (match icmp_type with + | None -> () + | Some v -> network_packet_event_set_icmp_type _res v); + (match icmp_code with + | None -> () + | Some v -> network_packet_event_set_icmp_code _res v); + _res + +let[@inline] network_packet_bundle_has_total_packets (self:network_packet_bundle) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] network_packet_bundle_has_total_duration (self:network_packet_bundle) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] network_packet_bundle_has_total_length (self:network_packet_bundle) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] network_packet_bundle_set_packet_context (self:network_packet_bundle) (x:network_packet_bundle_packet_context) : unit = + self.packet_context <- Some x +let[@inline] network_packet_bundle_set_packet_timestamps (self:network_packet_bundle) (x:int64 list) : unit = + self.packet_timestamps <- x +let[@inline] network_packet_bundle_set_packet_lengths (self:network_packet_bundle) (x:int32 list) : unit = + self.packet_lengths <- x +let[@inline] network_packet_bundle_set_total_packets (self:network_packet_bundle) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.total_packets <- x +let[@inline] network_packet_bundle_set_total_duration (self:network_packet_bundle) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.total_duration <- x +let[@inline] network_packet_bundle_set_total_length (self:network_packet_bundle) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.total_length <- x + +let copy_network_packet_bundle (self:network_packet_bundle) : network_packet_bundle = + { self with packet_context = self.packet_context } + +let make_network_packet_bundle + ?(packet_context:network_packet_bundle_packet_context option) + ?(packet_timestamps=[]) + ?(packet_lengths=[]) + ?(total_packets:int32 option) + ?(total_duration:int64 option) + ?(total_length:int64 option) + () : network_packet_bundle = + let _res = default_network_packet_bundle () in + (match packet_context with + | None -> () + | Some v -> network_packet_bundle_set_packet_context _res v); + network_packet_bundle_set_packet_timestamps _res packet_timestamps; + network_packet_bundle_set_packet_lengths _res packet_lengths; + (match total_packets with + | None -> () + | Some v -> network_packet_bundle_set_total_packets _res v); + (match total_duration with + | None -> () + | Some v -> network_packet_bundle_set_total_duration _res v); + (match total_length with + | None -> () + | Some v -> network_packet_bundle_set_total_length _res v); + _res + +let[@inline] network_packet_context_has_iid (self:network_packet_context) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] network_packet_context_set_iid (self:network_packet_context) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] network_packet_context_set_ctx (self:network_packet_context) (x:network_packet_event) : unit = + self.ctx <- Some x + +let copy_network_packet_context (self:network_packet_context) : network_packet_context = + { self with iid = self.iid } + +let make_network_packet_context + ?(iid:int64 option) + ?(ctx:network_packet_event option) + () : network_packet_context = + let _res = default_network_packet_context () in + (match iid with + | None -> () + | Some v -> network_packet_context_set_iid _res v); + (match ctx with + | None -> () + | Some v -> network_packet_context_set_ctx _res v); + _res + +let[@inline] packages_list_package_info_has_name (self:packages_list_package_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] packages_list_package_info_has_uid (self:packages_list_package_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] packages_list_package_info_has_debuggable (self:packages_list_package_info) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] packages_list_package_info_has_profileable_from_shell (self:packages_list_package_info) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] packages_list_package_info_has_version_code (self:packages_list_package_info) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] packages_list_package_info_set_name (self:packages_list_package_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] packages_list_package_info_set_uid (self:packages_list_package_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.uid <- x +let[@inline] packages_list_package_info_set_debuggable (self:packages_list_package_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.debuggable <- x +let[@inline] packages_list_package_info_set_profileable_from_shell (self:packages_list_package_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.profileable_from_shell <- x +let[@inline] packages_list_package_info_set_version_code (self:packages_list_package_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.version_code <- x + +let copy_packages_list_package_info (self:packages_list_package_info) : packages_list_package_info = + { self with name = self.name } + +let make_packages_list_package_info + ?(name:string option) + ?(uid:int64 option) + ?(debuggable:bool option) + ?(profileable_from_shell:bool option) + ?(version_code:int64 option) + () : packages_list_package_info = + let _res = default_packages_list_package_info () in + (match name with + | None -> () + | Some v -> packages_list_package_info_set_name _res v); + (match uid with + | None -> () + | Some v -> packages_list_package_info_set_uid _res v); + (match debuggable with + | None -> () + | Some v -> packages_list_package_info_set_debuggable _res v); + (match profileable_from_shell with + | None -> () + | Some v -> packages_list_package_info_set_profileable_from_shell _res v); + (match version_code with + | None -> () + | Some v -> packages_list_package_info_set_version_code _res v); + _res + +let[@inline] packages_list_has_parse_error (self:packages_list) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] packages_list_has_read_error (self:packages_list) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] packages_list_set_packages (self:packages_list) (x:packages_list_package_info list) : unit = + self.packages <- x +let[@inline] packages_list_set_parse_error (self:packages_list) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.parse_error <- x +let[@inline] packages_list_set_read_error (self:packages_list) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.read_error <- x + +let copy_packages_list (self:packages_list) : packages_list = + { self with packages = self.packages } + +let make_packages_list + ?(packages=[]) + ?(parse_error:bool option) + ?(read_error:bool option) + () : packages_list = + let _res = default_packages_list () in + packages_list_set_packages _res packages; + (match parse_error with + | None -> () + | Some v -> packages_list_set_parse_error _res v); + (match read_error with + | None -> () + | Some v -> packages_list_set_read_error _res v); + _res + + +let[@inline] pixel_modem_events_set_events (self:pixel_modem_events) (x:bytes list) : unit = + self.events <- x +let[@inline] pixel_modem_events_set_event_time_nanos (self:pixel_modem_events) (x:int64 list) : unit = + self.event_time_nanos <- x + +let copy_pixel_modem_events (self:pixel_modem_events) : pixel_modem_events = + { self with events = self.events } + +let make_pixel_modem_events + ?(events=[]) + ?(event_time_nanos=[]) + () : pixel_modem_events = + let _res = default_pixel_modem_events () in + pixel_modem_events_set_events _res events; + pixel_modem_events_set_event_time_nanos _res event_time_nanos; + _res + +let[@inline] pixel_modem_token_database_has_database (self:pixel_modem_token_database) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] pixel_modem_token_database_set_database (self:pixel_modem_token_database) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.database <- x + +let copy_pixel_modem_token_database (self:pixel_modem_token_database) : pixel_modem_token_database = + { self with database = self.database } + +let make_pixel_modem_token_database + ?(database:bytes option) + () : pixel_modem_token_database = + let _res = default_pixel_modem_token_database () in + (match database with + | None -> () + | Some v -> pixel_modem_token_database_set_database _res v); + _res + +let[@inline] proto_log_message_has_message_id (self:proto_log_message) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] proto_log_message_has_stacktrace_iid (self:proto_log_message) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] proto_log_message_set_message_id (self:proto_log_message) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.message_id <- x +let[@inline] proto_log_message_set_str_param_iids (self:proto_log_message) (x:int32 list) : unit = + self.str_param_iids <- x +let[@inline] proto_log_message_set_sint64_params (self:proto_log_message) (x:int64 list) : unit = + self.sint64_params <- x +let[@inline] proto_log_message_set_double_params (self:proto_log_message) (x:float list) : unit = + self.double_params <- x +let[@inline] proto_log_message_set_boolean_params (self:proto_log_message) (x:int32 list) : unit = + self.boolean_params <- x +let[@inline] proto_log_message_set_stacktrace_iid (self:proto_log_message) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.stacktrace_iid <- x + +let copy_proto_log_message (self:proto_log_message) : proto_log_message = + { self with message_id = self.message_id } + +let make_proto_log_message + ?(message_id:int64 option) + ?(str_param_iids=[]) + ?(sint64_params=[]) + ?(double_params=[]) + ?(boolean_params=[]) + ?(stacktrace_iid:int32 option) + () : proto_log_message = + let _res = default_proto_log_message () in + (match message_id with + | None -> () + | Some v -> proto_log_message_set_message_id _res v); + proto_log_message_set_str_param_iids _res str_param_iids; + proto_log_message_set_sint64_params _res sint64_params; + proto_log_message_set_double_params _res double_params; + proto_log_message_set_boolean_params _res boolean_params; + (match stacktrace_iid with + | None -> () + | Some v -> proto_log_message_set_stacktrace_iid _res v); + _res + +let[@inline] proto_log_viewer_config_message_data_has_message_id (self:proto_log_viewer_config_message_data) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] proto_log_viewer_config_message_data_has_message (self:proto_log_viewer_config_message_data) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] proto_log_viewer_config_message_data_has_level (self:proto_log_viewer_config_message_data) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] proto_log_viewer_config_message_data_has_group_id (self:proto_log_viewer_config_message_data) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] proto_log_viewer_config_message_data_has_location (self:proto_log_viewer_config_message_data) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] proto_log_viewer_config_message_data_set_message_id (self:proto_log_viewer_config_message_data) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.message_id <- x +let[@inline] proto_log_viewer_config_message_data_set_message (self:proto_log_viewer_config_message_data) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.message <- x +let[@inline] proto_log_viewer_config_message_data_set_level (self:proto_log_viewer_config_message_data) (x:proto_log_level) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.level <- x +let[@inline] proto_log_viewer_config_message_data_set_group_id (self:proto_log_viewer_config_message_data) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.group_id <- x +let[@inline] proto_log_viewer_config_message_data_set_location (self:proto_log_viewer_config_message_data) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.location <- x + +let copy_proto_log_viewer_config_message_data (self:proto_log_viewer_config_message_data) : proto_log_viewer_config_message_data = + { self with message_id = self.message_id } + +let make_proto_log_viewer_config_message_data + ?(message_id:int64 option) + ?(message:string option) + ?(level:proto_log_level option) + ?(group_id:int32 option) + ?(location:string option) + () : proto_log_viewer_config_message_data = + let _res = default_proto_log_viewer_config_message_data () in + (match message_id with + | None -> () + | Some v -> proto_log_viewer_config_message_data_set_message_id _res v); + (match message with + | None -> () + | Some v -> proto_log_viewer_config_message_data_set_message _res v); + (match level with + | None -> () + | Some v -> proto_log_viewer_config_message_data_set_level _res v); + (match group_id with + | None -> () + | Some v -> proto_log_viewer_config_message_data_set_group_id _res v); + (match location with + | None -> () + | Some v -> proto_log_viewer_config_message_data_set_location _res v); + _res + +let[@inline] proto_log_viewer_config_group_has_id (self:proto_log_viewer_config_group) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] proto_log_viewer_config_group_has_name (self:proto_log_viewer_config_group) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] proto_log_viewer_config_group_has_tag (self:proto_log_viewer_config_group) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] proto_log_viewer_config_group_set_id (self:proto_log_viewer_config_group) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] proto_log_viewer_config_group_set_name (self:proto_log_viewer_config_group) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x +let[@inline] proto_log_viewer_config_group_set_tag (self:proto_log_viewer_config_group) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.tag <- x + +let copy_proto_log_viewer_config_group (self:proto_log_viewer_config_group) : proto_log_viewer_config_group = + { self with id = self.id } + +let make_proto_log_viewer_config_group + ?(id:int32 option) + ?(name:string option) + ?(tag:string option) + () : proto_log_viewer_config_group = + let _res = default_proto_log_viewer_config_group () in + (match id with + | None -> () + | Some v -> proto_log_viewer_config_group_set_id _res v); + (match name with + | None -> () + | Some v -> proto_log_viewer_config_group_set_name _res v); + (match tag with + | None -> () + | Some v -> proto_log_viewer_config_group_set_tag _res v); + _res + + +let[@inline] proto_log_viewer_config_set_messages (self:proto_log_viewer_config) (x:proto_log_viewer_config_message_data list) : unit = + self.messages <- x +let[@inline] proto_log_viewer_config_set_groups (self:proto_log_viewer_config) (x:proto_log_viewer_config_group list) : unit = + self.groups <- x + +let copy_proto_log_viewer_config (self:proto_log_viewer_config) : proto_log_viewer_config = + { self with messages = self.messages } + +let make_proto_log_viewer_config + ?(messages=[]) + ?(groups=[]) + () : proto_log_viewer_config = + let _res = default_proto_log_viewer_config () in + proto_log_viewer_config_set_messages _res messages; + proto_log_viewer_config_set_groups _res groups; + _res + +let[@inline] shell_transition_target_has_mode (self:shell_transition_target) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] shell_transition_target_has_layer_id (self:shell_transition_target) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] shell_transition_target_has_window_id (self:shell_transition_target) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] shell_transition_target_has_flags (self:shell_transition_target) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] shell_transition_target_set_mode (self:shell_transition_target) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.mode <- x +let[@inline] shell_transition_target_set_layer_id (self:shell_transition_target) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.layer_id <- x +let[@inline] shell_transition_target_set_window_id (self:shell_transition_target) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.window_id <- x +let[@inline] shell_transition_target_set_flags (self:shell_transition_target) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.flags <- x + +let copy_shell_transition_target (self:shell_transition_target) : shell_transition_target = + { self with mode = self.mode } + +let make_shell_transition_target + ?(mode:int32 option) + ?(layer_id:int32 option) + ?(window_id:int32 option) + ?(flags:int32 option) + () : shell_transition_target = + let _res = default_shell_transition_target () in + (match mode with + | None -> () + | Some v -> shell_transition_target_set_mode _res v); + (match layer_id with + | None -> () + | Some v -> shell_transition_target_set_layer_id _res v); + (match window_id with + | None -> () + | Some v -> shell_transition_target_set_window_id _res v); + (match flags with + | None -> () + | Some v -> shell_transition_target_set_flags _res v); + _res + +let[@inline] shell_transition_has_id (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] shell_transition_has_create_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] shell_transition_has_send_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] shell_transition_has_dispatch_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] shell_transition_has_merge_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] shell_transition_has_merge_request_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] shell_transition_has_shell_abort_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] shell_transition_has_wm_abort_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] shell_transition_has_finish_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] shell_transition_has_start_transaction_id (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] shell_transition_has_finish_transaction_id (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] shell_transition_has_handler (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] shell_transition_has_type_ (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] shell_transition_has_merge_target (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] shell_transition_has_flags (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] shell_transition_has_starting_window_remove_time_ns (self:shell_transition) : bool = (Pbrt.Bitfield.get self._presence 15) + +let[@inline] shell_transition_set_id (self:shell_transition) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] shell_transition_set_create_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.create_time_ns <- x +let[@inline] shell_transition_set_send_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.send_time_ns <- x +let[@inline] shell_transition_set_dispatch_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.dispatch_time_ns <- x +let[@inline] shell_transition_set_merge_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.merge_time_ns <- x +let[@inline] shell_transition_set_merge_request_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.merge_request_time_ns <- x +let[@inline] shell_transition_set_shell_abort_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.shell_abort_time_ns <- x +let[@inline] shell_transition_set_wm_abort_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.wm_abort_time_ns <- x +let[@inline] shell_transition_set_finish_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.finish_time_ns <- x +let[@inline] shell_transition_set_start_transaction_id (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.start_transaction_id <- x +let[@inline] shell_transition_set_finish_transaction_id (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.finish_transaction_id <- x +let[@inline] shell_transition_set_handler (self:shell_transition) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.handler <- x +let[@inline] shell_transition_set_type_ (self:shell_transition) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.type_ <- x +let[@inline] shell_transition_set_targets (self:shell_transition) (x:shell_transition_target list) : unit = + self.targets <- x +let[@inline] shell_transition_set_merge_target (self:shell_transition) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.merge_target <- x +let[@inline] shell_transition_set_flags (self:shell_transition) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.flags <- x +let[@inline] shell_transition_set_starting_window_remove_time_ns (self:shell_transition) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.starting_window_remove_time_ns <- x + +let copy_shell_transition (self:shell_transition) : shell_transition = + { self with id = self.id } + +let make_shell_transition + ?(id:int32 option) + ?(create_time_ns:int64 option) + ?(send_time_ns:int64 option) + ?(dispatch_time_ns:int64 option) + ?(merge_time_ns:int64 option) + ?(merge_request_time_ns:int64 option) + ?(shell_abort_time_ns:int64 option) + ?(wm_abort_time_ns:int64 option) + ?(finish_time_ns:int64 option) + ?(start_transaction_id:int64 option) + ?(finish_transaction_id:int64 option) + ?(handler:int32 option) + ?(type_:int32 option) + ?(targets=[]) + ?(merge_target:int32 option) + ?(flags:int32 option) + ?(starting_window_remove_time_ns:int64 option) + () : shell_transition = + let _res = default_shell_transition () in + (match id with + | None -> () + | Some v -> shell_transition_set_id _res v); + (match create_time_ns with + | None -> () + | Some v -> shell_transition_set_create_time_ns _res v); + (match send_time_ns with + | None -> () + | Some v -> shell_transition_set_send_time_ns _res v); + (match dispatch_time_ns with + | None -> () + | Some v -> shell_transition_set_dispatch_time_ns _res v); + (match merge_time_ns with + | None -> () + | Some v -> shell_transition_set_merge_time_ns _res v); + (match merge_request_time_ns with + | None -> () + | Some v -> shell_transition_set_merge_request_time_ns _res v); + (match shell_abort_time_ns with + | None -> () + | Some v -> shell_transition_set_shell_abort_time_ns _res v); + (match wm_abort_time_ns with + | None -> () + | Some v -> shell_transition_set_wm_abort_time_ns _res v); + (match finish_time_ns with + | None -> () + | Some v -> shell_transition_set_finish_time_ns _res v); + (match start_transaction_id with + | None -> () + | Some v -> shell_transition_set_start_transaction_id _res v); + (match finish_transaction_id with + | None -> () + | Some v -> shell_transition_set_finish_transaction_id _res v); + (match handler with + | None -> () + | Some v -> shell_transition_set_handler _res v); + (match type_ with + | None -> () + | Some v -> shell_transition_set_type_ _res v); + shell_transition_set_targets _res targets; + (match merge_target with + | None -> () + | Some v -> shell_transition_set_merge_target _res v); + (match flags with + | None -> () + | Some v -> shell_transition_set_flags _res v); + (match starting_window_remove_time_ns with + | None -> () + | Some v -> shell_transition_set_starting_window_remove_time_ns _res v); + _res + +let[@inline] shell_handler_mapping_has_id (self:shell_handler_mapping) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] shell_handler_mapping_has_name (self:shell_handler_mapping) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] shell_handler_mapping_set_id (self:shell_handler_mapping) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] shell_handler_mapping_set_name (self:shell_handler_mapping) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x + +let copy_shell_handler_mapping (self:shell_handler_mapping) : shell_handler_mapping = + { self with id = self.id } + +let make_shell_handler_mapping + ?(id:int32 option) + ?(name:string option) + () : shell_handler_mapping = + let _res = default_shell_handler_mapping () in + (match id with + | None -> () + | Some v -> shell_handler_mapping_set_id _res v); + (match name with + | None -> () + | Some v -> shell_handler_mapping_set_name _res v); + _res + + +let[@inline] shell_handler_mappings_set_mapping (self:shell_handler_mappings) (x:shell_handler_mapping list) : unit = + self.mapping <- x + +let copy_shell_handler_mappings (self:shell_handler_mappings) : shell_handler_mappings = + { self with mapping = self.mapping } + +let make_shell_handler_mappings + ?(mapping=[]) + () : shell_handler_mappings = + let _res = default_shell_handler_mappings () in + shell_handler_mappings_set_mapping _res mapping; + _res + +let[@inline] rect_proto_has_left (self:rect_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] rect_proto_has_top (self:rect_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] rect_proto_has_right (self:rect_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] rect_proto_has_bottom (self:rect_proto) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] rect_proto_set_left (self:rect_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.left <- x +let[@inline] rect_proto_set_top (self:rect_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.top <- x +let[@inline] rect_proto_set_right (self:rect_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.right <- x +let[@inline] rect_proto_set_bottom (self:rect_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.bottom <- x + +let copy_rect_proto (self:rect_proto) : rect_proto = + { self with left = self.left } + +let make_rect_proto + ?(left:int32 option) + ?(top:int32 option) + ?(right:int32 option) + ?(bottom:int32 option) + () : rect_proto = + let _res = default_rect_proto () in + (match left with + | None -> () + | Some v -> rect_proto_set_left _res v); + (match top with + | None -> () + | Some v -> rect_proto_set_top _res v); + (match right with + | None -> () + | Some v -> rect_proto_set_right _res v); + (match bottom with + | None -> () + | Some v -> rect_proto_set_bottom _res v); + _res + + +let[@inline] region_proto_set_rect (self:region_proto) (x:rect_proto list) : unit = + self.rect <- x + +let copy_region_proto (self:region_proto) : region_proto = + { self with rect = self.rect } + +let make_region_proto + ?(rect=[]) + () : region_proto = + let _res = default_region_proto () in + region_proto_set_rect _res rect; + _res + +let[@inline] size_proto_has_w (self:size_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] size_proto_has_h (self:size_proto) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] size_proto_set_w (self:size_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.w <- x +let[@inline] size_proto_set_h (self:size_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.h <- x + +let copy_size_proto (self:size_proto) : size_proto = + { self with w = self.w } + +let make_size_proto + ?(w:int32 option) + ?(h:int32 option) + () : size_proto = + let _res = default_size_proto () in + (match w with + | None -> () + | Some v -> size_proto_set_w _res v); + (match h with + | None -> () + | Some v -> size_proto_set_h _res v); + _res + +let[@inline] transform_proto_has_dsdx (self:transform_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] transform_proto_has_dtdx (self:transform_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] transform_proto_has_dsdy (self:transform_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] transform_proto_has_dtdy (self:transform_proto) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] transform_proto_has_type_ (self:transform_proto) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] transform_proto_set_dsdx (self:transform_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.dsdx <- x +let[@inline] transform_proto_set_dtdx (self:transform_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.dtdx <- x +let[@inline] transform_proto_set_dsdy (self:transform_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.dsdy <- x +let[@inline] transform_proto_set_dtdy (self:transform_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.dtdy <- x +let[@inline] transform_proto_set_type_ (self:transform_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.type_ <- x + +let copy_transform_proto (self:transform_proto) : transform_proto = + { self with dsdx = self.dsdx } + +let make_transform_proto + ?(dsdx:float option) + ?(dtdx:float option) + ?(dsdy:float option) + ?(dtdy:float option) + ?(type_:int32 option) + () : transform_proto = + let _res = default_transform_proto () in + (match dsdx with + | None -> () + | Some v -> transform_proto_set_dsdx _res v); + (match dtdx with + | None -> () + | Some v -> transform_proto_set_dtdx _res v); + (match dsdy with + | None -> () + | Some v -> transform_proto_set_dsdy _res v); + (match dtdy with + | None -> () + | Some v -> transform_proto_set_dtdy _res v); + (match type_ with + | None -> () + | Some v -> transform_proto_set_type_ _res v); + _res + +let[@inline] color_proto_has_r (self:color_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] color_proto_has_g (self:color_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] color_proto_has_b (self:color_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] color_proto_has_a (self:color_proto) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] color_proto_set_r (self:color_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.r <- x +let[@inline] color_proto_set_g (self:color_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.g <- x +let[@inline] color_proto_set_b (self:color_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.b <- x +let[@inline] color_proto_set_a (self:color_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.a <- x + +let copy_color_proto (self:color_proto) : color_proto = + { self with r = self.r } + +let make_color_proto + ?(r:float option) + ?(g:float option) + ?(b:float option) + ?(a:float option) + () : color_proto = + let _res = default_color_proto () in + (match r with + | None -> () + | Some v -> color_proto_set_r _res v); + (match g with + | None -> () + | Some v -> color_proto_set_g _res v); + (match b with + | None -> () + | Some v -> color_proto_set_b _res v); + (match a with + | None -> () + | Some v -> color_proto_set_a _res v); + _res + +let[@inline] input_window_info_proto_has_layout_params_flags (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] input_window_info_proto_has_layout_params_type (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] input_window_info_proto_has_surface_inset (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] input_window_info_proto_has_visible (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] input_window_info_proto_has_can_receive_keys (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] input_window_info_proto_has_focusable (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] input_window_info_proto_has_has_wallpaper (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] input_window_info_proto_has_global_scale_factor (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] input_window_info_proto_has_window_x_scale (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] input_window_info_proto_has_window_y_scale (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] input_window_info_proto_has_crop_layer_id (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] input_window_info_proto_has_replace_touchable_region_with_crop (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] input_window_info_proto_has_input_config (self:input_window_info_proto) : bool = (Pbrt.Bitfield.get self._presence 12) + +let[@inline] input_window_info_proto_set_layout_params_flags (self:input_window_info_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.layout_params_flags <- x +let[@inline] input_window_info_proto_set_layout_params_type (self:input_window_info_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.layout_params_type <- x +let[@inline] input_window_info_proto_set_frame (self:input_window_info_proto) (x:rect_proto) : unit = + self.frame <- Some x +let[@inline] input_window_info_proto_set_touchable_region (self:input_window_info_proto) (x:region_proto) : unit = + self.touchable_region <- Some x +let[@inline] input_window_info_proto_set_surface_inset (self:input_window_info_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.surface_inset <- x +let[@inline] input_window_info_proto_set_visible (self:input_window_info_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.visible <- x +let[@inline] input_window_info_proto_set_can_receive_keys (self:input_window_info_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.can_receive_keys <- x +let[@inline] input_window_info_proto_set_focusable (self:input_window_info_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.focusable <- x +let[@inline] input_window_info_proto_set_has_wallpaper (self:input_window_info_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.has_wallpaper <- x +let[@inline] input_window_info_proto_set_global_scale_factor (self:input_window_info_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.global_scale_factor <- x +let[@inline] input_window_info_proto_set_window_x_scale (self:input_window_info_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.window_x_scale <- x +let[@inline] input_window_info_proto_set_window_y_scale (self:input_window_info_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.window_y_scale <- x +let[@inline] input_window_info_proto_set_crop_layer_id (self:input_window_info_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.crop_layer_id <- x +let[@inline] input_window_info_proto_set_replace_touchable_region_with_crop (self:input_window_info_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.replace_touchable_region_with_crop <- x +let[@inline] input_window_info_proto_set_touchable_region_crop (self:input_window_info_proto) (x:rect_proto) : unit = + self.touchable_region_crop <- Some x +let[@inline] input_window_info_proto_set_transform (self:input_window_info_proto) (x:transform_proto) : unit = + self.transform <- Some x +let[@inline] input_window_info_proto_set_input_config (self:input_window_info_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.input_config <- x + +let copy_input_window_info_proto (self:input_window_info_proto) : input_window_info_proto = + { self with layout_params_flags = self.layout_params_flags } + +let make_input_window_info_proto + ?(layout_params_flags:int32 option) + ?(layout_params_type:int32 option) + ?(frame:rect_proto option) + ?(touchable_region:region_proto option) + ?(surface_inset:int32 option) + ?(visible:bool option) + ?(can_receive_keys:bool option) + ?(focusable:bool option) + ?(has_wallpaper:bool option) + ?(global_scale_factor:float option) + ?(window_x_scale:float option) + ?(window_y_scale:float option) + ?(crop_layer_id:int32 option) + ?(replace_touchable_region_with_crop:bool option) + ?(touchable_region_crop:rect_proto option) + ?(transform:transform_proto option) + ?(input_config:int32 option) + () : input_window_info_proto = + let _res = default_input_window_info_proto () in + (match layout_params_flags with + | None -> () + | Some v -> input_window_info_proto_set_layout_params_flags _res v); + (match layout_params_type with + | None -> () + | Some v -> input_window_info_proto_set_layout_params_type _res v); + (match frame with + | None -> () + | Some v -> input_window_info_proto_set_frame _res v); + (match touchable_region with + | None -> () + | Some v -> input_window_info_proto_set_touchable_region _res v); + (match surface_inset with + | None -> () + | Some v -> input_window_info_proto_set_surface_inset _res v); + (match visible with + | None -> () + | Some v -> input_window_info_proto_set_visible _res v); + (match can_receive_keys with + | None -> () + | Some v -> input_window_info_proto_set_can_receive_keys _res v); + (match focusable with + | None -> () + | Some v -> input_window_info_proto_set_focusable _res v); + (match has_wallpaper with + | None -> () + | Some v -> input_window_info_proto_set_has_wallpaper _res v); + (match global_scale_factor with + | None -> () + | Some v -> input_window_info_proto_set_global_scale_factor _res v); + (match window_x_scale with + | None -> () + | Some v -> input_window_info_proto_set_window_x_scale _res v); + (match window_y_scale with + | None -> () + | Some v -> input_window_info_proto_set_window_y_scale _res v); + (match crop_layer_id with + | None -> () + | Some v -> input_window_info_proto_set_crop_layer_id _res v); + (match replace_touchable_region_with_crop with + | None -> () + | Some v -> input_window_info_proto_set_replace_touchable_region_with_crop _res v); + (match touchable_region_crop with + | None -> () + | Some v -> input_window_info_proto_set_touchable_region_crop _res v); + (match transform with + | None -> () + | Some v -> input_window_info_proto_set_transform _res v); + (match input_config with + | None -> () + | Some v -> input_window_info_proto_set_input_config _res v); + _res + +let[@inline] blur_region_has_blur_radius (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] blur_region_has_corner_radius_tl (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] blur_region_has_corner_radius_tr (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] blur_region_has_corner_radius_bl (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] blur_region_has_corner_radius_br (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] blur_region_has_corner_radius_tlx (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] blur_region_has_corner_radius_tly (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] blur_region_has_corner_radius_trx (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] blur_region_has_corner_radius_try (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] blur_region_has_corner_radius_blx (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] blur_region_has_corner_radius_bly (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] blur_region_has_corner_radius_brx (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] blur_region_has_corner_radius_bry (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] blur_region_has_alpha (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] blur_region_has_left (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] blur_region_has_top (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] blur_region_has_right (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 16) +let[@inline] blur_region_has_bottom (self:blur_region) : bool = (Pbrt.Bitfield.get self._presence 17) + +let[@inline] blur_region_set_blur_radius (self:blur_region) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.blur_radius <- x +let[@inline] blur_region_set_corner_radius_tl (self:blur_region) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.corner_radius_tl <- x +let[@inline] blur_region_set_corner_radius_tr (self:blur_region) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.corner_radius_tr <- x +let[@inline] blur_region_set_corner_radius_bl (self:blur_region) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.corner_radius_bl <- x +let[@inline] blur_region_set_corner_radius_br (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.corner_radius_br <- x +let[@inline] blur_region_set_corner_radius_tlx (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.corner_radius_tlx <- x +let[@inline] blur_region_set_corner_radius_tly (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.corner_radius_tly <- x +let[@inline] blur_region_set_corner_radius_trx (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.corner_radius_trx <- x +let[@inline] blur_region_set_corner_radius_try (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.corner_radius_try <- x +let[@inline] blur_region_set_corner_radius_blx (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.corner_radius_blx <- x +let[@inline] blur_region_set_corner_radius_bly (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.corner_radius_bly <- x +let[@inline] blur_region_set_corner_radius_brx (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.corner_radius_brx <- x +let[@inline] blur_region_set_corner_radius_bry (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.corner_radius_bry <- x +let[@inline] blur_region_set_alpha (self:blur_region) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.alpha <- x +let[@inline] blur_region_set_left (self:blur_region) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.left <- x +let[@inline] blur_region_set_top (self:blur_region) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.top <- x +let[@inline] blur_region_set_right (self:blur_region) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.right <- x +let[@inline] blur_region_set_bottom (self:blur_region) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 17); self.bottom <- x + +let copy_blur_region (self:blur_region) : blur_region = + { self with blur_radius = self.blur_radius } + +let make_blur_region + ?(blur_radius:int32 option) + ?(corner_radius_tl:int32 option) + ?(corner_radius_tr:int32 option) + ?(corner_radius_bl:int32 option) + ?(corner_radius_br:float option) + ?(corner_radius_tlx:float option) + ?(corner_radius_tly:float option) + ?(corner_radius_trx:float option) + ?(corner_radius_try:float option) + ?(corner_radius_blx:float option) + ?(corner_radius_bly:float option) + ?(corner_radius_brx:float option) + ?(corner_radius_bry:float option) + ?(alpha:float option) + ?(left:int32 option) + ?(top:int32 option) + ?(right:int32 option) + ?(bottom:int32 option) + () : blur_region = + let _res = default_blur_region () in + (match blur_radius with + | None -> () + | Some v -> blur_region_set_blur_radius _res v); + (match corner_radius_tl with + | None -> () + | Some v -> blur_region_set_corner_radius_tl _res v); + (match corner_radius_tr with + | None -> () + | Some v -> blur_region_set_corner_radius_tr _res v); + (match corner_radius_bl with + | None -> () + | Some v -> blur_region_set_corner_radius_bl _res v); + (match corner_radius_br with + | None -> () + | Some v -> blur_region_set_corner_radius_br _res v); + (match corner_radius_tlx with + | None -> () + | Some v -> blur_region_set_corner_radius_tlx _res v); + (match corner_radius_tly with + | None -> () + | Some v -> blur_region_set_corner_radius_tly _res v); + (match corner_radius_trx with + | None -> () + | Some v -> blur_region_set_corner_radius_trx _res v); + (match corner_radius_try with + | None -> () + | Some v -> blur_region_set_corner_radius_try _res v); + (match corner_radius_blx with + | None -> () + | Some v -> blur_region_set_corner_radius_blx _res v); + (match corner_radius_bly with + | None -> () + | Some v -> blur_region_set_corner_radius_bly _res v); + (match corner_radius_brx with + | None -> () + | Some v -> blur_region_set_corner_radius_brx _res v); + (match corner_radius_bry with + | None -> () + | Some v -> blur_region_set_corner_radius_bry _res v); + (match alpha with + | None -> () + | Some v -> blur_region_set_alpha _res v); + (match left with + | None -> () + | Some v -> blur_region_set_left _res v); + (match top with + | None -> () + | Some v -> blur_region_set_top _res v); + (match right with + | None -> () + | Some v -> blur_region_set_right _res v); + (match bottom with + | None -> () + | Some v -> blur_region_set_bottom _res v); + _res + + +let[@inline] color_transform_proto_set_val_ (self:color_transform_proto) (x:float list) : unit = + self.val_ <- x + +let copy_color_transform_proto (self:color_transform_proto) : color_transform_proto = + { self with val_ = self.val_ } + +let make_color_transform_proto + ?(val_=[]) + () : color_transform_proto = + let _res = default_color_transform_proto () in + color_transform_proto_set_val_ _res val_; + _res + +let[@inline] box_shadow_settings_box_shadow_params_has_blur_radius (self:box_shadow_settings_box_shadow_params) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] box_shadow_settings_box_shadow_params_has_spread_radius (self:box_shadow_settings_box_shadow_params) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] box_shadow_settings_box_shadow_params_has_color (self:box_shadow_settings_box_shadow_params) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] box_shadow_settings_box_shadow_params_has_offset_x (self:box_shadow_settings_box_shadow_params) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] box_shadow_settings_box_shadow_params_has_offset_y (self:box_shadow_settings_box_shadow_params) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] box_shadow_settings_box_shadow_params_set_blur_radius (self:box_shadow_settings_box_shadow_params) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.blur_radius <- x +let[@inline] box_shadow_settings_box_shadow_params_set_spread_radius (self:box_shadow_settings_box_shadow_params) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.spread_radius <- x +let[@inline] box_shadow_settings_box_shadow_params_set_color (self:box_shadow_settings_box_shadow_params) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.color <- x +let[@inline] box_shadow_settings_box_shadow_params_set_offset_x (self:box_shadow_settings_box_shadow_params) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.offset_x <- x +let[@inline] box_shadow_settings_box_shadow_params_set_offset_y (self:box_shadow_settings_box_shadow_params) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.offset_y <- x + +let copy_box_shadow_settings_box_shadow_params (self:box_shadow_settings_box_shadow_params) : box_shadow_settings_box_shadow_params = + { self with blur_radius = self.blur_radius } + +let make_box_shadow_settings_box_shadow_params + ?(blur_radius:float option) + ?(spread_radius:float option) + ?(color:int32 option) + ?(offset_x:float option) + ?(offset_y:float option) + () : box_shadow_settings_box_shadow_params = + let _res = default_box_shadow_settings_box_shadow_params () in + (match blur_radius with + | None -> () + | Some v -> box_shadow_settings_box_shadow_params_set_blur_radius _res v); + (match spread_radius with + | None -> () + | Some v -> box_shadow_settings_box_shadow_params_set_spread_radius _res v); + (match color with + | None -> () + | Some v -> box_shadow_settings_box_shadow_params_set_color _res v); + (match offset_x with + | None -> () + | Some v -> box_shadow_settings_box_shadow_params_set_offset_x _res v); + (match offset_y with + | None -> () + | Some v -> box_shadow_settings_box_shadow_params_set_offset_y _res v); + _res + + +let[@inline] box_shadow_settings_set_box_shadows (self:box_shadow_settings) (x:box_shadow_settings_box_shadow_params list) : unit = + self.box_shadows <- x + +let copy_box_shadow_settings (self:box_shadow_settings) : box_shadow_settings = + { self with box_shadows = self.box_shadows } + +let make_box_shadow_settings + ?(box_shadows=[]) + () : box_shadow_settings = + let _res = default_box_shadow_settings () in + box_shadow_settings_set_box_shadows _res box_shadows; + _res + +let[@inline] border_settings_has_stroke_width (self:border_settings) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] border_settings_has_color (self:border_settings) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] border_settings_set_stroke_width (self:border_settings) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.stroke_width <- x +let[@inline] border_settings_set_color (self:border_settings) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.color <- x + +let copy_border_settings (self:border_settings) : border_settings = + { self with stroke_width = self.stroke_width } + +let make_border_settings + ?(stroke_width:float option) + ?(color:int32 option) + () : border_settings = + let _res = default_border_settings () in + (match stroke_width with + | None -> () + | Some v -> border_settings_set_stroke_width _res v); + (match color with + | None -> () + | Some v -> border_settings_set_color _res v); + _res + +let[@inline] position_proto_has_x (self:position_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] position_proto_has_y (self:position_proto) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] position_proto_set_x (self:position_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.x <- x +let[@inline] position_proto_set_y (self:position_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.y <- x + +let copy_position_proto (self:position_proto) : position_proto = + { self with x = self.x } + +let make_position_proto + ?(x:float option) + ?(y:float option) + () : position_proto = + let _res = default_position_proto () in + (match x with + | None -> () + | Some v -> position_proto_set_x _res v); + (match y with + | None -> () + | Some v -> position_proto_set_y _res v); + _res + +let[@inline] active_buffer_proto_has_width (self:active_buffer_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] active_buffer_proto_has_height (self:active_buffer_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] active_buffer_proto_has_stride (self:active_buffer_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] active_buffer_proto_has_format (self:active_buffer_proto) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] active_buffer_proto_has_usage (self:active_buffer_proto) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] active_buffer_proto_set_width (self:active_buffer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.width <- x +let[@inline] active_buffer_proto_set_height (self:active_buffer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.height <- x +let[@inline] active_buffer_proto_set_stride (self:active_buffer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.stride <- x +let[@inline] active_buffer_proto_set_format (self:active_buffer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.format <- x +let[@inline] active_buffer_proto_set_usage (self:active_buffer_proto) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.usage <- x + +let copy_active_buffer_proto (self:active_buffer_proto) : active_buffer_proto = + { self with width = self.width } + +let make_active_buffer_proto + ?(width:int32 option) + ?(height:int32 option) + ?(stride:int32 option) + ?(format:int32 option) + ?(usage:int64 option) + () : active_buffer_proto = + let _res = default_active_buffer_proto () in + (match width with + | None -> () + | Some v -> active_buffer_proto_set_width _res v); + (match height with + | None -> () + | Some v -> active_buffer_proto_set_height _res v); + (match stride with + | None -> () + | Some v -> active_buffer_proto_set_stride _res v); + (match format with + | None -> () + | Some v -> active_buffer_proto_set_format _res v); + (match usage with + | None -> () + | Some v -> active_buffer_proto_set_usage _res v); + _res + +let[@inline] float_rect_proto_has_left (self:float_rect_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] float_rect_proto_has_top (self:float_rect_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] float_rect_proto_has_right (self:float_rect_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] float_rect_proto_has_bottom (self:float_rect_proto) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] float_rect_proto_set_left (self:float_rect_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.left <- x +let[@inline] float_rect_proto_set_top (self:float_rect_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.top <- x +let[@inline] float_rect_proto_set_right (self:float_rect_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.right <- x +let[@inline] float_rect_proto_set_bottom (self:float_rect_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.bottom <- x + +let copy_float_rect_proto (self:float_rect_proto) : float_rect_proto = + { self with left = self.left } + +let make_float_rect_proto + ?(left:float option) + ?(top:float option) + ?(right:float option) + ?(bottom:float option) + () : float_rect_proto = + let _res = default_float_rect_proto () in + (match left with + | None -> () + | Some v -> float_rect_proto_set_left _res v); + (match top with + | None -> () + | Some v -> float_rect_proto_set_top _res v); + (match right with + | None -> () + | Some v -> float_rect_proto_set_right _res v); + (match bottom with + | None -> () + | Some v -> float_rect_proto_set_bottom _res v); + _res + +let[@inline] barrier_layer_proto_has_id (self:barrier_layer_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] barrier_layer_proto_has_frame_number (self:barrier_layer_proto) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] barrier_layer_proto_set_id (self:barrier_layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] barrier_layer_proto_set_frame_number (self:barrier_layer_proto) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.frame_number <- x + +let copy_barrier_layer_proto (self:barrier_layer_proto) : barrier_layer_proto = + { self with id = self.id } + +let make_barrier_layer_proto + ?(id:int32 option) + ?(frame_number:int64 option) + () : barrier_layer_proto = + let _res = default_barrier_layer_proto () in + (match id with + | None -> () + | Some v -> barrier_layer_proto_set_id _res v); + (match frame_number with + | None -> () + | Some v -> barrier_layer_proto_set_frame_number _res v); + _res + +let[@inline] corner_radii_proto_has_tl (self:corner_radii_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] corner_radii_proto_has_tr (self:corner_radii_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] corner_radii_proto_has_bl (self:corner_radii_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] corner_radii_proto_has_br (self:corner_radii_proto) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] corner_radii_proto_set_tl (self:corner_radii_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.tl <- x +let[@inline] corner_radii_proto_set_tr (self:corner_radii_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tr <- x +let[@inline] corner_radii_proto_set_bl (self:corner_radii_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.bl <- x +let[@inline] corner_radii_proto_set_br (self:corner_radii_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.br <- x + +let copy_corner_radii_proto (self:corner_radii_proto) : corner_radii_proto = + { self with tl = self.tl } + +let make_corner_radii_proto + ?(tl:float option) + ?(tr:float option) + ?(bl:float option) + ?(br:float option) + () : corner_radii_proto = + let _res = default_corner_radii_proto () in + (match tl with + | None -> () + | Some v -> corner_radii_proto_set_tl _res v); + (match tr with + | None -> () + | Some v -> corner_radii_proto_set_tr _res v); + (match bl with + | None -> () + | Some v -> corner_radii_proto_set_bl _res v); + (match br with + | None -> () + | Some v -> corner_radii_proto_set_br _res v); + _res + +let[@inline] layer_proto_has_id (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layer_proto_has_name (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layer_proto_has_type_ (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] layer_proto_has_layer_stack (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] layer_proto_has_z (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] layer_proto_has_is_opaque (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] layer_proto_has_invalidate (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] layer_proto_has_dataspace (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] layer_proto_has_pixel_format (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] layer_proto_has_flags (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] layer_proto_has_parent (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] layer_proto_has_z_order_relative_of (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] layer_proto_has_queued_frames (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] layer_proto_has_refresh_pending (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] layer_proto_has_hwc_transform (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] layer_proto_has_window_type (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] layer_proto_has_app_id (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 16) +let[@inline] layer_proto_has_hwc_composition_type (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 17) +let[@inline] layer_proto_has_is_protected (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 18) +let[@inline] layer_proto_has_curr_frame (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 19) +let[@inline] layer_proto_has_effective_scaling_mode (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 20) +let[@inline] layer_proto_has_corner_radius (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 21) +let[@inline] layer_proto_has_shadow_radius (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 22) +let[@inline] layer_proto_has_is_relative_of (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 23) +let[@inline] layer_proto_has_background_blur_radius (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 24) +let[@inline] layer_proto_has_owner_uid (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 25) +let[@inline] layer_proto_has_is_trusted_overlay (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 26) +let[@inline] layer_proto_has_requested_corner_radius (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 27) +let[@inline] layer_proto_has_original_id (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 28) +let[@inline] layer_proto_has_trusted_overlay (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 29) +let[@inline] layer_proto_has_background_blur_scale (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 30) +let[@inline] layer_proto_has_system_content_priority (self:layer_proto) : bool = (Pbrt.Bitfield.get self._presence 31) + +let[@inline] layer_proto_set_id (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] layer_proto_set_name (self:layer_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x +let[@inline] layer_proto_set_children (self:layer_proto) (x:int32 list) : unit = + self.children <- x +let[@inline] layer_proto_set_relatives (self:layer_proto) (x:int32 list) : unit = + self.relatives <- x +let[@inline] layer_proto_set_type_ (self:layer_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.type_ <- x +let[@inline] layer_proto_set_transparent_region (self:layer_proto) (x:region_proto) : unit = + self.transparent_region <- Some x +let[@inline] layer_proto_set_visible_region (self:layer_proto) (x:region_proto) : unit = + self.visible_region <- Some x +let[@inline] layer_proto_set_damage_region (self:layer_proto) (x:region_proto) : unit = + self.damage_region <- Some x +let[@inline] layer_proto_set_layer_stack (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.layer_stack <- x +let[@inline] layer_proto_set_z (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.z <- x +let[@inline] layer_proto_set_position (self:layer_proto) (x:position_proto) : unit = + self.position <- Some x +let[@inline] layer_proto_set_requested_position (self:layer_proto) (x:position_proto) : unit = + self.requested_position <- Some x +let[@inline] layer_proto_set_size (self:layer_proto) (x:size_proto) : unit = + self.size <- Some x +let[@inline] layer_proto_set_crop (self:layer_proto) (x:rect_proto) : unit = + self.crop <- Some x +let[@inline] layer_proto_set_final_crop (self:layer_proto) (x:rect_proto) : unit = + self.final_crop <- Some x +let[@inline] layer_proto_set_is_opaque (self:layer_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.is_opaque <- x +let[@inline] layer_proto_set_invalidate (self:layer_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.invalidate <- x +let[@inline] layer_proto_set_dataspace (self:layer_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.dataspace <- x +let[@inline] layer_proto_set_pixel_format (self:layer_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.pixel_format <- x +let[@inline] layer_proto_set_color (self:layer_proto) (x:color_proto) : unit = + self.color <- Some x +let[@inline] layer_proto_set_requested_color (self:layer_proto) (x:color_proto) : unit = + self.requested_color <- Some x +let[@inline] layer_proto_set_flags (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.flags <- x +let[@inline] layer_proto_set_transform (self:layer_proto) (x:transform_proto) : unit = + self.transform <- Some x +let[@inline] layer_proto_set_requested_transform (self:layer_proto) (x:transform_proto) : unit = + self.requested_transform <- Some x +let[@inline] layer_proto_set_parent (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.parent <- x +let[@inline] layer_proto_set_z_order_relative_of (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.z_order_relative_of <- x +let[@inline] layer_proto_set_active_buffer (self:layer_proto) (x:active_buffer_proto) : unit = + self.active_buffer <- Some x +let[@inline] layer_proto_set_queued_frames (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.queued_frames <- x +let[@inline] layer_proto_set_refresh_pending (self:layer_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.refresh_pending <- x +let[@inline] layer_proto_set_hwc_frame (self:layer_proto) (x:rect_proto) : unit = + self.hwc_frame <- Some x +let[@inline] layer_proto_set_hwc_crop (self:layer_proto) (x:float_rect_proto) : unit = + self.hwc_crop <- Some x +let[@inline] layer_proto_set_hwc_transform (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.hwc_transform <- x +let[@inline] layer_proto_set_window_type (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.window_type <- x +let[@inline] layer_proto_set_app_id (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.app_id <- x +let[@inline] layer_proto_set_hwc_composition_type (self:layer_proto) (x:hwc_composition_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 17); self.hwc_composition_type <- x +let[@inline] layer_proto_set_is_protected (self:layer_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 18); self.is_protected <- x +let[@inline] layer_proto_set_curr_frame (self:layer_proto) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 19); self.curr_frame <- x +let[@inline] layer_proto_set_barrier_layer (self:layer_proto) (x:barrier_layer_proto list) : unit = + self.barrier_layer <- x +let[@inline] layer_proto_set_buffer_transform (self:layer_proto) (x:transform_proto) : unit = + self.buffer_transform <- Some x +let[@inline] layer_proto_set_effective_scaling_mode (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 20); self.effective_scaling_mode <- x +let[@inline] layer_proto_set_corner_radius (self:layer_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 21); self.corner_radius <- x +let[@inline] layer_proto_set_metadata (self:layer_proto) (x:(int32 * string) list) : unit = + self.metadata <- x +let[@inline] layer_proto_set_effective_transform (self:layer_proto) (x:transform_proto) : unit = + self.effective_transform <- Some x +let[@inline] layer_proto_set_source_bounds (self:layer_proto) (x:float_rect_proto) : unit = + self.source_bounds <- Some x +let[@inline] layer_proto_set_bounds (self:layer_proto) (x:float_rect_proto) : unit = + self.bounds <- Some x +let[@inline] layer_proto_set_screen_bounds (self:layer_proto) (x:float_rect_proto) : unit = + self.screen_bounds <- Some x +let[@inline] layer_proto_set_input_window_info (self:layer_proto) (x:input_window_info_proto) : unit = + self.input_window_info <- Some x +let[@inline] layer_proto_set_corner_radius_crop (self:layer_proto) (x:float_rect_proto) : unit = + self.corner_radius_crop <- Some x +let[@inline] layer_proto_set_shadow_radius (self:layer_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 22); self.shadow_radius <- x +let[@inline] layer_proto_set_color_transform (self:layer_proto) (x:color_transform_proto) : unit = + self.color_transform <- Some x +let[@inline] layer_proto_set_is_relative_of (self:layer_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 23); self.is_relative_of <- x +let[@inline] layer_proto_set_background_blur_radius (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 24); self.background_blur_radius <- x +let[@inline] layer_proto_set_owner_uid (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 25); self.owner_uid <- x +let[@inline] layer_proto_set_blur_regions (self:layer_proto) (x:blur_region list) : unit = + self.blur_regions <- x +let[@inline] layer_proto_set_is_trusted_overlay (self:layer_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 26); self.is_trusted_overlay <- x +let[@inline] layer_proto_set_requested_corner_radius (self:layer_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 27); self.requested_corner_radius <- x +let[@inline] layer_proto_set_destination_frame (self:layer_proto) (x:rect_proto) : unit = + self.destination_frame <- Some x +let[@inline] layer_proto_set_original_id (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 28); self.original_id <- x +let[@inline] layer_proto_set_trusted_overlay (self:layer_proto) (x:trusted_overlay) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 29); self.trusted_overlay <- x +let[@inline] layer_proto_set_background_blur_scale (self:layer_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 30); self.background_blur_scale <- x +let[@inline] layer_proto_set_corner_radii (self:layer_proto) (x:corner_radii_proto) : unit = + self.corner_radii <- Some x +let[@inline] layer_proto_set_requested_corner_radii (self:layer_proto) (x:corner_radii_proto) : unit = + self.requested_corner_radii <- Some x +let[@inline] layer_proto_set_client_drawn_corner_radii (self:layer_proto) (x:corner_radii_proto) : unit = + self.client_drawn_corner_radii <- Some x +let[@inline] layer_proto_set_system_content_priority (self:layer_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 31); self.system_content_priority <- x +let[@inline] layer_proto_set_box_shadow_settings (self:layer_proto) (x:box_shadow_settings) : unit = + self.box_shadow_settings <- Some x +let[@inline] layer_proto_set_border_settings (self:layer_proto) (x:border_settings) : unit = + self.border_settings <- Some x +let[@inline] layer_proto_set_effective_radii (self:layer_proto) (x:corner_radii_proto) : unit = + self.effective_radii <- Some x + +let copy_layer_proto (self:layer_proto) : layer_proto = + { self with id = self.id } + +let make_layer_proto + ?(id:int32 option) + ?(name:string option) + ?(children=[]) + ?(relatives=[]) + ?(type_:string option) + ?(transparent_region:region_proto option) + ?(visible_region:region_proto option) + ?(damage_region:region_proto option) + ?(layer_stack:int32 option) + ?(z:int32 option) + ?(position:position_proto option) + ?(requested_position:position_proto option) + ?(size:size_proto option) + ?(crop:rect_proto option) + ?(final_crop:rect_proto option) + ?(is_opaque:bool option) + ?(invalidate:bool option) + ?(dataspace:string option) + ?(pixel_format:string option) + ?(color:color_proto option) + ?(requested_color:color_proto option) + ?(flags:int32 option) + ?(transform:transform_proto option) + ?(requested_transform:transform_proto option) + ?(parent:int32 option) + ?(z_order_relative_of:int32 option) + ?(active_buffer:active_buffer_proto option) + ?(queued_frames:int32 option) + ?(refresh_pending:bool option) + ?(hwc_frame:rect_proto option) + ?(hwc_crop:float_rect_proto option) + ?(hwc_transform:int32 option) + ?(window_type:int32 option) + ?(app_id:int32 option) + ?(hwc_composition_type:hwc_composition_type option) + ?(is_protected:bool option) + ?(curr_frame:int64 option) + ?(barrier_layer=[]) + ?(buffer_transform:transform_proto option) + ?(effective_scaling_mode:int32 option) + ?(corner_radius:float option) + ?(metadata=[]) + ?(effective_transform:transform_proto option) + ?(source_bounds:float_rect_proto option) + ?(bounds:float_rect_proto option) + ?(screen_bounds:float_rect_proto option) + ?(input_window_info:input_window_info_proto option) + ?(corner_radius_crop:float_rect_proto option) + ?(shadow_radius:float option) + ?(color_transform:color_transform_proto option) + ?(is_relative_of:bool option) + ?(background_blur_radius:int32 option) + ?(owner_uid:int32 option) + ?(blur_regions=[]) + ?(is_trusted_overlay:bool option) + ?(requested_corner_radius:float option) + ?(destination_frame:rect_proto option) + ?(original_id:int32 option) + ?(trusted_overlay:trusted_overlay option) + ?(background_blur_scale:float option) + ?(corner_radii:corner_radii_proto option) + ?(requested_corner_radii:corner_radii_proto option) + ?(client_drawn_corner_radii:corner_radii_proto option) + ?(system_content_priority:int32 option) + ?(box_shadow_settings:box_shadow_settings option) + ?(border_settings:border_settings option) + ?(effective_radii:corner_radii_proto option) + () : layer_proto = + let _res = default_layer_proto () in + (match id with + | None -> () + | Some v -> layer_proto_set_id _res v); + (match name with + | None -> () + | Some v -> layer_proto_set_name _res v); + layer_proto_set_children _res children; + layer_proto_set_relatives _res relatives; + (match type_ with + | None -> () + | Some v -> layer_proto_set_type_ _res v); + (match transparent_region with + | None -> () + | Some v -> layer_proto_set_transparent_region _res v); + (match visible_region with + | None -> () + | Some v -> layer_proto_set_visible_region _res v); + (match damage_region with + | None -> () + | Some v -> layer_proto_set_damage_region _res v); + (match layer_stack with + | None -> () + | Some v -> layer_proto_set_layer_stack _res v); + (match z with + | None -> () + | Some v -> layer_proto_set_z _res v); + (match position with + | None -> () + | Some v -> layer_proto_set_position _res v); + (match requested_position with + | None -> () + | Some v -> layer_proto_set_requested_position _res v); + (match size with + | None -> () + | Some v -> layer_proto_set_size _res v); + (match crop with + | None -> () + | Some v -> layer_proto_set_crop _res v); + (match final_crop with + | None -> () + | Some v -> layer_proto_set_final_crop _res v); + (match is_opaque with + | None -> () + | Some v -> layer_proto_set_is_opaque _res v); + (match invalidate with + | None -> () + | Some v -> layer_proto_set_invalidate _res v); + (match dataspace with + | None -> () + | Some v -> layer_proto_set_dataspace _res v); + (match pixel_format with + | None -> () + | Some v -> layer_proto_set_pixel_format _res v); + (match color with + | None -> () + | Some v -> layer_proto_set_color _res v); + (match requested_color with + | None -> () + | Some v -> layer_proto_set_requested_color _res v); + (match flags with + | None -> () + | Some v -> layer_proto_set_flags _res v); + (match transform with + | None -> () + | Some v -> layer_proto_set_transform _res v); + (match requested_transform with + | None -> () + | Some v -> layer_proto_set_requested_transform _res v); + (match parent with + | None -> () + | Some v -> layer_proto_set_parent _res v); + (match z_order_relative_of with + | None -> () + | Some v -> layer_proto_set_z_order_relative_of _res v); + (match active_buffer with + | None -> () + | Some v -> layer_proto_set_active_buffer _res v); + (match queued_frames with + | None -> () + | Some v -> layer_proto_set_queued_frames _res v); + (match refresh_pending with + | None -> () + | Some v -> layer_proto_set_refresh_pending _res v); + (match hwc_frame with + | None -> () + | Some v -> layer_proto_set_hwc_frame _res v); + (match hwc_crop with + | None -> () + | Some v -> layer_proto_set_hwc_crop _res v); + (match hwc_transform with + | None -> () + | Some v -> layer_proto_set_hwc_transform _res v); + (match window_type with + | None -> () + | Some v -> layer_proto_set_window_type _res v); + (match app_id with + | None -> () + | Some v -> layer_proto_set_app_id _res v); + (match hwc_composition_type with + | None -> () + | Some v -> layer_proto_set_hwc_composition_type _res v); + (match is_protected with + | None -> () + | Some v -> layer_proto_set_is_protected _res v); + (match curr_frame with + | None -> () + | Some v -> layer_proto_set_curr_frame _res v); + layer_proto_set_barrier_layer _res barrier_layer; + (match buffer_transform with + | None -> () + | Some v -> layer_proto_set_buffer_transform _res v); + (match effective_scaling_mode with + | None -> () + | Some v -> layer_proto_set_effective_scaling_mode _res v); + (match corner_radius with + | None -> () + | Some v -> layer_proto_set_corner_radius _res v); + layer_proto_set_metadata _res metadata; + (match effective_transform with + | None -> () + | Some v -> layer_proto_set_effective_transform _res v); + (match source_bounds with + | None -> () + | Some v -> layer_proto_set_source_bounds _res v); + (match bounds with + | None -> () + | Some v -> layer_proto_set_bounds _res v); + (match screen_bounds with + | None -> () + | Some v -> layer_proto_set_screen_bounds _res v); + (match input_window_info with + | None -> () + | Some v -> layer_proto_set_input_window_info _res v); + (match corner_radius_crop with + | None -> () + | Some v -> layer_proto_set_corner_radius_crop _res v); + (match shadow_radius with + | None -> () + | Some v -> layer_proto_set_shadow_radius _res v); + (match color_transform with + | None -> () + | Some v -> layer_proto_set_color_transform _res v); + (match is_relative_of with + | None -> () + | Some v -> layer_proto_set_is_relative_of _res v); + (match background_blur_radius with + | None -> () + | Some v -> layer_proto_set_background_blur_radius _res v); + (match owner_uid with + | None -> () + | Some v -> layer_proto_set_owner_uid _res v); + layer_proto_set_blur_regions _res blur_regions; + (match is_trusted_overlay with + | None -> () + | Some v -> layer_proto_set_is_trusted_overlay _res v); + (match requested_corner_radius with + | None -> () + | Some v -> layer_proto_set_requested_corner_radius _res v); + (match destination_frame with + | None -> () + | Some v -> layer_proto_set_destination_frame _res v); + (match original_id with + | None -> () + | Some v -> layer_proto_set_original_id _res v); + (match trusted_overlay with + | None -> () + | Some v -> layer_proto_set_trusted_overlay _res v); + (match background_blur_scale with + | None -> () + | Some v -> layer_proto_set_background_blur_scale _res v); + (match corner_radii with + | None -> () + | Some v -> layer_proto_set_corner_radii _res v); + (match requested_corner_radii with + | None -> () + | Some v -> layer_proto_set_requested_corner_radii _res v); + (match client_drawn_corner_radii with + | None -> () + | Some v -> layer_proto_set_client_drawn_corner_radii _res v); + (match system_content_priority with + | None -> () + | Some v -> layer_proto_set_system_content_priority _res v); + (match box_shadow_settings with + | None -> () + | Some v -> layer_proto_set_box_shadow_settings _res v); + (match border_settings with + | None -> () + | Some v -> layer_proto_set_border_settings _res v); + (match effective_radii with + | None -> () + | Some v -> layer_proto_set_effective_radii _res v); + _res + + +let[@inline] layers_proto_set_layers (self:layers_proto) (x:layer_proto list) : unit = + self.layers <- x + +let copy_layers_proto (self:layers_proto) : layers_proto = + { self with layers = self.layers } + +let make_layers_proto + ?(layers=[]) + () : layers_proto = + let _res = default_layers_proto () in + layers_proto_set_layers _res layers; + _res + +let[@inline] display_proto_has_id (self:display_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] display_proto_has_name (self:display_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] display_proto_has_layer_stack (self:display_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] display_proto_has_is_virtual (self:display_proto) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] display_proto_has_dpi_x (self:display_proto) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] display_proto_has_dpi_y (self:display_proto) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] display_proto_set_id (self:display_proto) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] display_proto_set_name (self:display_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x +let[@inline] display_proto_set_layer_stack (self:display_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.layer_stack <- x +let[@inline] display_proto_set_size (self:display_proto) (x:size_proto) : unit = + self.size <- Some x +let[@inline] display_proto_set_layer_stack_space_rect (self:display_proto) (x:rect_proto) : unit = + self.layer_stack_space_rect <- Some x +let[@inline] display_proto_set_transform (self:display_proto) (x:transform_proto) : unit = + self.transform <- Some x +let[@inline] display_proto_set_is_virtual (self:display_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.is_virtual <- x +let[@inline] display_proto_set_dpi_x (self:display_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.dpi_x <- x +let[@inline] display_proto_set_dpi_y (self:display_proto) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.dpi_y <- x + +let copy_display_proto (self:display_proto) : display_proto = + { self with id = self.id } + +let make_display_proto + ?(id:int64 option) + ?(name:string option) + ?(layer_stack:int32 option) + ?(size:size_proto option) + ?(layer_stack_space_rect:rect_proto option) + ?(transform:transform_proto option) + ?(is_virtual:bool option) + ?(dpi_x:float option) + ?(dpi_y:float option) + () : display_proto = + let _res = default_display_proto () in + (match id with + | None -> () + | Some v -> display_proto_set_id _res v); + (match name with + | None -> () + | Some v -> display_proto_set_name _res v); + (match layer_stack with + | None -> () + | Some v -> display_proto_set_layer_stack _res v); + (match size with + | None -> () + | Some v -> display_proto_set_size _res v); + (match layer_stack_space_rect with + | None -> () + | Some v -> display_proto_set_layer_stack_space_rect _res v); + (match transform with + | None -> () + | Some v -> display_proto_set_transform _res v); + (match is_virtual with + | None -> () + | Some v -> display_proto_set_is_virtual _res v); + (match dpi_x with + | None -> () + | Some v -> display_proto_set_dpi_x _res v); + (match dpi_y with + | None -> () + | Some v -> display_proto_set_dpi_y _res v); + _res + +let[@inline] layers_snapshot_proto_has_elapsed_realtime_nanos (self:layers_snapshot_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layers_snapshot_proto_has_where (self:layers_snapshot_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layers_snapshot_proto_has_hwc_blob (self:layers_snapshot_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] layers_snapshot_proto_has_excludes_composition_state (self:layers_snapshot_proto) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] layers_snapshot_proto_has_missed_entries (self:layers_snapshot_proto) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] layers_snapshot_proto_has_vsync_id (self:layers_snapshot_proto) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] layers_snapshot_proto_set_elapsed_realtime_nanos (self:layers_snapshot_proto) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.elapsed_realtime_nanos <- x +let[@inline] layers_snapshot_proto_set_where (self:layers_snapshot_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.where <- x +let[@inline] layers_snapshot_proto_set_layers (self:layers_snapshot_proto) (x:layers_proto) : unit = + self.layers <- Some x +let[@inline] layers_snapshot_proto_set_hwc_blob (self:layers_snapshot_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.hwc_blob <- x +let[@inline] layers_snapshot_proto_set_excludes_composition_state (self:layers_snapshot_proto) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.excludes_composition_state <- x +let[@inline] layers_snapshot_proto_set_missed_entries (self:layers_snapshot_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.missed_entries <- x +let[@inline] layers_snapshot_proto_set_displays (self:layers_snapshot_proto) (x:display_proto list) : unit = + self.displays <- x +let[@inline] layers_snapshot_proto_set_vsync_id (self:layers_snapshot_proto) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.vsync_id <- x + +let copy_layers_snapshot_proto (self:layers_snapshot_proto) : layers_snapshot_proto = + { self with elapsed_realtime_nanos = self.elapsed_realtime_nanos } + +let make_layers_snapshot_proto + ?(elapsed_realtime_nanos:int64 option) + ?(where:string option) + ?(layers:layers_proto option) + ?(hwc_blob:string option) + ?(excludes_composition_state:bool option) + ?(missed_entries:int32 option) + ?(displays=[]) + ?(vsync_id:int64 option) + () : layers_snapshot_proto = + let _res = default_layers_snapshot_proto () in + (match elapsed_realtime_nanos with + | None -> () + | Some v -> layers_snapshot_proto_set_elapsed_realtime_nanos _res v); + (match where with + | None -> () + | Some v -> layers_snapshot_proto_set_where _res v); + (match layers with + | None -> () + | Some v -> layers_snapshot_proto_set_layers _res v); + (match hwc_blob with + | None -> () + | Some v -> layers_snapshot_proto_set_hwc_blob _res v); + (match excludes_composition_state with + | None -> () + | Some v -> layers_snapshot_proto_set_excludes_composition_state _res v); + (match missed_entries with + | None -> () + | Some v -> layers_snapshot_proto_set_missed_entries _res v); + layers_snapshot_proto_set_displays _res displays; + (match vsync_id with + | None -> () + | Some v -> layers_snapshot_proto_set_vsync_id _res v); + _res + +let[@inline] layers_trace_file_proto_has_magic_number (self:layers_trace_file_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layers_trace_file_proto_has_real_to_elapsed_time_offset_nanos (self:layers_trace_file_proto) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] layers_trace_file_proto_set_magic_number (self:layers_trace_file_proto) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.magic_number <- x +let[@inline] layers_trace_file_proto_set_entry (self:layers_trace_file_proto) (x:layers_snapshot_proto list) : unit = + self.entry <- x +let[@inline] layers_trace_file_proto_set_real_to_elapsed_time_offset_nanos (self:layers_trace_file_proto) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.real_to_elapsed_time_offset_nanos <- x + +let copy_layers_trace_file_proto (self:layers_trace_file_proto) : layers_trace_file_proto = + { self with magic_number = self.magic_number } + +let make_layers_trace_file_proto + ?(magic_number:int64 option) + ?(entry=[]) + ?(real_to_elapsed_time_offset_nanos:int64 option) + () : layers_trace_file_proto = + let _res = default_layers_trace_file_proto () in + (match magic_number with + | None -> () + | Some v -> layers_trace_file_proto_set_magic_number _res v); + layers_trace_file_proto_set_entry _res entry; + (match real_to_elapsed_time_offset_nanos with + | None -> () + | Some v -> layers_trace_file_proto_set_real_to_elapsed_time_offset_nanos _res v); + _res + +let[@inline] layer_state_matrix22_has_dsdx (self:layer_state_matrix22) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layer_state_matrix22_has_dtdx (self:layer_state_matrix22) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layer_state_matrix22_has_dtdy (self:layer_state_matrix22) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] layer_state_matrix22_has_dsdy (self:layer_state_matrix22) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] layer_state_matrix22_set_dsdx (self:layer_state_matrix22) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.dsdx <- x +let[@inline] layer_state_matrix22_set_dtdx (self:layer_state_matrix22) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.dtdx <- x +let[@inline] layer_state_matrix22_set_dtdy (self:layer_state_matrix22) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.dtdy <- x +let[@inline] layer_state_matrix22_set_dsdy (self:layer_state_matrix22) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.dsdy <- x + +let copy_layer_state_matrix22 (self:layer_state_matrix22) : layer_state_matrix22 = + { self with dsdx = self.dsdx } + +let make_layer_state_matrix22 + ?(dsdx:float option) + ?(dtdx:float option) + ?(dtdy:float option) + ?(dsdy:float option) + () : layer_state_matrix22 = + let _res = default_layer_state_matrix22 () in + (match dsdx with + | None -> () + | Some v -> layer_state_matrix22_set_dsdx _res v); + (match dtdx with + | None -> () + | Some v -> layer_state_matrix22_set_dtdx _res v); + (match dtdy with + | None -> () + | Some v -> layer_state_matrix22_set_dtdy _res v); + (match dsdy with + | None -> () + | Some v -> layer_state_matrix22_set_dsdy _res v); + _res + +let[@inline] layer_state_color3_has_r (self:layer_state_color3) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layer_state_color3_has_g (self:layer_state_color3) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layer_state_color3_has_b (self:layer_state_color3) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] layer_state_color3_set_r (self:layer_state_color3) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.r <- x +let[@inline] layer_state_color3_set_g (self:layer_state_color3) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.g <- x +let[@inline] layer_state_color3_set_b (self:layer_state_color3) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.b <- x + +let copy_layer_state_color3 (self:layer_state_color3) : layer_state_color3 = + { self with r = self.r } + +let make_layer_state_color3 + ?(r:float option) + ?(g:float option) + ?(b:float option) + () : layer_state_color3 = + let _res = default_layer_state_color3 () in + (match r with + | None -> () + | Some v -> layer_state_color3_set_r _res v); + (match g with + | None -> () + | Some v -> layer_state_color3_set_g _res v); + (match b with + | None -> () + | Some v -> layer_state_color3_set_b _res v); + _res + +let[@inline] layer_state_buffer_data_has_buffer_id (self:layer_state_buffer_data) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layer_state_buffer_data_has_width (self:layer_state_buffer_data) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layer_state_buffer_data_has_height (self:layer_state_buffer_data) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] layer_state_buffer_data_has_frame_number (self:layer_state_buffer_data) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] layer_state_buffer_data_has_flags (self:layer_state_buffer_data) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] layer_state_buffer_data_has_cached_buffer_id (self:layer_state_buffer_data) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] layer_state_buffer_data_has_pixel_format (self:layer_state_buffer_data) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] layer_state_buffer_data_has_usage (self:layer_state_buffer_data) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] layer_state_buffer_data_set_buffer_id (self:layer_state_buffer_data) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.buffer_id <- x +let[@inline] layer_state_buffer_data_set_width (self:layer_state_buffer_data) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.width <- x +let[@inline] layer_state_buffer_data_set_height (self:layer_state_buffer_data) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.height <- x +let[@inline] layer_state_buffer_data_set_frame_number (self:layer_state_buffer_data) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.frame_number <- x +let[@inline] layer_state_buffer_data_set_flags (self:layer_state_buffer_data) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.flags <- x +let[@inline] layer_state_buffer_data_set_cached_buffer_id (self:layer_state_buffer_data) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.cached_buffer_id <- x +let[@inline] layer_state_buffer_data_set_pixel_format (self:layer_state_buffer_data) (x:layer_state_buffer_data_pixel_format) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.pixel_format <- x +let[@inline] layer_state_buffer_data_set_usage (self:layer_state_buffer_data) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.usage <- x + +let copy_layer_state_buffer_data (self:layer_state_buffer_data) : layer_state_buffer_data = + { self with buffer_id = self.buffer_id } + +let make_layer_state_buffer_data + ?(buffer_id:int64 option) + ?(width:int32 option) + ?(height:int32 option) + ?(frame_number:int64 option) + ?(flags:int32 option) + ?(cached_buffer_id:int64 option) + ?(pixel_format:layer_state_buffer_data_pixel_format option) + ?(usage:int64 option) + () : layer_state_buffer_data = + let _res = default_layer_state_buffer_data () in + (match buffer_id with + | None -> () + | Some v -> layer_state_buffer_data_set_buffer_id _res v); + (match width with + | None -> () + | Some v -> layer_state_buffer_data_set_width _res v); + (match height with + | None -> () + | Some v -> layer_state_buffer_data_set_height _res v); + (match frame_number with + | None -> () + | Some v -> layer_state_buffer_data_set_frame_number _res v); + (match flags with + | None -> () + | Some v -> layer_state_buffer_data_set_flags _res v); + (match cached_buffer_id with + | None -> () + | Some v -> layer_state_buffer_data_set_cached_buffer_id _res v); + (match pixel_format with + | None -> () + | Some v -> layer_state_buffer_data_set_pixel_format _res v); + (match usage with + | None -> () + | Some v -> layer_state_buffer_data_set_usage _res v); + _res + +let[@inline] transform_has_dsdx (self:transform) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] transform_has_dtdx (self:transform) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] transform_has_dtdy (self:transform) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] transform_has_dsdy (self:transform) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] transform_has_tx (self:transform) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] transform_has_ty (self:transform) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] transform_set_dsdx (self:transform) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.dsdx <- x +let[@inline] transform_set_dtdx (self:transform) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.dtdx <- x +let[@inline] transform_set_dtdy (self:transform) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.dtdy <- x +let[@inline] transform_set_dsdy (self:transform) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.dsdy <- x +let[@inline] transform_set_tx (self:transform) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.tx <- x +let[@inline] transform_set_ty (self:transform) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.ty <- x + +let copy_transform (self:transform) : transform = + { self with dsdx = self.dsdx } + +let make_transform + ?(dsdx:float option) + ?(dtdx:float option) + ?(dtdy:float option) + ?(dsdy:float option) + ?(tx:float option) + ?(ty:float option) + () : transform = + let _res = default_transform () in + (match dsdx with + | None -> () + | Some v -> transform_set_dsdx _res v); + (match dtdx with + | None -> () + | Some v -> transform_set_dtdx _res v); + (match dtdy with + | None -> () + | Some v -> transform_set_dtdy _res v); + (match dsdy with + | None -> () + | Some v -> transform_set_dsdy _res v); + (match tx with + | None -> () + | Some v -> transform_set_tx _res v); + (match ty with + | None -> () + | Some v -> transform_set_ty _res v); + _res + +let[@inline] layer_state_window_info_has_layout_params_flags (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layer_state_window_info_has_layout_params_type (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layer_state_window_info_has_surface_inset (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] layer_state_window_info_has_focusable (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] layer_state_window_info_has_has_wallpaper (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] layer_state_window_info_has_global_scale_factor (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] layer_state_window_info_has_crop_layer_id (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] layer_state_window_info_has_replace_touchable_region_with_crop (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] layer_state_window_info_has_input_config (self:layer_state_window_info) : bool = (Pbrt.Bitfield.get self._presence 8) + +let[@inline] layer_state_window_info_set_layout_params_flags (self:layer_state_window_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.layout_params_flags <- x +let[@inline] layer_state_window_info_set_layout_params_type (self:layer_state_window_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.layout_params_type <- x +let[@inline] layer_state_window_info_set_touchable_region (self:layer_state_window_info) (x:region_proto) : unit = + self.touchable_region <- Some x +let[@inline] layer_state_window_info_set_surface_inset (self:layer_state_window_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.surface_inset <- x +let[@inline] layer_state_window_info_set_focusable (self:layer_state_window_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.focusable <- x +let[@inline] layer_state_window_info_set_has_wallpaper (self:layer_state_window_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.has_wallpaper <- x +let[@inline] layer_state_window_info_set_global_scale_factor (self:layer_state_window_info) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.global_scale_factor <- x +let[@inline] layer_state_window_info_set_crop_layer_id (self:layer_state_window_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.crop_layer_id <- x +let[@inline] layer_state_window_info_set_replace_touchable_region_with_crop (self:layer_state_window_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.replace_touchable_region_with_crop <- x +let[@inline] layer_state_window_info_set_touchable_region_crop (self:layer_state_window_info) (x:rect_proto) : unit = + self.touchable_region_crop <- Some x +let[@inline] layer_state_window_info_set_transform (self:layer_state_window_info) (x:transform) : unit = + self.transform <- Some x +let[@inline] layer_state_window_info_set_input_config (self:layer_state_window_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.input_config <- x + +let copy_layer_state_window_info (self:layer_state_window_info) : layer_state_window_info = + { self with layout_params_flags = self.layout_params_flags } + +let make_layer_state_window_info + ?(layout_params_flags:int32 option) + ?(layout_params_type:int32 option) + ?(touchable_region:region_proto option) + ?(surface_inset:int32 option) + ?(focusable:bool option) + ?(has_wallpaper:bool option) + ?(global_scale_factor:float option) + ?(crop_layer_id:int32 option) + ?(replace_touchable_region_with_crop:bool option) + ?(touchable_region_crop:rect_proto option) + ?(transform:transform option) + ?(input_config:int32 option) + () : layer_state_window_info = + let _res = default_layer_state_window_info () in + (match layout_params_flags with + | None -> () + | Some v -> layer_state_window_info_set_layout_params_flags _res v); + (match layout_params_type with + | None -> () + | Some v -> layer_state_window_info_set_layout_params_type _res v); + (match touchable_region with + | None -> () + | Some v -> layer_state_window_info_set_touchable_region _res v); + (match surface_inset with + | None -> () + | Some v -> layer_state_window_info_set_surface_inset _res v); + (match focusable with + | None -> () + | Some v -> layer_state_window_info_set_focusable _res v); + (match has_wallpaper with + | None -> () + | Some v -> layer_state_window_info_set_has_wallpaper _res v); + (match global_scale_factor with + | None -> () + | Some v -> layer_state_window_info_set_global_scale_factor _res v); + (match crop_layer_id with + | None -> () + | Some v -> layer_state_window_info_set_crop_layer_id _res v); + (match replace_touchable_region_with_crop with + | None -> () + | Some v -> layer_state_window_info_set_replace_touchable_region_with_crop _res v); + (match touchable_region_crop with + | None -> () + | Some v -> layer_state_window_info_set_touchable_region_crop _res v); + (match transform with + | None -> () + | Some v -> layer_state_window_info_set_transform _res v); + (match input_config with + | None -> () + | Some v -> layer_state_window_info_set_input_config _res v); + _res + +let[@inline] layer_state_corner_radii_has_tl (self:layer_state_corner_radii) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layer_state_corner_radii_has_tr (self:layer_state_corner_radii) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layer_state_corner_radii_has_bl (self:layer_state_corner_radii) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] layer_state_corner_radii_has_br (self:layer_state_corner_radii) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] layer_state_corner_radii_set_tl (self:layer_state_corner_radii) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.tl <- x +let[@inline] layer_state_corner_radii_set_tr (self:layer_state_corner_radii) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tr <- x +let[@inline] layer_state_corner_radii_set_bl (self:layer_state_corner_radii) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.bl <- x +let[@inline] layer_state_corner_radii_set_br (self:layer_state_corner_radii) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.br <- x + +let copy_layer_state_corner_radii (self:layer_state_corner_radii) : layer_state_corner_radii = + { self with tl = self.tl } + +let make_layer_state_corner_radii + ?(tl:float option) + ?(tr:float option) + ?(bl:float option) + ?(br:float option) + () : layer_state_corner_radii = + let _res = default_layer_state_corner_radii () in + (match tl with + | None -> () + | Some v -> layer_state_corner_radii_set_tl _res v); + (match tr with + | None -> () + | Some v -> layer_state_corner_radii_set_tr _res v); + (match bl with + | None -> () + | Some v -> layer_state_corner_radii_set_bl _res v); + (match br with + | None -> () + | Some v -> layer_state_corner_radii_set_br _res v); + _res + +let[@inline] layer_state_has_layer_id (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layer_state_has_what (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layer_state_has_x (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] layer_state_has_y (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] layer_state_has_z (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] layer_state_has_w (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] layer_state_has_h (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] layer_state_has_layer_stack (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] layer_state_has_flags (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] layer_state_has_mask (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] layer_state_has_corner_radius (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] layer_state_has_background_blur_radius (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] layer_state_has_parent_id (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] layer_state_has_relative_parent_id (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] layer_state_has_alpha (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] layer_state_has_transform (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] layer_state_has_transform_to_display_inverse (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 16) +let[@inline] layer_state_has_api (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 17) +let[@inline] layer_state_has_has_sideband_stream (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 18) +let[@inline] layer_state_has_bg_color_alpha (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 19) +let[@inline] layer_state_has_bg_color_dataspace (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 20) +let[@inline] layer_state_has_color_space_agnostic (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 21) +let[@inline] layer_state_has_shadow_radius (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 22) +let[@inline] layer_state_has_frame_rate_selection_priority (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 23) +let[@inline] layer_state_has_frame_rate (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 24) +let[@inline] layer_state_has_frame_rate_compatibility (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 25) +let[@inline] layer_state_has_change_frame_rate_strategy (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 26) +let[@inline] layer_state_has_fixed_transform_hint (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 27) +let[@inline] layer_state_has_frame_number (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 28) +let[@inline] layer_state_has_auto_refresh (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 29) +let[@inline] layer_state_has_is_trusted_overlay (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 30) +let[@inline] layer_state_has_drop_input_mode (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 31) +let[@inline] layer_state_has_trusted_overlay (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 32) +let[@inline] layer_state_has_background_blur_scale (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 33) +let[@inline] layer_state_has_system_content_priority (self:layer_state) : bool = (Pbrt.Bitfield.get self._presence 34) + +let[@inline] layer_state_set_layer_id (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.layer_id <- x +let[@inline] layer_state_set_what (self:layer_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.what <- x +let[@inline] layer_state_set_x (self:layer_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.x <- x +let[@inline] layer_state_set_y (self:layer_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.y <- x +let[@inline] layer_state_set_z (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.z <- x +let[@inline] layer_state_set_w (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.w <- x +let[@inline] layer_state_set_h (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.h <- x +let[@inline] layer_state_set_layer_stack (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.layer_stack <- x +let[@inline] layer_state_set_flags (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.flags <- x +let[@inline] layer_state_set_mask (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.mask <- x +let[@inline] layer_state_set_matrix (self:layer_state) (x:layer_state_matrix22) : unit = + self.matrix <- Some x +let[@inline] layer_state_set_corner_radius (self:layer_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.corner_radius <- x +let[@inline] layer_state_set_background_blur_radius (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.background_blur_radius <- x +let[@inline] layer_state_set_parent_id (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.parent_id <- x +let[@inline] layer_state_set_relative_parent_id (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.relative_parent_id <- x +let[@inline] layer_state_set_alpha (self:layer_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.alpha <- x +let[@inline] layer_state_set_color (self:layer_state) (x:layer_state_color3) : unit = + self.color <- Some x +let[@inline] layer_state_set_transparent_region (self:layer_state) (x:region_proto) : unit = + self.transparent_region <- Some x +let[@inline] layer_state_set_transform (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.transform <- x +let[@inline] layer_state_set_transform_to_display_inverse (self:layer_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.transform_to_display_inverse <- x +let[@inline] layer_state_set_crop (self:layer_state) (x:rect_proto) : unit = + self.crop <- Some x +let[@inline] layer_state_set_buffer_data (self:layer_state) (x:layer_state_buffer_data) : unit = + self.buffer_data <- Some x +let[@inline] layer_state_set_api (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 17); self.api <- x +let[@inline] layer_state_set_has_sideband_stream (self:layer_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 18); self.has_sideband_stream <- x +let[@inline] layer_state_set_color_transform (self:layer_state) (x:color_transform_proto) : unit = + self.color_transform <- Some x +let[@inline] layer_state_set_blur_regions (self:layer_state) (x:blur_region list) : unit = + self.blur_regions <- x +let[@inline] layer_state_set_window_info_handle (self:layer_state) (x:layer_state_window_info) : unit = + self.window_info_handle <- Some x +let[@inline] layer_state_set_bg_color_alpha (self:layer_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 19); self.bg_color_alpha <- x +let[@inline] layer_state_set_bg_color_dataspace (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 20); self.bg_color_dataspace <- x +let[@inline] layer_state_set_color_space_agnostic (self:layer_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 21); self.color_space_agnostic <- x +let[@inline] layer_state_set_shadow_radius (self:layer_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 22); self.shadow_radius <- x +let[@inline] layer_state_set_frame_rate_selection_priority (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 23); self.frame_rate_selection_priority <- x +let[@inline] layer_state_set_frame_rate (self:layer_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 24); self.frame_rate <- x +let[@inline] layer_state_set_frame_rate_compatibility (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 25); self.frame_rate_compatibility <- x +let[@inline] layer_state_set_change_frame_rate_strategy (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 26); self.change_frame_rate_strategy <- x +let[@inline] layer_state_set_fixed_transform_hint (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 27); self.fixed_transform_hint <- x +let[@inline] layer_state_set_frame_number (self:layer_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 28); self.frame_number <- x +let[@inline] layer_state_set_auto_refresh (self:layer_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 29); self.auto_refresh <- x +let[@inline] layer_state_set_is_trusted_overlay (self:layer_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 30); self.is_trusted_overlay <- x +let[@inline] layer_state_set_buffer_crop (self:layer_state) (x:rect_proto) : unit = + self.buffer_crop <- Some x +let[@inline] layer_state_set_destination_frame (self:layer_state) (x:rect_proto) : unit = + self.destination_frame <- Some x +let[@inline] layer_state_set_drop_input_mode (self:layer_state) (x:layer_state_drop_input_mode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 31); self.drop_input_mode <- x +let[@inline] layer_state_set_trusted_overlay (self:layer_state) (x:trusted_overlay) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 32); self.trusted_overlay <- x +let[@inline] layer_state_set_background_blur_scale (self:layer_state) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 33); self.background_blur_scale <- x +let[@inline] layer_state_set_corner_radii (self:layer_state) (x:layer_state_corner_radii) : unit = + self.corner_radii <- Some x +let[@inline] layer_state_set_client_drawn_corner_radii (self:layer_state) (x:layer_state_corner_radii) : unit = + self.client_drawn_corner_radii <- Some x +let[@inline] layer_state_set_system_content_priority (self:layer_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 34); self.system_content_priority <- x +let[@inline] layer_state_set_box_shadow_settings (self:layer_state) (x:box_shadow_settings) : unit = + self.box_shadow_settings <- Some x +let[@inline] layer_state_set_border_settings (self:layer_state) (x:border_settings) : unit = + self.border_settings <- Some x + +let copy_layer_state (self:layer_state) : layer_state = + { self with layer_id = self.layer_id } + +let make_layer_state + ?(layer_id:int32 option) + ?(what:int64 option) + ?(x:float option) + ?(y:float option) + ?(z:int32 option) + ?(w:int32 option) + ?(h:int32 option) + ?(layer_stack:int32 option) + ?(flags:int32 option) + ?(mask:int32 option) + ?(matrix:layer_state_matrix22 option) + ?(corner_radius:float option) + ?(background_blur_radius:int32 option) + ?(parent_id:int32 option) + ?(relative_parent_id:int32 option) + ?(alpha:float option) + ?(color:layer_state_color3 option) + ?(transparent_region:region_proto option) + ?(transform:int32 option) + ?(transform_to_display_inverse:bool option) + ?(crop:rect_proto option) + ?(buffer_data:layer_state_buffer_data option) + ?(api:int32 option) + ?(has_sideband_stream:bool option) + ?(color_transform:color_transform_proto option) + ?(blur_regions=[]) + ?(window_info_handle:layer_state_window_info option) + ?(bg_color_alpha:float option) + ?(bg_color_dataspace:int32 option) + ?(color_space_agnostic:bool option) + ?(shadow_radius:float option) + ?(frame_rate_selection_priority:int32 option) + ?(frame_rate:float option) + ?(frame_rate_compatibility:int32 option) + ?(change_frame_rate_strategy:int32 option) + ?(fixed_transform_hint:int32 option) + ?(frame_number:int64 option) + ?(auto_refresh:bool option) + ?(is_trusted_overlay:bool option) + ?(buffer_crop:rect_proto option) + ?(destination_frame:rect_proto option) + ?(drop_input_mode:layer_state_drop_input_mode option) + ?(trusted_overlay:trusted_overlay option) + ?(background_blur_scale:float option) + ?(corner_radii:layer_state_corner_radii option) + ?(client_drawn_corner_radii:layer_state_corner_radii option) + ?(system_content_priority:int32 option) + ?(box_shadow_settings:box_shadow_settings option) + ?(border_settings:border_settings option) + () : layer_state = + let _res = default_layer_state () in + (match layer_id with + | None -> () + | Some v -> layer_state_set_layer_id _res v); + (match what with + | None -> () + | Some v -> layer_state_set_what _res v); + (match x with + | None -> () + | Some v -> layer_state_set_x _res v); + (match y with + | None -> () + | Some v -> layer_state_set_y _res v); + (match z with + | None -> () + | Some v -> layer_state_set_z _res v); + (match w with + | None -> () + | Some v -> layer_state_set_w _res v); + (match h with + | None -> () + | Some v -> layer_state_set_h _res v); + (match layer_stack with + | None -> () + | Some v -> layer_state_set_layer_stack _res v); + (match flags with + | None -> () + | Some v -> layer_state_set_flags _res v); + (match mask with + | None -> () + | Some v -> layer_state_set_mask _res v); + (match matrix with + | None -> () + | Some v -> layer_state_set_matrix _res v); + (match corner_radius with + | None -> () + | Some v -> layer_state_set_corner_radius _res v); + (match background_blur_radius with + | None -> () + | Some v -> layer_state_set_background_blur_radius _res v); + (match parent_id with + | None -> () + | Some v -> layer_state_set_parent_id _res v); + (match relative_parent_id with + | None -> () + | Some v -> layer_state_set_relative_parent_id _res v); + (match alpha with + | None -> () + | Some v -> layer_state_set_alpha _res v); + (match color with + | None -> () + | Some v -> layer_state_set_color _res v); + (match transparent_region with + | None -> () + | Some v -> layer_state_set_transparent_region _res v); + (match transform with + | None -> () + | Some v -> layer_state_set_transform _res v); + (match transform_to_display_inverse with + | None -> () + | Some v -> layer_state_set_transform_to_display_inverse _res v); + (match crop with + | None -> () + | Some v -> layer_state_set_crop _res v); + (match buffer_data with + | None -> () + | Some v -> layer_state_set_buffer_data _res v); + (match api with + | None -> () + | Some v -> layer_state_set_api _res v); + (match has_sideband_stream with + | None -> () + | Some v -> layer_state_set_has_sideband_stream _res v); + (match color_transform with + | None -> () + | Some v -> layer_state_set_color_transform _res v); + layer_state_set_blur_regions _res blur_regions; + (match window_info_handle with + | None -> () + | Some v -> layer_state_set_window_info_handle _res v); + (match bg_color_alpha with + | None -> () + | Some v -> layer_state_set_bg_color_alpha _res v); + (match bg_color_dataspace with + | None -> () + | Some v -> layer_state_set_bg_color_dataspace _res v); + (match color_space_agnostic with + | None -> () + | Some v -> layer_state_set_color_space_agnostic _res v); + (match shadow_radius with + | None -> () + | Some v -> layer_state_set_shadow_radius _res v); + (match frame_rate_selection_priority with + | None -> () + | Some v -> layer_state_set_frame_rate_selection_priority _res v); + (match frame_rate with + | None -> () + | Some v -> layer_state_set_frame_rate _res v); + (match frame_rate_compatibility with + | None -> () + | Some v -> layer_state_set_frame_rate_compatibility _res v); + (match change_frame_rate_strategy with + | None -> () + | Some v -> layer_state_set_change_frame_rate_strategy _res v); + (match fixed_transform_hint with + | None -> () + | Some v -> layer_state_set_fixed_transform_hint _res v); + (match frame_number with + | None -> () + | Some v -> layer_state_set_frame_number _res v); + (match auto_refresh with + | None -> () + | Some v -> layer_state_set_auto_refresh _res v); + (match is_trusted_overlay with + | None -> () + | Some v -> layer_state_set_is_trusted_overlay _res v); + (match buffer_crop with + | None -> () + | Some v -> layer_state_set_buffer_crop _res v); + (match destination_frame with + | None -> () + | Some v -> layer_state_set_destination_frame _res v); + (match drop_input_mode with + | None -> () + | Some v -> layer_state_set_drop_input_mode _res v); + (match trusted_overlay with + | None -> () + | Some v -> layer_state_set_trusted_overlay _res v); + (match background_blur_scale with + | None -> () + | Some v -> layer_state_set_background_blur_scale _res v); + (match corner_radii with + | None -> () + | Some v -> layer_state_set_corner_radii _res v); + (match client_drawn_corner_radii with + | None -> () + | Some v -> layer_state_set_client_drawn_corner_radii _res v); + (match system_content_priority with + | None -> () + | Some v -> layer_state_set_system_content_priority _res v); + (match box_shadow_settings with + | None -> () + | Some v -> layer_state_set_box_shadow_settings _res v); + (match border_settings with + | None -> () + | Some v -> layer_state_set_border_settings _res v); + _res + +let[@inline] display_state_has_id (self:display_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] display_state_has_what (self:display_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] display_state_has_flags (self:display_state) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] display_state_has_layer_stack (self:display_state) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] display_state_has_orientation (self:display_state) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] display_state_has_width (self:display_state) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] display_state_has_height (self:display_state) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] display_state_set_id (self:display_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] display_state_set_what (self:display_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.what <- x +let[@inline] display_state_set_flags (self:display_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.flags <- x +let[@inline] display_state_set_layer_stack (self:display_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.layer_stack <- x +let[@inline] display_state_set_orientation (self:display_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.orientation <- x +let[@inline] display_state_set_layer_stack_space_rect (self:display_state) (x:rect_proto) : unit = + self.layer_stack_space_rect <- Some x +let[@inline] display_state_set_oriented_display_space_rect (self:display_state) (x:rect_proto) : unit = + self.oriented_display_space_rect <- Some x +let[@inline] display_state_set_width (self:display_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.width <- x +let[@inline] display_state_set_height (self:display_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.height <- x + +let copy_display_state (self:display_state) : display_state = + { self with id = self.id } + +let make_display_state + ?(id:int32 option) + ?(what:int32 option) + ?(flags:int32 option) + ?(layer_stack:int32 option) + ?(orientation:int32 option) + ?(layer_stack_space_rect:rect_proto option) + ?(oriented_display_space_rect:rect_proto option) + ?(width:int32 option) + ?(height:int32 option) + () : display_state = + let _res = default_display_state () in + (match id with + | None -> () + | Some v -> display_state_set_id _res v); + (match what with + | None -> () + | Some v -> display_state_set_what _res v); + (match flags with + | None -> () + | Some v -> display_state_set_flags _res v); + (match layer_stack with + | None -> () + | Some v -> display_state_set_layer_stack _res v); + (match orientation with + | None -> () + | Some v -> display_state_set_orientation _res v); + (match layer_stack_space_rect with + | None -> () + | Some v -> display_state_set_layer_stack_space_rect _res v); + (match oriented_display_space_rect with + | None -> () + | Some v -> display_state_set_oriented_display_space_rect _res v); + (match width with + | None -> () + | Some v -> display_state_set_width _res v); + (match height with + | None -> () + | Some v -> display_state_set_height _res v); + _res + +let[@inline] transaction_barrier_has_barrier_token (self:transaction_barrier) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] transaction_barrier_has_kind (self:transaction_barrier) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] transaction_barrier_set_barrier_token (self:transaction_barrier) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.barrier_token <- x +let[@inline] transaction_barrier_set_kind (self:transaction_barrier) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.kind <- x + +let copy_transaction_barrier (self:transaction_barrier) : transaction_barrier = + { self with barrier_token = self.barrier_token } + +let make_transaction_barrier + ?(barrier_token:string option) + ?(kind:int32 option) + () : transaction_barrier = + let _res = default_transaction_barrier () in + (match barrier_token with + | None -> () + | Some v -> transaction_barrier_set_barrier_token _res v); + (match kind with + | None -> () + | Some v -> transaction_barrier_set_kind _res v); + _res + +let[@inline] transaction_state_has_pid (self:transaction_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] transaction_state_has_uid (self:transaction_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] transaction_state_has_vsync_id (self:transaction_state) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] transaction_state_has_input_event_id (self:transaction_state) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] transaction_state_has_post_time (self:transaction_state) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] transaction_state_has_transaction_id (self:transaction_state) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] transaction_state_has_apply_token (self:transaction_state) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] transaction_state_set_pid (self:transaction_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] transaction_state_set_uid (self:transaction_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.uid <- x +let[@inline] transaction_state_set_vsync_id (self:transaction_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.vsync_id <- x +let[@inline] transaction_state_set_input_event_id (self:transaction_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.input_event_id <- x +let[@inline] transaction_state_set_post_time (self:transaction_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.post_time <- x +let[@inline] transaction_state_set_transaction_id (self:transaction_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.transaction_id <- x +let[@inline] transaction_state_set_layer_changes (self:transaction_state) (x:layer_state list) : unit = + self.layer_changes <- x +let[@inline] transaction_state_set_display_changes (self:transaction_state) (x:display_state list) : unit = + self.display_changes <- x +let[@inline] transaction_state_set_merged_transaction_ids (self:transaction_state) (x:int64 list) : unit = + self.merged_transaction_ids <- x +let[@inline] transaction_state_set_apply_token (self:transaction_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.apply_token <- x +let[@inline] transaction_state_set_transaction_barriers (self:transaction_state) (x:transaction_barrier list) : unit = + self.transaction_barriers <- x + +let copy_transaction_state (self:transaction_state) : transaction_state = + { self with pid = self.pid } + +let make_transaction_state + ?(pid:int32 option) + ?(uid:int32 option) + ?(vsync_id:int64 option) + ?(input_event_id:int32 option) + ?(post_time:int64 option) + ?(transaction_id:int64 option) + ?(layer_changes=[]) + ?(display_changes=[]) + ?(merged_transaction_ids=[]) + ?(apply_token:int64 option) + ?(transaction_barriers=[]) + () : transaction_state = + let _res = default_transaction_state () in + (match pid with + | None -> () + | Some v -> transaction_state_set_pid _res v); + (match uid with + | None -> () + | Some v -> transaction_state_set_uid _res v); + (match vsync_id with + | None -> () + | Some v -> transaction_state_set_vsync_id _res v); + (match input_event_id with + | None -> () + | Some v -> transaction_state_set_input_event_id _res v); + (match post_time with + | None -> () + | Some v -> transaction_state_set_post_time _res v); + (match transaction_id with + | None -> () + | Some v -> transaction_state_set_transaction_id _res v); + transaction_state_set_layer_changes _res layer_changes; + transaction_state_set_display_changes _res display_changes; + transaction_state_set_merged_transaction_ids _res merged_transaction_ids; + (match apply_token with + | None -> () + | Some v -> transaction_state_set_apply_token _res v); + transaction_state_set_transaction_barriers _res transaction_barriers; + _res + +let[@inline] layer_creation_args_has_layer_id (self:layer_creation_args) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] layer_creation_args_has_name (self:layer_creation_args) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] layer_creation_args_has_flags (self:layer_creation_args) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] layer_creation_args_has_parent_id (self:layer_creation_args) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] layer_creation_args_has_mirror_from_id (self:layer_creation_args) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] layer_creation_args_has_add_to_root (self:layer_creation_args) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] layer_creation_args_has_layer_stack_to_mirror (self:layer_creation_args) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] layer_creation_args_set_layer_id (self:layer_creation_args) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.layer_id <- x +let[@inline] layer_creation_args_set_name (self:layer_creation_args) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x +let[@inline] layer_creation_args_set_flags (self:layer_creation_args) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.flags <- x +let[@inline] layer_creation_args_set_parent_id (self:layer_creation_args) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.parent_id <- x +let[@inline] layer_creation_args_set_mirror_from_id (self:layer_creation_args) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.mirror_from_id <- x +let[@inline] layer_creation_args_set_add_to_root (self:layer_creation_args) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.add_to_root <- x +let[@inline] layer_creation_args_set_layer_stack_to_mirror (self:layer_creation_args) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.layer_stack_to_mirror <- x + +let copy_layer_creation_args (self:layer_creation_args) : layer_creation_args = + { self with layer_id = self.layer_id } + +let make_layer_creation_args + ?(layer_id:int32 option) + ?(name:string option) + ?(flags:int32 option) + ?(parent_id:int32 option) + ?(mirror_from_id:int32 option) + ?(add_to_root:bool option) + ?(layer_stack_to_mirror:int32 option) + () : layer_creation_args = + let _res = default_layer_creation_args () in + (match layer_id with + | None -> () + | Some v -> layer_creation_args_set_layer_id _res v); + (match name with + | None -> () + | Some v -> layer_creation_args_set_name _res v); + (match flags with + | None -> () + | Some v -> layer_creation_args_set_flags _res v); + (match parent_id with + | None -> () + | Some v -> layer_creation_args_set_parent_id _res v); + (match mirror_from_id with + | None -> () + | Some v -> layer_creation_args_set_mirror_from_id _res v); + (match add_to_root with + | None -> () + | Some v -> layer_creation_args_set_add_to_root _res v); + (match layer_stack_to_mirror with + | None -> () + | Some v -> layer_creation_args_set_layer_stack_to_mirror _res v); + _res + +let[@inline] display_info_has_layer_stack (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] display_info_has_display_id (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] display_info_has_logical_width (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] display_info_has_logical_height (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] display_info_has_receives_input (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] display_info_has_is_secure (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] display_info_has_is_primary (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] display_info_has_is_virtual (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] display_info_has_rotation_flags (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] display_info_has_transform_hint (self:display_info) : bool = (Pbrt.Bitfield.get self._presence 9) + +let[@inline] display_info_set_layer_stack (self:display_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.layer_stack <- x +let[@inline] display_info_set_display_id (self:display_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.display_id <- x +let[@inline] display_info_set_logical_width (self:display_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.logical_width <- x +let[@inline] display_info_set_logical_height (self:display_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.logical_height <- x +let[@inline] display_info_set_transform_inverse (self:display_info) (x:transform) : unit = + self.transform_inverse <- Some x +let[@inline] display_info_set_transform (self:display_info) (x:transform) : unit = + self.transform <- Some x +let[@inline] display_info_set_receives_input (self:display_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.receives_input <- x +let[@inline] display_info_set_is_secure (self:display_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.is_secure <- x +let[@inline] display_info_set_is_primary (self:display_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.is_primary <- x +let[@inline] display_info_set_is_virtual (self:display_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.is_virtual <- x +let[@inline] display_info_set_rotation_flags (self:display_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.rotation_flags <- x +let[@inline] display_info_set_transform_hint (self:display_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.transform_hint <- x + +let copy_display_info (self:display_info) : display_info = + { self with layer_stack = self.layer_stack } + +let make_display_info + ?(layer_stack:int32 option) + ?(display_id:int32 option) + ?(logical_width:int32 option) + ?(logical_height:int32 option) + ?(transform_inverse:transform option) + ?(transform:transform option) + ?(receives_input:bool option) + ?(is_secure:bool option) + ?(is_primary:bool option) + ?(is_virtual:bool option) + ?(rotation_flags:int32 option) + ?(transform_hint:int32 option) + () : display_info = + let _res = default_display_info () in + (match layer_stack with + | None -> () + | Some v -> display_info_set_layer_stack _res v); + (match display_id with + | None -> () + | Some v -> display_info_set_display_id _res v); + (match logical_width with + | None -> () + | Some v -> display_info_set_logical_width _res v); + (match logical_height with + | None -> () + | Some v -> display_info_set_logical_height _res v); + (match transform_inverse with + | None -> () + | Some v -> display_info_set_transform_inverse _res v); + (match transform with + | None -> () + | Some v -> display_info_set_transform _res v); + (match receives_input with + | None -> () + | Some v -> display_info_set_receives_input _res v); + (match is_secure with + | None -> () + | Some v -> display_info_set_is_secure _res v); + (match is_primary with + | None -> () + | Some v -> display_info_set_is_primary _res v); + (match is_virtual with + | None -> () + | Some v -> display_info_set_is_virtual _res v); + (match rotation_flags with + | None -> () + | Some v -> display_info_set_rotation_flags _res v); + (match transform_hint with + | None -> () + | Some v -> display_info_set_transform_hint _res v); + _res + +let[@inline] transaction_trace_entry_has_elapsed_realtime_nanos (self:transaction_trace_entry) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] transaction_trace_entry_has_vsync_id (self:transaction_trace_entry) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] transaction_trace_entry_has_displays_changed (self:transaction_trace_entry) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] transaction_trace_entry_set_elapsed_realtime_nanos (self:transaction_trace_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.elapsed_realtime_nanos <- x +let[@inline] transaction_trace_entry_set_vsync_id (self:transaction_trace_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.vsync_id <- x +let[@inline] transaction_trace_entry_set_transactions (self:transaction_trace_entry) (x:transaction_state list) : unit = + self.transactions <- x +let[@inline] transaction_trace_entry_set_added_layers (self:transaction_trace_entry) (x:layer_creation_args list) : unit = + self.added_layers <- x +let[@inline] transaction_trace_entry_set_destroyed_layers (self:transaction_trace_entry) (x:int32 list) : unit = + self.destroyed_layers <- x +let[@inline] transaction_trace_entry_set_added_displays (self:transaction_trace_entry) (x:display_state list) : unit = + self.added_displays <- x +let[@inline] transaction_trace_entry_set_removed_displays (self:transaction_trace_entry) (x:int32 list) : unit = + self.removed_displays <- x +let[@inline] transaction_trace_entry_set_destroyed_layer_handles (self:transaction_trace_entry) (x:int32 list) : unit = + self.destroyed_layer_handles <- x +let[@inline] transaction_trace_entry_set_displays_changed (self:transaction_trace_entry) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.displays_changed <- x +let[@inline] transaction_trace_entry_set_displays (self:transaction_trace_entry) (x:display_info list) : unit = + self.displays <- x + +let copy_transaction_trace_entry (self:transaction_trace_entry) : transaction_trace_entry = + { self with elapsed_realtime_nanos = self.elapsed_realtime_nanos } + +let make_transaction_trace_entry + ?(elapsed_realtime_nanos:int64 option) + ?(vsync_id:int64 option) + ?(transactions=[]) + ?(added_layers=[]) + ?(destroyed_layers=[]) + ?(added_displays=[]) + ?(removed_displays=[]) + ?(destroyed_layer_handles=[]) + ?(displays_changed:bool option) + ?(displays=[]) + () : transaction_trace_entry = + let _res = default_transaction_trace_entry () in + (match elapsed_realtime_nanos with + | None -> () + | Some v -> transaction_trace_entry_set_elapsed_realtime_nanos _res v); + (match vsync_id with + | None -> () + | Some v -> transaction_trace_entry_set_vsync_id _res v); + transaction_trace_entry_set_transactions _res transactions; + transaction_trace_entry_set_added_layers _res added_layers; + transaction_trace_entry_set_destroyed_layers _res destroyed_layers; + transaction_trace_entry_set_added_displays _res added_displays; + transaction_trace_entry_set_removed_displays _res removed_displays; + transaction_trace_entry_set_destroyed_layer_handles _res destroyed_layer_handles; + (match displays_changed with + | None -> () + | Some v -> transaction_trace_entry_set_displays_changed _res v); + transaction_trace_entry_set_displays _res displays; + _res + +let[@inline] transaction_trace_file_has_magic_number (self:transaction_trace_file) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] transaction_trace_file_has_real_to_elapsed_time_offset_nanos (self:transaction_trace_file) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] transaction_trace_file_has_version (self:transaction_trace_file) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] transaction_trace_file_set_magic_number (self:transaction_trace_file) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.magic_number <- x +let[@inline] transaction_trace_file_set_entry (self:transaction_trace_file) (x:transaction_trace_entry list) : unit = + self.entry <- x +let[@inline] transaction_trace_file_set_real_to_elapsed_time_offset_nanos (self:transaction_trace_file) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.real_to_elapsed_time_offset_nanos <- x +let[@inline] transaction_trace_file_set_version (self:transaction_trace_file) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.version <- x + +let copy_transaction_trace_file (self:transaction_trace_file) : transaction_trace_file = + { self with magic_number = self.magic_number } + +let make_transaction_trace_file + ?(magic_number:int64 option) + ?(entry=[]) + ?(real_to_elapsed_time_offset_nanos:int64 option) + ?(version:int32 option) + () : transaction_trace_file = + let _res = default_transaction_trace_file () in + (match magic_number with + | None -> () + | Some v -> transaction_trace_file_set_magic_number _res v); + transaction_trace_file_set_entry _res entry; + (match real_to_elapsed_time_offset_nanos with + | None -> () + | Some v -> transaction_trace_file_set_real_to_elapsed_time_offset_nanos _res v); + (match version with + | None -> () + | Some v -> transaction_trace_file_set_version _res v); + _res + +let[@inline] chrome_benchmark_metadata_has_benchmark_start_time_us (self:chrome_benchmark_metadata) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_benchmark_metadata_has_story_run_time_us (self:chrome_benchmark_metadata) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_benchmark_metadata_has_benchmark_name (self:chrome_benchmark_metadata) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_benchmark_metadata_has_benchmark_description (self:chrome_benchmark_metadata) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_benchmark_metadata_has_label (self:chrome_benchmark_metadata) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] chrome_benchmark_metadata_has_story_name (self:chrome_benchmark_metadata) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] chrome_benchmark_metadata_has_story_run_index (self:chrome_benchmark_metadata) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] chrome_benchmark_metadata_has_had_failures (self:chrome_benchmark_metadata) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] chrome_benchmark_metadata_set_benchmark_start_time_us (self:chrome_benchmark_metadata) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.benchmark_start_time_us <- x +let[@inline] chrome_benchmark_metadata_set_story_run_time_us (self:chrome_benchmark_metadata) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.story_run_time_us <- x +let[@inline] chrome_benchmark_metadata_set_benchmark_name (self:chrome_benchmark_metadata) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.benchmark_name <- x +let[@inline] chrome_benchmark_metadata_set_benchmark_description (self:chrome_benchmark_metadata) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.benchmark_description <- x +let[@inline] chrome_benchmark_metadata_set_label (self:chrome_benchmark_metadata) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.label <- x +let[@inline] chrome_benchmark_metadata_set_story_name (self:chrome_benchmark_metadata) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.story_name <- x +let[@inline] chrome_benchmark_metadata_set_story_tags (self:chrome_benchmark_metadata) (x:string list) : unit = + self.story_tags <- x +let[@inline] chrome_benchmark_metadata_set_story_run_index (self:chrome_benchmark_metadata) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.story_run_index <- x +let[@inline] chrome_benchmark_metadata_set_had_failures (self:chrome_benchmark_metadata) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.had_failures <- x + +let copy_chrome_benchmark_metadata (self:chrome_benchmark_metadata) : chrome_benchmark_metadata = + { self with benchmark_start_time_us = self.benchmark_start_time_us } + +let make_chrome_benchmark_metadata + ?(benchmark_start_time_us:int64 option) + ?(story_run_time_us:int64 option) + ?(benchmark_name:string option) + ?(benchmark_description:string option) + ?(label:string option) + ?(story_name:string option) + ?(story_tags=[]) + ?(story_run_index:int32 option) + ?(had_failures:bool option) + () : chrome_benchmark_metadata = + let _res = default_chrome_benchmark_metadata () in + (match benchmark_start_time_us with + | None -> () + | Some v -> chrome_benchmark_metadata_set_benchmark_start_time_us _res v); + (match story_run_time_us with + | None -> () + | Some v -> chrome_benchmark_metadata_set_story_run_time_us _res v); + (match benchmark_name with + | None -> () + | Some v -> chrome_benchmark_metadata_set_benchmark_name _res v); + (match benchmark_description with + | None -> () + | Some v -> chrome_benchmark_metadata_set_benchmark_description _res v); + (match label with + | None -> () + | Some v -> chrome_benchmark_metadata_set_label _res v); + (match story_name with + | None -> () + | Some v -> chrome_benchmark_metadata_set_story_name _res v); + chrome_benchmark_metadata_set_story_tags _res story_tags; + (match story_run_index with + | None -> () + | Some v -> chrome_benchmark_metadata_set_story_run_index _res v); + (match had_failures with + | None -> () + | Some v -> chrome_benchmark_metadata_set_had_failures _res v); + _res + +let[@inline] chrome_metadata_packet_finch_hash_has_name (self:chrome_metadata_packet_finch_hash) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_metadata_packet_finch_hash_has_group (self:chrome_metadata_packet_finch_hash) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_metadata_packet_finch_hash_set_name (self:chrome_metadata_packet_finch_hash) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] chrome_metadata_packet_finch_hash_set_group (self:chrome_metadata_packet_finch_hash) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.group <- x + +let copy_chrome_metadata_packet_finch_hash (self:chrome_metadata_packet_finch_hash) : chrome_metadata_packet_finch_hash = + { self with name = self.name } + +let make_chrome_metadata_packet_finch_hash + ?(name:int32 option) + ?(group:int32 option) + () : chrome_metadata_packet_finch_hash = + let _res = default_chrome_metadata_packet_finch_hash () in + (match name with + | None -> () + | Some v -> chrome_metadata_packet_finch_hash_set_name _res v); + (match group with + | None -> () + | Some v -> chrome_metadata_packet_finch_hash_set_group _res v); + _res + +let[@inline] background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_name_hash (self:background_tracing_metadata_trigger_rule_histogram_rule) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_min_trigger (self:background_tracing_metadata_trigger_rule_histogram_rule) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_max_trigger (self:background_tracing_metadata_trigger_rule_histogram_rule) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_name_hash (self:background_tracing_metadata_trigger_rule_histogram_rule) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.histogram_name_hash <- x +let[@inline] background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_min_trigger (self:background_tracing_metadata_trigger_rule_histogram_rule) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.histogram_min_trigger <- x +let[@inline] background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_max_trigger (self:background_tracing_metadata_trigger_rule_histogram_rule) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.histogram_max_trigger <- x + +let copy_background_tracing_metadata_trigger_rule_histogram_rule (self:background_tracing_metadata_trigger_rule_histogram_rule) : background_tracing_metadata_trigger_rule_histogram_rule = + { self with histogram_name_hash = self.histogram_name_hash } + +let make_background_tracing_metadata_trigger_rule_histogram_rule + ?(histogram_name_hash:int64 option) + ?(histogram_min_trigger:int64 option) + ?(histogram_max_trigger:int64 option) + () : background_tracing_metadata_trigger_rule_histogram_rule = + let _res = default_background_tracing_metadata_trigger_rule_histogram_rule () in + (match histogram_name_hash with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_name_hash _res v); + (match histogram_min_trigger with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_min_trigger _res v); + (match histogram_max_trigger with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_max_trigger _res v); + _res + +let[@inline] background_tracing_metadata_trigger_rule_named_rule_has_event_type (self:background_tracing_metadata_trigger_rule_named_rule) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] background_tracing_metadata_trigger_rule_named_rule_has_content_trigger_name_hash (self:background_tracing_metadata_trigger_rule_named_rule) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] background_tracing_metadata_trigger_rule_named_rule_set_event_type (self:background_tracing_metadata_trigger_rule_named_rule) (x:background_tracing_metadata_trigger_rule_named_rule_event_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.event_type <- x +let[@inline] background_tracing_metadata_trigger_rule_named_rule_set_content_trigger_name_hash (self:background_tracing_metadata_trigger_rule_named_rule) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.content_trigger_name_hash <- x + +let copy_background_tracing_metadata_trigger_rule_named_rule (self:background_tracing_metadata_trigger_rule_named_rule) : background_tracing_metadata_trigger_rule_named_rule = + { self with event_type = self.event_type } + +let make_background_tracing_metadata_trigger_rule_named_rule + ?(event_type:background_tracing_metadata_trigger_rule_named_rule_event_type option) + ?(content_trigger_name_hash:int64 option) + () : background_tracing_metadata_trigger_rule_named_rule = + let _res = default_background_tracing_metadata_trigger_rule_named_rule () in + (match event_type with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_named_rule_set_event_type _res v); + (match content_trigger_name_hash with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_named_rule_set_content_trigger_name_hash _res v); + _res + +let[@inline] background_tracing_metadata_trigger_rule_has_trigger_type (self:background_tracing_metadata_trigger_rule) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] background_tracing_metadata_trigger_rule_has_name_hash (self:background_tracing_metadata_trigger_rule) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] background_tracing_metadata_trigger_rule_set_trigger_type (self:background_tracing_metadata_trigger_rule) (x:background_tracing_metadata_trigger_rule_trigger_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.trigger_type <- x +let[@inline] background_tracing_metadata_trigger_rule_set_histogram_rule (self:background_tracing_metadata_trigger_rule) (x:background_tracing_metadata_trigger_rule_histogram_rule) : unit = + self.histogram_rule <- Some x +let[@inline] background_tracing_metadata_trigger_rule_set_named_rule (self:background_tracing_metadata_trigger_rule) (x:background_tracing_metadata_trigger_rule_named_rule) : unit = + self.named_rule <- Some x +let[@inline] background_tracing_metadata_trigger_rule_set_name_hash (self:background_tracing_metadata_trigger_rule) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name_hash <- x + +let copy_background_tracing_metadata_trigger_rule (self:background_tracing_metadata_trigger_rule) : background_tracing_metadata_trigger_rule = + { self with trigger_type = self.trigger_type } + +let make_background_tracing_metadata_trigger_rule + ?(trigger_type:background_tracing_metadata_trigger_rule_trigger_type option) + ?(histogram_rule:background_tracing_metadata_trigger_rule_histogram_rule option) + ?(named_rule:background_tracing_metadata_trigger_rule_named_rule option) + ?(name_hash:int32 option) + () : background_tracing_metadata_trigger_rule = + let _res = default_background_tracing_metadata_trigger_rule () in + (match trigger_type with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_set_trigger_type _res v); + (match histogram_rule with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_set_histogram_rule _res v); + (match named_rule with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_set_named_rule _res v); + (match name_hash with + | None -> () + | Some v -> background_tracing_metadata_trigger_rule_set_name_hash _res v); + _res + +let[@inline] background_tracing_metadata_has_scenario_name_hash (self:background_tracing_metadata) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] background_tracing_metadata_set_triggered_rule (self:background_tracing_metadata) (x:background_tracing_metadata_trigger_rule) : unit = + self.triggered_rule <- Some x +let[@inline] background_tracing_metadata_set_active_rules (self:background_tracing_metadata) (x:background_tracing_metadata_trigger_rule list) : unit = + self.active_rules <- x +let[@inline] background_tracing_metadata_set_scenario_name_hash (self:background_tracing_metadata) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.scenario_name_hash <- x + +let copy_background_tracing_metadata (self:background_tracing_metadata) : background_tracing_metadata = + { self with triggered_rule = self.triggered_rule } + +let make_background_tracing_metadata + ?(triggered_rule:background_tracing_metadata_trigger_rule option) + ?(active_rules=[]) + ?(scenario_name_hash:int32 option) + () : background_tracing_metadata = + let _res = default_background_tracing_metadata () in + (match triggered_rule with + | None -> () + | Some v -> background_tracing_metadata_set_triggered_rule _res v); + background_tracing_metadata_set_active_rules _res active_rules; + (match scenario_name_hash with + | None -> () + | Some v -> background_tracing_metadata_set_scenario_name_hash _res v); + _res + +let[@inline] chrome_metadata_packet_has_chrome_version_code (self:chrome_metadata_packet) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_metadata_packet_has_enabled_categories (self:chrome_metadata_packet) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_metadata_packet_set_background_tracing_metadata (self:chrome_metadata_packet) (x:background_tracing_metadata) : unit = + self.background_tracing_metadata <- Some x +let[@inline] chrome_metadata_packet_set_chrome_version_code (self:chrome_metadata_packet) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.chrome_version_code <- x +let[@inline] chrome_metadata_packet_set_enabled_categories (self:chrome_metadata_packet) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.enabled_categories <- x +let[@inline] chrome_metadata_packet_set_field_trial_hashes (self:chrome_metadata_packet) (x:chrome_metadata_packet_finch_hash list) : unit = + self.field_trial_hashes <- x + +let copy_chrome_metadata_packet (self:chrome_metadata_packet) : chrome_metadata_packet = + { self with background_tracing_metadata = self.background_tracing_metadata } + +let make_chrome_metadata_packet + ?(background_tracing_metadata:background_tracing_metadata option) + ?(chrome_version_code:int32 option) + ?(enabled_categories:string option) + ?(field_trial_hashes=[]) + () : chrome_metadata_packet = + let _res = default_chrome_metadata_packet () in + (match background_tracing_metadata with + | None -> () + | Some v -> chrome_metadata_packet_set_background_tracing_metadata _res v); + (match chrome_version_code with + | None -> () + | Some v -> chrome_metadata_packet_set_chrome_version_code _res v); + (match enabled_categories with + | None -> () + | Some v -> chrome_metadata_packet_set_enabled_categories _res v); + chrome_metadata_packet_set_field_trial_hashes _res field_trial_hashes; + _res + +let[@inline] chrome_traced_value_has_nested_type (self:chrome_traced_value) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_traced_value_has_int_value (self:chrome_traced_value) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_traced_value_has_double_value (self:chrome_traced_value) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_traced_value_has_bool_value (self:chrome_traced_value) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_traced_value_has_string_value (self:chrome_traced_value) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] chrome_traced_value_set_nested_type (self:chrome_traced_value) (x:chrome_traced_value_nested_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.nested_type <- x +let[@inline] chrome_traced_value_set_dict_keys (self:chrome_traced_value) (x:string list) : unit = + self.dict_keys <- x +let[@inline] chrome_traced_value_set_dict_values (self:chrome_traced_value) (x:chrome_traced_value list) : unit = + self.dict_values <- x +let[@inline] chrome_traced_value_set_array_values (self:chrome_traced_value) (x:chrome_traced_value list) : unit = + self.array_values <- x +let[@inline] chrome_traced_value_set_int_value (self:chrome_traced_value) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.int_value <- x +let[@inline] chrome_traced_value_set_double_value (self:chrome_traced_value) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.double_value <- x +let[@inline] chrome_traced_value_set_bool_value (self:chrome_traced_value) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.bool_value <- x +let[@inline] chrome_traced_value_set_string_value (self:chrome_traced_value) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.string_value <- x + +let copy_chrome_traced_value (self:chrome_traced_value) : chrome_traced_value = + { self with nested_type = self.nested_type } + +let make_chrome_traced_value + ?(nested_type:chrome_traced_value_nested_type option) + ?(dict_keys=[]) + ?(dict_values=[]) + ?(array_values=[]) + ?(int_value:int32 option) + ?(double_value:float option) + ?(bool_value:bool option) + ?(string_value:string option) + () : chrome_traced_value = + let _res = default_chrome_traced_value () in + (match nested_type with + | None -> () + | Some v -> chrome_traced_value_set_nested_type _res v); + chrome_traced_value_set_dict_keys _res dict_keys; + chrome_traced_value_set_dict_values _res dict_values; + chrome_traced_value_set_array_values _res array_values; + (match int_value with + | None -> () + | Some v -> chrome_traced_value_set_int_value _res v); + (match double_value with + | None -> () + | Some v -> chrome_traced_value_set_double_value _res v); + (match bool_value with + | None -> () + | Some v -> chrome_traced_value_set_bool_value _res v); + (match string_value with + | None -> () + | Some v -> chrome_traced_value_set_string_value _res v); + _res + +let[@inline] chrome_string_table_entry_has_value (self:chrome_string_table_entry) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_string_table_entry_has_index (self:chrome_string_table_entry) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_string_table_entry_set_value (self:chrome_string_table_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.value <- x +let[@inline] chrome_string_table_entry_set_index (self:chrome_string_table_entry) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.index <- x + +let copy_chrome_string_table_entry (self:chrome_string_table_entry) : chrome_string_table_entry = + { self with value = self.value } + +let make_chrome_string_table_entry + ?(value:string option) + ?(index:int32 option) + () : chrome_string_table_entry = + let _res = default_chrome_string_table_entry () in + (match value with + | None -> () + | Some v -> chrome_string_table_entry_set_value _res v); + (match index with + | None -> () + | Some v -> chrome_string_table_entry_set_index _res v); + _res + +let[@inline] chrome_trace_event_arg_has_name (self:chrome_trace_event_arg) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_trace_event_arg_has_name_index (self:chrome_trace_event_arg) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_trace_event_arg_set_name (self:chrome_trace_event_arg) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] chrome_trace_event_arg_set_value (self:chrome_trace_event_arg) (x:chrome_trace_event_arg_value) : unit = + self.value <- Some x +let[@inline] chrome_trace_event_arg_set_name_index (self:chrome_trace_event_arg) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name_index <- x + +let copy_chrome_trace_event_arg (self:chrome_trace_event_arg) : chrome_trace_event_arg = + { self with name = self.name } + +let make_chrome_trace_event_arg + ?(name:string option) + ?(value:chrome_trace_event_arg_value option) + ?(name_index:int32 option) + () : chrome_trace_event_arg = + let _res = default_chrome_trace_event_arg () in + (match name with + | None -> () + | Some v -> chrome_trace_event_arg_set_name _res v); + (match value with + | None -> () + | Some v -> chrome_trace_event_arg_set_value _res v); + (match name_index with + | None -> () + | Some v -> chrome_trace_event_arg_set_name_index _res v); + _res + +let[@inline] chrome_trace_event_has_name (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_trace_event_has_timestamp (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_trace_event_has_phase (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_trace_event_has_thread_id (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_trace_event_has_duration (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] chrome_trace_event_has_thread_duration (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] chrome_trace_event_has_scope (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] chrome_trace_event_has_id (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] chrome_trace_event_has_flags (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] chrome_trace_event_has_category_group_name (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] chrome_trace_event_has_process_id (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] chrome_trace_event_has_thread_timestamp (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] chrome_trace_event_has_bind_id (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] chrome_trace_event_has_name_index (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] chrome_trace_event_has_category_group_name_index (self:chrome_trace_event) : bool = (Pbrt.Bitfield.get self._presence 14) + +let[@inline] chrome_trace_event_set_name (self:chrome_trace_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] chrome_trace_event_set_timestamp (self:chrome_trace_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.timestamp <- x +let[@inline] chrome_trace_event_set_phase (self:chrome_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.phase <- x +let[@inline] chrome_trace_event_set_thread_id (self:chrome_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.thread_id <- x +let[@inline] chrome_trace_event_set_duration (self:chrome_trace_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.duration <- x +let[@inline] chrome_trace_event_set_thread_duration (self:chrome_trace_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.thread_duration <- x +let[@inline] chrome_trace_event_set_scope (self:chrome_trace_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.scope <- x +let[@inline] chrome_trace_event_set_id (self:chrome_trace_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.id <- x +let[@inline] chrome_trace_event_set_flags (self:chrome_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.flags <- x +let[@inline] chrome_trace_event_set_category_group_name (self:chrome_trace_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.category_group_name <- x +let[@inline] chrome_trace_event_set_process_id (self:chrome_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.process_id <- x +let[@inline] chrome_trace_event_set_thread_timestamp (self:chrome_trace_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.thread_timestamp <- x +let[@inline] chrome_trace_event_set_bind_id (self:chrome_trace_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.bind_id <- x +let[@inline] chrome_trace_event_set_args (self:chrome_trace_event) (x:chrome_trace_event_arg list) : unit = + self.args <- x +let[@inline] chrome_trace_event_set_name_index (self:chrome_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.name_index <- x +let[@inline] chrome_trace_event_set_category_group_name_index (self:chrome_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.category_group_name_index <- x + +let copy_chrome_trace_event (self:chrome_trace_event) : chrome_trace_event = + { self with name = self.name } + +let make_chrome_trace_event + ?(name:string option) + ?(timestamp:int64 option) + ?(phase:int32 option) + ?(thread_id:int32 option) + ?(duration:int64 option) + ?(thread_duration:int64 option) + ?(scope:string option) + ?(id:int64 option) + ?(flags:int32 option) + ?(category_group_name:string option) + ?(process_id:int32 option) + ?(thread_timestamp:int64 option) + ?(bind_id:int64 option) + ?(args=[]) + ?(name_index:int32 option) + ?(category_group_name_index:int32 option) + () : chrome_trace_event = + let _res = default_chrome_trace_event () in + (match name with + | None -> () + | Some v -> chrome_trace_event_set_name _res v); + (match timestamp with + | None -> () + | Some v -> chrome_trace_event_set_timestamp _res v); + (match phase with + | None -> () + | Some v -> chrome_trace_event_set_phase _res v); + (match thread_id with + | None -> () + | Some v -> chrome_trace_event_set_thread_id _res v); + (match duration with + | None -> () + | Some v -> chrome_trace_event_set_duration _res v); + (match thread_duration with + | None -> () + | Some v -> chrome_trace_event_set_thread_duration _res v); + (match scope with + | None -> () + | Some v -> chrome_trace_event_set_scope _res v); + (match id with + | None -> () + | Some v -> chrome_trace_event_set_id _res v); + (match flags with + | None -> () + | Some v -> chrome_trace_event_set_flags _res v); + (match category_group_name with + | None -> () + | Some v -> chrome_trace_event_set_category_group_name _res v); + (match process_id with + | None -> () + | Some v -> chrome_trace_event_set_process_id _res v); + (match thread_timestamp with + | None -> () + | Some v -> chrome_trace_event_set_thread_timestamp _res v); + (match bind_id with + | None -> () + | Some v -> chrome_trace_event_set_bind_id _res v); + chrome_trace_event_set_args _res args; + (match name_index with + | None -> () + | Some v -> chrome_trace_event_set_name_index _res v); + (match category_group_name_index with + | None -> () + | Some v -> chrome_trace_event_set_category_group_name_index _res v); + _res + +let[@inline] chrome_metadata_has_name (self:chrome_metadata) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] chrome_metadata_set_name (self:chrome_metadata) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] chrome_metadata_set_value (self:chrome_metadata) (x:chrome_metadata_value) : unit = + self.value <- Some x + +let copy_chrome_metadata (self:chrome_metadata) : chrome_metadata = + { self with name = self.name } + +let make_chrome_metadata + ?(name:string option) + ?(value:chrome_metadata_value option) + () : chrome_metadata = + let _res = default_chrome_metadata () in + (match name with + | None -> () + | Some v -> chrome_metadata_set_name _res v); + (match value with + | None -> () + | Some v -> chrome_metadata_set_value _res v); + _res + +let[@inline] chrome_legacy_json_trace_has_type_ (self:chrome_legacy_json_trace) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_legacy_json_trace_has_data (self:chrome_legacy_json_trace) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_legacy_json_trace_set_type_ (self:chrome_legacy_json_trace) (x:chrome_legacy_json_trace_trace_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.type_ <- x +let[@inline] chrome_legacy_json_trace_set_data (self:chrome_legacy_json_trace) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.data <- x + +let copy_chrome_legacy_json_trace (self:chrome_legacy_json_trace) : chrome_legacy_json_trace = + { self with type_ = self.type_ } + +let make_chrome_legacy_json_trace + ?(type_:chrome_legacy_json_trace_trace_type option) + ?(data:string option) + () : chrome_legacy_json_trace = + let _res = default_chrome_legacy_json_trace () in + (match type_ with + | None -> () + | Some v -> chrome_legacy_json_trace_set_type_ _res v); + (match data with + | None -> () + | Some v -> chrome_legacy_json_trace_set_data _res v); + _res + + +let[@inline] chrome_event_bundle_set_trace_events (self:chrome_event_bundle) (x:chrome_trace_event list) : unit = + self.trace_events <- x +let[@inline] chrome_event_bundle_set_metadata (self:chrome_event_bundle) (x:chrome_metadata list) : unit = + self.metadata <- x +let[@inline] chrome_event_bundle_set_legacy_ftrace_output (self:chrome_event_bundle) (x:string list) : unit = + self.legacy_ftrace_output <- x +let[@inline] chrome_event_bundle_set_legacy_json_trace (self:chrome_event_bundle) (x:chrome_legacy_json_trace list) : unit = + self.legacy_json_trace <- x +let[@inline] chrome_event_bundle_set_string_table (self:chrome_event_bundle) (x:chrome_string_table_entry list) : unit = + self.string_table <- x + +let copy_chrome_event_bundle (self:chrome_event_bundle) : chrome_event_bundle = + { self with trace_events = self.trace_events } + +let make_chrome_event_bundle + ?(trace_events=[]) + ?(metadata=[]) + ?(legacy_ftrace_output=[]) + ?(legacy_json_trace=[]) + ?(string_table=[]) + () : chrome_event_bundle = + let _res = default_chrome_event_bundle () in + chrome_event_bundle_set_trace_events _res trace_events; + chrome_event_bundle_set_metadata _res metadata; + chrome_event_bundle_set_legacy_ftrace_output _res legacy_ftrace_output; + chrome_event_bundle_set_legacy_json_trace _res legacy_json_trace; + chrome_event_bundle_set_string_table _res string_table; + _res + +let[@inline] chrome_trigger_has_trigger_name (self:chrome_trigger) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_trigger_has_trigger_name_hash (self:chrome_trigger) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_trigger_has_flow_id (self:chrome_trigger) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] chrome_trigger_set_trigger_name (self:chrome_trigger) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.trigger_name <- x +let[@inline] chrome_trigger_set_trigger_name_hash (self:chrome_trigger) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.trigger_name_hash <- x +let[@inline] chrome_trigger_set_flow_id (self:chrome_trigger) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.flow_id <- x + +let copy_chrome_trigger (self:chrome_trigger) : chrome_trigger = + { self with trigger_name = self.trigger_name } + +let make_chrome_trigger + ?(trigger_name:string option) + ?(trigger_name_hash:int32 option) + ?(flow_id:int64 option) + () : chrome_trigger = + let _res = default_chrome_trigger () in + (match trigger_name with + | None -> () + | Some v -> chrome_trigger_set_trigger_name _res v); + (match trigger_name_hash with + | None -> () + | Some v -> chrome_trigger_set_trigger_name_hash _res v); + (match flow_id with + | None -> () + | Some v -> chrome_trigger_set_flow_id _res v); + _res + +let[@inline] interned_v8_string_has_iid (self:interned_v8_string) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] interned_v8_string_set_iid (self:interned_v8_string) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] interned_v8_string_set_encoded_string (self:interned_v8_string) (x:interned_v8_string_encoded_string) : unit = + self.encoded_string <- Some x + +let copy_interned_v8_string (self:interned_v8_string) : interned_v8_string = + { self with iid = self.iid } + +let make_interned_v8_string + ?(iid:int64 option) + ?(encoded_string:interned_v8_string_encoded_string option) + () : interned_v8_string = + let _res = default_interned_v8_string () in + (match iid with + | None -> () + | Some v -> interned_v8_string_set_iid _res v); + (match encoded_string with + | None -> () + | Some v -> interned_v8_string_set_encoded_string _res v); + _res + +let[@inline] interned_v8_js_script_has_iid (self:interned_v8_js_script) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] interned_v8_js_script_has_script_id (self:interned_v8_js_script) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] interned_v8_js_script_has_type_ (self:interned_v8_js_script) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] interned_v8_js_script_set_iid (self:interned_v8_js_script) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] interned_v8_js_script_set_script_id (self:interned_v8_js_script) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.script_id <- x +let[@inline] interned_v8_js_script_set_type_ (self:interned_v8_js_script) (x:interned_v8_js_script_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.type_ <- x +let[@inline] interned_v8_js_script_set_name (self:interned_v8_js_script) (x:v8_string) : unit = + self.name <- Some x +let[@inline] interned_v8_js_script_set_source (self:interned_v8_js_script) (x:v8_string) : unit = + self.source <- Some x + +let copy_interned_v8_js_script (self:interned_v8_js_script) : interned_v8_js_script = + { self with iid = self.iid } + +let make_interned_v8_js_script + ?(iid:int64 option) + ?(script_id:int32 option) + ?(type_:interned_v8_js_script_type option) + ?(name:v8_string option) + ?(source:v8_string option) + () : interned_v8_js_script = + let _res = default_interned_v8_js_script () in + (match iid with + | None -> () + | Some v -> interned_v8_js_script_set_iid _res v); + (match script_id with + | None -> () + | Some v -> interned_v8_js_script_set_script_id _res v); + (match type_ with + | None -> () + | Some v -> interned_v8_js_script_set_type_ _res v); + (match name with + | None -> () + | Some v -> interned_v8_js_script_set_name _res v); + (match source with + | None -> () + | Some v -> interned_v8_js_script_set_source _res v); + _res + +let[@inline] interned_v8_wasm_script_has_iid (self:interned_v8_wasm_script) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] interned_v8_wasm_script_has_script_id (self:interned_v8_wasm_script) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] interned_v8_wasm_script_has_url (self:interned_v8_wasm_script) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] interned_v8_wasm_script_has_wire_bytes (self:interned_v8_wasm_script) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] interned_v8_wasm_script_set_iid (self:interned_v8_wasm_script) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] interned_v8_wasm_script_set_script_id (self:interned_v8_wasm_script) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.script_id <- x +let[@inline] interned_v8_wasm_script_set_url (self:interned_v8_wasm_script) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.url <- x +let[@inline] interned_v8_wasm_script_set_wire_bytes (self:interned_v8_wasm_script) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.wire_bytes <- x + +let copy_interned_v8_wasm_script (self:interned_v8_wasm_script) : interned_v8_wasm_script = + { self with iid = self.iid } + +let make_interned_v8_wasm_script + ?(iid:int64 option) + ?(script_id:int32 option) + ?(url:string option) + ?(wire_bytes:bytes option) + () : interned_v8_wasm_script = + let _res = default_interned_v8_wasm_script () in + (match iid with + | None -> () + | Some v -> interned_v8_wasm_script_set_iid _res v); + (match script_id with + | None -> () + | Some v -> interned_v8_wasm_script_set_script_id _res v); + (match url with + | None -> () + | Some v -> interned_v8_wasm_script_set_url _res v); + (match wire_bytes with + | None -> () + | Some v -> interned_v8_wasm_script_set_wire_bytes _res v); + _res + +let[@inline] interned_v8_js_function_has_iid (self:interned_v8_js_function) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] interned_v8_js_function_has_v8_js_function_name_iid (self:interned_v8_js_function) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] interned_v8_js_function_has_v8_js_script_iid (self:interned_v8_js_function) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] interned_v8_js_function_has_is_toplevel (self:interned_v8_js_function) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] interned_v8_js_function_has_kind (self:interned_v8_js_function) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] interned_v8_js_function_has_byte_offset (self:interned_v8_js_function) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] interned_v8_js_function_has_line (self:interned_v8_js_function) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] interned_v8_js_function_has_column (self:interned_v8_js_function) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] interned_v8_js_function_set_iid (self:interned_v8_js_function) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] interned_v8_js_function_set_v8_js_function_name_iid (self:interned_v8_js_function) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.v8_js_function_name_iid <- x +let[@inline] interned_v8_js_function_set_v8_js_script_iid (self:interned_v8_js_function) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.v8_js_script_iid <- x +let[@inline] interned_v8_js_function_set_is_toplevel (self:interned_v8_js_function) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.is_toplevel <- x +let[@inline] interned_v8_js_function_set_kind (self:interned_v8_js_function) (x:interned_v8_js_function_kind) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.kind <- x +let[@inline] interned_v8_js_function_set_byte_offset (self:interned_v8_js_function) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.byte_offset <- x +let[@inline] interned_v8_js_function_set_line (self:interned_v8_js_function) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.line <- x +let[@inline] interned_v8_js_function_set_column (self:interned_v8_js_function) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.column <- x + +let copy_interned_v8_js_function (self:interned_v8_js_function) : interned_v8_js_function = + { self with iid = self.iid } + +let make_interned_v8_js_function + ?(iid:int64 option) + ?(v8_js_function_name_iid:int64 option) + ?(v8_js_script_iid:int64 option) + ?(is_toplevel:bool option) + ?(kind:interned_v8_js_function_kind option) + ?(byte_offset:int32 option) + ?(line:int32 option) + ?(column:int32 option) + () : interned_v8_js_function = + let _res = default_interned_v8_js_function () in + (match iid with + | None -> () + | Some v -> interned_v8_js_function_set_iid _res v); + (match v8_js_function_name_iid with + | None -> () + | Some v -> interned_v8_js_function_set_v8_js_function_name_iid _res v); + (match v8_js_script_iid with + | None -> () + | Some v -> interned_v8_js_function_set_v8_js_script_iid _res v); + (match is_toplevel with + | None -> () + | Some v -> interned_v8_js_function_set_is_toplevel _res v); + (match kind with + | None -> () + | Some v -> interned_v8_js_function_set_kind _res v); + (match byte_offset with + | None -> () + | Some v -> interned_v8_js_function_set_byte_offset _res v); + (match line with + | None -> () + | Some v -> interned_v8_js_function_set_line _res v); + (match column with + | None -> () + | Some v -> interned_v8_js_function_set_column _res v); + _res + +let[@inline] interned_v8_isolate_code_range_has_base_address (self:interned_v8_isolate_code_range) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] interned_v8_isolate_code_range_has_size (self:interned_v8_isolate_code_range) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] interned_v8_isolate_code_range_has_embedded_blob_code_copy_start_address (self:interned_v8_isolate_code_range) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] interned_v8_isolate_code_range_has_is_process_wide (self:interned_v8_isolate_code_range) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] interned_v8_isolate_code_range_set_base_address (self:interned_v8_isolate_code_range) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.base_address <- x +let[@inline] interned_v8_isolate_code_range_set_size (self:interned_v8_isolate_code_range) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.size <- x +let[@inline] interned_v8_isolate_code_range_set_embedded_blob_code_copy_start_address (self:interned_v8_isolate_code_range) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.embedded_blob_code_copy_start_address <- x +let[@inline] interned_v8_isolate_code_range_set_is_process_wide (self:interned_v8_isolate_code_range) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.is_process_wide <- x + +let copy_interned_v8_isolate_code_range (self:interned_v8_isolate_code_range) : interned_v8_isolate_code_range = + { self with base_address = self.base_address } + +let make_interned_v8_isolate_code_range + ?(base_address:int64 option) + ?(size:int64 option) + ?(embedded_blob_code_copy_start_address:int64 option) + ?(is_process_wide:bool option) + () : interned_v8_isolate_code_range = + let _res = default_interned_v8_isolate_code_range () in + (match base_address with + | None -> () + | Some v -> interned_v8_isolate_code_range_set_base_address _res v); + (match size with + | None -> () + | Some v -> interned_v8_isolate_code_range_set_size _res v); + (match embedded_blob_code_copy_start_address with + | None -> () + | Some v -> interned_v8_isolate_code_range_set_embedded_blob_code_copy_start_address _res v); + (match is_process_wide with + | None -> () + | Some v -> interned_v8_isolate_code_range_set_is_process_wide _res v); + _res + +let[@inline] interned_v8_isolate_has_iid (self:interned_v8_isolate) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] interned_v8_isolate_has_pid (self:interned_v8_isolate) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] interned_v8_isolate_has_isolate_id (self:interned_v8_isolate) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] interned_v8_isolate_has_embedded_blob_code_start_address (self:interned_v8_isolate) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] interned_v8_isolate_has_embedded_blob_code_size (self:interned_v8_isolate) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] interned_v8_isolate_set_iid (self:interned_v8_isolate) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] interned_v8_isolate_set_pid (self:interned_v8_isolate) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.pid <- x +let[@inline] interned_v8_isolate_set_isolate_id (self:interned_v8_isolate) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.isolate_id <- x +let[@inline] interned_v8_isolate_set_code_range (self:interned_v8_isolate) (x:interned_v8_isolate_code_range) : unit = + self.code_range <- Some x +let[@inline] interned_v8_isolate_set_embedded_blob_code_start_address (self:interned_v8_isolate) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.embedded_blob_code_start_address <- x +let[@inline] interned_v8_isolate_set_embedded_blob_code_size (self:interned_v8_isolate) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.embedded_blob_code_size <- x + +let copy_interned_v8_isolate (self:interned_v8_isolate) : interned_v8_isolate = + { self with iid = self.iid } + +let make_interned_v8_isolate + ?(iid:int64 option) + ?(pid:int32 option) + ?(isolate_id:int32 option) + ?(code_range:interned_v8_isolate_code_range option) + ?(embedded_blob_code_start_address:int64 option) + ?(embedded_blob_code_size:int64 option) + () : interned_v8_isolate = + let _res = default_interned_v8_isolate () in + (match iid with + | None -> () + | Some v -> interned_v8_isolate_set_iid _res v); + (match pid with + | None -> () + | Some v -> interned_v8_isolate_set_pid _res v); + (match isolate_id with + | None -> () + | Some v -> interned_v8_isolate_set_isolate_id _res v); + (match code_range with + | None -> () + | Some v -> interned_v8_isolate_set_code_range _res v); + (match embedded_blob_code_start_address with + | None -> () + | Some v -> interned_v8_isolate_set_embedded_blob_code_start_address _res v); + (match embedded_blob_code_size with + | None -> () + | Some v -> interned_v8_isolate_set_embedded_blob_code_size _res v); + _res + +let[@inline] v8_js_code_has_v8_isolate_iid (self:v8_js_code) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] v8_js_code_has_tid (self:v8_js_code) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] v8_js_code_has_v8_js_function_iid (self:v8_js_code) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] v8_js_code_has_tier (self:v8_js_code) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] v8_js_code_has_instruction_start (self:v8_js_code) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] v8_js_code_has_instruction_size_bytes (self:v8_js_code) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] v8_js_code_set_v8_isolate_iid (self:v8_js_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.v8_isolate_iid <- x +let[@inline] v8_js_code_set_tid (self:v8_js_code) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tid <- x +let[@inline] v8_js_code_set_v8_js_function_iid (self:v8_js_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.v8_js_function_iid <- x +let[@inline] v8_js_code_set_tier (self:v8_js_code) (x:v8_js_code_tier) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.tier <- x +let[@inline] v8_js_code_set_instruction_start (self:v8_js_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.instruction_start <- x +let[@inline] v8_js_code_set_instruction_size_bytes (self:v8_js_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.instruction_size_bytes <- x +let[@inline] v8_js_code_set_instructions (self:v8_js_code) (x:v8_js_code_instructions) : unit = + self.instructions <- Some x + +let copy_v8_js_code (self:v8_js_code) : v8_js_code = + { self with v8_isolate_iid = self.v8_isolate_iid } + +let make_v8_js_code + ?(v8_isolate_iid:int64 option) + ?(tid:int32 option) + ?(v8_js_function_iid:int64 option) + ?(tier:v8_js_code_tier option) + ?(instruction_start:int64 option) + ?(instruction_size_bytes:int64 option) + ?(instructions:v8_js_code_instructions option) + () : v8_js_code = + let _res = default_v8_js_code () in + (match v8_isolate_iid with + | None -> () + | Some v -> v8_js_code_set_v8_isolate_iid _res v); + (match tid with + | None -> () + | Some v -> v8_js_code_set_tid _res v); + (match v8_js_function_iid with + | None -> () + | Some v -> v8_js_code_set_v8_js_function_iid _res v); + (match tier with + | None -> () + | Some v -> v8_js_code_set_tier _res v); + (match instruction_start with + | None -> () + | Some v -> v8_js_code_set_instruction_start _res v); + (match instruction_size_bytes with + | None -> () + | Some v -> v8_js_code_set_instruction_size_bytes _res v); + (match instructions with + | None -> () + | Some v -> v8_js_code_set_instructions _res v); + _res + +let[@inline] v8_internal_code_has_v8_isolate_iid (self:v8_internal_code) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] v8_internal_code_has_tid (self:v8_internal_code) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] v8_internal_code_has_name (self:v8_internal_code) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] v8_internal_code_has_type_ (self:v8_internal_code) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] v8_internal_code_has_builtin_id (self:v8_internal_code) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] v8_internal_code_has_instruction_start (self:v8_internal_code) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] v8_internal_code_has_instruction_size_bytes (self:v8_internal_code) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] v8_internal_code_has_machine_code (self:v8_internal_code) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] v8_internal_code_set_v8_isolate_iid (self:v8_internal_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.v8_isolate_iid <- x +let[@inline] v8_internal_code_set_tid (self:v8_internal_code) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tid <- x +let[@inline] v8_internal_code_set_name (self:v8_internal_code) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.name <- x +let[@inline] v8_internal_code_set_type_ (self:v8_internal_code) (x:v8_internal_code_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.type_ <- x +let[@inline] v8_internal_code_set_builtin_id (self:v8_internal_code) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.builtin_id <- x +let[@inline] v8_internal_code_set_instruction_start (self:v8_internal_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.instruction_start <- x +let[@inline] v8_internal_code_set_instruction_size_bytes (self:v8_internal_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.instruction_size_bytes <- x +let[@inline] v8_internal_code_set_machine_code (self:v8_internal_code) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.machine_code <- x + +let copy_v8_internal_code (self:v8_internal_code) : v8_internal_code = + { self with v8_isolate_iid = self.v8_isolate_iid } + +let make_v8_internal_code + ?(v8_isolate_iid:int64 option) + ?(tid:int32 option) + ?(name:string option) + ?(type_:v8_internal_code_type option) + ?(builtin_id:int32 option) + ?(instruction_start:int64 option) + ?(instruction_size_bytes:int64 option) + ?(machine_code:bytes option) + () : v8_internal_code = + let _res = default_v8_internal_code () in + (match v8_isolate_iid with + | None -> () + | Some v -> v8_internal_code_set_v8_isolate_iid _res v); + (match tid with + | None -> () + | Some v -> v8_internal_code_set_tid _res v); + (match name with + | None -> () + | Some v -> v8_internal_code_set_name _res v); + (match type_ with + | None -> () + | Some v -> v8_internal_code_set_type_ _res v); + (match builtin_id with + | None -> () + | Some v -> v8_internal_code_set_builtin_id _res v); + (match instruction_start with + | None -> () + | Some v -> v8_internal_code_set_instruction_start _res v); + (match instruction_size_bytes with + | None -> () + | Some v -> v8_internal_code_set_instruction_size_bytes _res v); + (match machine_code with + | None -> () + | Some v -> v8_internal_code_set_machine_code _res v); + _res + +let[@inline] v8_wasm_code_has_v8_isolate_iid (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] v8_wasm_code_has_tid (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] v8_wasm_code_has_v8_wasm_script_iid (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] v8_wasm_code_has_function_name (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] v8_wasm_code_has_tier (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] v8_wasm_code_has_code_offset_in_module (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] v8_wasm_code_has_instruction_start (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] v8_wasm_code_has_instruction_size_bytes (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] v8_wasm_code_has_machine_code (self:v8_wasm_code) : bool = (Pbrt.Bitfield.get self._presence 8) + +let[@inline] v8_wasm_code_set_v8_isolate_iid (self:v8_wasm_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.v8_isolate_iid <- x +let[@inline] v8_wasm_code_set_tid (self:v8_wasm_code) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tid <- x +let[@inline] v8_wasm_code_set_v8_wasm_script_iid (self:v8_wasm_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.v8_wasm_script_iid <- x +let[@inline] v8_wasm_code_set_function_name (self:v8_wasm_code) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.function_name <- x +let[@inline] v8_wasm_code_set_tier (self:v8_wasm_code) (x:v8_wasm_code_tier) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.tier <- x +let[@inline] v8_wasm_code_set_code_offset_in_module (self:v8_wasm_code) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.code_offset_in_module <- x +let[@inline] v8_wasm_code_set_instruction_start (self:v8_wasm_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.instruction_start <- x +let[@inline] v8_wasm_code_set_instruction_size_bytes (self:v8_wasm_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.instruction_size_bytes <- x +let[@inline] v8_wasm_code_set_machine_code (self:v8_wasm_code) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.machine_code <- x + +let copy_v8_wasm_code (self:v8_wasm_code) : v8_wasm_code = + { self with v8_isolate_iid = self.v8_isolate_iid } + +let make_v8_wasm_code + ?(v8_isolate_iid:int64 option) + ?(tid:int32 option) + ?(v8_wasm_script_iid:int64 option) + ?(function_name:string option) + ?(tier:v8_wasm_code_tier option) + ?(code_offset_in_module:int32 option) + ?(instruction_start:int64 option) + ?(instruction_size_bytes:int64 option) + ?(machine_code:bytes option) + () : v8_wasm_code = + let _res = default_v8_wasm_code () in + (match v8_isolate_iid with + | None -> () + | Some v -> v8_wasm_code_set_v8_isolate_iid _res v); + (match tid with + | None -> () + | Some v -> v8_wasm_code_set_tid _res v); + (match v8_wasm_script_iid with + | None -> () + | Some v -> v8_wasm_code_set_v8_wasm_script_iid _res v); + (match function_name with + | None -> () + | Some v -> v8_wasm_code_set_function_name _res v); + (match tier with + | None -> () + | Some v -> v8_wasm_code_set_tier _res v); + (match code_offset_in_module with + | None -> () + | Some v -> v8_wasm_code_set_code_offset_in_module _res v); + (match instruction_start with + | None -> () + | Some v -> v8_wasm_code_set_instruction_start _res v); + (match instruction_size_bytes with + | None -> () + | Some v -> v8_wasm_code_set_instruction_size_bytes _res v); + (match machine_code with + | None -> () + | Some v -> v8_wasm_code_set_machine_code _res v); + _res + +let[@inline] v8_reg_exp_code_has_v8_isolate_iid (self:v8_reg_exp_code) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] v8_reg_exp_code_has_tid (self:v8_reg_exp_code) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] v8_reg_exp_code_has_instruction_start (self:v8_reg_exp_code) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] v8_reg_exp_code_has_instruction_size_bytes (self:v8_reg_exp_code) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] v8_reg_exp_code_has_machine_code (self:v8_reg_exp_code) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] v8_reg_exp_code_set_v8_isolate_iid (self:v8_reg_exp_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.v8_isolate_iid <- x +let[@inline] v8_reg_exp_code_set_tid (self:v8_reg_exp_code) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tid <- x +let[@inline] v8_reg_exp_code_set_pattern (self:v8_reg_exp_code) (x:v8_string) : unit = + self.pattern <- Some x +let[@inline] v8_reg_exp_code_set_instruction_start (self:v8_reg_exp_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.instruction_start <- x +let[@inline] v8_reg_exp_code_set_instruction_size_bytes (self:v8_reg_exp_code) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.instruction_size_bytes <- x +let[@inline] v8_reg_exp_code_set_machine_code (self:v8_reg_exp_code) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.machine_code <- x + +let copy_v8_reg_exp_code (self:v8_reg_exp_code) : v8_reg_exp_code = + { self with v8_isolate_iid = self.v8_isolate_iid } + +let make_v8_reg_exp_code + ?(v8_isolate_iid:int64 option) + ?(tid:int32 option) + ?(pattern:v8_string option) + ?(instruction_start:int64 option) + ?(instruction_size_bytes:int64 option) + ?(machine_code:bytes option) + () : v8_reg_exp_code = + let _res = default_v8_reg_exp_code () in + (match v8_isolate_iid with + | None -> () + | Some v -> v8_reg_exp_code_set_v8_isolate_iid _res v); + (match tid with + | None -> () + | Some v -> v8_reg_exp_code_set_tid _res v); + (match pattern with + | None -> () + | Some v -> v8_reg_exp_code_set_pattern _res v); + (match instruction_start with + | None -> () + | Some v -> v8_reg_exp_code_set_instruction_start _res v); + (match instruction_size_bytes with + | None -> () + | Some v -> v8_reg_exp_code_set_instruction_size_bytes _res v); + (match machine_code with + | None -> () + | Some v -> v8_reg_exp_code_set_machine_code _res v); + _res + +let[@inline] v8_code_move_has_isolate_iid (self:v8_code_move) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] v8_code_move_has_tid (self:v8_code_move) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] v8_code_move_has_from_instruction_start_address (self:v8_code_move) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] v8_code_move_has_to_instruction_start_address (self:v8_code_move) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] v8_code_move_has_instruction_size_bytes (self:v8_code_move) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] v8_code_move_set_isolate_iid (self:v8_code_move) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.isolate_iid <- x +let[@inline] v8_code_move_set_tid (self:v8_code_move) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tid <- x +let[@inline] v8_code_move_set_from_instruction_start_address (self:v8_code_move) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.from_instruction_start_address <- x +let[@inline] v8_code_move_set_to_instruction_start_address (self:v8_code_move) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.to_instruction_start_address <- x +let[@inline] v8_code_move_set_instruction_size_bytes (self:v8_code_move) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.instruction_size_bytes <- x +let[@inline] v8_code_move_set_to_instructions (self:v8_code_move) (x:v8_code_move_to_instructions) : unit = + self.to_instructions <- Some x + +let copy_v8_code_move (self:v8_code_move) : v8_code_move = + { self with isolate_iid = self.isolate_iid } + +let make_v8_code_move + ?(isolate_iid:int64 option) + ?(tid:int32 option) + ?(from_instruction_start_address:int64 option) + ?(to_instruction_start_address:int64 option) + ?(instruction_size_bytes:int64 option) + ?(to_instructions:v8_code_move_to_instructions option) + () : v8_code_move = + let _res = default_v8_code_move () in + (match isolate_iid with + | None -> () + | Some v -> v8_code_move_set_isolate_iid _res v); + (match tid with + | None -> () + | Some v -> v8_code_move_set_tid _res v); + (match from_instruction_start_address with + | None -> () + | Some v -> v8_code_move_set_from_instruction_start_address _res v); + (match to_instruction_start_address with + | None -> () + | Some v -> v8_code_move_set_to_instruction_start_address _res v); + (match instruction_size_bytes with + | None -> () + | Some v -> v8_code_move_set_instruction_size_bytes _res v); + (match to_instructions with + | None -> () + | Some v -> v8_code_move_set_to_instructions _res v); + _res + +let[@inline] v8_code_defaults_has_tid (self:v8_code_defaults) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] v8_code_defaults_set_tid (self:v8_code_defaults) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.tid <- x + +let copy_v8_code_defaults (self:v8_code_defaults) : v8_code_defaults = + { self with tid = self.tid } + +let make_v8_code_defaults + ?(tid:int32 option) + () : v8_code_defaults = + let _res = default_v8_code_defaults () in + (match tid with + | None -> () + | Some v -> v8_code_defaults_set_tid _res v); + _res + +let[@inline] clock_snapshot_clock_has_clock_id (self:clock_snapshot_clock) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] clock_snapshot_clock_has_timestamp (self:clock_snapshot_clock) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] clock_snapshot_clock_has_is_incremental (self:clock_snapshot_clock) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] clock_snapshot_clock_has_unit_multiplier_ns (self:clock_snapshot_clock) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] clock_snapshot_clock_set_clock_id (self:clock_snapshot_clock) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.clock_id <- x +let[@inline] clock_snapshot_clock_set_timestamp (self:clock_snapshot_clock) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.timestamp <- x +let[@inline] clock_snapshot_clock_set_is_incremental (self:clock_snapshot_clock) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.is_incremental <- x +let[@inline] clock_snapshot_clock_set_unit_multiplier_ns (self:clock_snapshot_clock) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.unit_multiplier_ns <- x + +let copy_clock_snapshot_clock (self:clock_snapshot_clock) : clock_snapshot_clock = + { self with clock_id = self.clock_id } + +let make_clock_snapshot_clock + ?(clock_id:int32 option) + ?(timestamp:int64 option) + ?(is_incremental:bool option) + ?(unit_multiplier_ns:int64 option) + () : clock_snapshot_clock = + let _res = default_clock_snapshot_clock () in + (match clock_id with + | None -> () + | Some v -> clock_snapshot_clock_set_clock_id _res v); + (match timestamp with + | None -> () + | Some v -> clock_snapshot_clock_set_timestamp _res v); + (match is_incremental with + | None -> () + | Some v -> clock_snapshot_clock_set_is_incremental _res v); + (match unit_multiplier_ns with + | None -> () + | Some v -> clock_snapshot_clock_set_unit_multiplier_ns _res v); + _res + +let[@inline] clock_snapshot_has_primary_trace_clock (self:clock_snapshot) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] clock_snapshot_set_clocks (self:clock_snapshot) (x:clock_snapshot_clock list) : unit = + self.clocks <- x +let[@inline] clock_snapshot_set_primary_trace_clock (self:clock_snapshot) (x:builtin_clock) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.primary_trace_clock <- x + +let copy_clock_snapshot (self:clock_snapshot) : clock_snapshot = + { self with clocks = self.clocks } + +let make_clock_snapshot + ?(clocks=[]) + ?(primary_trace_clock:builtin_clock option) + () : clock_snapshot = + let _res = default_clock_snapshot () in + clock_snapshot_set_clocks _res clocks; + (match primary_trace_clock with + | None -> () + | Some v -> clock_snapshot_set_primary_trace_clock _res v); + _res + +let[@inline] cswitch_etw_event_has_new_thread_id (self:cswitch_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] cswitch_etw_event_has_old_thread_id (self:cswitch_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] cswitch_etw_event_has_new_thread_priority (self:cswitch_etw_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] cswitch_etw_event_has_old_thread_priority (self:cswitch_etw_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] cswitch_etw_event_has_previous_c_state (self:cswitch_etw_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] cswitch_etw_event_has_old_thread_wait_ideal_processor (self:cswitch_etw_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] cswitch_etw_event_has_new_thread_wait_time (self:cswitch_etw_event) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] cswitch_etw_event_set_new_thread_id (self:cswitch_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.new_thread_id <- x +let[@inline] cswitch_etw_event_set_old_thread_id (self:cswitch_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.old_thread_id <- x +let[@inline] cswitch_etw_event_set_new_thread_priority (self:cswitch_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.new_thread_priority <- x +let[@inline] cswitch_etw_event_set_old_thread_priority (self:cswitch_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.old_thread_priority <- x +let[@inline] cswitch_etw_event_set_previous_c_state (self:cswitch_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.previous_c_state <- x +let[@inline] cswitch_etw_event_set_old_thread_wait_reason_enum_or_int (self:cswitch_etw_event) (x:cswitch_etw_event_old_thread_wait_reason_enum_or_int) : unit = + self.old_thread_wait_reason_enum_or_int <- Some x +let[@inline] cswitch_etw_event_set_old_thread_wait_mode_enum_or_int (self:cswitch_etw_event) (x:cswitch_etw_event_old_thread_wait_mode_enum_or_int) : unit = + self.old_thread_wait_mode_enum_or_int <- Some x +let[@inline] cswitch_etw_event_set_old_thread_state_enum_or_int (self:cswitch_etw_event) (x:cswitch_etw_event_old_thread_state_enum_or_int) : unit = + self.old_thread_state_enum_or_int <- Some x +let[@inline] cswitch_etw_event_set_old_thread_wait_ideal_processor (self:cswitch_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.old_thread_wait_ideal_processor <- x +let[@inline] cswitch_etw_event_set_new_thread_wait_time (self:cswitch_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.new_thread_wait_time <- x + +let copy_cswitch_etw_event (self:cswitch_etw_event) : cswitch_etw_event = + { self with new_thread_id = self.new_thread_id } + +let make_cswitch_etw_event + ?(new_thread_id:int32 option) + ?(old_thread_id:int32 option) + ?(new_thread_priority:int32 option) + ?(old_thread_priority:int32 option) + ?(previous_c_state:int32 option) + ?(old_thread_wait_reason_enum_or_int:cswitch_etw_event_old_thread_wait_reason_enum_or_int option) + ?(old_thread_wait_mode_enum_or_int:cswitch_etw_event_old_thread_wait_mode_enum_or_int option) + ?(old_thread_state_enum_or_int:cswitch_etw_event_old_thread_state_enum_or_int option) + ?(old_thread_wait_ideal_processor:int32 option) + ?(new_thread_wait_time:int32 option) + () : cswitch_etw_event = + let _res = default_cswitch_etw_event () in + (match new_thread_id with + | None -> () + | Some v -> cswitch_etw_event_set_new_thread_id _res v); + (match old_thread_id with + | None -> () + | Some v -> cswitch_etw_event_set_old_thread_id _res v); + (match new_thread_priority with + | None -> () + | Some v -> cswitch_etw_event_set_new_thread_priority _res v); + (match old_thread_priority with + | None -> () + | Some v -> cswitch_etw_event_set_old_thread_priority _res v); + (match previous_c_state with + | None -> () + | Some v -> cswitch_etw_event_set_previous_c_state _res v); + (match old_thread_wait_reason_enum_or_int with + | None -> () + | Some v -> cswitch_etw_event_set_old_thread_wait_reason_enum_or_int _res v); + (match old_thread_wait_mode_enum_or_int with + | None -> () + | Some v -> cswitch_etw_event_set_old_thread_wait_mode_enum_or_int _res v); + (match old_thread_state_enum_or_int with + | None -> () + | Some v -> cswitch_etw_event_set_old_thread_state_enum_or_int _res v); + (match old_thread_wait_ideal_processor with + | None -> () + | Some v -> cswitch_etw_event_set_old_thread_wait_ideal_processor _res v); + (match new_thread_wait_time with + | None -> () + | Some v -> cswitch_etw_event_set_new_thread_wait_time _res v); + _res + +let[@inline] ready_thread_etw_event_has_t_thread_id (self:ready_thread_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] ready_thread_etw_event_has_adjust_increment (self:ready_thread_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] ready_thread_etw_event_set_t_thread_id (self:ready_thread_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.t_thread_id <- x +let[@inline] ready_thread_etw_event_set_adjust_reason_enum_or_int (self:ready_thread_etw_event) (x:ready_thread_etw_event_adjust_reason_enum_or_int) : unit = + self.adjust_reason_enum_or_int <- Some x +let[@inline] ready_thread_etw_event_set_adjust_increment (self:ready_thread_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.adjust_increment <- x +let[@inline] ready_thread_etw_event_set_flag_enum_or_int (self:ready_thread_etw_event) (x:ready_thread_etw_event_flag_enum_or_int) : unit = + self.flag_enum_or_int <- Some x + +let copy_ready_thread_etw_event (self:ready_thread_etw_event) : ready_thread_etw_event = + { self with t_thread_id = self.t_thread_id } + +let make_ready_thread_etw_event + ?(t_thread_id:int32 option) + ?(adjust_reason_enum_or_int:ready_thread_etw_event_adjust_reason_enum_or_int option) + ?(adjust_increment:int32 option) + ?(flag_enum_or_int:ready_thread_etw_event_flag_enum_or_int option) + () : ready_thread_etw_event = + let _res = default_ready_thread_etw_event () in + (match t_thread_id with + | None -> () + | Some v -> ready_thread_etw_event_set_t_thread_id _res v); + (match adjust_reason_enum_or_int with + | None -> () + | Some v -> ready_thread_etw_event_set_adjust_reason_enum_or_int _res v); + (match adjust_increment with + | None -> () + | Some v -> ready_thread_etw_event_set_adjust_increment _res v); + (match flag_enum_or_int with + | None -> () + | Some v -> ready_thread_etw_event_set_flag_enum_or_int _res v); + _res + +let[@inline] mem_info_etw_event_has_priority_levels (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] mem_info_etw_event_has_zero_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] mem_info_etw_event_has_free_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] mem_info_etw_event_has_modified_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] mem_info_etw_event_has_modified_no_write_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] mem_info_etw_event_has_bad_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] mem_info_etw_event_has_modified_page_count_page_file (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] mem_info_etw_event_has_paged_pool_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] mem_info_etw_event_has_non_paged_pool_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] mem_info_etw_event_has_mdl_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] mem_info_etw_event_has_commit_page_count (self:mem_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 10) + +let[@inline] mem_info_etw_event_set_priority_levels (self:mem_info_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.priority_levels <- x +let[@inline] mem_info_etw_event_set_zero_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.zero_page_count <- x +let[@inline] mem_info_etw_event_set_free_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.free_page_count <- x +let[@inline] mem_info_etw_event_set_modified_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.modified_page_count <- x +let[@inline] mem_info_etw_event_set_modified_no_write_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.modified_no_write_page_count <- x +let[@inline] mem_info_etw_event_set_bad_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.bad_page_count <- x +let[@inline] mem_info_etw_event_set_standby_page_counts (self:mem_info_etw_event) (x:int64 list) : unit = + self.standby_page_counts <- x +let[@inline] mem_info_etw_event_set_repurposed_page_counts (self:mem_info_etw_event) (x:int64 list) : unit = + self.repurposed_page_counts <- x +let[@inline] mem_info_etw_event_set_modified_page_count_page_file (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.modified_page_count_page_file <- x +let[@inline] mem_info_etw_event_set_paged_pool_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.paged_pool_page_count <- x +let[@inline] mem_info_etw_event_set_non_paged_pool_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.non_paged_pool_page_count <- x +let[@inline] mem_info_etw_event_set_mdl_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.mdl_page_count <- x +let[@inline] mem_info_etw_event_set_commit_page_count (self:mem_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.commit_page_count <- x + +let copy_mem_info_etw_event (self:mem_info_etw_event) : mem_info_etw_event = + { self with priority_levels = self.priority_levels } + +let make_mem_info_etw_event + ?(priority_levels:int32 option) + ?(zero_page_count:int64 option) + ?(free_page_count:int64 option) + ?(modified_page_count:int64 option) + ?(modified_no_write_page_count:int64 option) + ?(bad_page_count:int64 option) + ?(standby_page_counts=[]) + ?(repurposed_page_counts=[]) + ?(modified_page_count_page_file:int64 option) + ?(paged_pool_page_count:int64 option) + ?(non_paged_pool_page_count:int64 option) + ?(mdl_page_count:int64 option) + ?(commit_page_count:int64 option) + () : mem_info_etw_event = + let _res = default_mem_info_etw_event () in + (match priority_levels with + | None -> () + | Some v -> mem_info_etw_event_set_priority_levels _res v); + (match zero_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_zero_page_count _res v); + (match free_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_free_page_count _res v); + (match modified_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_modified_page_count _res v); + (match modified_no_write_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_modified_no_write_page_count _res v); + (match bad_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_bad_page_count _res v); + mem_info_etw_event_set_standby_page_counts _res standby_page_counts; + mem_info_etw_event_set_repurposed_page_counts _res repurposed_page_counts; + (match modified_page_count_page_file with + | None -> () + | Some v -> mem_info_etw_event_set_modified_page_count_page_file _res v); + (match paged_pool_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_paged_pool_page_count _res v); + (match non_paged_pool_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_non_paged_pool_page_count _res v); + (match mdl_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_mdl_page_count _res v); + (match commit_page_count with + | None -> () + | Some v -> mem_info_etw_event_set_commit_page_count _res v); + _res + +let[@inline] file_io_create_etw_event_has_irp_ptr (self:file_io_create_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] file_io_create_etw_event_has_file_object (self:file_io_create_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] file_io_create_etw_event_has_ttid (self:file_io_create_etw_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] file_io_create_etw_event_has_create_options (self:file_io_create_etw_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] file_io_create_etw_event_has_file_attributes (self:file_io_create_etw_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] file_io_create_etw_event_has_share_access (self:file_io_create_etw_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] file_io_create_etw_event_has_open_path (self:file_io_create_etw_event) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] file_io_create_etw_event_set_irp_ptr (self:file_io_create_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.irp_ptr <- x +let[@inline] file_io_create_etw_event_set_file_object (self:file_io_create_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.file_object <- x +let[@inline] file_io_create_etw_event_set_ttid (self:file_io_create_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.ttid <- x +let[@inline] file_io_create_etw_event_set_create_options (self:file_io_create_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.create_options <- x +let[@inline] file_io_create_etw_event_set_file_attributes (self:file_io_create_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.file_attributes <- x +let[@inline] file_io_create_etw_event_set_share_access (self:file_io_create_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.share_access <- x +let[@inline] file_io_create_etw_event_set_open_path (self:file_io_create_etw_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.open_path <- x + +let copy_file_io_create_etw_event (self:file_io_create_etw_event) : file_io_create_etw_event = + { self with irp_ptr = self.irp_ptr } + +let make_file_io_create_etw_event + ?(irp_ptr:int64 option) + ?(file_object:int64 option) + ?(ttid:int32 option) + ?(create_options:int32 option) + ?(file_attributes:int32 option) + ?(share_access:int32 option) + ?(open_path:string option) + () : file_io_create_etw_event = + let _res = default_file_io_create_etw_event () in + (match irp_ptr with + | None -> () + | Some v -> file_io_create_etw_event_set_irp_ptr _res v); + (match file_object with + | None -> () + | Some v -> file_io_create_etw_event_set_file_object _res v); + (match ttid with + | None -> () + | Some v -> file_io_create_etw_event_set_ttid _res v); + (match create_options with + | None -> () + | Some v -> file_io_create_etw_event_set_create_options _res v); + (match file_attributes with + | None -> () + | Some v -> file_io_create_etw_event_set_file_attributes _res v); + (match share_access with + | None -> () + | Some v -> file_io_create_etw_event_set_share_access _res v); + (match open_path with + | None -> () + | Some v -> file_io_create_etw_event_set_open_path _res v); + _res + +let[@inline] file_io_dir_enum_etw_event_has_irp_ptr (self:file_io_dir_enum_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] file_io_dir_enum_etw_event_has_file_object (self:file_io_dir_enum_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] file_io_dir_enum_etw_event_has_file_key (self:file_io_dir_enum_etw_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] file_io_dir_enum_etw_event_has_ttid (self:file_io_dir_enum_etw_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] file_io_dir_enum_etw_event_has_length (self:file_io_dir_enum_etw_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] file_io_dir_enum_etw_event_has_info_class (self:file_io_dir_enum_etw_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] file_io_dir_enum_etw_event_has_file_index (self:file_io_dir_enum_etw_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] file_io_dir_enum_etw_event_has_file_name (self:file_io_dir_enum_etw_event) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] file_io_dir_enum_etw_event_set_irp_ptr (self:file_io_dir_enum_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.irp_ptr <- x +let[@inline] file_io_dir_enum_etw_event_set_file_object (self:file_io_dir_enum_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.file_object <- x +let[@inline] file_io_dir_enum_etw_event_set_file_key (self:file_io_dir_enum_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.file_key <- x +let[@inline] file_io_dir_enum_etw_event_set_ttid (self:file_io_dir_enum_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.ttid <- x +let[@inline] file_io_dir_enum_etw_event_set_length (self:file_io_dir_enum_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.length <- x +let[@inline] file_io_dir_enum_etw_event_set_info_class (self:file_io_dir_enum_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.info_class <- x +let[@inline] file_io_dir_enum_etw_event_set_file_index (self:file_io_dir_enum_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.file_index <- x +let[@inline] file_io_dir_enum_etw_event_set_file_name (self:file_io_dir_enum_etw_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.file_name <- x + +let copy_file_io_dir_enum_etw_event (self:file_io_dir_enum_etw_event) : file_io_dir_enum_etw_event = + { self with irp_ptr = self.irp_ptr } + +let make_file_io_dir_enum_etw_event + ?(irp_ptr:int64 option) + ?(file_object:int64 option) + ?(file_key:int64 option) + ?(ttid:int32 option) + ?(length:int32 option) + ?(info_class:int32 option) + ?(file_index:int32 option) + ?(file_name:string option) + () : file_io_dir_enum_etw_event = + let _res = default_file_io_dir_enum_etw_event () in + (match irp_ptr with + | None -> () + | Some v -> file_io_dir_enum_etw_event_set_irp_ptr _res v); + (match file_object with + | None -> () + | Some v -> file_io_dir_enum_etw_event_set_file_object _res v); + (match file_key with + | None -> () + | Some v -> file_io_dir_enum_etw_event_set_file_key _res v); + (match ttid with + | None -> () + | Some v -> file_io_dir_enum_etw_event_set_ttid _res v); + (match length with + | None -> () + | Some v -> file_io_dir_enum_etw_event_set_length _res v); + (match info_class with + | None -> () + | Some v -> file_io_dir_enum_etw_event_set_info_class _res v); + (match file_index with + | None -> () + | Some v -> file_io_dir_enum_etw_event_set_file_index _res v); + (match file_name with + | None -> () + | Some v -> file_io_dir_enum_etw_event_set_file_name _res v); + _res + +let[@inline] file_io_info_etw_event_has_irp_ptr (self:file_io_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] file_io_info_etw_event_has_file_object (self:file_io_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] file_io_info_etw_event_has_file_key (self:file_io_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] file_io_info_etw_event_has_extra_info (self:file_io_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] file_io_info_etw_event_has_ttid (self:file_io_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] file_io_info_etw_event_has_info_class (self:file_io_info_etw_event) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] file_io_info_etw_event_set_irp_ptr (self:file_io_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.irp_ptr <- x +let[@inline] file_io_info_etw_event_set_file_object (self:file_io_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.file_object <- x +let[@inline] file_io_info_etw_event_set_file_key (self:file_io_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.file_key <- x +let[@inline] file_io_info_etw_event_set_extra_info (self:file_io_info_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.extra_info <- x +let[@inline] file_io_info_etw_event_set_ttid (self:file_io_info_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.ttid <- x +let[@inline] file_io_info_etw_event_set_info_class (self:file_io_info_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.info_class <- x + +let copy_file_io_info_etw_event (self:file_io_info_etw_event) : file_io_info_etw_event = + { self with irp_ptr = self.irp_ptr } + +let make_file_io_info_etw_event + ?(irp_ptr:int64 option) + ?(file_object:int64 option) + ?(file_key:int64 option) + ?(extra_info:int64 option) + ?(ttid:int32 option) + ?(info_class:int32 option) + () : file_io_info_etw_event = + let _res = default_file_io_info_etw_event () in + (match irp_ptr with + | None -> () + | Some v -> file_io_info_etw_event_set_irp_ptr _res v); + (match file_object with + | None -> () + | Some v -> file_io_info_etw_event_set_file_object _res v); + (match file_key with + | None -> () + | Some v -> file_io_info_etw_event_set_file_key _res v); + (match extra_info with + | None -> () + | Some v -> file_io_info_etw_event_set_extra_info _res v); + (match ttid with + | None -> () + | Some v -> file_io_info_etw_event_set_ttid _res v); + (match info_class with + | None -> () + | Some v -> file_io_info_etw_event_set_info_class _res v); + _res + +let[@inline] file_io_read_write_etw_event_has_offset (self:file_io_read_write_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] file_io_read_write_etw_event_has_irp_ptr (self:file_io_read_write_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] file_io_read_write_etw_event_has_file_object (self:file_io_read_write_etw_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] file_io_read_write_etw_event_has_file_key (self:file_io_read_write_etw_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] file_io_read_write_etw_event_has_ttid (self:file_io_read_write_etw_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] file_io_read_write_etw_event_has_io_size (self:file_io_read_write_etw_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] file_io_read_write_etw_event_has_io_flags (self:file_io_read_write_etw_event) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] file_io_read_write_etw_event_set_offset (self:file_io_read_write_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.offset <- x +let[@inline] file_io_read_write_etw_event_set_irp_ptr (self:file_io_read_write_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.irp_ptr <- x +let[@inline] file_io_read_write_etw_event_set_file_object (self:file_io_read_write_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.file_object <- x +let[@inline] file_io_read_write_etw_event_set_file_key (self:file_io_read_write_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.file_key <- x +let[@inline] file_io_read_write_etw_event_set_ttid (self:file_io_read_write_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.ttid <- x +let[@inline] file_io_read_write_etw_event_set_io_size (self:file_io_read_write_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.io_size <- x +let[@inline] file_io_read_write_etw_event_set_io_flags (self:file_io_read_write_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.io_flags <- x + +let copy_file_io_read_write_etw_event (self:file_io_read_write_etw_event) : file_io_read_write_etw_event = + { self with offset = self.offset } + +let make_file_io_read_write_etw_event + ?(offset:int64 option) + ?(irp_ptr:int64 option) + ?(file_object:int64 option) + ?(file_key:int64 option) + ?(ttid:int32 option) + ?(io_size:int32 option) + ?(io_flags:int32 option) + () : file_io_read_write_etw_event = + let _res = default_file_io_read_write_etw_event () in + (match offset with + | None -> () + | Some v -> file_io_read_write_etw_event_set_offset _res v); + (match irp_ptr with + | None -> () + | Some v -> file_io_read_write_etw_event_set_irp_ptr _res v); + (match file_object with + | None -> () + | Some v -> file_io_read_write_etw_event_set_file_object _res v); + (match file_key with + | None -> () + | Some v -> file_io_read_write_etw_event_set_file_key _res v); + (match ttid with + | None -> () + | Some v -> file_io_read_write_etw_event_set_ttid _res v); + (match io_size with + | None -> () + | Some v -> file_io_read_write_etw_event_set_io_size _res v); + (match io_flags with + | None -> () + | Some v -> file_io_read_write_etw_event_set_io_flags _res v); + _res + +let[@inline] file_io_simple_op_etw_event_has_irp_ptr (self:file_io_simple_op_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] file_io_simple_op_etw_event_has_file_object (self:file_io_simple_op_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] file_io_simple_op_etw_event_has_file_key (self:file_io_simple_op_etw_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] file_io_simple_op_etw_event_has_ttid (self:file_io_simple_op_etw_event) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] file_io_simple_op_etw_event_set_irp_ptr (self:file_io_simple_op_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.irp_ptr <- x +let[@inline] file_io_simple_op_etw_event_set_file_object (self:file_io_simple_op_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.file_object <- x +let[@inline] file_io_simple_op_etw_event_set_file_key (self:file_io_simple_op_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.file_key <- x +let[@inline] file_io_simple_op_etw_event_set_ttid (self:file_io_simple_op_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.ttid <- x + +let copy_file_io_simple_op_etw_event (self:file_io_simple_op_etw_event) : file_io_simple_op_etw_event = + { self with irp_ptr = self.irp_ptr } + +let make_file_io_simple_op_etw_event + ?(irp_ptr:int64 option) + ?(file_object:int64 option) + ?(file_key:int64 option) + ?(ttid:int32 option) + () : file_io_simple_op_etw_event = + let _res = default_file_io_simple_op_etw_event () in + (match irp_ptr with + | None -> () + | Some v -> file_io_simple_op_etw_event_set_irp_ptr _res v); + (match file_object with + | None -> () + | Some v -> file_io_simple_op_etw_event_set_file_object _res v); + (match file_key with + | None -> () + | Some v -> file_io_simple_op_etw_event_set_file_key _res v); + (match ttid with + | None -> () + | Some v -> file_io_simple_op_etw_event_set_ttid _res v); + _res + +let[@inline] file_io_op_end_etw_event_has_irp_ptr (self:file_io_op_end_etw_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] file_io_op_end_etw_event_has_extra_info (self:file_io_op_end_etw_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] file_io_op_end_etw_event_has_nt_status (self:file_io_op_end_etw_event) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] file_io_op_end_etw_event_set_irp_ptr (self:file_io_op_end_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.irp_ptr <- x +let[@inline] file_io_op_end_etw_event_set_extra_info (self:file_io_op_end_etw_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.extra_info <- x +let[@inline] file_io_op_end_etw_event_set_nt_status (self:file_io_op_end_etw_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.nt_status <- x + +let copy_file_io_op_end_etw_event (self:file_io_op_end_etw_event) : file_io_op_end_etw_event = + { self with irp_ptr = self.irp_ptr } + +let make_file_io_op_end_etw_event + ?(irp_ptr:int64 option) + ?(extra_info:int64 option) + ?(nt_status:int32 option) + () : file_io_op_end_etw_event = + let _res = default_file_io_op_end_etw_event () in + (match irp_ptr with + | None -> () + | Some v -> file_io_op_end_etw_event_set_irp_ptr _res v); + (match extra_info with + | None -> () + | Some v -> file_io_op_end_etw_event_set_extra_info _res v); + (match nt_status with + | None -> () + | Some v -> file_io_op_end_etw_event_set_nt_status _res v); + _res + +let[@inline] etw_trace_event_has_timestamp (self:etw_trace_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] etw_trace_event_has_cpu (self:etw_trace_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] etw_trace_event_has_thread_id (self:etw_trace_event) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] etw_trace_event_set_timestamp (self:etw_trace_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.timestamp <- x +let[@inline] etw_trace_event_set_cpu (self:etw_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.cpu <- x +let[@inline] etw_trace_event_set_thread_id (self:etw_trace_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.thread_id <- x +let[@inline] etw_trace_event_set_event (self:etw_trace_event) (x:etw_trace_event_event) : unit = + self.event <- Some x + +let copy_etw_trace_event (self:etw_trace_event) : etw_trace_event = + { self with timestamp = self.timestamp } + +let make_etw_trace_event + ?(timestamp:int64 option) + ?(cpu:int32 option) + ?(thread_id:int32 option) + ?(event:etw_trace_event_event option) + () : etw_trace_event = + let _res = default_etw_trace_event () in + (match timestamp with + | None -> () + | Some v -> etw_trace_event_set_timestamp _res v); + (match cpu with + | None -> () + | Some v -> etw_trace_event_set_cpu _res v); + (match thread_id with + | None -> () + | Some v -> etw_trace_event_set_thread_id _res v); + (match event with + | None -> () + | Some v -> etw_trace_event_set_event _res v); + _res + +let[@inline] etw_trace_event_bundle_has_cpu (self:etw_trace_event_bundle) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] etw_trace_event_bundle_set_cpu (self:etw_trace_event_bundle) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cpu <- x +let[@inline] etw_trace_event_bundle_set_event (self:etw_trace_event_bundle) (x:etw_trace_event list) : unit = + self.event <- x + +let copy_etw_trace_event_bundle (self:etw_trace_event_bundle) : etw_trace_event_bundle = + { self with cpu = self.cpu } + +let make_etw_trace_event_bundle + ?(cpu:int32 option) + ?(event=[]) + () : etw_trace_event_bundle = + let _res = default_etw_trace_event_bundle () in + (match cpu with + | None -> () + | Some v -> etw_trace_event_bundle_set_cpu _res v); + etw_trace_event_bundle_set_event _res event; + _res + +let[@inline] evdev_event_input_event_has_kernel_timestamp (self:evdev_event_input_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] evdev_event_input_event_has_type_ (self:evdev_event_input_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] evdev_event_input_event_has_code (self:evdev_event_input_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] evdev_event_input_event_has_value (self:evdev_event_input_event) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] evdev_event_input_event_set_kernel_timestamp (self:evdev_event_input_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.kernel_timestamp <- x +let[@inline] evdev_event_input_event_set_type_ (self:evdev_event_input_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.type_ <- x +let[@inline] evdev_event_input_event_set_code (self:evdev_event_input_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.code <- x +let[@inline] evdev_event_input_event_set_value (self:evdev_event_input_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.value <- x + +let copy_evdev_event_input_event (self:evdev_event_input_event) : evdev_event_input_event = + { self with kernel_timestamp = self.kernel_timestamp } + +let make_evdev_event_input_event + ?(kernel_timestamp:int64 option) + ?(type_:int32 option) + ?(code:int32 option) + ?(value:int32 option) + () : evdev_event_input_event = + let _res = default_evdev_event_input_event () in + (match kernel_timestamp with + | None -> () + | Some v -> evdev_event_input_event_set_kernel_timestamp _res v); + (match type_ with + | None -> () + | Some v -> evdev_event_input_event_set_type_ _res v); + (match code with + | None -> () + | Some v -> evdev_event_input_event_set_code _res v); + (match value with + | None -> () + | Some v -> evdev_event_input_event_set_value _res v); + _res + +let[@inline] evdev_event_has_device_id (self:evdev_event) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] evdev_event_set_device_id (self:evdev_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.device_id <- x +let[@inline] evdev_event_set_event (self:evdev_event) (x:evdev_event_event) : unit = + self.event <- Some x + +let copy_evdev_event (self:evdev_event) : evdev_event = + { self with device_id = self.device_id } + +let make_evdev_event + ?(device_id:int32 option) + ?(event:evdev_event_event option) + () : evdev_event = + let _res = default_evdev_event () in + (match device_id with + | None -> () + | Some v -> evdev_event_set_device_id _res v); + (match event with + | None -> () + | Some v -> evdev_event_set_event _res v); + _res + +let[@inline] uninterpreted_option_name_part_has_name_part (self:uninterpreted_option_name_part) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] uninterpreted_option_name_part_has_is_extension (self:uninterpreted_option_name_part) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] uninterpreted_option_name_part_set_name_part (self:uninterpreted_option_name_part) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name_part <- x +let[@inline] uninterpreted_option_name_part_set_is_extension (self:uninterpreted_option_name_part) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.is_extension <- x + +let copy_uninterpreted_option_name_part (self:uninterpreted_option_name_part) : uninterpreted_option_name_part = + { self with name_part = self.name_part } + +let make_uninterpreted_option_name_part + ?(name_part:string option) + ?(is_extension:bool option) + () : uninterpreted_option_name_part = + let _res = default_uninterpreted_option_name_part () in + (match name_part with + | None -> () + | Some v -> uninterpreted_option_name_part_set_name_part _res v); + (match is_extension with + | None -> () + | Some v -> uninterpreted_option_name_part_set_is_extension _res v); + _res + +let[@inline] uninterpreted_option_has_identifier_value (self:uninterpreted_option) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] uninterpreted_option_has_positive_int_value (self:uninterpreted_option) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] uninterpreted_option_has_negative_int_value (self:uninterpreted_option) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] uninterpreted_option_has_double_value (self:uninterpreted_option) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] uninterpreted_option_has_string_value (self:uninterpreted_option) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] uninterpreted_option_has_aggregate_value (self:uninterpreted_option) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] uninterpreted_option_set_name (self:uninterpreted_option) (x:uninterpreted_option_name_part list) : unit = + self.name <- x +let[@inline] uninterpreted_option_set_identifier_value (self:uninterpreted_option) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.identifier_value <- x +let[@inline] uninterpreted_option_set_positive_int_value (self:uninterpreted_option) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.positive_int_value <- x +let[@inline] uninterpreted_option_set_negative_int_value (self:uninterpreted_option) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.negative_int_value <- x +let[@inline] uninterpreted_option_set_double_value (self:uninterpreted_option) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.double_value <- x +let[@inline] uninterpreted_option_set_string_value (self:uninterpreted_option) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.string_value <- x +let[@inline] uninterpreted_option_set_aggregate_value (self:uninterpreted_option) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.aggregate_value <- x + +let copy_uninterpreted_option (self:uninterpreted_option) : uninterpreted_option = + { self with name = self.name } + +let make_uninterpreted_option + ?(name=[]) + ?(identifier_value:string option) + ?(positive_int_value:int64 option) + ?(negative_int_value:int64 option) + ?(double_value:float option) + ?(string_value:bytes option) + ?(aggregate_value:string option) + () : uninterpreted_option = + let _res = default_uninterpreted_option () in + uninterpreted_option_set_name _res name; + (match identifier_value with + | None -> () + | Some v -> uninterpreted_option_set_identifier_value _res v); + (match positive_int_value with + | None -> () + | Some v -> uninterpreted_option_set_positive_int_value _res v); + (match negative_int_value with + | None -> () + | Some v -> uninterpreted_option_set_negative_int_value _res v); + (match double_value with + | None -> () + | Some v -> uninterpreted_option_set_double_value _res v); + (match string_value with + | None -> () + | Some v -> uninterpreted_option_set_string_value _res v); + (match aggregate_value with + | None -> () + | Some v -> uninterpreted_option_set_aggregate_value _res v); + _res + +let[@inline] field_options_has_packed (self:field_options) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] field_options_set_packed (self:field_options) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.packed <- x +let[@inline] field_options_set_uninterpreted_option (self:field_options) (x:uninterpreted_option list) : unit = + self.uninterpreted_option <- x + +let copy_field_options (self:field_options) : field_options = + { self with packed = self.packed } + +let make_field_options + ?(packed:bool option) + ?(uninterpreted_option=[]) + () : field_options = + let _res = default_field_options () in + (match packed with + | None -> () + | Some v -> field_options_set_packed _res v); + field_options_set_uninterpreted_option _res uninterpreted_option; + _res + +let[@inline] field_descriptor_proto_has_name (self:field_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] field_descriptor_proto_has_number (self:field_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] field_descriptor_proto_has_label (self:field_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] field_descriptor_proto_has_type_ (self:field_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] field_descriptor_proto_has_type_name (self:field_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] field_descriptor_proto_has_extendee (self:field_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] field_descriptor_proto_has_default_value (self:field_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] field_descriptor_proto_has_oneof_index (self:field_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] field_descriptor_proto_set_name (self:field_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] field_descriptor_proto_set_number (self:field_descriptor_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.number <- x +let[@inline] field_descriptor_proto_set_label (self:field_descriptor_proto) (x:field_descriptor_proto_label) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.label <- x +let[@inline] field_descriptor_proto_set_type_ (self:field_descriptor_proto) (x:field_descriptor_proto_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.type_ <- x +let[@inline] field_descriptor_proto_set_type_name (self:field_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.type_name <- x +let[@inline] field_descriptor_proto_set_extendee (self:field_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.extendee <- x +let[@inline] field_descriptor_proto_set_default_value (self:field_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.default_value <- x +let[@inline] field_descriptor_proto_set_options (self:field_descriptor_proto) (x:field_options) : unit = + self.options <- Some x +let[@inline] field_descriptor_proto_set_oneof_index (self:field_descriptor_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.oneof_index <- x + +let copy_field_descriptor_proto (self:field_descriptor_proto) : field_descriptor_proto = + { self with name = self.name } + +let make_field_descriptor_proto + ?(name:string option) + ?(number:int32 option) + ?(label:field_descriptor_proto_label option) + ?(type_:field_descriptor_proto_type option) + ?(type_name:string option) + ?(extendee:string option) + ?(default_value:string option) + ?(options:field_options option) + ?(oneof_index:int32 option) + () : field_descriptor_proto = + let _res = default_field_descriptor_proto () in + (match name with + | None -> () + | Some v -> field_descriptor_proto_set_name _res v); + (match number with + | None -> () + | Some v -> field_descriptor_proto_set_number _res v); + (match label with + | None -> () + | Some v -> field_descriptor_proto_set_label _res v); + (match type_ with + | None -> () + | Some v -> field_descriptor_proto_set_type_ _res v); + (match type_name with + | None -> () + | Some v -> field_descriptor_proto_set_type_name _res v); + (match extendee with + | None -> () + | Some v -> field_descriptor_proto_set_extendee _res v); + (match default_value with + | None -> () + | Some v -> field_descriptor_proto_set_default_value _res v); + (match options with + | None -> () + | Some v -> field_descriptor_proto_set_options _res v); + (match oneof_index with + | None -> () + | Some v -> field_descriptor_proto_set_oneof_index _res v); + _res + +let[@inline] enum_value_descriptor_proto_has_name (self:enum_value_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] enum_value_descriptor_proto_has_number (self:enum_value_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] enum_value_descriptor_proto_set_name (self:enum_value_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] enum_value_descriptor_proto_set_number (self:enum_value_descriptor_proto) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.number <- x + +let copy_enum_value_descriptor_proto (self:enum_value_descriptor_proto) : enum_value_descriptor_proto = + { self with name = self.name } + +let make_enum_value_descriptor_proto + ?(name:string option) + ?(number:int32 option) + () : enum_value_descriptor_proto = + let _res = default_enum_value_descriptor_proto () in + (match name with + | None -> () + | Some v -> enum_value_descriptor_proto_set_name _res v); + (match number with + | None -> () + | Some v -> enum_value_descriptor_proto_set_number _res v); + _res + +let[@inline] enum_descriptor_proto_has_name (self:enum_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] enum_descriptor_proto_set_name (self:enum_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] enum_descriptor_proto_set_value (self:enum_descriptor_proto) (x:enum_value_descriptor_proto list) : unit = + self.value <- x +let[@inline] enum_descriptor_proto_set_reserved_name (self:enum_descriptor_proto) (x:string list) : unit = + self.reserved_name <- x + +let copy_enum_descriptor_proto (self:enum_descriptor_proto) : enum_descriptor_proto = + { self with name = self.name } + +let make_enum_descriptor_proto + ?(name:string option) + ?(value=[]) + ?(reserved_name=[]) + () : enum_descriptor_proto = + let _res = default_enum_descriptor_proto () in + (match name with + | None -> () + | Some v -> enum_descriptor_proto_set_name _res v); + enum_descriptor_proto_set_value _res value; + enum_descriptor_proto_set_reserved_name _res reserved_name; + _res + +let[@inline] oneof_descriptor_proto_has_name (self:oneof_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] oneof_descriptor_proto_has_options (self:oneof_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] oneof_descriptor_proto_set_name (self:oneof_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] oneof_descriptor_proto_set_options (self:oneof_descriptor_proto) (x:unit) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.options <- x + +let copy_oneof_descriptor_proto (self:oneof_descriptor_proto) : oneof_descriptor_proto = + { self with name = self.name } + +let make_oneof_descriptor_proto + ?(name:string option) + ?(options:unit option) + () : oneof_descriptor_proto = + let _res = default_oneof_descriptor_proto () in + (match name with + | None -> () + | Some v -> oneof_descriptor_proto_set_name _res v); + (match options with + | None -> () + | Some v -> oneof_descriptor_proto_set_options _res v); + _res + +let[@inline] descriptor_proto_reserved_range_has_start (self:descriptor_proto_reserved_range) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] descriptor_proto_reserved_range_has_end_ (self:descriptor_proto_reserved_range) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] descriptor_proto_reserved_range_set_start (self:descriptor_proto_reserved_range) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.start <- x +let[@inline] descriptor_proto_reserved_range_set_end_ (self:descriptor_proto_reserved_range) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.end_ <- x + +let copy_descriptor_proto_reserved_range (self:descriptor_proto_reserved_range) : descriptor_proto_reserved_range = + { self with start = self.start } + +let make_descriptor_proto_reserved_range + ?(start:int32 option) + ?(end_:int32 option) + () : descriptor_proto_reserved_range = + let _res = default_descriptor_proto_reserved_range () in + (match start with + | None -> () + | Some v -> descriptor_proto_reserved_range_set_start _res v); + (match end_ with + | None -> () + | Some v -> descriptor_proto_reserved_range_set_end_ _res v); + _res + +let[@inline] descriptor_proto_has_name (self:descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] descriptor_proto_set_name (self:descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] descriptor_proto_set_field (self:descriptor_proto) (x:field_descriptor_proto list) : unit = + self.field <- x +let[@inline] descriptor_proto_set_extension (self:descriptor_proto) (x:field_descriptor_proto list) : unit = + self.extension <- x +let[@inline] descriptor_proto_set_nested_type (self:descriptor_proto) (x:descriptor_proto list) : unit = + self.nested_type <- x +let[@inline] descriptor_proto_set_enum_type (self:descriptor_proto) (x:enum_descriptor_proto list) : unit = + self.enum_type <- x +let[@inline] descriptor_proto_set_oneof_decl (self:descriptor_proto) (x:oneof_descriptor_proto list) : unit = + self.oneof_decl <- x +let[@inline] descriptor_proto_set_reserved_range (self:descriptor_proto) (x:descriptor_proto_reserved_range list) : unit = + self.reserved_range <- x +let[@inline] descriptor_proto_set_reserved_name (self:descriptor_proto) (x:string list) : unit = + self.reserved_name <- x + +let copy_descriptor_proto (self:descriptor_proto) : descriptor_proto = + { self with name = self.name } + +let make_descriptor_proto + ?(name:string option) + ?(field=[]) + ?(extension=[]) + ?(nested_type=[]) + ?(enum_type=[]) + ?(oneof_decl=[]) + ?(reserved_range=[]) + ?(reserved_name=[]) + () : descriptor_proto = + let _res = default_descriptor_proto () in + (match name with + | None -> () + | Some v -> descriptor_proto_set_name _res v); + descriptor_proto_set_field _res field; + descriptor_proto_set_extension _res extension; + descriptor_proto_set_nested_type _res nested_type; + descriptor_proto_set_enum_type _res enum_type; + descriptor_proto_set_oneof_decl _res oneof_decl; + descriptor_proto_set_reserved_range _res reserved_range; + descriptor_proto_set_reserved_name _res reserved_name; + _res + +let[@inline] file_descriptor_proto_has_name (self:file_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] file_descriptor_proto_has_package (self:file_descriptor_proto) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] file_descriptor_proto_set_name (self:file_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] file_descriptor_proto_set_package (self:file_descriptor_proto) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.package <- x +let[@inline] file_descriptor_proto_set_dependency (self:file_descriptor_proto) (x:string list) : unit = + self.dependency <- x +let[@inline] file_descriptor_proto_set_public_dependency (self:file_descriptor_proto) (x:int32 list) : unit = + self.public_dependency <- x +let[@inline] file_descriptor_proto_set_weak_dependency (self:file_descriptor_proto) (x:int32 list) : unit = + self.weak_dependency <- x +let[@inline] file_descriptor_proto_set_message_type (self:file_descriptor_proto) (x:descriptor_proto list) : unit = + self.message_type <- x +let[@inline] file_descriptor_proto_set_enum_type (self:file_descriptor_proto) (x:enum_descriptor_proto list) : unit = + self.enum_type <- x +let[@inline] file_descriptor_proto_set_extension (self:file_descriptor_proto) (x:field_descriptor_proto list) : unit = + self.extension <- x + +let copy_file_descriptor_proto (self:file_descriptor_proto) : file_descriptor_proto = + { self with name = self.name } + +let make_file_descriptor_proto + ?(name:string option) + ?(package:string option) + ?(dependency=[]) + ?(public_dependency=[]) + ?(weak_dependency=[]) + ?(message_type=[]) + ?(enum_type=[]) + ?(extension=[]) + () : file_descriptor_proto = + let _res = default_file_descriptor_proto () in + (match name with + | None -> () + | Some v -> file_descriptor_proto_set_name _res v); + (match package with + | None -> () + | Some v -> file_descriptor_proto_set_package _res v); + file_descriptor_proto_set_dependency _res dependency; + file_descriptor_proto_set_public_dependency _res public_dependency; + file_descriptor_proto_set_weak_dependency _res weak_dependency; + file_descriptor_proto_set_message_type _res message_type; + file_descriptor_proto_set_enum_type _res enum_type; + file_descriptor_proto_set_extension _res extension; + _res + + +let[@inline] file_descriptor_set_set_file (self:file_descriptor_set) (x:file_descriptor_proto list) : unit = + self.file <- x + +let copy_file_descriptor_set (self:file_descriptor_set) : file_descriptor_set = + { self with file = self.file } + +let make_file_descriptor_set + ?(file=[]) + () : file_descriptor_set = + let _res = default_file_descriptor_set () in + file_descriptor_set_set_file _res file; + _res + + +let[@inline] extension_descriptor_set_extension_set (self:extension_descriptor) (x:file_descriptor_set) : unit = + self.extension_set <- Some x + +let copy_extension_descriptor (self:extension_descriptor) : extension_descriptor = + { self with extension_set = self.extension_set } + +let make_extension_descriptor + ?(extension_set:file_descriptor_set option) + () : extension_descriptor = + let _res = default_extension_descriptor () in + (match extension_set with + | None -> () + | Some v -> extension_descriptor_set_extension_set _res v); + _res + +let[@inline] inode_file_map_entry_has_inode_number (self:inode_file_map_entry) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] inode_file_map_entry_has_type_ (self:inode_file_map_entry) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] inode_file_map_entry_set_inode_number (self:inode_file_map_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.inode_number <- x +let[@inline] inode_file_map_entry_set_paths (self:inode_file_map_entry) (x:string list) : unit = + self.paths <- x +let[@inline] inode_file_map_entry_set_type_ (self:inode_file_map_entry) (x:inode_file_map_entry_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.type_ <- x + +let copy_inode_file_map_entry (self:inode_file_map_entry) : inode_file_map_entry = + { self with inode_number = self.inode_number } + +let make_inode_file_map_entry + ?(inode_number:int64 option) + ?(paths=[]) + ?(type_:inode_file_map_entry_type option) + () : inode_file_map_entry = + let _res = default_inode_file_map_entry () in + (match inode_number with + | None -> () + | Some v -> inode_file_map_entry_set_inode_number _res v); + inode_file_map_entry_set_paths _res paths; + (match type_ with + | None -> () + | Some v -> inode_file_map_entry_set_type_ _res v); + _res + +let[@inline] inode_file_map_has_block_device_id (self:inode_file_map) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] inode_file_map_set_block_device_id (self:inode_file_map) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.block_device_id <- x +let[@inline] inode_file_map_set_mount_points (self:inode_file_map) (x:string list) : unit = + self.mount_points <- x +let[@inline] inode_file_map_set_entries (self:inode_file_map) (x:inode_file_map_entry list) : unit = + self.entries <- x + +let copy_inode_file_map (self:inode_file_map) : inode_file_map = + { self with block_device_id = self.block_device_id } + +let make_inode_file_map + ?(block_device_id:int64 option) + ?(mount_points=[]) + ?(entries=[]) + () : inode_file_map = + let _res = default_inode_file_map () in + (match block_device_id with + | None -> () + | Some v -> inode_file_map_set_block_device_id _res v); + inode_file_map_set_mount_points _res mount_points; + inode_file_map_set_entries _res entries; + _res + +let[@inline] generic_kernel_cpu_frequency_event_has_cpu (self:generic_kernel_cpu_frequency_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] generic_kernel_cpu_frequency_event_has_freq_hz (self:generic_kernel_cpu_frequency_event) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] generic_kernel_cpu_frequency_event_set_cpu (self:generic_kernel_cpu_frequency_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cpu <- x +let[@inline] generic_kernel_cpu_frequency_event_set_freq_hz (self:generic_kernel_cpu_frequency_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.freq_hz <- x + +let copy_generic_kernel_cpu_frequency_event (self:generic_kernel_cpu_frequency_event) : generic_kernel_cpu_frequency_event = + { self with cpu = self.cpu } + +let make_generic_kernel_cpu_frequency_event + ?(cpu:int32 option) + ?(freq_hz:int64 option) + () : generic_kernel_cpu_frequency_event = + let _res = default_generic_kernel_cpu_frequency_event () in + (match cpu with + | None -> () + | Some v -> generic_kernel_cpu_frequency_event_set_cpu _res v); + (match freq_hz with + | None -> () + | Some v -> generic_kernel_cpu_frequency_event_set_freq_hz _res v); + _res + +let[@inline] generic_kernel_task_state_event_has_cpu (self:generic_kernel_task_state_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] generic_kernel_task_state_event_has_comm (self:generic_kernel_task_state_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] generic_kernel_task_state_event_has_tid (self:generic_kernel_task_state_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] generic_kernel_task_state_event_has_state (self:generic_kernel_task_state_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] generic_kernel_task_state_event_has_prio (self:generic_kernel_task_state_event) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] generic_kernel_task_state_event_set_cpu (self:generic_kernel_task_state_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cpu <- x +let[@inline] generic_kernel_task_state_event_set_comm (self:generic_kernel_task_state_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.comm <- x +let[@inline] generic_kernel_task_state_event_set_tid (self:generic_kernel_task_state_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.tid <- x +let[@inline] generic_kernel_task_state_event_set_state (self:generic_kernel_task_state_event) (x:generic_kernel_task_state_event_task_state_enum) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.state <- x +let[@inline] generic_kernel_task_state_event_set_prio (self:generic_kernel_task_state_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.prio <- x + +let copy_generic_kernel_task_state_event (self:generic_kernel_task_state_event) : generic_kernel_task_state_event = + { self with cpu = self.cpu } + +let make_generic_kernel_task_state_event + ?(cpu:int32 option) + ?(comm:string option) + ?(tid:int64 option) + ?(state:generic_kernel_task_state_event_task_state_enum option) + ?(prio:int32 option) + () : generic_kernel_task_state_event = + let _res = default_generic_kernel_task_state_event () in + (match cpu with + | None -> () + | Some v -> generic_kernel_task_state_event_set_cpu _res v); + (match comm with + | None -> () + | Some v -> generic_kernel_task_state_event_set_comm _res v); + (match tid with + | None -> () + | Some v -> generic_kernel_task_state_event_set_tid _res v); + (match state with + | None -> () + | Some v -> generic_kernel_task_state_event_set_state _res v); + (match prio with + | None -> () + | Some v -> generic_kernel_task_state_event_set_prio _res v); + _res + +let[@inline] generic_kernel_task_rename_event_has_tid (self:generic_kernel_task_rename_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] generic_kernel_task_rename_event_has_comm (self:generic_kernel_task_rename_event) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] generic_kernel_task_rename_event_set_tid (self:generic_kernel_task_rename_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.tid <- x +let[@inline] generic_kernel_task_rename_event_set_comm (self:generic_kernel_task_rename_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.comm <- x + +let copy_generic_kernel_task_rename_event (self:generic_kernel_task_rename_event) : generic_kernel_task_rename_event = + { self with tid = self.tid } + +let make_generic_kernel_task_rename_event + ?(tid:int64 option) + ?(comm:string option) + () : generic_kernel_task_rename_event = + let _res = default_generic_kernel_task_rename_event () in + (match tid with + | None -> () + | Some v -> generic_kernel_task_rename_event_set_tid _res v); + (match comm with + | None -> () + | Some v -> generic_kernel_task_rename_event_set_comm _res v); + _res + +let[@inline] generic_kernel_process_tree_thread_has_tid (self:generic_kernel_process_tree_thread) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] generic_kernel_process_tree_thread_has_pid (self:generic_kernel_process_tree_thread) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] generic_kernel_process_tree_thread_has_comm (self:generic_kernel_process_tree_thread) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] generic_kernel_process_tree_thread_has_is_main_thread (self:generic_kernel_process_tree_thread) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] generic_kernel_process_tree_thread_set_tid (self:generic_kernel_process_tree_thread) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.tid <- x +let[@inline] generic_kernel_process_tree_thread_set_pid (self:generic_kernel_process_tree_thread) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.pid <- x +let[@inline] generic_kernel_process_tree_thread_set_comm (self:generic_kernel_process_tree_thread) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.comm <- x +let[@inline] generic_kernel_process_tree_thread_set_is_main_thread (self:generic_kernel_process_tree_thread) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.is_main_thread <- x + +let copy_generic_kernel_process_tree_thread (self:generic_kernel_process_tree_thread) : generic_kernel_process_tree_thread = + { self with tid = self.tid } + +let make_generic_kernel_process_tree_thread + ?(tid:int64 option) + ?(pid:int64 option) + ?(comm:string option) + ?(is_main_thread:bool option) + () : generic_kernel_process_tree_thread = + let _res = default_generic_kernel_process_tree_thread () in + (match tid with + | None -> () + | Some v -> generic_kernel_process_tree_thread_set_tid _res v); + (match pid with + | None -> () + | Some v -> generic_kernel_process_tree_thread_set_pid _res v); + (match comm with + | None -> () + | Some v -> generic_kernel_process_tree_thread_set_comm _res v); + (match is_main_thread with + | None -> () + | Some v -> generic_kernel_process_tree_thread_set_is_main_thread _res v); + _res + +let[@inline] generic_kernel_process_tree_process_has_pid (self:generic_kernel_process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] generic_kernel_process_tree_process_has_ppid (self:generic_kernel_process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] generic_kernel_process_tree_process_has_cmdline (self:generic_kernel_process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] generic_kernel_process_tree_process_set_pid (self:generic_kernel_process_tree_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] generic_kernel_process_tree_process_set_ppid (self:generic_kernel_process_tree_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.ppid <- x +let[@inline] generic_kernel_process_tree_process_set_cmdline (self:generic_kernel_process_tree_process) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.cmdline <- x + +let copy_generic_kernel_process_tree_process (self:generic_kernel_process_tree_process) : generic_kernel_process_tree_process = + { self with pid = self.pid } + +let make_generic_kernel_process_tree_process + ?(pid:int64 option) + ?(ppid:int64 option) + ?(cmdline:string option) + () : generic_kernel_process_tree_process = + let _res = default_generic_kernel_process_tree_process () in + (match pid with + | None -> () + | Some v -> generic_kernel_process_tree_process_set_pid _res v); + (match ppid with + | None -> () + | Some v -> generic_kernel_process_tree_process_set_ppid _res v); + (match cmdline with + | None -> () + | Some v -> generic_kernel_process_tree_process_set_cmdline _res v); + _res + + +let[@inline] generic_kernel_process_tree_set_processes (self:generic_kernel_process_tree) (x:generic_kernel_process_tree_process list) : unit = + self.processes <- x +let[@inline] generic_kernel_process_tree_set_threads (self:generic_kernel_process_tree) (x:generic_kernel_process_tree_thread list) : unit = + self.threads <- x + +let copy_generic_kernel_process_tree (self:generic_kernel_process_tree) : generic_kernel_process_tree = + { self with processes = self.processes } + +let make_generic_kernel_process_tree + ?(processes=[]) + ?(threads=[]) + () : generic_kernel_process_tree = + let _res = default_generic_kernel_process_tree () in + generic_kernel_process_tree_set_processes _res processes; + generic_kernel_process_tree_set_threads _res threads; + _res + +let[@inline] gpu_counter_event_gpu_counter_has_counter_id (self:gpu_counter_event_gpu_counter) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] gpu_counter_event_gpu_counter_set_counter_id (self:gpu_counter_event_gpu_counter) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.counter_id <- x +let[@inline] gpu_counter_event_gpu_counter_set_value (self:gpu_counter_event_gpu_counter) (x:gpu_counter_event_gpu_counter_value) : unit = + self.value <- Some x + +let copy_gpu_counter_event_gpu_counter (self:gpu_counter_event_gpu_counter) : gpu_counter_event_gpu_counter = + { self with counter_id = self.counter_id } + +let make_gpu_counter_event_gpu_counter + ?(counter_id:int32 option) + ?(value:gpu_counter_event_gpu_counter_value option) + () : gpu_counter_event_gpu_counter = + let _res = default_gpu_counter_event_gpu_counter () in + (match counter_id with + | None -> () + | Some v -> gpu_counter_event_gpu_counter_set_counter_id _res v); + (match value with + | None -> () + | Some v -> gpu_counter_event_gpu_counter_set_value _res v); + _res + +let[@inline] gpu_counter_event_has_gpu_id (self:gpu_counter_event) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] gpu_counter_event_set_counter_descriptor (self:gpu_counter_event) (x:gpu_counter_descriptor) : unit = + self.counter_descriptor <- Some x +let[@inline] gpu_counter_event_set_counters (self:gpu_counter_event) (x:gpu_counter_event_gpu_counter list) : unit = + self.counters <- x +let[@inline] gpu_counter_event_set_gpu_id (self:gpu_counter_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.gpu_id <- x + +let copy_gpu_counter_event (self:gpu_counter_event) : gpu_counter_event = + { self with counter_descriptor = self.counter_descriptor } + +let make_gpu_counter_event + ?(counter_descriptor:gpu_counter_descriptor option) + ?(counters=[]) + ?(gpu_id:int32 option) + () : gpu_counter_event = + let _res = default_gpu_counter_event () in + (match counter_descriptor with + | None -> () + | Some v -> gpu_counter_event_set_counter_descriptor _res v); + gpu_counter_event_set_counters _res counters; + (match gpu_id with + | None -> () + | Some v -> gpu_counter_event_set_gpu_id _res v); + _res + +let[@inline] gpu_log_has_severity (self:gpu_log) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_log_has_tag (self:gpu_log) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] gpu_log_has_log_message (self:gpu_log) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] gpu_log_set_severity (self:gpu_log) (x:gpu_log_severity) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.severity <- x +let[@inline] gpu_log_set_tag (self:gpu_log) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tag <- x +let[@inline] gpu_log_set_log_message (self:gpu_log) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.log_message <- x + +let copy_gpu_log (self:gpu_log) : gpu_log = + { self with severity = self.severity } + +let make_gpu_log + ?(severity:gpu_log_severity option) + ?(tag:string option) + ?(log_message:string option) + () : gpu_log = + let _res = default_gpu_log () in + (match severity with + | None -> () + | Some v -> gpu_log_set_severity _res v); + (match tag with + | None -> () + | Some v -> gpu_log_set_tag _res v); + (match log_message with + | None -> () + | Some v -> gpu_log_set_log_message _res v); + _res + +let[@inline] gpu_render_stage_event_extra_data_has_name (self:gpu_render_stage_event_extra_data) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_render_stage_event_extra_data_has_value (self:gpu_render_stage_event_extra_data) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] gpu_render_stage_event_extra_data_set_name (self:gpu_render_stage_event_extra_data) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] gpu_render_stage_event_extra_data_set_value (self:gpu_render_stage_event_extra_data) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.value <- x + +let copy_gpu_render_stage_event_extra_data (self:gpu_render_stage_event_extra_data) : gpu_render_stage_event_extra_data = + { self with name = self.name } + +let make_gpu_render_stage_event_extra_data + ?(name:string option) + ?(value:string option) + () : gpu_render_stage_event_extra_data = + let _res = default_gpu_render_stage_event_extra_data () in + (match name with + | None -> () + | Some v -> gpu_render_stage_event_extra_data_set_name _res v); + (match value with + | None -> () + | Some v -> gpu_render_stage_event_extra_data_set_value _res v); + _res + +let[@inline] gpu_render_stage_event_specifications_context_spec_has_context (self:gpu_render_stage_event_specifications_context_spec) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_render_stage_event_specifications_context_spec_has_pid (self:gpu_render_stage_event_specifications_context_spec) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] gpu_render_stage_event_specifications_context_spec_set_context (self:gpu_render_stage_event_specifications_context_spec) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.context <- x +let[@inline] gpu_render_stage_event_specifications_context_spec_set_pid (self:gpu_render_stage_event_specifications_context_spec) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.pid <- x + +let copy_gpu_render_stage_event_specifications_context_spec (self:gpu_render_stage_event_specifications_context_spec) : gpu_render_stage_event_specifications_context_spec = + { self with context = self.context } + +let make_gpu_render_stage_event_specifications_context_spec + ?(context:int64 option) + ?(pid:int32 option) + () : gpu_render_stage_event_specifications_context_spec = + let _res = default_gpu_render_stage_event_specifications_context_spec () in + (match context with + | None -> () + | Some v -> gpu_render_stage_event_specifications_context_spec_set_context _res v); + (match pid with + | None -> () + | Some v -> gpu_render_stage_event_specifications_context_spec_set_pid _res v); + _res + +let[@inline] gpu_render_stage_event_specifications_description_has_name (self:gpu_render_stage_event_specifications_description) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_render_stage_event_specifications_description_has_description (self:gpu_render_stage_event_specifications_description) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] gpu_render_stage_event_specifications_description_set_name (self:gpu_render_stage_event_specifications_description) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] gpu_render_stage_event_specifications_description_set_description (self:gpu_render_stage_event_specifications_description) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.description <- x + +let copy_gpu_render_stage_event_specifications_description (self:gpu_render_stage_event_specifications_description) : gpu_render_stage_event_specifications_description = + { self with name = self.name } + +let make_gpu_render_stage_event_specifications_description + ?(name:string option) + ?(description:string option) + () : gpu_render_stage_event_specifications_description = + let _res = default_gpu_render_stage_event_specifications_description () in + (match name with + | None -> () + | Some v -> gpu_render_stage_event_specifications_description_set_name _res v); + (match description with + | None -> () + | Some v -> gpu_render_stage_event_specifications_description_set_description _res v); + _res + + +let[@inline] gpu_render_stage_event_specifications_set_context_spec (self:gpu_render_stage_event_specifications) (x:gpu_render_stage_event_specifications_context_spec) : unit = + self.context_spec <- Some x +let[@inline] gpu_render_stage_event_specifications_set_hw_queue (self:gpu_render_stage_event_specifications) (x:gpu_render_stage_event_specifications_description list) : unit = + self.hw_queue <- x +let[@inline] gpu_render_stage_event_specifications_set_stage (self:gpu_render_stage_event_specifications) (x:gpu_render_stage_event_specifications_description list) : unit = + self.stage <- x + +let copy_gpu_render_stage_event_specifications (self:gpu_render_stage_event_specifications) : gpu_render_stage_event_specifications = + { self with context_spec = self.context_spec } + +let make_gpu_render_stage_event_specifications + ?(context_spec:gpu_render_stage_event_specifications_context_spec option) + ?(hw_queue=[]) + ?(stage=[]) + () : gpu_render_stage_event_specifications = + let _res = default_gpu_render_stage_event_specifications () in + (match context_spec with + | None -> () + | Some v -> gpu_render_stage_event_specifications_set_context_spec _res v); + gpu_render_stage_event_specifications_set_hw_queue _res hw_queue; + gpu_render_stage_event_specifications_set_stage _res stage; + _res + +let[@inline] gpu_render_stage_event_has_event_id (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] gpu_render_stage_event_has_duration (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] gpu_render_stage_event_has_hw_queue_iid (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] gpu_render_stage_event_has_stage_iid (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] gpu_render_stage_event_has_gpu_id (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] gpu_render_stage_event_has_context (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] gpu_render_stage_event_has_render_target_handle (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] gpu_render_stage_event_has_submission_id (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] gpu_render_stage_event_has_render_pass_handle (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] gpu_render_stage_event_has_render_pass_instance_id (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] gpu_render_stage_event_has_command_buffer_handle (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] gpu_render_stage_event_has_hw_queue_id (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] gpu_render_stage_event_has_stage_id (self:gpu_render_stage_event) : bool = (Pbrt.Bitfield.get self._presence 12) + +let[@inline] gpu_render_stage_event_set_event_id (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.event_id <- x +let[@inline] gpu_render_stage_event_set_duration (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.duration <- x +let[@inline] gpu_render_stage_event_set_hw_queue_iid (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.hw_queue_iid <- x +let[@inline] gpu_render_stage_event_set_stage_iid (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.stage_iid <- x +let[@inline] gpu_render_stage_event_set_gpu_id (self:gpu_render_stage_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.gpu_id <- x +let[@inline] gpu_render_stage_event_set_context (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.context <- x +let[@inline] gpu_render_stage_event_set_render_target_handle (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.render_target_handle <- x +let[@inline] gpu_render_stage_event_set_submission_id (self:gpu_render_stage_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.submission_id <- x +let[@inline] gpu_render_stage_event_set_extra_data (self:gpu_render_stage_event) (x:gpu_render_stage_event_extra_data list) : unit = + self.extra_data <- x +let[@inline] gpu_render_stage_event_set_render_pass_handle (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.render_pass_handle <- x +let[@inline] gpu_render_stage_event_set_render_pass_instance_id (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.render_pass_instance_id <- x +let[@inline] gpu_render_stage_event_set_render_subpass_index_mask (self:gpu_render_stage_event) (x:int64 list) : unit = + self.render_subpass_index_mask <- x +let[@inline] gpu_render_stage_event_set_command_buffer_handle (self:gpu_render_stage_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.command_buffer_handle <- x +let[@inline] gpu_render_stage_event_set_specifications (self:gpu_render_stage_event) (x:gpu_render_stage_event_specifications) : unit = + self.specifications <- Some x +let[@inline] gpu_render_stage_event_set_hw_queue_id (self:gpu_render_stage_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.hw_queue_id <- x +let[@inline] gpu_render_stage_event_set_stage_id (self:gpu_render_stage_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.stage_id <- x + +let copy_gpu_render_stage_event (self:gpu_render_stage_event) : gpu_render_stage_event = + { self with event_id = self.event_id } + +let make_gpu_render_stage_event + ?(event_id:int64 option) + ?(duration:int64 option) + ?(hw_queue_iid:int64 option) + ?(stage_iid:int64 option) + ?(gpu_id:int32 option) + ?(context:int64 option) + ?(render_target_handle:int64 option) + ?(submission_id:int32 option) + ?(extra_data=[]) + ?(render_pass_handle:int64 option) + ?(render_pass_instance_id:int64 option) + ?(render_subpass_index_mask=[]) + ?(command_buffer_handle:int64 option) + ?(specifications:gpu_render_stage_event_specifications option) + ?(hw_queue_id:int32 option) + ?(stage_id:int32 option) + () : gpu_render_stage_event = + let _res = default_gpu_render_stage_event () in + (match event_id with + | None -> () + | Some v -> gpu_render_stage_event_set_event_id _res v); + (match duration with + | None -> () + | Some v -> gpu_render_stage_event_set_duration _res v); + (match hw_queue_iid with + | None -> () + | Some v -> gpu_render_stage_event_set_hw_queue_iid _res v); + (match stage_iid with + | None -> () + | Some v -> gpu_render_stage_event_set_stage_iid _res v); + (match gpu_id with + | None -> () + | Some v -> gpu_render_stage_event_set_gpu_id _res v); + (match context with + | None -> () + | Some v -> gpu_render_stage_event_set_context _res v); + (match render_target_handle with + | None -> () + | Some v -> gpu_render_stage_event_set_render_target_handle _res v); + (match submission_id with + | None -> () + | Some v -> gpu_render_stage_event_set_submission_id _res v); + gpu_render_stage_event_set_extra_data _res extra_data; + (match render_pass_handle with + | None -> () + | Some v -> gpu_render_stage_event_set_render_pass_handle _res v); + (match render_pass_instance_id with + | None -> () + | Some v -> gpu_render_stage_event_set_render_pass_instance_id _res v); + gpu_render_stage_event_set_render_subpass_index_mask _res render_subpass_index_mask; + (match command_buffer_handle with + | None -> () + | Some v -> gpu_render_stage_event_set_command_buffer_handle _res v); + (match specifications with + | None -> () + | Some v -> gpu_render_stage_event_set_specifications _res v); + (match hw_queue_id with + | None -> () + | Some v -> gpu_render_stage_event_set_hw_queue_id _res v); + (match stage_id with + | None -> () + | Some v -> gpu_render_stage_event_set_stage_id _res v); + _res + +let[@inline] interned_graphics_context_has_iid (self:interned_graphics_context) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] interned_graphics_context_has_pid (self:interned_graphics_context) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] interned_graphics_context_has_api (self:interned_graphics_context) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] interned_graphics_context_set_iid (self:interned_graphics_context) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] interned_graphics_context_set_pid (self:interned_graphics_context) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.pid <- x +let[@inline] interned_graphics_context_set_api (self:interned_graphics_context) (x:interned_graphics_context_api) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.api <- x + +let copy_interned_graphics_context (self:interned_graphics_context) : interned_graphics_context = + { self with iid = self.iid } + +let make_interned_graphics_context + ?(iid:int64 option) + ?(pid:int32 option) + ?(api:interned_graphics_context_api option) + () : interned_graphics_context = + let _res = default_interned_graphics_context () in + (match iid with + | None -> () + | Some v -> interned_graphics_context_set_iid _res v); + (match pid with + | None -> () + | Some v -> interned_graphics_context_set_pid _res v); + (match api with + | None -> () + | Some v -> interned_graphics_context_set_api _res v); + _res + +let[@inline] interned_gpu_render_stage_specification_has_iid (self:interned_gpu_render_stage_specification) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] interned_gpu_render_stage_specification_has_name (self:interned_gpu_render_stage_specification) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] interned_gpu_render_stage_specification_has_description (self:interned_gpu_render_stage_specification) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] interned_gpu_render_stage_specification_has_category (self:interned_gpu_render_stage_specification) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] interned_gpu_render_stage_specification_set_iid (self:interned_gpu_render_stage_specification) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] interned_gpu_render_stage_specification_set_name (self:interned_gpu_render_stage_specification) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x +let[@inline] interned_gpu_render_stage_specification_set_description (self:interned_gpu_render_stage_specification) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.description <- x +let[@inline] interned_gpu_render_stage_specification_set_category (self:interned_gpu_render_stage_specification) (x:interned_gpu_render_stage_specification_render_stage_category) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.category <- x + +let copy_interned_gpu_render_stage_specification (self:interned_gpu_render_stage_specification) : interned_gpu_render_stage_specification = + { self with iid = self.iid } + +let make_interned_gpu_render_stage_specification + ?(iid:int64 option) + ?(name:string option) + ?(description:string option) + ?(category:interned_gpu_render_stage_specification_render_stage_category option) + () : interned_gpu_render_stage_specification = + let _res = default_interned_gpu_render_stage_specification () in + (match iid with + | None -> () + | Some v -> interned_gpu_render_stage_specification_set_iid _res v); + (match name with + | None -> () + | Some v -> interned_gpu_render_stage_specification_set_name _res v); + (match description with + | None -> () + | Some v -> interned_gpu_render_stage_specification_set_description _res v); + (match category with + | None -> () + | Some v -> interned_gpu_render_stage_specification_set_category _res v); + _res + +let[@inline] vulkan_api_event_vk_debug_utils_object_name_has_pid (self:vulkan_api_event_vk_debug_utils_object_name) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] vulkan_api_event_vk_debug_utils_object_name_has_vk_device (self:vulkan_api_event_vk_debug_utils_object_name) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] vulkan_api_event_vk_debug_utils_object_name_has_object_type (self:vulkan_api_event_vk_debug_utils_object_name) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] vulkan_api_event_vk_debug_utils_object_name_has_object_ (self:vulkan_api_event_vk_debug_utils_object_name) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] vulkan_api_event_vk_debug_utils_object_name_has_object_name (self:vulkan_api_event_vk_debug_utils_object_name) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] vulkan_api_event_vk_debug_utils_object_name_set_pid (self:vulkan_api_event_vk_debug_utils_object_name) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] vulkan_api_event_vk_debug_utils_object_name_set_vk_device (self:vulkan_api_event_vk_debug_utils_object_name) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.vk_device <- x +let[@inline] vulkan_api_event_vk_debug_utils_object_name_set_object_type (self:vulkan_api_event_vk_debug_utils_object_name) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.object_type <- x +let[@inline] vulkan_api_event_vk_debug_utils_object_name_set_object_ (self:vulkan_api_event_vk_debug_utils_object_name) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.object_ <- x +let[@inline] vulkan_api_event_vk_debug_utils_object_name_set_object_name (self:vulkan_api_event_vk_debug_utils_object_name) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.object_name <- x + +let copy_vulkan_api_event_vk_debug_utils_object_name (self:vulkan_api_event_vk_debug_utils_object_name) : vulkan_api_event_vk_debug_utils_object_name = + { self with pid = self.pid } + +let make_vulkan_api_event_vk_debug_utils_object_name + ?(pid:int32 option) + ?(vk_device:int64 option) + ?(object_type:int32 option) + ?(object_:int64 option) + ?(object_name:string option) + () : vulkan_api_event_vk_debug_utils_object_name = + let _res = default_vulkan_api_event_vk_debug_utils_object_name () in + (match pid with + | None -> () + | Some v -> vulkan_api_event_vk_debug_utils_object_name_set_pid _res v); + (match vk_device with + | None -> () + | Some v -> vulkan_api_event_vk_debug_utils_object_name_set_vk_device _res v); + (match object_type with + | None -> () + | Some v -> vulkan_api_event_vk_debug_utils_object_name_set_object_type _res v); + (match object_ with + | None -> () + | Some v -> vulkan_api_event_vk_debug_utils_object_name_set_object_ _res v); + (match object_name with + | None -> () + | Some v -> vulkan_api_event_vk_debug_utils_object_name_set_object_name _res v); + _res + +let[@inline] vulkan_api_event_vk_queue_submit_has_duration_ns (self:vulkan_api_event_vk_queue_submit) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] vulkan_api_event_vk_queue_submit_has_pid (self:vulkan_api_event_vk_queue_submit) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] vulkan_api_event_vk_queue_submit_has_tid (self:vulkan_api_event_vk_queue_submit) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] vulkan_api_event_vk_queue_submit_has_vk_queue (self:vulkan_api_event_vk_queue_submit) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] vulkan_api_event_vk_queue_submit_has_submission_id (self:vulkan_api_event_vk_queue_submit) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] vulkan_api_event_vk_queue_submit_set_duration_ns (self:vulkan_api_event_vk_queue_submit) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.duration_ns <- x +let[@inline] vulkan_api_event_vk_queue_submit_set_pid (self:vulkan_api_event_vk_queue_submit) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.pid <- x +let[@inline] vulkan_api_event_vk_queue_submit_set_tid (self:vulkan_api_event_vk_queue_submit) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.tid <- x +let[@inline] vulkan_api_event_vk_queue_submit_set_vk_queue (self:vulkan_api_event_vk_queue_submit) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.vk_queue <- x +let[@inline] vulkan_api_event_vk_queue_submit_set_vk_command_buffers (self:vulkan_api_event_vk_queue_submit) (x:int64 list) : unit = + self.vk_command_buffers <- x +let[@inline] vulkan_api_event_vk_queue_submit_set_submission_id (self:vulkan_api_event_vk_queue_submit) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.submission_id <- x + +let copy_vulkan_api_event_vk_queue_submit (self:vulkan_api_event_vk_queue_submit) : vulkan_api_event_vk_queue_submit = + { self with duration_ns = self.duration_ns } + +let make_vulkan_api_event_vk_queue_submit + ?(duration_ns:int64 option) + ?(pid:int32 option) + ?(tid:int32 option) + ?(vk_queue:int64 option) + ?(vk_command_buffers=[]) + ?(submission_id:int32 option) + () : vulkan_api_event_vk_queue_submit = + let _res = default_vulkan_api_event_vk_queue_submit () in + (match duration_ns with + | None -> () + | Some v -> vulkan_api_event_vk_queue_submit_set_duration_ns _res v); + (match pid with + | None -> () + | Some v -> vulkan_api_event_vk_queue_submit_set_pid _res v); + (match tid with + | None -> () + | Some v -> vulkan_api_event_vk_queue_submit_set_tid _res v); + (match vk_queue with + | None -> () + | Some v -> vulkan_api_event_vk_queue_submit_set_vk_queue _res v); + vulkan_api_event_vk_queue_submit_set_vk_command_buffers _res vk_command_buffers; + (match submission_id with + | None -> () + | Some v -> vulkan_api_event_vk_queue_submit_set_submission_id _res v); + _res + +let[@inline] vulkan_memory_event_annotation_has_key_iid (self:vulkan_memory_event_annotation) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] vulkan_memory_event_annotation_set_key_iid (self:vulkan_memory_event_annotation) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.key_iid <- x +let[@inline] vulkan_memory_event_annotation_set_value (self:vulkan_memory_event_annotation) (x:vulkan_memory_event_annotation_value) : unit = + self.value <- Some x + +let copy_vulkan_memory_event_annotation (self:vulkan_memory_event_annotation) : vulkan_memory_event_annotation = + { self with key_iid = self.key_iid } + +let make_vulkan_memory_event_annotation + ?(key_iid:int64 option) + ?(value:vulkan_memory_event_annotation_value option) + () : vulkan_memory_event_annotation = + let _res = default_vulkan_memory_event_annotation () in + (match key_iid with + | None -> () + | Some v -> vulkan_memory_event_annotation_set_key_iid _res v); + (match value with + | None -> () + | Some v -> vulkan_memory_event_annotation_set_value _res v); + _res + +let[@inline] vulkan_memory_event_has_source (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] vulkan_memory_event_has_operation (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] vulkan_memory_event_has_timestamp (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] vulkan_memory_event_has_pid (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] vulkan_memory_event_has_memory_address (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] vulkan_memory_event_has_memory_size (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] vulkan_memory_event_has_caller_iid (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] vulkan_memory_event_has_allocation_scope (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] vulkan_memory_event_has_device (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] vulkan_memory_event_has_device_memory (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] vulkan_memory_event_has_memory_type (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] vulkan_memory_event_has_heap (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] vulkan_memory_event_has_object_handle (self:vulkan_memory_event) : bool = (Pbrt.Bitfield.get self._presence 12) + +let[@inline] vulkan_memory_event_set_source (self:vulkan_memory_event) (x:vulkan_memory_event_source) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.source <- x +let[@inline] vulkan_memory_event_set_operation (self:vulkan_memory_event) (x:vulkan_memory_event_operation) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.operation <- x +let[@inline] vulkan_memory_event_set_timestamp (self:vulkan_memory_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.timestamp <- x +let[@inline] vulkan_memory_event_set_pid (self:vulkan_memory_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.pid <- x +let[@inline] vulkan_memory_event_set_memory_address (self:vulkan_memory_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.memory_address <- x +let[@inline] vulkan_memory_event_set_memory_size (self:vulkan_memory_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.memory_size <- x +let[@inline] vulkan_memory_event_set_caller_iid (self:vulkan_memory_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.caller_iid <- x +let[@inline] vulkan_memory_event_set_allocation_scope (self:vulkan_memory_event) (x:vulkan_memory_event_allocation_scope) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.allocation_scope <- x +let[@inline] vulkan_memory_event_set_annotations (self:vulkan_memory_event) (x:vulkan_memory_event_annotation list) : unit = + self.annotations <- x +let[@inline] vulkan_memory_event_set_device (self:vulkan_memory_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.device <- x +let[@inline] vulkan_memory_event_set_device_memory (self:vulkan_memory_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.device_memory <- x +let[@inline] vulkan_memory_event_set_memory_type (self:vulkan_memory_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.memory_type <- x +let[@inline] vulkan_memory_event_set_heap (self:vulkan_memory_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.heap <- x +let[@inline] vulkan_memory_event_set_object_handle (self:vulkan_memory_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.object_handle <- x + +let copy_vulkan_memory_event (self:vulkan_memory_event) : vulkan_memory_event = + { self with source = self.source } + +let make_vulkan_memory_event + ?(source:vulkan_memory_event_source option) + ?(operation:vulkan_memory_event_operation option) + ?(timestamp:int64 option) + ?(pid:int32 option) + ?(memory_address:int64 option) + ?(memory_size:int64 option) + ?(caller_iid:int64 option) + ?(allocation_scope:vulkan_memory_event_allocation_scope option) + ?(annotations=[]) + ?(device:int64 option) + ?(device_memory:int64 option) + ?(memory_type:int32 option) + ?(heap:int32 option) + ?(object_handle:int64 option) + () : vulkan_memory_event = + let _res = default_vulkan_memory_event () in + (match source with + | None -> () + | Some v -> vulkan_memory_event_set_source _res v); + (match operation with + | None -> () + | Some v -> vulkan_memory_event_set_operation _res v); + (match timestamp with + | None -> () + | Some v -> vulkan_memory_event_set_timestamp _res v); + (match pid with + | None -> () + | Some v -> vulkan_memory_event_set_pid _res v); + (match memory_address with + | None -> () + | Some v -> vulkan_memory_event_set_memory_address _res v); + (match memory_size with + | None -> () + | Some v -> vulkan_memory_event_set_memory_size _res v); + (match caller_iid with + | None -> () + | Some v -> vulkan_memory_event_set_caller_iid _res v); + (match allocation_scope with + | None -> () + | Some v -> vulkan_memory_event_set_allocation_scope _res v); + vulkan_memory_event_set_annotations _res annotations; + (match device with + | None -> () + | Some v -> vulkan_memory_event_set_device _res v); + (match device_memory with + | None -> () + | Some v -> vulkan_memory_event_set_device_memory _res v); + (match memory_type with + | None -> () + | Some v -> vulkan_memory_event_set_memory_type _res v); + (match heap with + | None -> () + | Some v -> vulkan_memory_event_set_heap _res v); + (match object_handle with + | None -> () + | Some v -> vulkan_memory_event_set_object_handle _res v); + _res + +let[@inline] interned_string_has_iid (self:interned_string) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] interned_string_has_str (self:interned_string) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] interned_string_set_iid (self:interned_string) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] interned_string_set_str (self:interned_string) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.str <- x + +let copy_interned_string (self:interned_string) : interned_string = + { self with iid = self.iid } + +let make_interned_string + ?(iid:int64 option) + ?(str:bytes option) + () : interned_string = + let _res = default_interned_string () in + (match iid with + | None -> () + | Some v -> interned_string_set_iid _res v); + (match str with + | None -> () + | Some v -> interned_string_set_str _res v); + _res + +let[@inline] line_has_function_name (self:line) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] line_has_source_file_name (self:line) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] line_has_line_number (self:line) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] line_set_function_name (self:line) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.function_name <- x +let[@inline] line_set_source_file_name (self:line) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.source_file_name <- x +let[@inline] line_set_line_number (self:line) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.line_number <- x + +let copy_line (self:line) : line = + { self with function_name = self.function_name } + +let make_line + ?(function_name:string option) + ?(source_file_name:string option) + ?(line_number:int32 option) + () : line = + let _res = default_line () in + (match function_name with + | None -> () + | Some v -> line_set_function_name _res v); + (match source_file_name with + | None -> () + | Some v -> line_set_source_file_name _res v); + (match line_number with + | None -> () + | Some v -> line_set_line_number _res v); + _res + +let[@inline] address_symbols_has_address (self:address_symbols) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] address_symbols_set_address (self:address_symbols) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.address <- x +let[@inline] address_symbols_set_lines (self:address_symbols) (x:line list) : unit = + self.lines <- x + +let copy_address_symbols (self:address_symbols) : address_symbols = + { self with address = self.address } + +let make_address_symbols + ?(address:int64 option) + ?(lines=[]) + () : address_symbols = + let _res = default_address_symbols () in + (match address with + | None -> () + | Some v -> address_symbols_set_address _res v); + address_symbols_set_lines _res lines; + _res + +let[@inline] module_symbols_has_path (self:module_symbols) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] module_symbols_has_build_id (self:module_symbols) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] module_symbols_set_path (self:module_symbols) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.path <- x +let[@inline] module_symbols_set_build_id (self:module_symbols) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.build_id <- x +let[@inline] module_symbols_set_address_symbols (self:module_symbols) (x:address_symbols list) : unit = + self.address_symbols <- x + +let copy_module_symbols (self:module_symbols) : module_symbols = + { self with path = self.path } + +let make_module_symbols + ?(path:string option) + ?(build_id:string option) + ?(address_symbols=[]) + () : module_symbols = + let _res = default_module_symbols () in + (match path with + | None -> () + | Some v -> module_symbols_set_path _res v); + (match build_id with + | None -> () + | Some v -> module_symbols_set_build_id _res v); + module_symbols_set_address_symbols _res address_symbols; + _res + +let[@inline] mapping_has_iid (self:mapping) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] mapping_has_build_id (self:mapping) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] mapping_has_exact_offset (self:mapping) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] mapping_has_start_offset (self:mapping) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] mapping_has_start (self:mapping) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] mapping_has_end_ (self:mapping) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] mapping_has_load_bias (self:mapping) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] mapping_set_iid (self:mapping) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] mapping_set_build_id (self:mapping) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.build_id <- x +let[@inline] mapping_set_exact_offset (self:mapping) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.exact_offset <- x +let[@inline] mapping_set_start_offset (self:mapping) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.start_offset <- x +let[@inline] mapping_set_start (self:mapping) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.start <- x +let[@inline] mapping_set_end_ (self:mapping) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.end_ <- x +let[@inline] mapping_set_load_bias (self:mapping) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.load_bias <- x +let[@inline] mapping_set_path_string_ids (self:mapping) (x:int64 list) : unit = + self.path_string_ids <- x + +let copy_mapping (self:mapping) : mapping = + { self with iid = self.iid } + +let make_mapping + ?(iid:int64 option) + ?(build_id:int64 option) + ?(exact_offset:int64 option) + ?(start_offset:int64 option) + ?(start:int64 option) + ?(end_:int64 option) + ?(load_bias:int64 option) + ?(path_string_ids=[]) + () : mapping = + let _res = default_mapping () in + (match iid with + | None -> () + | Some v -> mapping_set_iid _res v); + (match build_id with + | None -> () + | Some v -> mapping_set_build_id _res v); + (match exact_offset with + | None -> () + | Some v -> mapping_set_exact_offset _res v); + (match start_offset with + | None -> () + | Some v -> mapping_set_start_offset _res v); + (match start with + | None -> () + | Some v -> mapping_set_start _res v); + (match end_ with + | None -> () + | Some v -> mapping_set_end_ _res v); + (match load_bias with + | None -> () + | Some v -> mapping_set_load_bias _res v); + mapping_set_path_string_ids _res path_string_ids; + _res + +let[@inline] frame_has_iid (self:frame) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] frame_has_function_name_id (self:frame) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] frame_has_mapping_id (self:frame) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] frame_has_rel_pc (self:frame) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] frame_has_source_path_iid (self:frame) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] frame_has_line_number (self:frame) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] frame_set_iid (self:frame) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] frame_set_function_name_id (self:frame) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.function_name_id <- x +let[@inline] frame_set_mapping_id (self:frame) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.mapping_id <- x +let[@inline] frame_set_rel_pc (self:frame) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.rel_pc <- x +let[@inline] frame_set_source_path_iid (self:frame) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.source_path_iid <- x +let[@inline] frame_set_line_number (self:frame) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.line_number <- x + +let copy_frame (self:frame) : frame = + { self with iid = self.iid } + +let make_frame + ?(iid:int64 option) + ?(function_name_id:int64 option) + ?(mapping_id:int64 option) + ?(rel_pc:int64 option) + ?(source_path_iid:int64 option) + ?(line_number:int32 option) + () : frame = + let _res = default_frame () in + (match iid with + | None -> () + | Some v -> frame_set_iid _res v); + (match function_name_id with + | None -> () + | Some v -> frame_set_function_name_id _res v); + (match mapping_id with + | None -> () + | Some v -> frame_set_mapping_id _res v); + (match rel_pc with + | None -> () + | Some v -> frame_set_rel_pc _res v); + (match source_path_iid with + | None -> () + | Some v -> frame_set_source_path_iid _res v); + (match line_number with + | None -> () + | Some v -> frame_set_line_number _res v); + _res + +let[@inline] callstack_has_iid (self:callstack) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] callstack_set_iid (self:callstack) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] callstack_set_frame_ids (self:callstack) (x:int64 list) : unit = + self.frame_ids <- x + +let copy_callstack (self:callstack) : callstack = + { self with iid = self.iid } + +let make_callstack + ?(iid:int64 option) + ?(frame_ids=[]) + () : callstack = + let _res = default_callstack () in + (match iid with + | None -> () + | Some v -> callstack_set_iid _res v); + callstack_set_frame_ids _res frame_ids; + _res + +let[@inline] histogram_name_has_iid (self:histogram_name) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] histogram_name_has_name (self:histogram_name) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] histogram_name_set_iid (self:histogram_name) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] histogram_name_set_name (self:histogram_name) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x + +let copy_histogram_name (self:histogram_name) : histogram_name = + { self with iid = self.iid } + +let make_histogram_name + ?(iid:int64 option) + ?(name:string option) + () : histogram_name = + let _res = default_histogram_name () in + (match iid with + | None -> () + | Some v -> histogram_name_set_iid _res v); + (match name with + | None -> () + | Some v -> histogram_name_set_name _res v); + _res + +let[@inline] chrome_histogram_sample_has_name_hash (self:chrome_histogram_sample) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_histogram_sample_has_name (self:chrome_histogram_sample) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_histogram_sample_has_sample (self:chrome_histogram_sample) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_histogram_sample_has_name_iid (self:chrome_histogram_sample) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] chrome_histogram_sample_set_name_hash (self:chrome_histogram_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name_hash <- x +let[@inline] chrome_histogram_sample_set_name (self:chrome_histogram_sample) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x +let[@inline] chrome_histogram_sample_set_sample (self:chrome_histogram_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.sample <- x +let[@inline] chrome_histogram_sample_set_name_iid (self:chrome_histogram_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.name_iid <- x + +let copy_chrome_histogram_sample (self:chrome_histogram_sample) : chrome_histogram_sample = + { self with name_hash = self.name_hash } + +let make_chrome_histogram_sample + ?(name_hash:int64 option) + ?(name:string option) + ?(sample:int64 option) + ?(name_iid:int64 option) + () : chrome_histogram_sample = + let _res = default_chrome_histogram_sample () in + (match name_hash with + | None -> () + | Some v -> chrome_histogram_sample_set_name_hash _res v); + (match name with + | None -> () + | Some v -> chrome_histogram_sample_set_name _res v); + (match sample with + | None -> () + | Some v -> chrome_histogram_sample_set_sample _res v); + (match name_iid with + | None -> () + | Some v -> chrome_histogram_sample_set_name_iid _res v); + _res + +let[@inline] debug_annotation_nested_value_has_nested_type (self:debug_annotation_nested_value) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] debug_annotation_nested_value_has_int_value (self:debug_annotation_nested_value) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] debug_annotation_nested_value_has_double_value (self:debug_annotation_nested_value) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] debug_annotation_nested_value_has_bool_value (self:debug_annotation_nested_value) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] debug_annotation_nested_value_has_string_value (self:debug_annotation_nested_value) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] debug_annotation_nested_value_set_nested_type (self:debug_annotation_nested_value) (x:debug_annotation_nested_value_nested_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.nested_type <- x +let[@inline] debug_annotation_nested_value_set_dict_keys (self:debug_annotation_nested_value) (x:string list) : unit = + self.dict_keys <- x +let[@inline] debug_annotation_nested_value_set_dict_values (self:debug_annotation_nested_value) (x:debug_annotation_nested_value list) : unit = + self.dict_values <- x +let[@inline] debug_annotation_nested_value_set_array_values (self:debug_annotation_nested_value) (x:debug_annotation_nested_value list) : unit = + self.array_values <- x +let[@inline] debug_annotation_nested_value_set_int_value (self:debug_annotation_nested_value) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.int_value <- x +let[@inline] debug_annotation_nested_value_set_double_value (self:debug_annotation_nested_value) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.double_value <- x +let[@inline] debug_annotation_nested_value_set_bool_value (self:debug_annotation_nested_value) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.bool_value <- x +let[@inline] debug_annotation_nested_value_set_string_value (self:debug_annotation_nested_value) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.string_value <- x + +let copy_debug_annotation_nested_value (self:debug_annotation_nested_value) : debug_annotation_nested_value = + { self with nested_type = self.nested_type } + +let make_debug_annotation_nested_value + ?(nested_type:debug_annotation_nested_value_nested_type option) + ?(dict_keys=[]) + ?(dict_values=[]) + ?(array_values=[]) + ?(int_value:int64 option) + ?(double_value:float option) + ?(bool_value:bool option) + ?(string_value:string option) + () : debug_annotation_nested_value = + let _res = default_debug_annotation_nested_value () in + (match nested_type with + | None -> () + | Some v -> debug_annotation_nested_value_set_nested_type _res v); + debug_annotation_nested_value_set_dict_keys _res dict_keys; + debug_annotation_nested_value_set_dict_values _res dict_values; + debug_annotation_nested_value_set_array_values _res array_values; + (match int_value with + | None -> () + | Some v -> debug_annotation_nested_value_set_int_value _res v); + (match double_value with + | None -> () + | Some v -> debug_annotation_nested_value_set_double_value _res v); + (match bool_value with + | None -> () + | Some v -> debug_annotation_nested_value_set_bool_value _res v); + (match string_value with + | None -> () + | Some v -> debug_annotation_nested_value_set_string_value _res v); + _res + +let[@inline] debug_annotation_has_proto_value (self:debug_annotation) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] debug_annotation_set_name_field (self:debug_annotation) (x:debug_annotation_name_field) : unit = + self.name_field <- Some x +let[@inline] debug_annotation_set_value (self:debug_annotation) (x:debug_annotation_value) : unit = + self.value <- Some x +let[@inline] debug_annotation_set_proto_type_descriptor (self:debug_annotation) (x:debug_annotation_proto_type_descriptor) : unit = + self.proto_type_descriptor <- Some x +let[@inline] debug_annotation_set_proto_value (self:debug_annotation) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.proto_value <- x +let[@inline] debug_annotation_set_dict_entries (self:debug_annotation) (x:debug_annotation list) : unit = + self.dict_entries <- x +let[@inline] debug_annotation_set_array_values (self:debug_annotation) (x:debug_annotation list) : unit = + self.array_values <- x + +let copy_debug_annotation (self:debug_annotation) : debug_annotation = + { self with name_field = self.name_field } + +let make_debug_annotation + ?(name_field:debug_annotation_name_field option) + ?(value:debug_annotation_value option) + ?(proto_type_descriptor:debug_annotation_proto_type_descriptor option) + ?(proto_value:bytes option) + ?(dict_entries=[]) + ?(array_values=[]) + () : debug_annotation = + let _res = default_debug_annotation () in + (match name_field with + | None -> () + | Some v -> debug_annotation_set_name_field _res v); + (match value with + | None -> () + | Some v -> debug_annotation_set_value _res v); + (match proto_type_descriptor with + | None -> () + | Some v -> debug_annotation_set_proto_type_descriptor _res v); + (match proto_value with + | None -> () + | Some v -> debug_annotation_set_proto_value _res v); + debug_annotation_set_dict_entries _res dict_entries; + debug_annotation_set_array_values _res array_values; + _res + +let[@inline] debug_annotation_name_has_iid (self:debug_annotation_name) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] debug_annotation_name_has_name (self:debug_annotation_name) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] debug_annotation_name_set_iid (self:debug_annotation_name) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] debug_annotation_name_set_name (self:debug_annotation_name) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x + +let copy_debug_annotation_name (self:debug_annotation_name) : debug_annotation_name = + { self with iid = self.iid } + +let make_debug_annotation_name + ?(iid:int64 option) + ?(name:string option) + () : debug_annotation_name = + let _res = default_debug_annotation_name () in + (match iid with + | None -> () + | Some v -> debug_annotation_name_set_iid _res v); + (match name with + | None -> () + | Some v -> debug_annotation_name_set_name _res v); + _res + +let[@inline] debug_annotation_value_type_name_has_iid (self:debug_annotation_value_type_name) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] debug_annotation_value_type_name_has_name (self:debug_annotation_value_type_name) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] debug_annotation_value_type_name_set_iid (self:debug_annotation_value_type_name) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] debug_annotation_value_type_name_set_name (self:debug_annotation_value_type_name) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x + +let copy_debug_annotation_value_type_name (self:debug_annotation_value_type_name) : debug_annotation_value_type_name = + { self with iid = self.iid } + +let make_debug_annotation_value_type_name + ?(iid:int64 option) + ?(name:string option) + () : debug_annotation_value_type_name = + let _res = default_debug_annotation_value_type_name () in + (match iid with + | None -> () + | Some v -> debug_annotation_value_type_name_set_iid _res v); + (match name with + | None -> () + | Some v -> debug_annotation_value_type_name_set_name _res v); + _res + +let[@inline] log_message_has_source_location_iid (self:log_message) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] log_message_has_body_iid (self:log_message) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] log_message_has_prio (self:log_message) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] log_message_set_source_location_iid (self:log_message) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.source_location_iid <- x +let[@inline] log_message_set_body_iid (self:log_message) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.body_iid <- x +let[@inline] log_message_set_prio (self:log_message) (x:log_message_priority) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.prio <- x + +let copy_log_message (self:log_message) : log_message = + { self with source_location_iid = self.source_location_iid } + +let make_log_message + ?(source_location_iid:int64 option) + ?(body_iid:int64 option) + ?(prio:log_message_priority option) + () : log_message = + let _res = default_log_message () in + (match source_location_iid with + | None -> () + | Some v -> log_message_set_source_location_iid _res v); + (match body_iid with + | None -> () + | Some v -> log_message_set_body_iid _res v); + (match prio with + | None -> () + | Some v -> log_message_set_prio _res v); + _res + +let[@inline] log_message_body_has_iid (self:log_message_body) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] log_message_body_has_body (self:log_message_body) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] log_message_body_set_iid (self:log_message_body) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] log_message_body_set_body (self:log_message_body) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.body <- x + +let copy_log_message_body (self:log_message_body) : log_message_body = + { self with iid = self.iid } + +let make_log_message_body + ?(iid:int64 option) + ?(body:string option) + () : log_message_body = + let _res = default_log_message_body () in + (match iid with + | None -> () + | Some v -> log_message_body_set_iid _res v); + (match body with + | None -> () + | Some v -> log_message_body_set_body _res v); + _res + +let[@inline] unsymbolized_source_location_has_iid (self:unsymbolized_source_location) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] unsymbolized_source_location_has_mapping_id (self:unsymbolized_source_location) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] unsymbolized_source_location_has_rel_pc (self:unsymbolized_source_location) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] unsymbolized_source_location_set_iid (self:unsymbolized_source_location) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] unsymbolized_source_location_set_mapping_id (self:unsymbolized_source_location) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.mapping_id <- x +let[@inline] unsymbolized_source_location_set_rel_pc (self:unsymbolized_source_location) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.rel_pc <- x + +let copy_unsymbolized_source_location (self:unsymbolized_source_location) : unsymbolized_source_location = + { self with iid = self.iid } + +let make_unsymbolized_source_location + ?(iid:int64 option) + ?(mapping_id:int64 option) + ?(rel_pc:int64 option) + () : unsymbolized_source_location = + let _res = default_unsymbolized_source_location () in + (match iid with + | None -> () + | Some v -> unsymbolized_source_location_set_iid _res v); + (match mapping_id with + | None -> () + | Some v -> unsymbolized_source_location_set_mapping_id _res v); + (match rel_pc with + | None -> () + | Some v -> unsymbolized_source_location_set_rel_pc _res v); + _res + +let[@inline] source_location_has_iid (self:source_location) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] source_location_has_file_name (self:source_location) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] source_location_has_function_name (self:source_location) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] source_location_has_line_number (self:source_location) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] source_location_set_iid (self:source_location) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] source_location_set_file_name (self:source_location) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.file_name <- x +let[@inline] source_location_set_function_name (self:source_location) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.function_name <- x +let[@inline] source_location_set_line_number (self:source_location) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.line_number <- x + +let copy_source_location (self:source_location) : source_location = + { self with iid = self.iid } + +let make_source_location + ?(iid:int64 option) + ?(file_name:string option) + ?(function_name:string option) + ?(line_number:int32 option) + () : source_location = + let _res = default_source_location () in + (match iid with + | None -> () + | Some v -> source_location_set_iid _res v); + (match file_name with + | None -> () + | Some v -> source_location_set_file_name _res v); + (match function_name with + | None -> () + | Some v -> source_location_set_function_name _res v); + (match line_number with + | None -> () + | Some v -> source_location_set_line_number _res v); + _res + + +let[@inline] chrome_active_processes_set_pid (self:chrome_active_processes) (x:int32 list) : unit = + self.pid <- x + +let copy_chrome_active_processes (self:chrome_active_processes) : chrome_active_processes = + { self with pid = self.pid } + +let make_chrome_active_processes + ?(pid=[]) + () : chrome_active_processes = + let _res = default_chrome_active_processes () in + chrome_active_processes_set_pid _res pid; + _res + +let[@inline] chrome_application_state_info_has_application_state (self:chrome_application_state_info) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] chrome_application_state_info_set_application_state (self:chrome_application_state_info) (x:chrome_application_state_info_chrome_application_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.application_state <- x + +let copy_chrome_application_state_info (self:chrome_application_state_info) : chrome_application_state_info = + { self with application_state = self.application_state } + +let make_chrome_application_state_info + ?(application_state:chrome_application_state_info_chrome_application_state option) + () : chrome_application_state_info = + let _res = default_chrome_application_state_info () in + (match application_state with + | None -> () + | Some v -> chrome_application_state_info_set_application_state _res v); + _res + +let[@inline] chrome_compositor_state_machine_major_state_has_next_action (self:chrome_compositor_state_machine_major_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_compositor_state_machine_major_state_has_begin_impl_frame_state (self:chrome_compositor_state_machine_major_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_compositor_state_machine_major_state_has_begin_main_frame_state (self:chrome_compositor_state_machine_major_state) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_compositor_state_machine_major_state_has_layer_tree_frame_sink_state (self:chrome_compositor_state_machine_major_state) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_compositor_state_machine_major_state_has_forced_redraw_state (self:chrome_compositor_state_machine_major_state) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] chrome_compositor_state_machine_major_state_set_next_action (self:chrome_compositor_state_machine_major_state) (x:chrome_compositor_scheduler_action) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.next_action <- x +let[@inline] chrome_compositor_state_machine_major_state_set_begin_impl_frame_state (self:chrome_compositor_state_machine_major_state) (x:chrome_compositor_state_machine_major_state_begin_impl_frame_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.begin_impl_frame_state <- x +let[@inline] chrome_compositor_state_machine_major_state_set_begin_main_frame_state (self:chrome_compositor_state_machine_major_state) (x:chrome_compositor_state_machine_major_state_begin_main_frame_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.begin_main_frame_state <- x +let[@inline] chrome_compositor_state_machine_major_state_set_layer_tree_frame_sink_state (self:chrome_compositor_state_machine_major_state) (x:chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.layer_tree_frame_sink_state <- x +let[@inline] chrome_compositor_state_machine_major_state_set_forced_redraw_state (self:chrome_compositor_state_machine_major_state) (x:chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.forced_redraw_state <- x + +let copy_chrome_compositor_state_machine_major_state (self:chrome_compositor_state_machine_major_state) : chrome_compositor_state_machine_major_state = + { self with next_action = self.next_action } + +let make_chrome_compositor_state_machine_major_state + ?(next_action:chrome_compositor_scheduler_action option) + ?(begin_impl_frame_state:chrome_compositor_state_machine_major_state_begin_impl_frame_state option) + ?(begin_main_frame_state:chrome_compositor_state_machine_major_state_begin_main_frame_state option) + ?(layer_tree_frame_sink_state:chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state option) + ?(forced_redraw_state:chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state option) + () : chrome_compositor_state_machine_major_state = + let _res = default_chrome_compositor_state_machine_major_state () in + (match next_action with + | None -> () + | Some v -> chrome_compositor_state_machine_major_state_set_next_action _res v); + (match begin_impl_frame_state with + | None -> () + | Some v -> chrome_compositor_state_machine_major_state_set_begin_impl_frame_state _res v); + (match begin_main_frame_state with + | None -> () + | Some v -> chrome_compositor_state_machine_major_state_set_begin_main_frame_state _res v); + (match layer_tree_frame_sink_state with + | None -> () + | Some v -> chrome_compositor_state_machine_major_state_set_layer_tree_frame_sink_state _res v); + (match forced_redraw_state with + | None -> () + | Some v -> chrome_compositor_state_machine_major_state_set_forced_redraw_state _res v); + _res + +let[@inline] chrome_compositor_state_machine_minor_state_has_commit_count (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_compositor_state_machine_minor_state_has_current_frame_number (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_compositor_state_machine_minor_state_has_last_frame_number_submit_performed (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_compositor_state_machine_minor_state_has_last_frame_number_draw_performed (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_compositor_state_machine_minor_state_has_last_frame_number_begin_main_frame_sent (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_draw (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_send_begin_main_frame_for_current_frame (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_notify_begin_main_frame_not_expected_until (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_notify_begin_main_frame_not_expected_soon (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] chrome_compositor_state_machine_minor_state_has_wants_begin_main_frame_not_expected (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_commit_during_frame (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_invalidate_layer_tree_frame_sink (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_perform_impl_side_invalidaion (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_prepare_tiles (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] chrome_compositor_state_machine_minor_state_has_consecutive_checkerboard_animations (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] chrome_compositor_state_machine_minor_state_has_pending_submit_frames (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] chrome_compositor_state_machine_minor_state_has_submit_frames_with_current_layer_tree_frame_sink (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 16) +let[@inline] chrome_compositor_state_machine_minor_state_has_needs_redraw (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 17) +let[@inline] chrome_compositor_state_machine_minor_state_has_needs_prepare_tiles (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 18) +let[@inline] chrome_compositor_state_machine_minor_state_has_needs_begin_main_frame (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 19) +let[@inline] chrome_compositor_state_machine_minor_state_has_needs_one_begin_impl_frame (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 20) +let[@inline] chrome_compositor_state_machine_minor_state_has_visible (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 21) +let[@inline] chrome_compositor_state_machine_minor_state_has_begin_frame_source_paused (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 22) +let[@inline] chrome_compositor_state_machine_minor_state_has_can_draw (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 23) +let[@inline] chrome_compositor_state_machine_minor_state_has_resourceless_draw (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 24) +let[@inline] chrome_compositor_state_machine_minor_state_has_has_pending_tree (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 25) +let[@inline] chrome_compositor_state_machine_minor_state_has_pending_tree_is_ready_for_activation (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 26) +let[@inline] chrome_compositor_state_machine_minor_state_has_active_tree_needs_first_draw (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 27) +let[@inline] chrome_compositor_state_machine_minor_state_has_active_tree_is_ready_to_draw (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 28) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_create_and_initialize_first_layer_tree_frame_sink (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 29) +let[@inline] chrome_compositor_state_machine_minor_state_has_tree_priority (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 30) +let[@inline] chrome_compositor_state_machine_minor_state_has_scroll_handler_state (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 31) +let[@inline] chrome_compositor_state_machine_minor_state_has_critical_begin_main_frame_to_activate_is_fast (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 32) +let[@inline] chrome_compositor_state_machine_minor_state_has_main_thread_missed_last_deadline (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 33) +let[@inline] chrome_compositor_state_machine_minor_state_has_video_needs_begin_frames (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 34) +let[@inline] chrome_compositor_state_machine_minor_state_has_defer_begin_main_frame (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 35) +let[@inline] chrome_compositor_state_machine_minor_state_has_last_commit_had_no_updates (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 36) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_draw_in_last_frame (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 37) +let[@inline] chrome_compositor_state_machine_minor_state_has_did_submit_in_last_frame (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 38) +let[@inline] chrome_compositor_state_machine_minor_state_has_needs_impl_side_invalidation (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 39) +let[@inline] chrome_compositor_state_machine_minor_state_has_current_pending_tree_is_impl_side (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 40) +let[@inline] chrome_compositor_state_machine_minor_state_has_previous_pending_tree_was_impl_side (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 41) +let[@inline] chrome_compositor_state_machine_minor_state_has_processing_animation_worklets_for_active_tree (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 42) +let[@inline] chrome_compositor_state_machine_minor_state_has_processing_animation_worklets_for_pending_tree (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 43) +let[@inline] chrome_compositor_state_machine_minor_state_has_processing_paint_worklets_for_pending_tree (self:chrome_compositor_state_machine_minor_state) : bool = (Pbrt.Bitfield.get self._presence 44) + +let[@inline] chrome_compositor_state_machine_minor_state_set_commit_count (self:chrome_compositor_state_machine_minor_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.commit_count <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_current_frame_number (self:chrome_compositor_state_machine_minor_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.current_frame_number <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_last_frame_number_submit_performed (self:chrome_compositor_state_machine_minor_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.last_frame_number_submit_performed <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_last_frame_number_draw_performed (self:chrome_compositor_state_machine_minor_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.last_frame_number_draw_performed <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_last_frame_number_begin_main_frame_sent (self:chrome_compositor_state_machine_minor_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.last_frame_number_begin_main_frame_sent <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_draw (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.did_draw <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_send_begin_main_frame_for_current_frame (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.did_send_begin_main_frame_for_current_frame <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_notify_begin_main_frame_not_expected_until (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.did_notify_begin_main_frame_not_expected_until <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_notify_begin_main_frame_not_expected_soon (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.did_notify_begin_main_frame_not_expected_soon <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_wants_begin_main_frame_not_expected (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.wants_begin_main_frame_not_expected <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_commit_during_frame (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.did_commit_during_frame <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_invalidate_layer_tree_frame_sink (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.did_invalidate_layer_tree_frame_sink <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_perform_impl_side_invalidaion (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.did_perform_impl_side_invalidaion <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_prepare_tiles (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.did_prepare_tiles <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_consecutive_checkerboard_animations (self:chrome_compositor_state_machine_minor_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.consecutive_checkerboard_animations <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_pending_submit_frames (self:chrome_compositor_state_machine_minor_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.pending_submit_frames <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_submit_frames_with_current_layer_tree_frame_sink (self:chrome_compositor_state_machine_minor_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.submit_frames_with_current_layer_tree_frame_sink <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_needs_redraw (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 17); self.needs_redraw <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_needs_prepare_tiles (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 18); self.needs_prepare_tiles <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_needs_begin_main_frame (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 19); self.needs_begin_main_frame <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_needs_one_begin_impl_frame (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 20); self.needs_one_begin_impl_frame <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_visible (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 21); self.visible <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_begin_frame_source_paused (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 22); self.begin_frame_source_paused <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_can_draw (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 23); self.can_draw <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_resourceless_draw (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 24); self.resourceless_draw <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_has_pending_tree (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 25); self.has_pending_tree <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_pending_tree_is_ready_for_activation (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 26); self.pending_tree_is_ready_for_activation <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_active_tree_needs_first_draw (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 27); self.active_tree_needs_first_draw <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_active_tree_is_ready_to_draw (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 28); self.active_tree_is_ready_to_draw <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_create_and_initialize_first_layer_tree_frame_sink (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 29); self.did_create_and_initialize_first_layer_tree_frame_sink <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_tree_priority (self:chrome_compositor_state_machine_minor_state) (x:chrome_compositor_state_machine_minor_state_tree_priority) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 30); self.tree_priority <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_scroll_handler_state (self:chrome_compositor_state_machine_minor_state) (x:chrome_compositor_state_machine_minor_state_scroll_handler_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 31); self.scroll_handler_state <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_critical_begin_main_frame_to_activate_is_fast (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 32); self.critical_begin_main_frame_to_activate_is_fast <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_main_thread_missed_last_deadline (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 33); self.main_thread_missed_last_deadline <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_video_needs_begin_frames (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 34); self.video_needs_begin_frames <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_defer_begin_main_frame (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 35); self.defer_begin_main_frame <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_last_commit_had_no_updates (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 36); self.last_commit_had_no_updates <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_draw_in_last_frame (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 37); self.did_draw_in_last_frame <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_did_submit_in_last_frame (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 38); self.did_submit_in_last_frame <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_needs_impl_side_invalidation (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 39); self.needs_impl_side_invalidation <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_current_pending_tree_is_impl_side (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 40); self.current_pending_tree_is_impl_side <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_previous_pending_tree_was_impl_side (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 41); self.previous_pending_tree_was_impl_side <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_processing_animation_worklets_for_active_tree (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 42); self.processing_animation_worklets_for_active_tree <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_processing_animation_worklets_for_pending_tree (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 43); self.processing_animation_worklets_for_pending_tree <- x +let[@inline] chrome_compositor_state_machine_minor_state_set_processing_paint_worklets_for_pending_tree (self:chrome_compositor_state_machine_minor_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 44); self.processing_paint_worklets_for_pending_tree <- x + +let copy_chrome_compositor_state_machine_minor_state (self:chrome_compositor_state_machine_minor_state) : chrome_compositor_state_machine_minor_state = + { self with commit_count = self.commit_count } + +let make_chrome_compositor_state_machine_minor_state + ?(commit_count:int32 option) + ?(current_frame_number:int32 option) + ?(last_frame_number_submit_performed:int32 option) + ?(last_frame_number_draw_performed:int32 option) + ?(last_frame_number_begin_main_frame_sent:int32 option) + ?(did_draw:bool option) + ?(did_send_begin_main_frame_for_current_frame:bool option) + ?(did_notify_begin_main_frame_not_expected_until:bool option) + ?(did_notify_begin_main_frame_not_expected_soon:bool option) + ?(wants_begin_main_frame_not_expected:bool option) + ?(did_commit_during_frame:bool option) + ?(did_invalidate_layer_tree_frame_sink:bool option) + ?(did_perform_impl_side_invalidaion:bool option) + ?(did_prepare_tiles:bool option) + ?(consecutive_checkerboard_animations:int32 option) + ?(pending_submit_frames:int32 option) + ?(submit_frames_with_current_layer_tree_frame_sink:int32 option) + ?(needs_redraw:bool option) + ?(needs_prepare_tiles:bool option) + ?(needs_begin_main_frame:bool option) + ?(needs_one_begin_impl_frame:bool option) + ?(visible:bool option) + ?(begin_frame_source_paused:bool option) + ?(can_draw:bool option) + ?(resourceless_draw:bool option) + ?(has_pending_tree:bool option) + ?(pending_tree_is_ready_for_activation:bool option) + ?(active_tree_needs_first_draw:bool option) + ?(active_tree_is_ready_to_draw:bool option) + ?(did_create_and_initialize_first_layer_tree_frame_sink:bool option) + ?(tree_priority:chrome_compositor_state_machine_minor_state_tree_priority option) + ?(scroll_handler_state:chrome_compositor_state_machine_minor_state_scroll_handler_state option) + ?(critical_begin_main_frame_to_activate_is_fast:bool option) + ?(main_thread_missed_last_deadline:bool option) + ?(video_needs_begin_frames:bool option) + ?(defer_begin_main_frame:bool option) + ?(last_commit_had_no_updates:bool option) + ?(did_draw_in_last_frame:bool option) + ?(did_submit_in_last_frame:bool option) + ?(needs_impl_side_invalidation:bool option) + ?(current_pending_tree_is_impl_side:bool option) + ?(previous_pending_tree_was_impl_side:bool option) + ?(processing_animation_worklets_for_active_tree:bool option) + ?(processing_animation_worklets_for_pending_tree:bool option) + ?(processing_paint_worklets_for_pending_tree:bool option) + () : chrome_compositor_state_machine_minor_state = + let _res = default_chrome_compositor_state_machine_minor_state () in + (match commit_count with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_commit_count _res v); + (match current_frame_number with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_current_frame_number _res v); + (match last_frame_number_submit_performed with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_last_frame_number_submit_performed _res v); + (match last_frame_number_draw_performed with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_last_frame_number_draw_performed _res v); + (match last_frame_number_begin_main_frame_sent with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_last_frame_number_begin_main_frame_sent _res v); + (match did_draw with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_draw _res v); + (match did_send_begin_main_frame_for_current_frame with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_send_begin_main_frame_for_current_frame _res v); + (match did_notify_begin_main_frame_not_expected_until with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_notify_begin_main_frame_not_expected_until _res v); + (match did_notify_begin_main_frame_not_expected_soon with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_notify_begin_main_frame_not_expected_soon _res v); + (match wants_begin_main_frame_not_expected with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_wants_begin_main_frame_not_expected _res v); + (match did_commit_during_frame with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_commit_during_frame _res v); + (match did_invalidate_layer_tree_frame_sink with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_invalidate_layer_tree_frame_sink _res v); + (match did_perform_impl_side_invalidaion with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_perform_impl_side_invalidaion _res v); + (match did_prepare_tiles with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_prepare_tiles _res v); + (match consecutive_checkerboard_animations with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_consecutive_checkerboard_animations _res v); + (match pending_submit_frames with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_pending_submit_frames _res v); + (match submit_frames_with_current_layer_tree_frame_sink with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_submit_frames_with_current_layer_tree_frame_sink _res v); + (match needs_redraw with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_needs_redraw _res v); + (match needs_prepare_tiles with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_needs_prepare_tiles _res v); + (match needs_begin_main_frame with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_needs_begin_main_frame _res v); + (match needs_one_begin_impl_frame with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_needs_one_begin_impl_frame _res v); + (match visible with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_visible _res v); + (match begin_frame_source_paused with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_begin_frame_source_paused _res v); + (match can_draw with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_can_draw _res v); + (match resourceless_draw with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_resourceless_draw _res v); + (match has_pending_tree with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_has_pending_tree _res v); + (match pending_tree_is_ready_for_activation with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_pending_tree_is_ready_for_activation _res v); + (match active_tree_needs_first_draw with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_active_tree_needs_first_draw _res v); + (match active_tree_is_ready_to_draw with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_active_tree_is_ready_to_draw _res v); + (match did_create_and_initialize_first_layer_tree_frame_sink with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_create_and_initialize_first_layer_tree_frame_sink _res v); + (match tree_priority with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_tree_priority _res v); + (match scroll_handler_state with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_scroll_handler_state _res v); + (match critical_begin_main_frame_to_activate_is_fast with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_critical_begin_main_frame_to_activate_is_fast _res v); + (match main_thread_missed_last_deadline with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_main_thread_missed_last_deadline _res v); + (match video_needs_begin_frames with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_video_needs_begin_frames _res v); + (match defer_begin_main_frame with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_defer_begin_main_frame _res v); + (match last_commit_had_no_updates with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_last_commit_had_no_updates _res v); + (match did_draw_in_last_frame with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_draw_in_last_frame _res v); + (match did_submit_in_last_frame with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_did_submit_in_last_frame _res v); + (match needs_impl_side_invalidation with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_needs_impl_side_invalidation _res v); + (match current_pending_tree_is_impl_side with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_current_pending_tree_is_impl_side _res v); + (match previous_pending_tree_was_impl_side with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_previous_pending_tree_was_impl_side _res v); + (match processing_animation_worklets_for_active_tree with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_processing_animation_worklets_for_active_tree _res v); + (match processing_animation_worklets_for_pending_tree with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_processing_animation_worklets_for_pending_tree _res v); + (match processing_paint_worklets_for_pending_tree with + | None -> () + | Some v -> chrome_compositor_state_machine_minor_state_set_processing_paint_worklets_for_pending_tree _res v); + _res + + +let[@inline] chrome_compositor_state_machine_set_major_state (self:chrome_compositor_state_machine) (x:chrome_compositor_state_machine_major_state) : unit = + self.major_state <- Some x +let[@inline] chrome_compositor_state_machine_set_minor_state (self:chrome_compositor_state_machine) (x:chrome_compositor_state_machine_minor_state) : unit = + self.minor_state <- Some x + +let copy_chrome_compositor_state_machine (self:chrome_compositor_state_machine) : chrome_compositor_state_machine = + { self with major_state = self.major_state } + +let make_chrome_compositor_state_machine + ?(major_state:chrome_compositor_state_machine_major_state option) + ?(minor_state:chrome_compositor_state_machine_minor_state option) + () : chrome_compositor_state_machine = + let _res = default_chrome_compositor_state_machine () in + (match major_state with + | None -> () + | Some v -> chrome_compositor_state_machine_set_major_state _res v); + (match minor_state with + | None -> () + | Some v -> chrome_compositor_state_machine_set_minor_state _res v); + _res + +let[@inline] begin_frame_args_has_type_ (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] begin_frame_args_has_source_id (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] begin_frame_args_has_sequence_number (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] begin_frame_args_has_frame_time_us (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] begin_frame_args_has_deadline_us (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] begin_frame_args_has_interval_delta_us (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] begin_frame_args_has_on_critical_path (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] begin_frame_args_has_animate_only (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] begin_frame_args_has_frames_throttled_since_last (self:begin_frame_args) : bool = (Pbrt.Bitfield.get self._presence 8) + +let[@inline] begin_frame_args_set_type_ (self:begin_frame_args) (x:begin_frame_args_begin_frame_args_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.type_ <- x +let[@inline] begin_frame_args_set_source_id (self:begin_frame_args) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.source_id <- x +let[@inline] begin_frame_args_set_sequence_number (self:begin_frame_args) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.sequence_number <- x +let[@inline] begin_frame_args_set_frame_time_us (self:begin_frame_args) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.frame_time_us <- x +let[@inline] begin_frame_args_set_deadline_us (self:begin_frame_args) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.deadline_us <- x +let[@inline] begin_frame_args_set_interval_delta_us (self:begin_frame_args) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.interval_delta_us <- x +let[@inline] begin_frame_args_set_on_critical_path (self:begin_frame_args) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.on_critical_path <- x +let[@inline] begin_frame_args_set_animate_only (self:begin_frame_args) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.animate_only <- x +let[@inline] begin_frame_args_set_created_from (self:begin_frame_args) (x:begin_frame_args_created_from) : unit = + self.created_from <- Some x +let[@inline] begin_frame_args_set_frames_throttled_since_last (self:begin_frame_args) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.frames_throttled_since_last <- x + +let copy_begin_frame_args (self:begin_frame_args) : begin_frame_args = + { self with type_ = self.type_ } + +let make_begin_frame_args + ?(type_:begin_frame_args_begin_frame_args_type option) + ?(source_id:int64 option) + ?(sequence_number:int64 option) + ?(frame_time_us:int64 option) + ?(deadline_us:int64 option) + ?(interval_delta_us:int64 option) + ?(on_critical_path:bool option) + ?(animate_only:bool option) + ?(created_from:begin_frame_args_created_from option) + ?(frames_throttled_since_last:int64 option) + () : begin_frame_args = + let _res = default_begin_frame_args () in + (match type_ with + | None -> () + | Some v -> begin_frame_args_set_type_ _res v); + (match source_id with + | None -> () + | Some v -> begin_frame_args_set_source_id _res v); + (match sequence_number with + | None -> () + | Some v -> begin_frame_args_set_sequence_number _res v); + (match frame_time_us with + | None -> () + | Some v -> begin_frame_args_set_frame_time_us _res v); + (match deadline_us with + | None -> () + | Some v -> begin_frame_args_set_deadline_us _res v); + (match interval_delta_us with + | None -> () + | Some v -> begin_frame_args_set_interval_delta_us _res v); + (match on_critical_path with + | None -> () + | Some v -> begin_frame_args_set_on_critical_path _res v); + (match animate_only with + | None -> () + | Some v -> begin_frame_args_set_animate_only _res v); + (match created_from with + | None -> () + | Some v -> begin_frame_args_set_created_from _res v); + (match frames_throttled_since_last with + | None -> () + | Some v -> begin_frame_args_set_frames_throttled_since_last _res v); + _res + +let[@inline] begin_impl_frame_args_timestamps_in_us_has_interval_delta (self:begin_impl_frame_args_timestamps_in_us) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] begin_impl_frame_args_timestamps_in_us_has_now_to_deadline_delta (self:begin_impl_frame_args_timestamps_in_us) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] begin_impl_frame_args_timestamps_in_us_has_frame_time_to_now_delta (self:begin_impl_frame_args_timestamps_in_us) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] begin_impl_frame_args_timestamps_in_us_has_frame_time_to_deadline_delta (self:begin_impl_frame_args_timestamps_in_us) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] begin_impl_frame_args_timestamps_in_us_has_now (self:begin_impl_frame_args_timestamps_in_us) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] begin_impl_frame_args_timestamps_in_us_has_frame_time (self:begin_impl_frame_args_timestamps_in_us) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] begin_impl_frame_args_timestamps_in_us_has_deadline (self:begin_impl_frame_args_timestamps_in_us) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] begin_impl_frame_args_timestamps_in_us_set_interval_delta (self:begin_impl_frame_args_timestamps_in_us) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.interval_delta <- x +let[@inline] begin_impl_frame_args_timestamps_in_us_set_now_to_deadline_delta (self:begin_impl_frame_args_timestamps_in_us) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.now_to_deadline_delta <- x +let[@inline] begin_impl_frame_args_timestamps_in_us_set_frame_time_to_now_delta (self:begin_impl_frame_args_timestamps_in_us) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.frame_time_to_now_delta <- x +let[@inline] begin_impl_frame_args_timestamps_in_us_set_frame_time_to_deadline_delta (self:begin_impl_frame_args_timestamps_in_us) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.frame_time_to_deadline_delta <- x +let[@inline] begin_impl_frame_args_timestamps_in_us_set_now (self:begin_impl_frame_args_timestamps_in_us) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.now <- x +let[@inline] begin_impl_frame_args_timestamps_in_us_set_frame_time (self:begin_impl_frame_args_timestamps_in_us) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.frame_time <- x +let[@inline] begin_impl_frame_args_timestamps_in_us_set_deadline (self:begin_impl_frame_args_timestamps_in_us) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.deadline <- x + +let copy_begin_impl_frame_args_timestamps_in_us (self:begin_impl_frame_args_timestamps_in_us) : begin_impl_frame_args_timestamps_in_us = + { self with interval_delta = self.interval_delta } + +let make_begin_impl_frame_args_timestamps_in_us + ?(interval_delta:int64 option) + ?(now_to_deadline_delta:int64 option) + ?(frame_time_to_now_delta:int64 option) + ?(frame_time_to_deadline_delta:int64 option) + ?(now:int64 option) + ?(frame_time:int64 option) + ?(deadline:int64 option) + () : begin_impl_frame_args_timestamps_in_us = + let _res = default_begin_impl_frame_args_timestamps_in_us () in + (match interval_delta with + | None -> () + | Some v -> begin_impl_frame_args_timestamps_in_us_set_interval_delta _res v); + (match now_to_deadline_delta with + | None -> () + | Some v -> begin_impl_frame_args_timestamps_in_us_set_now_to_deadline_delta _res v); + (match frame_time_to_now_delta with + | None -> () + | Some v -> begin_impl_frame_args_timestamps_in_us_set_frame_time_to_now_delta _res v); + (match frame_time_to_deadline_delta with + | None -> () + | Some v -> begin_impl_frame_args_timestamps_in_us_set_frame_time_to_deadline_delta _res v); + (match now with + | None -> () + | Some v -> begin_impl_frame_args_timestamps_in_us_set_now _res v); + (match frame_time with + | None -> () + | Some v -> begin_impl_frame_args_timestamps_in_us_set_frame_time _res v); + (match deadline with + | None -> () + | Some v -> begin_impl_frame_args_timestamps_in_us_set_deadline _res v); + _res + +let[@inline] begin_impl_frame_args_has_updated_at_us (self:begin_impl_frame_args) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] begin_impl_frame_args_has_finished_at_us (self:begin_impl_frame_args) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] begin_impl_frame_args_has_state (self:begin_impl_frame_args) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] begin_impl_frame_args_set_updated_at_us (self:begin_impl_frame_args) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.updated_at_us <- x +let[@inline] begin_impl_frame_args_set_finished_at_us (self:begin_impl_frame_args) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.finished_at_us <- x +let[@inline] begin_impl_frame_args_set_state (self:begin_impl_frame_args) (x:begin_impl_frame_args_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.state <- x +let[@inline] begin_impl_frame_args_set_args (self:begin_impl_frame_args) (x:begin_impl_frame_args_args) : unit = + self.args <- Some x +let[@inline] begin_impl_frame_args_set_timestamps_in_us (self:begin_impl_frame_args) (x:begin_impl_frame_args_timestamps_in_us) : unit = + self.timestamps_in_us <- Some x + +let copy_begin_impl_frame_args (self:begin_impl_frame_args) : begin_impl_frame_args = + { self with updated_at_us = self.updated_at_us } + +let make_begin_impl_frame_args + ?(updated_at_us:int64 option) + ?(finished_at_us:int64 option) + ?(state:begin_impl_frame_args_state option) + ?(args:begin_impl_frame_args_args option) + ?(timestamps_in_us:begin_impl_frame_args_timestamps_in_us option) + () : begin_impl_frame_args = + let _res = default_begin_impl_frame_args () in + (match updated_at_us with + | None -> () + | Some v -> begin_impl_frame_args_set_updated_at_us _res v); + (match finished_at_us with + | None -> () + | Some v -> begin_impl_frame_args_set_finished_at_us _res v); + (match state with + | None -> () + | Some v -> begin_impl_frame_args_set_state _res v); + (match args with + | None -> () + | Some v -> begin_impl_frame_args_set_args _res v); + (match timestamps_in_us with + | None -> () + | Some v -> begin_impl_frame_args_set_timestamps_in_us _res v); + _res + +let[@inline] begin_frame_observer_state_has_dropped_begin_frame_args (self:begin_frame_observer_state) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] begin_frame_observer_state_set_dropped_begin_frame_args (self:begin_frame_observer_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.dropped_begin_frame_args <- x +let[@inline] begin_frame_observer_state_set_last_begin_frame_args (self:begin_frame_observer_state) (x:begin_frame_args) : unit = + self.last_begin_frame_args <- Some x + +let copy_begin_frame_observer_state (self:begin_frame_observer_state) : begin_frame_observer_state = + { self with dropped_begin_frame_args = self.dropped_begin_frame_args } + +let make_begin_frame_observer_state + ?(dropped_begin_frame_args:int64 option) + ?(last_begin_frame_args:begin_frame_args option) + () : begin_frame_observer_state = + let _res = default_begin_frame_observer_state () in + (match dropped_begin_frame_args with + | None -> () + | Some v -> begin_frame_observer_state_set_dropped_begin_frame_args _res v); + (match last_begin_frame_args with + | None -> () + | Some v -> begin_frame_observer_state_set_last_begin_frame_args _res v); + _res + +let[@inline] begin_frame_source_state_has_source_id (self:begin_frame_source_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] begin_frame_source_state_has_paused (self:begin_frame_source_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] begin_frame_source_state_has_num_observers (self:begin_frame_source_state) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] begin_frame_source_state_set_source_id (self:begin_frame_source_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.source_id <- x +let[@inline] begin_frame_source_state_set_paused (self:begin_frame_source_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.paused <- x +let[@inline] begin_frame_source_state_set_num_observers (self:begin_frame_source_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.num_observers <- x +let[@inline] begin_frame_source_state_set_last_begin_frame_args (self:begin_frame_source_state) (x:begin_frame_args) : unit = + self.last_begin_frame_args <- Some x + +let copy_begin_frame_source_state (self:begin_frame_source_state) : begin_frame_source_state = + { self with source_id = self.source_id } + +let make_begin_frame_source_state + ?(source_id:int32 option) + ?(paused:bool option) + ?(num_observers:int32 option) + ?(last_begin_frame_args:begin_frame_args option) + () : begin_frame_source_state = + let _res = default_begin_frame_source_state () in + (match source_id with + | None -> () + | Some v -> begin_frame_source_state_set_source_id _res v); + (match paused with + | None -> () + | Some v -> begin_frame_source_state_set_paused _res v); + (match num_observers with + | None -> () + | Some v -> begin_frame_source_state_set_num_observers _res v); + (match last_begin_frame_args with + | None -> () + | Some v -> begin_frame_source_state_set_last_begin_frame_args _res v); + _res + +let[@inline] compositor_timing_history_has_begin_main_frame_queue_critical_estimate_delta_us (self:compositor_timing_history) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] compositor_timing_history_has_begin_main_frame_queue_not_critical_estimate_delta_us (self:compositor_timing_history) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] compositor_timing_history_has_begin_main_frame_start_to_ready_to_commit_estimate_delta_us (self:compositor_timing_history) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] compositor_timing_history_has_commit_to_ready_to_activate_estimate_delta_us (self:compositor_timing_history) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] compositor_timing_history_has_prepare_tiles_estimate_delta_us (self:compositor_timing_history) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] compositor_timing_history_has_activate_estimate_delta_us (self:compositor_timing_history) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] compositor_timing_history_has_draw_estimate_delta_us (self:compositor_timing_history) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] compositor_timing_history_set_begin_main_frame_queue_critical_estimate_delta_us (self:compositor_timing_history) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.begin_main_frame_queue_critical_estimate_delta_us <- x +let[@inline] compositor_timing_history_set_begin_main_frame_queue_not_critical_estimate_delta_us (self:compositor_timing_history) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.begin_main_frame_queue_not_critical_estimate_delta_us <- x +let[@inline] compositor_timing_history_set_begin_main_frame_start_to_ready_to_commit_estimate_delta_us (self:compositor_timing_history) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.begin_main_frame_start_to_ready_to_commit_estimate_delta_us <- x +let[@inline] compositor_timing_history_set_commit_to_ready_to_activate_estimate_delta_us (self:compositor_timing_history) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.commit_to_ready_to_activate_estimate_delta_us <- x +let[@inline] compositor_timing_history_set_prepare_tiles_estimate_delta_us (self:compositor_timing_history) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.prepare_tiles_estimate_delta_us <- x +let[@inline] compositor_timing_history_set_activate_estimate_delta_us (self:compositor_timing_history) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.activate_estimate_delta_us <- x +let[@inline] compositor_timing_history_set_draw_estimate_delta_us (self:compositor_timing_history) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.draw_estimate_delta_us <- x + +let copy_compositor_timing_history (self:compositor_timing_history) : compositor_timing_history = + { self with begin_main_frame_queue_critical_estimate_delta_us = self.begin_main_frame_queue_critical_estimate_delta_us } + +let make_compositor_timing_history + ?(begin_main_frame_queue_critical_estimate_delta_us:int64 option) + ?(begin_main_frame_queue_not_critical_estimate_delta_us:int64 option) + ?(begin_main_frame_start_to_ready_to_commit_estimate_delta_us:int64 option) + ?(commit_to_ready_to_activate_estimate_delta_us:int64 option) + ?(prepare_tiles_estimate_delta_us:int64 option) + ?(activate_estimate_delta_us:int64 option) + ?(draw_estimate_delta_us:int64 option) + () : compositor_timing_history = + let _res = default_compositor_timing_history () in + (match begin_main_frame_queue_critical_estimate_delta_us with + | None -> () + | Some v -> compositor_timing_history_set_begin_main_frame_queue_critical_estimate_delta_us _res v); + (match begin_main_frame_queue_not_critical_estimate_delta_us with + | None -> () + | Some v -> compositor_timing_history_set_begin_main_frame_queue_not_critical_estimate_delta_us _res v); + (match begin_main_frame_start_to_ready_to_commit_estimate_delta_us with + | None -> () + | Some v -> compositor_timing_history_set_begin_main_frame_start_to_ready_to_commit_estimate_delta_us _res v); + (match commit_to_ready_to_activate_estimate_delta_us with + | None -> () + | Some v -> compositor_timing_history_set_commit_to_ready_to_activate_estimate_delta_us _res v); + (match prepare_tiles_estimate_delta_us with + | None -> () + | Some v -> compositor_timing_history_set_prepare_tiles_estimate_delta_us _res v); + (match activate_estimate_delta_us with + | None -> () + | Some v -> compositor_timing_history_set_activate_estimate_delta_us _res v); + (match draw_estimate_delta_us with + | None -> () + | Some v -> compositor_timing_history_set_draw_estimate_delta_us _res v); + _res + +let[@inline] chrome_compositor_scheduler_state_has_observing_begin_frame_source (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_compositor_scheduler_state_has_begin_impl_frame_deadline_task (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_compositor_scheduler_state_has_pending_begin_frame_task (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_compositor_scheduler_state_has_skipped_last_frame_missed_exceeded_deadline (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_compositor_scheduler_state_has_inside_action (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] chrome_compositor_scheduler_state_has_deadline_mode (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] chrome_compositor_scheduler_state_has_deadline_us (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] chrome_compositor_scheduler_state_has_deadline_scheduled_at_us (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] chrome_compositor_scheduler_state_has_now_us (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] chrome_compositor_scheduler_state_has_now_to_deadline_delta_us (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] chrome_compositor_scheduler_state_has_now_to_deadline_scheduled_at_delta_us (self:chrome_compositor_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 10) + +let[@inline] chrome_compositor_scheduler_state_set_state_machine (self:chrome_compositor_scheduler_state) (x:chrome_compositor_state_machine) : unit = + self.state_machine <- Some x +let[@inline] chrome_compositor_scheduler_state_set_observing_begin_frame_source (self:chrome_compositor_scheduler_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.observing_begin_frame_source <- x +let[@inline] chrome_compositor_scheduler_state_set_begin_impl_frame_deadline_task (self:chrome_compositor_scheduler_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.begin_impl_frame_deadline_task <- x +let[@inline] chrome_compositor_scheduler_state_set_pending_begin_frame_task (self:chrome_compositor_scheduler_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.pending_begin_frame_task <- x +let[@inline] chrome_compositor_scheduler_state_set_skipped_last_frame_missed_exceeded_deadline (self:chrome_compositor_scheduler_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.skipped_last_frame_missed_exceeded_deadline <- x +let[@inline] chrome_compositor_scheduler_state_set_inside_action (self:chrome_compositor_scheduler_state) (x:chrome_compositor_scheduler_action) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.inside_action <- x +let[@inline] chrome_compositor_scheduler_state_set_deadline_mode (self:chrome_compositor_scheduler_state) (x:chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.deadline_mode <- x +let[@inline] chrome_compositor_scheduler_state_set_deadline_us (self:chrome_compositor_scheduler_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.deadline_us <- x +let[@inline] chrome_compositor_scheduler_state_set_deadline_scheduled_at_us (self:chrome_compositor_scheduler_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.deadline_scheduled_at_us <- x +let[@inline] chrome_compositor_scheduler_state_set_now_us (self:chrome_compositor_scheduler_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.now_us <- x +let[@inline] chrome_compositor_scheduler_state_set_now_to_deadline_delta_us (self:chrome_compositor_scheduler_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.now_to_deadline_delta_us <- x +let[@inline] chrome_compositor_scheduler_state_set_now_to_deadline_scheduled_at_delta_us (self:chrome_compositor_scheduler_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.now_to_deadline_scheduled_at_delta_us <- x +let[@inline] chrome_compositor_scheduler_state_set_begin_impl_frame_args (self:chrome_compositor_scheduler_state) (x:begin_impl_frame_args) : unit = + self.begin_impl_frame_args <- Some x +let[@inline] chrome_compositor_scheduler_state_set_begin_frame_observer_state (self:chrome_compositor_scheduler_state) (x:begin_frame_observer_state) : unit = + self.begin_frame_observer_state <- Some x +let[@inline] chrome_compositor_scheduler_state_set_begin_frame_source_state (self:chrome_compositor_scheduler_state) (x:begin_frame_source_state) : unit = + self.begin_frame_source_state <- Some x +let[@inline] chrome_compositor_scheduler_state_set_compositor_timing_history (self:chrome_compositor_scheduler_state) (x:compositor_timing_history) : unit = + self.compositor_timing_history <- Some x + +let copy_chrome_compositor_scheduler_state (self:chrome_compositor_scheduler_state) : chrome_compositor_scheduler_state = + { self with state_machine = self.state_machine } + +let make_chrome_compositor_scheduler_state + ?(state_machine:chrome_compositor_state_machine option) + ?(observing_begin_frame_source:bool option) + ?(begin_impl_frame_deadline_task:bool option) + ?(pending_begin_frame_task:bool option) + ?(skipped_last_frame_missed_exceeded_deadline:bool option) + ?(inside_action:chrome_compositor_scheduler_action option) + ?(deadline_mode:chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode option) + ?(deadline_us:int64 option) + ?(deadline_scheduled_at_us:int64 option) + ?(now_us:int64 option) + ?(now_to_deadline_delta_us:int64 option) + ?(now_to_deadline_scheduled_at_delta_us:int64 option) + ?(begin_impl_frame_args:begin_impl_frame_args option) + ?(begin_frame_observer_state:begin_frame_observer_state option) + ?(begin_frame_source_state:begin_frame_source_state option) + ?(compositor_timing_history:compositor_timing_history option) + () : chrome_compositor_scheduler_state = + let _res = default_chrome_compositor_scheduler_state () in + (match state_machine with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_state_machine _res v); + (match observing_begin_frame_source with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_observing_begin_frame_source _res v); + (match begin_impl_frame_deadline_task with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_begin_impl_frame_deadline_task _res v); + (match pending_begin_frame_task with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_pending_begin_frame_task _res v); + (match skipped_last_frame_missed_exceeded_deadline with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_skipped_last_frame_missed_exceeded_deadline _res v); + (match inside_action with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_inside_action _res v); + (match deadline_mode with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_deadline_mode _res v); + (match deadline_us with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_deadline_us _res v); + (match deadline_scheduled_at_us with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_deadline_scheduled_at_us _res v); + (match now_us with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_now_us _res v); + (match now_to_deadline_delta_us with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_now_to_deadline_delta_us _res v); + (match now_to_deadline_scheduled_at_delta_us with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_now_to_deadline_scheduled_at_delta_us _res v); + (match begin_impl_frame_args with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_begin_impl_frame_args _res v); + (match begin_frame_observer_state with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_begin_frame_observer_state _res v); + (match begin_frame_source_state with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_begin_frame_source_state _res v); + (match compositor_timing_history with + | None -> () + | Some v -> chrome_compositor_scheduler_state_set_compositor_timing_history _res v); + _res + +let[@inline] chrome_content_settings_event_info_has_number_of_exceptions (self:chrome_content_settings_event_info) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] chrome_content_settings_event_info_set_number_of_exceptions (self:chrome_content_settings_event_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.number_of_exceptions <- x + +let copy_chrome_content_settings_event_info (self:chrome_content_settings_event_info) : chrome_content_settings_event_info = + { self with number_of_exceptions = self.number_of_exceptions } + +let make_chrome_content_settings_event_info + ?(number_of_exceptions:int32 option) + () : chrome_content_settings_event_info = + let _res = default_chrome_content_settings_event_info () in + (match number_of_exceptions with + | None -> () + | Some v -> chrome_content_settings_event_info_set_number_of_exceptions _res v); + _res + +let[@inline] chrome_frame_reporter_has_state (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_frame_reporter_has_reason (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_frame_reporter_has_frame_source (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_frame_reporter_has_frame_sequence (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_frame_reporter_has_affects_smoothness (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] chrome_frame_reporter_has_scroll_state (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] chrome_frame_reporter_has_has_main_animation (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] chrome_frame_reporter_has_has_compositor_animation (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] chrome_frame_reporter_has_has_smooth_input_main (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] chrome_frame_reporter_has_has_missing_content (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] chrome_frame_reporter_has_layer_tree_host_id (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] chrome_frame_reporter_has_has_high_latency (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] chrome_frame_reporter_has_frame_type (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] chrome_frame_reporter_has_checkerboarded_needs_raster (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] chrome_frame_reporter_has_checkerboarded_needs_record (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] chrome_frame_reporter_has_surface_frame_trace_id (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] chrome_frame_reporter_has_display_trace_id (self:chrome_frame_reporter) : bool = (Pbrt.Bitfield.get self._presence 16) + +let[@inline] chrome_frame_reporter_set_state (self:chrome_frame_reporter) (x:chrome_frame_reporter_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.state <- x +let[@inline] chrome_frame_reporter_set_reason (self:chrome_frame_reporter) (x:chrome_frame_reporter_frame_drop_reason) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.reason <- x +let[@inline] chrome_frame_reporter_set_frame_source (self:chrome_frame_reporter) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.frame_source <- x +let[@inline] chrome_frame_reporter_set_frame_sequence (self:chrome_frame_reporter) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.frame_sequence <- x +let[@inline] chrome_frame_reporter_set_affects_smoothness (self:chrome_frame_reporter) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.affects_smoothness <- x +let[@inline] chrome_frame_reporter_set_scroll_state (self:chrome_frame_reporter) (x:chrome_frame_reporter_scroll_state) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.scroll_state <- x +let[@inline] chrome_frame_reporter_set_has_main_animation (self:chrome_frame_reporter) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.has_main_animation <- x +let[@inline] chrome_frame_reporter_set_has_compositor_animation (self:chrome_frame_reporter) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.has_compositor_animation <- x +let[@inline] chrome_frame_reporter_set_has_smooth_input_main (self:chrome_frame_reporter) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.has_smooth_input_main <- x +let[@inline] chrome_frame_reporter_set_has_missing_content (self:chrome_frame_reporter) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.has_missing_content <- x +let[@inline] chrome_frame_reporter_set_layer_tree_host_id (self:chrome_frame_reporter) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.layer_tree_host_id <- x +let[@inline] chrome_frame_reporter_set_has_high_latency (self:chrome_frame_reporter) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.has_high_latency <- x +let[@inline] chrome_frame_reporter_set_frame_type (self:chrome_frame_reporter) (x:chrome_frame_reporter_frame_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.frame_type <- x +let[@inline] chrome_frame_reporter_set_high_latency_contribution_stage (self:chrome_frame_reporter) (x:string list) : unit = + self.high_latency_contribution_stage <- x +let[@inline] chrome_frame_reporter_set_checkerboarded_needs_raster (self:chrome_frame_reporter) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.checkerboarded_needs_raster <- x +let[@inline] chrome_frame_reporter_set_checkerboarded_needs_record (self:chrome_frame_reporter) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.checkerboarded_needs_record <- x +let[@inline] chrome_frame_reporter_set_surface_frame_trace_id (self:chrome_frame_reporter) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.surface_frame_trace_id <- x +let[@inline] chrome_frame_reporter_set_display_trace_id (self:chrome_frame_reporter) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.display_trace_id <- x + +let copy_chrome_frame_reporter (self:chrome_frame_reporter) : chrome_frame_reporter = + { self with state = self.state } + +let make_chrome_frame_reporter + ?(state:chrome_frame_reporter_state option) + ?(reason:chrome_frame_reporter_frame_drop_reason option) + ?(frame_source:int64 option) + ?(frame_sequence:int64 option) + ?(affects_smoothness:bool option) + ?(scroll_state:chrome_frame_reporter_scroll_state option) + ?(has_main_animation:bool option) + ?(has_compositor_animation:bool option) + ?(has_smooth_input_main:bool option) + ?(has_missing_content:bool option) + ?(layer_tree_host_id:int64 option) + ?(has_high_latency:bool option) + ?(frame_type:chrome_frame_reporter_frame_type option) + ?(high_latency_contribution_stage=[]) + ?(checkerboarded_needs_raster:bool option) + ?(checkerboarded_needs_record:bool option) + ?(surface_frame_trace_id:int64 option) + ?(display_trace_id:int64 option) + () : chrome_frame_reporter = + let _res = default_chrome_frame_reporter () in + (match state with + | None -> () + | Some v -> chrome_frame_reporter_set_state _res v); + (match reason with + | None -> () + | Some v -> chrome_frame_reporter_set_reason _res v); + (match frame_source with + | None -> () + | Some v -> chrome_frame_reporter_set_frame_source _res v); + (match frame_sequence with + | None -> () + | Some v -> chrome_frame_reporter_set_frame_sequence _res v); + (match affects_smoothness with + | None -> () + | Some v -> chrome_frame_reporter_set_affects_smoothness _res v); + (match scroll_state with + | None -> () + | Some v -> chrome_frame_reporter_set_scroll_state _res v); + (match has_main_animation with + | None -> () + | Some v -> chrome_frame_reporter_set_has_main_animation _res v); + (match has_compositor_animation with + | None -> () + | Some v -> chrome_frame_reporter_set_has_compositor_animation _res v); + (match has_smooth_input_main with + | None -> () + | Some v -> chrome_frame_reporter_set_has_smooth_input_main _res v); + (match has_missing_content with + | None -> () + | Some v -> chrome_frame_reporter_set_has_missing_content _res v); + (match layer_tree_host_id with + | None -> () + | Some v -> chrome_frame_reporter_set_layer_tree_host_id _res v); + (match has_high_latency with + | None -> () + | Some v -> chrome_frame_reporter_set_has_high_latency _res v); + (match frame_type with + | None -> () + | Some v -> chrome_frame_reporter_set_frame_type _res v); + chrome_frame_reporter_set_high_latency_contribution_stage _res high_latency_contribution_stage; + (match checkerboarded_needs_raster with + | None -> () + | Some v -> chrome_frame_reporter_set_checkerboarded_needs_raster _res v); + (match checkerboarded_needs_record with + | None -> () + | Some v -> chrome_frame_reporter_set_checkerboarded_needs_record _res v); + (match surface_frame_trace_id with + | None -> () + | Some v -> chrome_frame_reporter_set_surface_frame_trace_id _res v); + (match display_trace_id with + | None -> () + | Some v -> chrome_frame_reporter_set_display_trace_id _res v); + _res + +let[@inline] chrome_keyed_service_has_name (self:chrome_keyed_service) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] chrome_keyed_service_set_name (self:chrome_keyed_service) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x + +let copy_chrome_keyed_service (self:chrome_keyed_service) : chrome_keyed_service = + { self with name = self.name } + +let make_chrome_keyed_service + ?(name:string option) + () : chrome_keyed_service = + let _res = default_chrome_keyed_service () in + (match name with + | None -> () + | Some v -> chrome_keyed_service_set_name _res v); + _res + +let[@inline] chrome_latency_info_component_info_has_component_type (self:chrome_latency_info_component_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_latency_info_component_info_has_time_us (self:chrome_latency_info_component_info) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_latency_info_component_info_set_component_type (self:chrome_latency_info_component_info) (x:chrome_latency_info_latency_component_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.component_type <- x +let[@inline] chrome_latency_info_component_info_set_time_us (self:chrome_latency_info_component_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.time_us <- x + +let copy_chrome_latency_info_component_info (self:chrome_latency_info_component_info) : chrome_latency_info_component_info = + { self with component_type = self.component_type } + +let make_chrome_latency_info_component_info + ?(component_type:chrome_latency_info_latency_component_type option) + ?(time_us:int64 option) + () : chrome_latency_info_component_info = + let _res = default_chrome_latency_info_component_info () in + (match component_type with + | None -> () + | Some v -> chrome_latency_info_component_info_set_component_type _res v); + (match time_us with + | None -> () + | Some v -> chrome_latency_info_component_info_set_time_us _res v); + _res + +let[@inline] chrome_latency_info_has_trace_id (self:chrome_latency_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_latency_info_has_step (self:chrome_latency_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_latency_info_has_frame_tree_node_id (self:chrome_latency_info) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_latency_info_has_is_coalesced (self:chrome_latency_info) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_latency_info_has_gesture_scroll_id (self:chrome_latency_info) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] chrome_latency_info_has_touch_id (self:chrome_latency_info) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] chrome_latency_info_has_input_type (self:chrome_latency_info) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] chrome_latency_info_set_trace_id (self:chrome_latency_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.trace_id <- x +let[@inline] chrome_latency_info_set_step (self:chrome_latency_info) (x:chrome_latency_info_step) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.step <- x +let[@inline] chrome_latency_info_set_frame_tree_node_id (self:chrome_latency_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.frame_tree_node_id <- x +let[@inline] chrome_latency_info_set_component_info (self:chrome_latency_info) (x:chrome_latency_info_component_info list) : unit = + self.component_info <- x +let[@inline] chrome_latency_info_set_is_coalesced (self:chrome_latency_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.is_coalesced <- x +let[@inline] chrome_latency_info_set_gesture_scroll_id (self:chrome_latency_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.gesture_scroll_id <- x +let[@inline] chrome_latency_info_set_touch_id (self:chrome_latency_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.touch_id <- x +let[@inline] chrome_latency_info_set_input_type (self:chrome_latency_info) (x:chrome_latency_info_input_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.input_type <- x + +let copy_chrome_latency_info (self:chrome_latency_info) : chrome_latency_info = + { self with trace_id = self.trace_id } + +let make_chrome_latency_info + ?(trace_id:int64 option) + ?(step:chrome_latency_info_step option) + ?(frame_tree_node_id:int32 option) + ?(component_info=[]) + ?(is_coalesced:bool option) + ?(gesture_scroll_id:int64 option) + ?(touch_id:int64 option) + ?(input_type:chrome_latency_info_input_type option) + () : chrome_latency_info = + let _res = default_chrome_latency_info () in + (match trace_id with + | None -> () + | Some v -> chrome_latency_info_set_trace_id _res v); + (match step with + | None -> () + | Some v -> chrome_latency_info_set_step _res v); + (match frame_tree_node_id with + | None -> () + | Some v -> chrome_latency_info_set_frame_tree_node_id _res v); + chrome_latency_info_set_component_info _res component_info; + (match is_coalesced with + | None -> () + | Some v -> chrome_latency_info_set_is_coalesced _res v); + (match gesture_scroll_id with + | None -> () + | Some v -> chrome_latency_info_set_gesture_scroll_id _res v); + (match touch_id with + | None -> () + | Some v -> chrome_latency_info_set_touch_id _res v); + (match input_type with + | None -> () + | Some v -> chrome_latency_info_set_input_type _res v); + _res + +let[@inline] chrome_legacy_ipc_has_message_class (self:chrome_legacy_ipc) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_legacy_ipc_has_message_line (self:chrome_legacy_ipc) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_legacy_ipc_set_message_class (self:chrome_legacy_ipc) (x:chrome_legacy_ipc_message_class) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.message_class <- x +let[@inline] chrome_legacy_ipc_set_message_line (self:chrome_legacy_ipc) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.message_line <- x + +let copy_chrome_legacy_ipc (self:chrome_legacy_ipc) : chrome_legacy_ipc = + { self with message_class = self.message_class } + +let make_chrome_legacy_ipc + ?(message_class:chrome_legacy_ipc_message_class option) + ?(message_line:int32 option) + () : chrome_legacy_ipc = + let _res = default_chrome_legacy_ipc () in + (match message_class with + | None -> () + | Some v -> chrome_legacy_ipc_set_message_class _res v); + (match message_line with + | None -> () + | Some v -> chrome_legacy_ipc_set_message_line _res v); + _res + +let[@inline] chrome_message_pump_has_sent_messages_in_queue (self:chrome_message_pump) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_message_pump_has_io_handler_location_iid (self:chrome_message_pump) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_message_pump_set_sent_messages_in_queue (self:chrome_message_pump) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.sent_messages_in_queue <- x +let[@inline] chrome_message_pump_set_io_handler_location_iid (self:chrome_message_pump) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.io_handler_location_iid <- x + +let copy_chrome_message_pump (self:chrome_message_pump) : chrome_message_pump = + { self with sent_messages_in_queue = self.sent_messages_in_queue } + +let make_chrome_message_pump + ?(sent_messages_in_queue:bool option) + ?(io_handler_location_iid:int64 option) + () : chrome_message_pump = + let _res = default_chrome_message_pump () in + (match sent_messages_in_queue with + | None -> () + | Some v -> chrome_message_pump_set_sent_messages_in_queue _res v); + (match io_handler_location_iid with + | None -> () + | Some v -> chrome_message_pump_set_io_handler_location_iid _res v); + _res + +let[@inline] chrome_mojo_event_info_has_watcher_notify_interface_tag (self:chrome_mojo_event_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_mojo_event_info_has_ipc_hash (self:chrome_mojo_event_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_mojo_event_info_has_mojo_interface_tag (self:chrome_mojo_event_info) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_mojo_event_info_has_mojo_interface_method_iid (self:chrome_mojo_event_info) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_mojo_event_info_has_is_reply (self:chrome_mojo_event_info) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] chrome_mojo_event_info_has_payload_size (self:chrome_mojo_event_info) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] chrome_mojo_event_info_has_data_num_bytes (self:chrome_mojo_event_info) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] chrome_mojo_event_info_set_watcher_notify_interface_tag (self:chrome_mojo_event_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.watcher_notify_interface_tag <- x +let[@inline] chrome_mojo_event_info_set_ipc_hash (self:chrome_mojo_event_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.ipc_hash <- x +let[@inline] chrome_mojo_event_info_set_mojo_interface_tag (self:chrome_mojo_event_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.mojo_interface_tag <- x +let[@inline] chrome_mojo_event_info_set_mojo_interface_method_iid (self:chrome_mojo_event_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.mojo_interface_method_iid <- x +let[@inline] chrome_mojo_event_info_set_is_reply (self:chrome_mojo_event_info) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.is_reply <- x +let[@inline] chrome_mojo_event_info_set_payload_size (self:chrome_mojo_event_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.payload_size <- x +let[@inline] chrome_mojo_event_info_set_data_num_bytes (self:chrome_mojo_event_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.data_num_bytes <- x + +let copy_chrome_mojo_event_info (self:chrome_mojo_event_info) : chrome_mojo_event_info = + { self with watcher_notify_interface_tag = self.watcher_notify_interface_tag } + +let make_chrome_mojo_event_info + ?(watcher_notify_interface_tag:string option) + ?(ipc_hash:int32 option) + ?(mojo_interface_tag:string option) + ?(mojo_interface_method_iid:int64 option) + ?(is_reply:bool option) + ?(payload_size:int64 option) + ?(data_num_bytes:int64 option) + () : chrome_mojo_event_info = + let _res = default_chrome_mojo_event_info () in + (match watcher_notify_interface_tag with + | None -> () + | Some v -> chrome_mojo_event_info_set_watcher_notify_interface_tag _res v); + (match ipc_hash with + | None -> () + | Some v -> chrome_mojo_event_info_set_ipc_hash _res v); + (match mojo_interface_tag with + | None -> () + | Some v -> chrome_mojo_event_info_set_mojo_interface_tag _res v); + (match mojo_interface_method_iid with + | None -> () + | Some v -> chrome_mojo_event_info_set_mojo_interface_method_iid _res v); + (match is_reply with + | None -> () + | Some v -> chrome_mojo_event_info_set_is_reply _res v); + (match payload_size with + | None -> () + | Some v -> chrome_mojo_event_info_set_payload_size _res v); + (match data_num_bytes with + | None -> () + | Some v -> chrome_mojo_event_info_set_data_num_bytes _res v); + _res + +let[@inline] chrome_renderer_scheduler_state_has_rail_mode (self:chrome_renderer_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_renderer_scheduler_state_has_is_backgrounded (self:chrome_renderer_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_renderer_scheduler_state_has_is_hidden (self:chrome_renderer_scheduler_state) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] chrome_renderer_scheduler_state_set_rail_mode (self:chrome_renderer_scheduler_state) (x:chrome_railmode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.rail_mode <- x +let[@inline] chrome_renderer_scheduler_state_set_is_backgrounded (self:chrome_renderer_scheduler_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.is_backgrounded <- x +let[@inline] chrome_renderer_scheduler_state_set_is_hidden (self:chrome_renderer_scheduler_state) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.is_hidden <- x + +let copy_chrome_renderer_scheduler_state (self:chrome_renderer_scheduler_state) : chrome_renderer_scheduler_state = + { self with rail_mode = self.rail_mode } + +let make_chrome_renderer_scheduler_state + ?(rail_mode:chrome_railmode option) + ?(is_backgrounded:bool option) + ?(is_hidden:bool option) + () : chrome_renderer_scheduler_state = + let _res = default_chrome_renderer_scheduler_state () in + (match rail_mode with + | None -> () + | Some v -> chrome_renderer_scheduler_state_set_rail_mode _res v); + (match is_backgrounded with + | None -> () + | Some v -> chrome_renderer_scheduler_state_set_is_backgrounded _res v); + (match is_hidden with + | None -> () + | Some v -> chrome_renderer_scheduler_state_set_is_hidden _res v); + _res + +let[@inline] chrome_user_event_has_action (self:chrome_user_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_user_event_has_action_hash (self:chrome_user_event) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] chrome_user_event_set_action (self:chrome_user_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.action <- x +let[@inline] chrome_user_event_set_action_hash (self:chrome_user_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.action_hash <- x + +let copy_chrome_user_event (self:chrome_user_event) : chrome_user_event = + { self with action = self.action } + +let make_chrome_user_event + ?(action:string option) + ?(action_hash:int64 option) + () : chrome_user_event = + let _res = default_chrome_user_event () in + (match action with + | None -> () + | Some v -> chrome_user_event_set_action _res v); + (match action_hash with + | None -> () + | Some v -> chrome_user_event_set_action_hash _res v); + _res + +let[@inline] chrome_window_handle_event_info_has_dpi (self:chrome_window_handle_event_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_window_handle_event_info_has_message_id (self:chrome_window_handle_event_info) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_window_handle_event_info_has_hwnd_ptr (self:chrome_window_handle_event_info) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] chrome_window_handle_event_info_set_dpi (self:chrome_window_handle_event_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.dpi <- x +let[@inline] chrome_window_handle_event_info_set_message_id (self:chrome_window_handle_event_info) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.message_id <- x +let[@inline] chrome_window_handle_event_info_set_hwnd_ptr (self:chrome_window_handle_event_info) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.hwnd_ptr <- x + +let copy_chrome_window_handle_event_info (self:chrome_window_handle_event_info) : chrome_window_handle_event_info = + { self with dpi = self.dpi } + +let make_chrome_window_handle_event_info + ?(dpi:int32 option) + ?(message_id:int32 option) + ?(hwnd_ptr:int64 option) + () : chrome_window_handle_event_info = + let _res = default_chrome_window_handle_event_info () in + (match dpi with + | None -> () + | Some v -> chrome_window_handle_event_info_set_dpi _res v); + (match message_id with + | None -> () + | Some v -> chrome_window_handle_event_info_set_message_id _res v); + (match hwnd_ptr with + | None -> () + | Some v -> chrome_window_handle_event_info_set_hwnd_ptr _res v); + _res + +let[@inline] screenshot_has_jpg_image (self:screenshot) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] screenshot_set_jpg_image (self:screenshot) (x:bytes) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.jpg_image <- x + +let copy_screenshot (self:screenshot) : screenshot = + { self with jpg_image = self.jpg_image } + +let make_screenshot + ?(jpg_image:bytes option) + () : screenshot = + let _res = default_screenshot () in + (match jpg_image with + | None -> () + | Some v -> screenshot_set_jpg_image _res v); + _res + +let[@inline] task_execution_has_posted_from_iid (self:task_execution) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] task_execution_set_posted_from_iid (self:task_execution) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.posted_from_iid <- x + +let copy_task_execution (self:task_execution) : task_execution = + { self with posted_from_iid = self.posted_from_iid } + +let make_task_execution + ?(posted_from_iid:int64 option) + () : task_execution = + let _res = default_task_execution () in + (match posted_from_iid with + | None -> () + | Some v -> task_execution_set_posted_from_iid _res v); + _res + +let[@inline] track_event_callstack_frame_has_function_name (self:track_event_callstack_frame) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] track_event_callstack_frame_has_source_file (self:track_event_callstack_frame) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] track_event_callstack_frame_has_line_number (self:track_event_callstack_frame) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] track_event_callstack_frame_set_function_name (self:track_event_callstack_frame) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.function_name <- x +let[@inline] track_event_callstack_frame_set_source_file (self:track_event_callstack_frame) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.source_file <- x +let[@inline] track_event_callstack_frame_set_line_number (self:track_event_callstack_frame) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.line_number <- x + +let copy_track_event_callstack_frame (self:track_event_callstack_frame) : track_event_callstack_frame = + { self with function_name = self.function_name } + +let make_track_event_callstack_frame + ?(function_name:string option) + ?(source_file:string option) + ?(line_number:int32 option) + () : track_event_callstack_frame = + let _res = default_track_event_callstack_frame () in + (match function_name with + | None -> () + | Some v -> track_event_callstack_frame_set_function_name _res v); + (match source_file with + | None -> () + | Some v -> track_event_callstack_frame_set_source_file _res v); + (match line_number with + | None -> () + | Some v -> track_event_callstack_frame_set_line_number _res v); + _res + + +let[@inline] track_event_callstack_set_frames (self:track_event_callstack) (x:track_event_callstack_frame list) : unit = + self.frames <- x + +let copy_track_event_callstack (self:track_event_callstack) : track_event_callstack = + { self with frames = self.frames } + +let make_track_event_callstack + ?(frames=[]) + () : track_event_callstack = + let _res = default_track_event_callstack () in + track_event_callstack_set_frames _res frames; + _res + +let[@inline] track_event_legacy_event_has_name_iid (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] track_event_legacy_event_has_phase (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] track_event_legacy_event_has_duration_us (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] track_event_legacy_event_has_thread_duration_us (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] track_event_legacy_event_has_thread_instruction_delta (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] track_event_legacy_event_has_id_scope (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] track_event_legacy_event_has_use_async_tts (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] track_event_legacy_event_has_bind_id (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] track_event_legacy_event_has_bind_to_enclosing (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] track_event_legacy_event_has_flow_direction (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] track_event_legacy_event_has_instant_event_scope (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] track_event_legacy_event_has_pid_override (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] track_event_legacy_event_has_tid_override (self:track_event_legacy_event) : bool = (Pbrt.Bitfield.get self._presence 12) + +let[@inline] track_event_legacy_event_set_name_iid (self:track_event_legacy_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name_iid <- x +let[@inline] track_event_legacy_event_set_phase (self:track_event_legacy_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.phase <- x +let[@inline] track_event_legacy_event_set_duration_us (self:track_event_legacy_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.duration_us <- x +let[@inline] track_event_legacy_event_set_thread_duration_us (self:track_event_legacy_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.thread_duration_us <- x +let[@inline] track_event_legacy_event_set_thread_instruction_delta (self:track_event_legacy_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.thread_instruction_delta <- x +let[@inline] track_event_legacy_event_set_id (self:track_event_legacy_event) (x:track_event_legacy_event_id) : unit = + self.id <- Some x +let[@inline] track_event_legacy_event_set_id_scope (self:track_event_legacy_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.id_scope <- x +let[@inline] track_event_legacy_event_set_use_async_tts (self:track_event_legacy_event) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.use_async_tts <- x +let[@inline] track_event_legacy_event_set_bind_id (self:track_event_legacy_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.bind_id <- x +let[@inline] track_event_legacy_event_set_bind_to_enclosing (self:track_event_legacy_event) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.bind_to_enclosing <- x +let[@inline] track_event_legacy_event_set_flow_direction (self:track_event_legacy_event) (x:track_event_legacy_event_flow_direction) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.flow_direction <- x +let[@inline] track_event_legacy_event_set_instant_event_scope (self:track_event_legacy_event) (x:track_event_legacy_event_instant_event_scope) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.instant_event_scope <- x +let[@inline] track_event_legacy_event_set_pid_override (self:track_event_legacy_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.pid_override <- x +let[@inline] track_event_legacy_event_set_tid_override (self:track_event_legacy_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.tid_override <- x + +let copy_track_event_legacy_event (self:track_event_legacy_event) : track_event_legacy_event = + { self with name_iid = self.name_iid } + +let make_track_event_legacy_event + ?(name_iid:int64 option) + ?(phase:int32 option) + ?(duration_us:int64 option) + ?(thread_duration_us:int64 option) + ?(thread_instruction_delta:int64 option) + ?(id:track_event_legacy_event_id option) + ?(id_scope:string option) + ?(use_async_tts:bool option) + ?(bind_id:int64 option) + ?(bind_to_enclosing:bool option) + ?(flow_direction:track_event_legacy_event_flow_direction option) + ?(instant_event_scope:track_event_legacy_event_instant_event_scope option) + ?(pid_override:int32 option) + ?(tid_override:int32 option) + () : track_event_legacy_event = + let _res = default_track_event_legacy_event () in + (match name_iid with + | None -> () + | Some v -> track_event_legacy_event_set_name_iid _res v); + (match phase with + | None -> () + | Some v -> track_event_legacy_event_set_phase _res v); + (match duration_us with + | None -> () + | Some v -> track_event_legacy_event_set_duration_us _res v); + (match thread_duration_us with + | None -> () + | Some v -> track_event_legacy_event_set_thread_duration_us _res v); + (match thread_instruction_delta with + | None -> () + | Some v -> track_event_legacy_event_set_thread_instruction_delta _res v); + (match id with + | None -> () + | Some v -> track_event_legacy_event_set_id _res v); + (match id_scope with + | None -> () + | Some v -> track_event_legacy_event_set_id_scope _res v); + (match use_async_tts with + | None -> () + | Some v -> track_event_legacy_event_set_use_async_tts _res v); + (match bind_id with + | None -> () + | Some v -> track_event_legacy_event_set_bind_id _res v); + (match bind_to_enclosing with + | None -> () + | Some v -> track_event_legacy_event_set_bind_to_enclosing _res v); + (match flow_direction with + | None -> () + | Some v -> track_event_legacy_event_set_flow_direction _res v); + (match instant_event_scope with + | None -> () + | Some v -> track_event_legacy_event_set_instant_event_scope _res v); + (match pid_override with + | None -> () + | Some v -> track_event_legacy_event_set_pid_override _res v); + (match tid_override with + | None -> () + | Some v -> track_event_legacy_event_set_tid_override _res v); + _res + +let[@inline] track_event_has_type_ (self:track_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] track_event_has_track_uuid (self:track_event) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] track_event_set_category_iids (self:track_event) (x:int64 list) : unit = + self.category_iids <- x +let[@inline] track_event_set_categories (self:track_event) (x:string list) : unit = + self.categories <- x +let[@inline] track_event_set_name_field (self:track_event) (x:track_event_name_field) : unit = + self.name_field <- Some x +let[@inline] track_event_set_type_ (self:track_event) (x:track_event_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.type_ <- x +let[@inline] track_event_set_track_uuid (self:track_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.track_uuid <- x +let[@inline] track_event_set_counter_value_field (self:track_event) (x:track_event_counter_value_field) : unit = + self.counter_value_field <- Some x +let[@inline] track_event_set_extra_counter_track_uuids (self:track_event) (x:int64 list) : unit = + self.extra_counter_track_uuids <- x +let[@inline] track_event_set_extra_counter_values (self:track_event) (x:int64 list) : unit = + self.extra_counter_values <- x +let[@inline] track_event_set_extra_double_counter_track_uuids (self:track_event) (x:int64 list) : unit = + self.extra_double_counter_track_uuids <- x +let[@inline] track_event_set_extra_double_counter_values (self:track_event) (x:float list) : unit = + self.extra_double_counter_values <- x +let[@inline] track_event_set_flow_ids_old (self:track_event) (x:int64 list) : unit = + self.flow_ids_old <- x +let[@inline] track_event_set_flow_ids (self:track_event) (x:int64 list) : unit = + self.flow_ids <- x +let[@inline] track_event_set_terminating_flow_ids_old (self:track_event) (x:int64 list) : unit = + self.terminating_flow_ids_old <- x +let[@inline] track_event_set_terminating_flow_ids (self:track_event) (x:int64 list) : unit = + self.terminating_flow_ids <- x +let[@inline] track_event_set_correlation_id_field (self:track_event) (x:track_event_correlation_id_field) : unit = + self.correlation_id_field <- Some x +let[@inline] track_event_set_callstack_field (self:track_event) (x:track_event_callstack_field) : unit = + self.callstack_field <- Some x +let[@inline] track_event_set_debug_annotations (self:track_event) (x:debug_annotation list) : unit = + self.debug_annotations <- x +let[@inline] track_event_set_task_execution (self:track_event) (x:task_execution) : unit = + self.task_execution <- Some x +let[@inline] track_event_set_log_message (self:track_event) (x:log_message) : unit = + self.log_message <- Some x +let[@inline] track_event_set_cc_scheduler_state (self:track_event) (x:chrome_compositor_scheduler_state) : unit = + self.cc_scheduler_state <- Some x +let[@inline] track_event_set_chrome_user_event (self:track_event) (x:chrome_user_event) : unit = + self.chrome_user_event <- Some x +let[@inline] track_event_set_chrome_keyed_service (self:track_event) (x:chrome_keyed_service) : unit = + self.chrome_keyed_service <- Some x +let[@inline] track_event_set_chrome_legacy_ipc (self:track_event) (x:chrome_legacy_ipc) : unit = + self.chrome_legacy_ipc <- Some x +let[@inline] track_event_set_chrome_histogram_sample (self:track_event) (x:chrome_histogram_sample) : unit = + self.chrome_histogram_sample <- Some x +let[@inline] track_event_set_chrome_latency_info (self:track_event) (x:chrome_latency_info) : unit = + self.chrome_latency_info <- Some x +let[@inline] track_event_set_chrome_frame_reporter (self:track_event) (x:chrome_frame_reporter) : unit = + self.chrome_frame_reporter <- Some x +let[@inline] track_event_set_chrome_application_state_info (self:track_event) (x:chrome_application_state_info) : unit = + self.chrome_application_state_info <- Some x +let[@inline] track_event_set_chrome_renderer_scheduler_state (self:track_event) (x:chrome_renderer_scheduler_state) : unit = + self.chrome_renderer_scheduler_state <- Some x +let[@inline] track_event_set_chrome_window_handle_event_info (self:track_event) (x:chrome_window_handle_event_info) : unit = + self.chrome_window_handle_event_info <- Some x +let[@inline] track_event_set_chrome_content_settings_event_info (self:track_event) (x:chrome_content_settings_event_info) : unit = + self.chrome_content_settings_event_info <- Some x +let[@inline] track_event_set_chrome_active_processes (self:track_event) (x:chrome_active_processes) : unit = + self.chrome_active_processes <- Some x +let[@inline] track_event_set_screenshot (self:track_event) (x:screenshot) : unit = + self.screenshot <- Some x +let[@inline] track_event_set_source_location_field (self:track_event) (x:track_event_source_location_field) : unit = + self.source_location_field <- Some x +let[@inline] track_event_set_chrome_message_pump (self:track_event) (x:chrome_message_pump) : unit = + self.chrome_message_pump <- Some x +let[@inline] track_event_set_chrome_mojo_event_info (self:track_event) (x:chrome_mojo_event_info) : unit = + self.chrome_mojo_event_info <- Some x +let[@inline] track_event_set_timestamp (self:track_event) (x:track_event_timestamp) : unit = + self.timestamp <- Some x +let[@inline] track_event_set_thread_time (self:track_event) (x:track_event_thread_time) : unit = + self.thread_time <- Some x +let[@inline] track_event_set_thread_instruction_count (self:track_event) (x:track_event_thread_instruction_count) : unit = + self.thread_instruction_count <- Some x +let[@inline] track_event_set_legacy_event (self:track_event) (x:track_event_legacy_event) : unit = + self.legacy_event <- Some x + +let copy_track_event (self:track_event) : track_event = + { self with category_iids = self.category_iids } + +let make_track_event + ?(category_iids=[]) + ?(categories=[]) + ?(name_field:track_event_name_field option) + ?(type_:track_event_type option) + ?(track_uuid:int64 option) + ?(counter_value_field:track_event_counter_value_field option) + ?(extra_counter_track_uuids=[]) + ?(extra_counter_values=[]) + ?(extra_double_counter_track_uuids=[]) + ?(extra_double_counter_values=[]) + ?(flow_ids_old=[]) + ?(flow_ids=[]) + ?(terminating_flow_ids_old=[]) + ?(terminating_flow_ids=[]) + ?(correlation_id_field:track_event_correlation_id_field option) + ?(callstack_field:track_event_callstack_field option) + ?(debug_annotations=[]) + ?(task_execution:task_execution option) + ?(log_message:log_message option) + ?(cc_scheduler_state:chrome_compositor_scheduler_state option) + ?(chrome_user_event:chrome_user_event option) + ?(chrome_keyed_service:chrome_keyed_service option) + ?(chrome_legacy_ipc:chrome_legacy_ipc option) + ?(chrome_histogram_sample:chrome_histogram_sample option) + ?(chrome_latency_info:chrome_latency_info option) + ?(chrome_frame_reporter:chrome_frame_reporter option) + ?(chrome_application_state_info:chrome_application_state_info option) + ?(chrome_renderer_scheduler_state:chrome_renderer_scheduler_state option) + ?(chrome_window_handle_event_info:chrome_window_handle_event_info option) + ?(chrome_content_settings_event_info:chrome_content_settings_event_info option) + ?(chrome_active_processes:chrome_active_processes option) + ?(screenshot:screenshot option) + ?(source_location_field:track_event_source_location_field option) + ?(chrome_message_pump:chrome_message_pump option) + ?(chrome_mojo_event_info:chrome_mojo_event_info option) + ?(timestamp:track_event_timestamp option) + ?(thread_time:track_event_thread_time option) + ?(thread_instruction_count:track_event_thread_instruction_count option) + ?(legacy_event:track_event_legacy_event option) + () : track_event = + let _res = default_track_event () in + track_event_set_category_iids _res category_iids; + track_event_set_categories _res categories; + (match name_field with + | None -> () + | Some v -> track_event_set_name_field _res v); + (match type_ with + | None -> () + | Some v -> track_event_set_type_ _res v); + (match track_uuid with + | None -> () + | Some v -> track_event_set_track_uuid _res v); + (match counter_value_field with + | None -> () + | Some v -> track_event_set_counter_value_field _res v); + track_event_set_extra_counter_track_uuids _res extra_counter_track_uuids; + track_event_set_extra_counter_values _res extra_counter_values; + track_event_set_extra_double_counter_track_uuids _res extra_double_counter_track_uuids; + track_event_set_extra_double_counter_values _res extra_double_counter_values; + track_event_set_flow_ids_old _res flow_ids_old; + track_event_set_flow_ids _res flow_ids; + track_event_set_terminating_flow_ids_old _res terminating_flow_ids_old; + track_event_set_terminating_flow_ids _res terminating_flow_ids; + (match correlation_id_field with + | None -> () + | Some v -> track_event_set_correlation_id_field _res v); + (match callstack_field with + | None -> () + | Some v -> track_event_set_callstack_field _res v); + track_event_set_debug_annotations _res debug_annotations; + (match task_execution with + | None -> () + | Some v -> track_event_set_task_execution _res v); + (match log_message with + | None -> () + | Some v -> track_event_set_log_message _res v); + (match cc_scheduler_state with + | None -> () + | Some v -> track_event_set_cc_scheduler_state _res v); + (match chrome_user_event with + | None -> () + | Some v -> track_event_set_chrome_user_event _res v); + (match chrome_keyed_service with + | None -> () + | Some v -> track_event_set_chrome_keyed_service _res v); + (match chrome_legacy_ipc with + | None -> () + | Some v -> track_event_set_chrome_legacy_ipc _res v); + (match chrome_histogram_sample with + | None -> () + | Some v -> track_event_set_chrome_histogram_sample _res v); + (match chrome_latency_info with + | None -> () + | Some v -> track_event_set_chrome_latency_info _res v); + (match chrome_frame_reporter with + | None -> () + | Some v -> track_event_set_chrome_frame_reporter _res v); + (match chrome_application_state_info with + | None -> () + | Some v -> track_event_set_chrome_application_state_info _res v); + (match chrome_renderer_scheduler_state with + | None -> () + | Some v -> track_event_set_chrome_renderer_scheduler_state _res v); + (match chrome_window_handle_event_info with + | None -> () + | Some v -> track_event_set_chrome_window_handle_event_info _res v); + (match chrome_content_settings_event_info with + | None -> () + | Some v -> track_event_set_chrome_content_settings_event_info _res v); + (match chrome_active_processes with + | None -> () + | Some v -> track_event_set_chrome_active_processes _res v); + (match screenshot with + | None -> () + | Some v -> track_event_set_screenshot _res v); + (match source_location_field with + | None -> () + | Some v -> track_event_set_source_location_field _res v); + (match chrome_message_pump with + | None -> () + | Some v -> track_event_set_chrome_message_pump _res v); + (match chrome_mojo_event_info with + | None -> () + | Some v -> track_event_set_chrome_mojo_event_info _res v); + (match timestamp with + | None -> () + | Some v -> track_event_set_timestamp _res v); + (match thread_time with + | None -> () + | Some v -> track_event_set_thread_time _res v); + (match thread_instruction_count with + | None -> () + | Some v -> track_event_set_thread_instruction_count _res v); + (match legacy_event with + | None -> () + | Some v -> track_event_set_legacy_event _res v); + _res + +let[@inline] track_event_defaults_has_track_uuid (self:track_event_defaults) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] track_event_defaults_set_track_uuid (self:track_event_defaults) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.track_uuid <- x +let[@inline] track_event_defaults_set_extra_counter_track_uuids (self:track_event_defaults) (x:int64 list) : unit = + self.extra_counter_track_uuids <- x +let[@inline] track_event_defaults_set_extra_double_counter_track_uuids (self:track_event_defaults) (x:int64 list) : unit = + self.extra_double_counter_track_uuids <- x + +let copy_track_event_defaults (self:track_event_defaults) : track_event_defaults = + { self with track_uuid = self.track_uuid } + +let make_track_event_defaults + ?(track_uuid:int64 option) + ?(extra_counter_track_uuids=[]) + ?(extra_double_counter_track_uuids=[]) + () : track_event_defaults = + let _res = default_track_event_defaults () in + (match track_uuid with + | None -> () + | Some v -> track_event_defaults_set_track_uuid _res v); + track_event_defaults_set_extra_counter_track_uuids _res extra_counter_track_uuids; + track_event_defaults_set_extra_double_counter_track_uuids _res extra_double_counter_track_uuids; + _res + +let[@inline] event_category_has_iid (self:event_category) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] event_category_has_name (self:event_category) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] event_category_set_iid (self:event_category) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] event_category_set_name (self:event_category) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x + +let copy_event_category (self:event_category) : event_category = + { self with iid = self.iid } + +let make_event_category + ?(iid:int64 option) + ?(name:string option) + () : event_category = + let _res = default_event_category () in + (match iid with + | None -> () + | Some v -> event_category_set_iid _res v); + (match name with + | None -> () + | Some v -> event_category_set_name _res v); + _res + +let[@inline] event_name_has_iid (self:event_name) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] event_name_has_name (self:event_name) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] event_name_set_iid (self:event_name) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] event_name_set_name (self:event_name) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.name <- x + +let copy_event_name (self:event_name) : event_name = + { self with iid = self.iid } + +let make_event_name + ?(iid:int64 option) + ?(name:string option) + () : event_name = + let _res = default_event_name () in + (match iid with + | None -> () + | Some v -> event_name_set_iid _res v); + (match name with + | None -> () + | Some v -> event_name_set_name _res v); + _res + + +let[@inline] interned_data_set_event_categories (self:interned_data) (x:event_category list) : unit = + self.event_categories <- x +let[@inline] interned_data_set_event_names (self:interned_data) (x:event_name list) : unit = + self.event_names <- x +let[@inline] interned_data_set_debug_annotation_names (self:interned_data) (x:debug_annotation_name list) : unit = + self.debug_annotation_names <- x +let[@inline] interned_data_set_debug_annotation_value_type_names (self:interned_data) (x:debug_annotation_value_type_name list) : unit = + self.debug_annotation_value_type_names <- x +let[@inline] interned_data_set_source_locations (self:interned_data) (x:source_location list) : unit = + self.source_locations <- x +let[@inline] interned_data_set_unsymbolized_source_locations (self:interned_data) (x:unsymbolized_source_location list) : unit = + self.unsymbolized_source_locations <- x +let[@inline] interned_data_set_log_message_body (self:interned_data) (x:log_message_body list) : unit = + self.log_message_body <- x +let[@inline] interned_data_set_histogram_names (self:interned_data) (x:histogram_name list) : unit = + self.histogram_names <- x +let[@inline] interned_data_set_build_ids (self:interned_data) (x:interned_string list) : unit = + self.build_ids <- x +let[@inline] interned_data_set_mapping_paths (self:interned_data) (x:interned_string list) : unit = + self.mapping_paths <- x +let[@inline] interned_data_set_source_paths (self:interned_data) (x:interned_string list) : unit = + self.source_paths <- x +let[@inline] interned_data_set_function_names (self:interned_data) (x:interned_string list) : unit = + self.function_names <- x +let[@inline] interned_data_set_mappings (self:interned_data) (x:mapping list) : unit = + self.mappings <- x +let[@inline] interned_data_set_frames (self:interned_data) (x:frame list) : unit = + self.frames <- x +let[@inline] interned_data_set_callstacks (self:interned_data) (x:callstack list) : unit = + self.callstacks <- x +let[@inline] interned_data_set_vulkan_memory_keys (self:interned_data) (x:interned_string list) : unit = + self.vulkan_memory_keys <- x +let[@inline] interned_data_set_graphics_contexts (self:interned_data) (x:interned_graphics_context list) : unit = + self.graphics_contexts <- x +let[@inline] interned_data_set_gpu_specifications (self:interned_data) (x:interned_gpu_render_stage_specification list) : unit = + self.gpu_specifications <- x +let[@inline] interned_data_set_kernel_symbols (self:interned_data) (x:interned_string list) : unit = + self.kernel_symbols <- x +let[@inline] interned_data_set_debug_annotation_string_values (self:interned_data) (x:interned_string list) : unit = + self.debug_annotation_string_values <- x +let[@inline] interned_data_set_packet_context (self:interned_data) (x:network_packet_context list) : unit = + self.packet_context <- x +let[@inline] interned_data_set_v8_js_function_name (self:interned_data) (x:interned_v8_string list) : unit = + self.v8_js_function_name <- x +let[@inline] interned_data_set_v8_js_function (self:interned_data) (x:interned_v8_js_function list) : unit = + self.v8_js_function <- x +let[@inline] interned_data_set_v8_js_script (self:interned_data) (x:interned_v8_js_script list) : unit = + self.v8_js_script <- x +let[@inline] interned_data_set_v8_wasm_script (self:interned_data) (x:interned_v8_wasm_script list) : unit = + self.v8_wasm_script <- x +let[@inline] interned_data_set_v8_isolate (self:interned_data) (x:interned_v8_isolate list) : unit = + self.v8_isolate <- x +let[@inline] interned_data_set_protolog_string_args (self:interned_data) (x:interned_string list) : unit = + self.protolog_string_args <- x +let[@inline] interned_data_set_protolog_stacktrace (self:interned_data) (x:interned_string list) : unit = + self.protolog_stacktrace <- x +let[@inline] interned_data_set_viewcapture_package_name (self:interned_data) (x:interned_string list) : unit = + self.viewcapture_package_name <- x +let[@inline] interned_data_set_viewcapture_window_name (self:interned_data) (x:interned_string list) : unit = + self.viewcapture_window_name <- x +let[@inline] interned_data_set_viewcapture_view_id (self:interned_data) (x:interned_string list) : unit = + self.viewcapture_view_id <- x +let[@inline] interned_data_set_viewcapture_class_name (self:interned_data) (x:interned_string list) : unit = + self.viewcapture_class_name <- x +let[@inline] interned_data_set_app_wakelock_info (self:interned_data) (x:app_wakelock_info list) : unit = + self.app_wakelock_info <- x +let[@inline] interned_data_set_correlation_id_str (self:interned_data) (x:interned_string list) : unit = + self.correlation_id_str <- x + +let copy_interned_data (self:interned_data) : interned_data = + { self with event_categories = self.event_categories } + +let make_interned_data + ?(event_categories=[]) + ?(event_names=[]) + ?(debug_annotation_names=[]) + ?(debug_annotation_value_type_names=[]) + ?(source_locations=[]) + ?(unsymbolized_source_locations=[]) + ?(log_message_body=[]) + ?(histogram_names=[]) + ?(build_ids=[]) + ?(mapping_paths=[]) + ?(source_paths=[]) + ?(function_names=[]) + ?(mappings=[]) + ?(frames=[]) + ?(callstacks=[]) + ?(vulkan_memory_keys=[]) + ?(graphics_contexts=[]) + ?(gpu_specifications=[]) + ?(kernel_symbols=[]) + ?(debug_annotation_string_values=[]) + ?(packet_context=[]) + ?(v8_js_function_name=[]) + ?(v8_js_function=[]) + ?(v8_js_script=[]) + ?(v8_wasm_script=[]) + ?(v8_isolate=[]) + ?(protolog_string_args=[]) + ?(protolog_stacktrace=[]) + ?(viewcapture_package_name=[]) + ?(viewcapture_window_name=[]) + ?(viewcapture_view_id=[]) + ?(viewcapture_class_name=[]) + ?(app_wakelock_info=[]) + ?(correlation_id_str=[]) + () : interned_data = + let _res = default_interned_data () in + interned_data_set_event_categories _res event_categories; + interned_data_set_event_names _res event_names; + interned_data_set_debug_annotation_names _res debug_annotation_names; + interned_data_set_debug_annotation_value_type_names _res debug_annotation_value_type_names; + interned_data_set_source_locations _res source_locations; + interned_data_set_unsymbolized_source_locations _res unsymbolized_source_locations; + interned_data_set_log_message_body _res log_message_body; + interned_data_set_histogram_names _res histogram_names; + interned_data_set_build_ids _res build_ids; + interned_data_set_mapping_paths _res mapping_paths; + interned_data_set_source_paths _res source_paths; + interned_data_set_function_names _res function_names; + interned_data_set_mappings _res mappings; + interned_data_set_frames _res frames; + interned_data_set_callstacks _res callstacks; + interned_data_set_vulkan_memory_keys _res vulkan_memory_keys; + interned_data_set_graphics_contexts _res graphics_contexts; + interned_data_set_gpu_specifications _res gpu_specifications; + interned_data_set_kernel_symbols _res kernel_symbols; + interned_data_set_debug_annotation_string_values _res debug_annotation_string_values; + interned_data_set_packet_context _res packet_context; + interned_data_set_v8_js_function_name _res v8_js_function_name; + interned_data_set_v8_js_function _res v8_js_function; + interned_data_set_v8_js_script _res v8_js_script; + interned_data_set_v8_wasm_script _res v8_wasm_script; + interned_data_set_v8_isolate _res v8_isolate; + interned_data_set_protolog_string_args _res protolog_string_args; + interned_data_set_protolog_stacktrace _res protolog_stacktrace; + interned_data_set_viewcapture_package_name _res viewcapture_package_name; + interned_data_set_viewcapture_window_name _res viewcapture_window_name; + interned_data_set_viewcapture_view_id _res viewcapture_view_id; + interned_data_set_viewcapture_class_name _res viewcapture_class_name; + interned_data_set_app_wakelock_info _res app_wakelock_info; + interned_data_set_correlation_id_str _res correlation_id_str; + _res + +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_name (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_units (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_value_uint64 (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_value_string (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_name (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_units (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) (x:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.units <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_value_uint64 (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.value_uint64 <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_value_string (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.value_string <- x + +let copy_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry (self:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry = + { self with name = self.name } + +let make_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry + ?(name:string option) + ?(units:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units option) + ?(value_uint64:int64 option) + ?(value_string:string option) + () : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry = + let _res = default_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry () in + (match name with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_name _res v); + (match units with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_units _res v); + (match value_uint64 with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_value_uint64 _res v); + (match value_string with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_value_string _res v); + _res + +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_has_id (self:memory_tracker_snapshot_process_snapshot_memory_node) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_has_absolute_name (self:memory_tracker_snapshot_process_snapshot_memory_node) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_has_weak (self:memory_tracker_snapshot_process_snapshot_memory_node) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_has_size_bytes (self:memory_tracker_snapshot_process_snapshot_memory_node) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_set_id (self:memory_tracker_snapshot_process_snapshot_memory_node) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_set_absolute_name (self:memory_tracker_snapshot_process_snapshot_memory_node) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.absolute_name <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_set_weak (self:memory_tracker_snapshot_process_snapshot_memory_node) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.weak <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_set_size_bytes (self:memory_tracker_snapshot_process_snapshot_memory_node) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.size_bytes <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_node_set_entries (self:memory_tracker_snapshot_process_snapshot_memory_node) (x:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry list) : unit = + self.entries <- x + +let copy_memory_tracker_snapshot_process_snapshot_memory_node (self:memory_tracker_snapshot_process_snapshot_memory_node) : memory_tracker_snapshot_process_snapshot_memory_node = + { self with id = self.id } + +let make_memory_tracker_snapshot_process_snapshot_memory_node + ?(id:int64 option) + ?(absolute_name:string option) + ?(weak:bool option) + ?(size_bytes:int64 option) + ?(entries=[]) + () : memory_tracker_snapshot_process_snapshot_memory_node = + let _res = default_memory_tracker_snapshot_process_snapshot_memory_node () in + (match id with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_node_set_id _res v); + (match absolute_name with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_node_set_absolute_name _res v); + (match weak with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_node_set_weak _res v); + (match size_bytes with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_node_set_size_bytes _res v); + memory_tracker_snapshot_process_snapshot_memory_node_set_entries _res entries; + _res + +let[@inline] memory_tracker_snapshot_process_snapshot_memory_edge_has_source_id (self:memory_tracker_snapshot_process_snapshot_memory_edge) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_edge_has_target_id (self:memory_tracker_snapshot_process_snapshot_memory_edge) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_edge_has_importance (self:memory_tracker_snapshot_process_snapshot_memory_edge) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] memory_tracker_snapshot_process_snapshot_memory_edge_has_overridable (self:memory_tracker_snapshot_process_snapshot_memory_edge) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] memory_tracker_snapshot_process_snapshot_memory_edge_set_source_id (self:memory_tracker_snapshot_process_snapshot_memory_edge) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.source_id <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_edge_set_target_id (self:memory_tracker_snapshot_process_snapshot_memory_edge) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.target_id <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_edge_set_importance (self:memory_tracker_snapshot_process_snapshot_memory_edge) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.importance <- x +let[@inline] memory_tracker_snapshot_process_snapshot_memory_edge_set_overridable (self:memory_tracker_snapshot_process_snapshot_memory_edge) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.overridable <- x + +let copy_memory_tracker_snapshot_process_snapshot_memory_edge (self:memory_tracker_snapshot_process_snapshot_memory_edge) : memory_tracker_snapshot_process_snapshot_memory_edge = + { self with source_id = self.source_id } + +let make_memory_tracker_snapshot_process_snapshot_memory_edge + ?(source_id:int64 option) + ?(target_id:int64 option) + ?(importance:int32 option) + ?(overridable:bool option) + () : memory_tracker_snapshot_process_snapshot_memory_edge = + let _res = default_memory_tracker_snapshot_process_snapshot_memory_edge () in + (match source_id with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_edge_set_source_id _res v); + (match target_id with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_edge_set_target_id _res v); + (match importance with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_edge_set_importance _res v); + (match overridable with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_memory_edge_set_overridable _res v); + _res + +let[@inline] memory_tracker_snapshot_process_snapshot_has_pid (self:memory_tracker_snapshot_process_snapshot) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] memory_tracker_snapshot_process_snapshot_set_pid (self:memory_tracker_snapshot_process_snapshot) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] memory_tracker_snapshot_process_snapshot_set_allocator_dumps (self:memory_tracker_snapshot_process_snapshot) (x:memory_tracker_snapshot_process_snapshot_memory_node list) : unit = + self.allocator_dumps <- x +let[@inline] memory_tracker_snapshot_process_snapshot_set_memory_edges (self:memory_tracker_snapshot_process_snapshot) (x:memory_tracker_snapshot_process_snapshot_memory_edge list) : unit = + self.memory_edges <- x + +let copy_memory_tracker_snapshot_process_snapshot (self:memory_tracker_snapshot_process_snapshot) : memory_tracker_snapshot_process_snapshot = + { self with pid = self.pid } + +let make_memory_tracker_snapshot_process_snapshot + ?(pid:int32 option) + ?(allocator_dumps=[]) + ?(memory_edges=[]) + () : memory_tracker_snapshot_process_snapshot = + let _res = default_memory_tracker_snapshot_process_snapshot () in + (match pid with + | None -> () + | Some v -> memory_tracker_snapshot_process_snapshot_set_pid _res v); + memory_tracker_snapshot_process_snapshot_set_allocator_dumps _res allocator_dumps; + memory_tracker_snapshot_process_snapshot_set_memory_edges _res memory_edges; + _res + +let[@inline] memory_tracker_snapshot_has_global_dump_id (self:memory_tracker_snapshot) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] memory_tracker_snapshot_has_level_of_detail (self:memory_tracker_snapshot) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] memory_tracker_snapshot_set_global_dump_id (self:memory_tracker_snapshot) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.global_dump_id <- x +let[@inline] memory_tracker_snapshot_set_level_of_detail (self:memory_tracker_snapshot) (x:memory_tracker_snapshot_level_of_detail) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.level_of_detail <- x +let[@inline] memory_tracker_snapshot_set_process_memory_dumps (self:memory_tracker_snapshot) (x:memory_tracker_snapshot_process_snapshot list) : unit = + self.process_memory_dumps <- x + +let copy_memory_tracker_snapshot (self:memory_tracker_snapshot) : memory_tracker_snapshot = + { self with global_dump_id = self.global_dump_id } + +let make_memory_tracker_snapshot + ?(global_dump_id:int64 option) + ?(level_of_detail:memory_tracker_snapshot_level_of_detail option) + ?(process_memory_dumps=[]) + () : memory_tracker_snapshot = + let _res = default_memory_tracker_snapshot () in + (match global_dump_id with + | None -> () + | Some v -> memory_tracker_snapshot_set_global_dump_id _res v); + (match level_of_detail with + | None -> () + | Some v -> memory_tracker_snapshot_set_level_of_detail _res v); + memory_tracker_snapshot_set_process_memory_dumps _res process_memory_dumps; + _res + + +let[@inline] perfetto_metatrace_arg_set_key_or_interned_key (self:perfetto_metatrace_arg) (x:perfetto_metatrace_arg_key_or_interned_key) : unit = + self.key_or_interned_key <- Some x +let[@inline] perfetto_metatrace_arg_set_value_or_interned_value (self:perfetto_metatrace_arg) (x:perfetto_metatrace_arg_value_or_interned_value) : unit = + self.value_or_interned_value <- Some x + +let copy_perfetto_metatrace_arg (self:perfetto_metatrace_arg) : perfetto_metatrace_arg = + { self with key_or_interned_key = self.key_or_interned_key } + +let make_perfetto_metatrace_arg + ?(key_or_interned_key:perfetto_metatrace_arg_key_or_interned_key option) + ?(value_or_interned_value:perfetto_metatrace_arg_value_or_interned_value option) + () : perfetto_metatrace_arg = + let _res = default_perfetto_metatrace_arg () in + (match key_or_interned_key with + | None -> () + | Some v -> perfetto_metatrace_arg_set_key_or_interned_key _res v); + (match value_or_interned_value with + | None -> () + | Some v -> perfetto_metatrace_arg_set_value_or_interned_value _res v); + _res + +let[@inline] perfetto_metatrace_interned_string_has_iid (self:perfetto_metatrace_interned_string) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] perfetto_metatrace_interned_string_has_value (self:perfetto_metatrace_interned_string) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] perfetto_metatrace_interned_string_set_iid (self:perfetto_metatrace_interned_string) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.iid <- x +let[@inline] perfetto_metatrace_interned_string_set_value (self:perfetto_metatrace_interned_string) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.value <- x + +let copy_perfetto_metatrace_interned_string (self:perfetto_metatrace_interned_string) : perfetto_metatrace_interned_string = + { self with iid = self.iid } + +let make_perfetto_metatrace_interned_string + ?(iid:int64 option) + ?(value:string option) + () : perfetto_metatrace_interned_string = + let _res = default_perfetto_metatrace_interned_string () in + (match iid with + | None -> () + | Some v -> perfetto_metatrace_interned_string_set_iid _res v); + (match value with + | None -> () + | Some v -> perfetto_metatrace_interned_string_set_value _res v); + _res + +let[@inline] perfetto_metatrace_has_event_duration_ns (self:perfetto_metatrace) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] perfetto_metatrace_has_counter_value (self:perfetto_metatrace) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] perfetto_metatrace_has_thread_id (self:perfetto_metatrace) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] perfetto_metatrace_has_has_overruns (self:perfetto_metatrace) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] perfetto_metatrace_set_record_type (self:perfetto_metatrace) (x:perfetto_metatrace_record_type) : unit = + self.record_type <- Some x +let[@inline] perfetto_metatrace_set_event_duration_ns (self:perfetto_metatrace) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.event_duration_ns <- x +let[@inline] perfetto_metatrace_set_counter_value (self:perfetto_metatrace) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.counter_value <- x +let[@inline] perfetto_metatrace_set_thread_id (self:perfetto_metatrace) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.thread_id <- x +let[@inline] perfetto_metatrace_set_has_overruns (self:perfetto_metatrace) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.has_overruns <- x +let[@inline] perfetto_metatrace_set_args (self:perfetto_metatrace) (x:perfetto_metatrace_arg list) : unit = + self.args <- x +let[@inline] perfetto_metatrace_set_interned_strings (self:perfetto_metatrace) (x:perfetto_metatrace_interned_string list) : unit = + self.interned_strings <- x + +let copy_perfetto_metatrace (self:perfetto_metatrace) : perfetto_metatrace = + { self with record_type = self.record_type } + +let make_perfetto_metatrace + ?(record_type:perfetto_metatrace_record_type option) + ?(event_duration_ns:int64 option) + ?(counter_value:int32 option) + ?(thread_id:int32 option) + ?(has_overruns:bool option) + ?(args=[]) + ?(interned_strings=[]) + () : perfetto_metatrace = + let _res = default_perfetto_metatrace () in + (match record_type with + | None -> () + | Some v -> perfetto_metatrace_set_record_type _res v); + (match event_duration_ns with + | None -> () + | Some v -> perfetto_metatrace_set_event_duration_ns _res v); + (match counter_value with + | None -> () + | Some v -> perfetto_metatrace_set_counter_value _res v); + (match thread_id with + | None -> () + | Some v -> perfetto_metatrace_set_thread_id _res v); + (match has_overruns with + | None -> () + | Some v -> perfetto_metatrace_set_has_overruns _res v); + perfetto_metatrace_set_args _res args; + perfetto_metatrace_set_interned_strings _res interned_strings; + _res + +let[@inline] tracing_service_event_data_sources_data_source_has_producer_name (self:tracing_service_event_data_sources_data_source) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] tracing_service_event_data_sources_data_source_has_data_source_name (self:tracing_service_event_data_sources_data_source) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] tracing_service_event_data_sources_data_source_set_producer_name (self:tracing_service_event_data_sources_data_source) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.producer_name <- x +let[@inline] tracing_service_event_data_sources_data_source_set_data_source_name (self:tracing_service_event_data_sources_data_source) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.data_source_name <- x + +let copy_tracing_service_event_data_sources_data_source (self:tracing_service_event_data_sources_data_source) : tracing_service_event_data_sources_data_source = + { self with producer_name = self.producer_name } + +let make_tracing_service_event_data_sources_data_source + ?(producer_name:string option) + ?(data_source_name:string option) + () : tracing_service_event_data_sources_data_source = + let _res = default_tracing_service_event_data_sources_data_source () in + (match producer_name with + | None -> () + | Some v -> tracing_service_event_data_sources_data_source_set_producer_name _res v); + (match data_source_name with + | None -> () + | Some v -> tracing_service_event_data_sources_data_source_set_data_source_name _res v); + _res + + +let[@inline] tracing_service_event_data_sources_set_data_source (self:tracing_service_event_data_sources) (x:tracing_service_event_data_sources_data_source list) : unit = + self.data_source <- x + +let copy_tracing_service_event_data_sources (self:tracing_service_event_data_sources) : tracing_service_event_data_sources = + { self with data_source = self.data_source } + +let make_tracing_service_event_data_sources + ?(data_source=[]) + () : tracing_service_event_data_sources = + let _res = default_tracing_service_event_data_sources () in + tracing_service_event_data_sources_set_data_source _res data_source; + _res + +let[@inline] android_energy_consumer_has_energy_consumer_id (self:android_energy_consumer) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_energy_consumer_has_ordinal (self:android_energy_consumer) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] android_energy_consumer_has_type_ (self:android_energy_consumer) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] android_energy_consumer_has_name (self:android_energy_consumer) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] android_energy_consumer_set_energy_consumer_id (self:android_energy_consumer) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.energy_consumer_id <- x +let[@inline] android_energy_consumer_set_ordinal (self:android_energy_consumer) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.ordinal <- x +let[@inline] android_energy_consumer_set_type_ (self:android_energy_consumer) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.type_ <- x +let[@inline] android_energy_consumer_set_name (self:android_energy_consumer) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.name <- x + +let copy_android_energy_consumer (self:android_energy_consumer) : android_energy_consumer = + { self with energy_consumer_id = self.energy_consumer_id } + +let make_android_energy_consumer + ?(energy_consumer_id:int32 option) + ?(ordinal:int32 option) + ?(type_:string option) + ?(name:string option) + () : android_energy_consumer = + let _res = default_android_energy_consumer () in + (match energy_consumer_id with + | None -> () + | Some v -> android_energy_consumer_set_energy_consumer_id _res v); + (match ordinal with + | None -> () + | Some v -> android_energy_consumer_set_ordinal _res v); + (match type_ with + | None -> () + | Some v -> android_energy_consumer_set_type_ _res v); + (match name with + | None -> () + | Some v -> android_energy_consumer_set_name _res v); + _res + + +let[@inline] android_energy_consumer_descriptor_set_energy_consumers (self:android_energy_consumer_descriptor) (x:android_energy_consumer list) : unit = + self.energy_consumers <- x + +let copy_android_energy_consumer_descriptor (self:android_energy_consumer_descriptor) : android_energy_consumer_descriptor = + { self with energy_consumers = self.energy_consumers } + +let make_android_energy_consumer_descriptor + ?(energy_consumers=[]) + () : android_energy_consumer_descriptor = + let _res = default_android_energy_consumer_descriptor () in + android_energy_consumer_descriptor_set_energy_consumers _res energy_consumers; + _res + +let[@inline] android_energy_estimation_breakdown_energy_uid_breakdown_has_uid (self:android_energy_estimation_breakdown_energy_uid_breakdown) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_energy_estimation_breakdown_energy_uid_breakdown_has_energy_uws (self:android_energy_estimation_breakdown_energy_uid_breakdown) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] android_energy_estimation_breakdown_energy_uid_breakdown_set_uid (self:android_energy_estimation_breakdown_energy_uid_breakdown) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.uid <- x +let[@inline] android_energy_estimation_breakdown_energy_uid_breakdown_set_energy_uws (self:android_energy_estimation_breakdown_energy_uid_breakdown) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.energy_uws <- x + +let copy_android_energy_estimation_breakdown_energy_uid_breakdown (self:android_energy_estimation_breakdown_energy_uid_breakdown) : android_energy_estimation_breakdown_energy_uid_breakdown = + { self with uid = self.uid } + +let make_android_energy_estimation_breakdown_energy_uid_breakdown + ?(uid:int32 option) + ?(energy_uws:int64 option) + () : android_energy_estimation_breakdown_energy_uid_breakdown = + let _res = default_android_energy_estimation_breakdown_energy_uid_breakdown () in + (match uid with + | None -> () + | Some v -> android_energy_estimation_breakdown_energy_uid_breakdown_set_uid _res v); + (match energy_uws with + | None -> () + | Some v -> android_energy_estimation_breakdown_energy_uid_breakdown_set_energy_uws _res v); + _res + +let[@inline] android_energy_estimation_breakdown_has_energy_consumer_id (self:android_energy_estimation_breakdown) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] android_energy_estimation_breakdown_has_energy_uws (self:android_energy_estimation_breakdown) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] android_energy_estimation_breakdown_set_energy_consumer_descriptor (self:android_energy_estimation_breakdown) (x:android_energy_consumer_descriptor) : unit = + self.energy_consumer_descriptor <- Some x +let[@inline] android_energy_estimation_breakdown_set_energy_consumer_id (self:android_energy_estimation_breakdown) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.energy_consumer_id <- x +let[@inline] android_energy_estimation_breakdown_set_energy_uws (self:android_energy_estimation_breakdown) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.energy_uws <- x +let[@inline] android_energy_estimation_breakdown_set_per_uid_breakdown (self:android_energy_estimation_breakdown) (x:android_energy_estimation_breakdown_energy_uid_breakdown list) : unit = + self.per_uid_breakdown <- x + +let copy_android_energy_estimation_breakdown (self:android_energy_estimation_breakdown) : android_energy_estimation_breakdown = + { self with energy_consumer_descriptor = self.energy_consumer_descriptor } + +let make_android_energy_estimation_breakdown + ?(energy_consumer_descriptor:android_energy_consumer_descriptor option) + ?(energy_consumer_id:int32 option) + ?(energy_uws:int64 option) + ?(per_uid_breakdown=[]) + () : android_energy_estimation_breakdown = + let _res = default_android_energy_estimation_breakdown () in + (match energy_consumer_descriptor with + | None -> () + | Some v -> android_energy_estimation_breakdown_set_energy_consumer_descriptor _res v); + (match energy_consumer_id with + | None -> () + | Some v -> android_energy_estimation_breakdown_set_energy_consumer_id _res v); + (match energy_uws with + | None -> () + | Some v -> android_energy_estimation_breakdown_set_energy_uws _res v); + android_energy_estimation_breakdown_set_per_uid_breakdown _res per_uid_breakdown; + _res + +let[@inline] entity_state_residency_power_entity_state_has_entity_index (self:entity_state_residency_power_entity_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] entity_state_residency_power_entity_state_has_state_index (self:entity_state_residency_power_entity_state) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] entity_state_residency_power_entity_state_has_entity_name (self:entity_state_residency_power_entity_state) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] entity_state_residency_power_entity_state_has_state_name (self:entity_state_residency_power_entity_state) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] entity_state_residency_power_entity_state_set_entity_index (self:entity_state_residency_power_entity_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.entity_index <- x +let[@inline] entity_state_residency_power_entity_state_set_state_index (self:entity_state_residency_power_entity_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.state_index <- x +let[@inline] entity_state_residency_power_entity_state_set_entity_name (self:entity_state_residency_power_entity_state) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.entity_name <- x +let[@inline] entity_state_residency_power_entity_state_set_state_name (self:entity_state_residency_power_entity_state) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.state_name <- x + +let copy_entity_state_residency_power_entity_state (self:entity_state_residency_power_entity_state) : entity_state_residency_power_entity_state = + { self with entity_index = self.entity_index } + +let make_entity_state_residency_power_entity_state + ?(entity_index:int32 option) + ?(state_index:int32 option) + ?(entity_name:string option) + ?(state_name:string option) + () : entity_state_residency_power_entity_state = + let _res = default_entity_state_residency_power_entity_state () in + (match entity_index with + | None -> () + | Some v -> entity_state_residency_power_entity_state_set_entity_index _res v); + (match state_index with + | None -> () + | Some v -> entity_state_residency_power_entity_state_set_state_index _res v); + (match entity_name with + | None -> () + | Some v -> entity_state_residency_power_entity_state_set_entity_name _res v); + (match state_name with + | None -> () + | Some v -> entity_state_residency_power_entity_state_set_state_name _res v); + _res + +let[@inline] entity_state_residency_state_residency_has_entity_index (self:entity_state_residency_state_residency) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] entity_state_residency_state_residency_has_state_index (self:entity_state_residency_state_residency) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] entity_state_residency_state_residency_has_total_time_in_state_ms (self:entity_state_residency_state_residency) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] entity_state_residency_state_residency_has_total_state_entry_count (self:entity_state_residency_state_residency) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] entity_state_residency_state_residency_has_last_entry_timestamp_ms (self:entity_state_residency_state_residency) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] entity_state_residency_state_residency_set_entity_index (self:entity_state_residency_state_residency) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.entity_index <- x +let[@inline] entity_state_residency_state_residency_set_state_index (self:entity_state_residency_state_residency) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.state_index <- x +let[@inline] entity_state_residency_state_residency_set_total_time_in_state_ms (self:entity_state_residency_state_residency) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.total_time_in_state_ms <- x +let[@inline] entity_state_residency_state_residency_set_total_state_entry_count (self:entity_state_residency_state_residency) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.total_state_entry_count <- x +let[@inline] entity_state_residency_state_residency_set_last_entry_timestamp_ms (self:entity_state_residency_state_residency) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.last_entry_timestamp_ms <- x + +let copy_entity_state_residency_state_residency (self:entity_state_residency_state_residency) : entity_state_residency_state_residency = + { self with entity_index = self.entity_index } + +let make_entity_state_residency_state_residency + ?(entity_index:int32 option) + ?(state_index:int32 option) + ?(total_time_in_state_ms:int64 option) + ?(total_state_entry_count:int64 option) + ?(last_entry_timestamp_ms:int64 option) + () : entity_state_residency_state_residency = + let _res = default_entity_state_residency_state_residency () in + (match entity_index with + | None -> () + | Some v -> entity_state_residency_state_residency_set_entity_index _res v); + (match state_index with + | None -> () + | Some v -> entity_state_residency_state_residency_set_state_index _res v); + (match total_time_in_state_ms with + | None -> () + | Some v -> entity_state_residency_state_residency_set_total_time_in_state_ms _res v); + (match total_state_entry_count with + | None -> () + | Some v -> entity_state_residency_state_residency_set_total_state_entry_count _res v); + (match last_entry_timestamp_ms with + | None -> () + | Some v -> entity_state_residency_state_residency_set_last_entry_timestamp_ms _res v); + _res + + +let[@inline] entity_state_residency_set_power_entity_state (self:entity_state_residency) (x:entity_state_residency_power_entity_state list) : unit = + self.power_entity_state <- x +let[@inline] entity_state_residency_set_residency (self:entity_state_residency) (x:entity_state_residency_state_residency list) : unit = + self.residency <- x + +let copy_entity_state_residency (self:entity_state_residency) : entity_state_residency = + { self with power_entity_state = self.power_entity_state } + +let make_entity_state_residency + ?(power_entity_state=[]) + ?(residency=[]) + () : entity_state_residency = + let _res = default_entity_state_residency () in + entity_state_residency_set_power_entity_state _res power_entity_state; + entity_state_residency_set_residency _res residency; + _res + +let[@inline] battery_counters_has_charge_counter_uah (self:battery_counters) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] battery_counters_has_capacity_percent (self:battery_counters) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] battery_counters_has_current_ua (self:battery_counters) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] battery_counters_has_current_avg_ua (self:battery_counters) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] battery_counters_has_name (self:battery_counters) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] battery_counters_has_energy_counter_uwh (self:battery_counters) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] battery_counters_has_voltage_uv (self:battery_counters) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] battery_counters_set_charge_counter_uah (self:battery_counters) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.charge_counter_uah <- x +let[@inline] battery_counters_set_capacity_percent (self:battery_counters) (x:float) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.capacity_percent <- x +let[@inline] battery_counters_set_current_ua (self:battery_counters) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.current_ua <- x +let[@inline] battery_counters_set_current_avg_ua (self:battery_counters) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.current_avg_ua <- x +let[@inline] battery_counters_set_name (self:battery_counters) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.name <- x +let[@inline] battery_counters_set_energy_counter_uwh (self:battery_counters) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.energy_counter_uwh <- x +let[@inline] battery_counters_set_voltage_uv (self:battery_counters) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.voltage_uv <- x + +let copy_battery_counters (self:battery_counters) : battery_counters = + { self with charge_counter_uah = self.charge_counter_uah } + +let make_battery_counters + ?(charge_counter_uah:int64 option) + ?(capacity_percent:float option) + ?(current_ua:int64 option) + ?(current_avg_ua:int64 option) + ?(name:string option) + ?(energy_counter_uwh:int64 option) + ?(voltage_uv:int64 option) + () : battery_counters = + let _res = default_battery_counters () in + (match charge_counter_uah with + | None -> () + | Some v -> battery_counters_set_charge_counter_uah _res v); + (match capacity_percent with + | None -> () + | Some v -> battery_counters_set_capacity_percent _res v); + (match current_ua with + | None -> () + | Some v -> battery_counters_set_current_ua _res v); + (match current_avg_ua with + | None -> () + | Some v -> battery_counters_set_current_avg_ua _res v); + (match name with + | None -> () + | Some v -> battery_counters_set_name _res v); + (match energy_counter_uwh with + | None -> () + | Some v -> battery_counters_set_energy_counter_uwh _res v); + (match voltage_uv with + | None -> () + | Some v -> battery_counters_set_voltage_uv _res v); + _res + +let[@inline] power_rails_rail_descriptor_has_index (self:power_rails_rail_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] power_rails_rail_descriptor_has_rail_name (self:power_rails_rail_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] power_rails_rail_descriptor_has_subsys_name (self:power_rails_rail_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] power_rails_rail_descriptor_has_sampling_rate (self:power_rails_rail_descriptor) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] power_rails_rail_descriptor_set_index (self:power_rails_rail_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.index <- x +let[@inline] power_rails_rail_descriptor_set_rail_name (self:power_rails_rail_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.rail_name <- x +let[@inline] power_rails_rail_descriptor_set_subsys_name (self:power_rails_rail_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.subsys_name <- x +let[@inline] power_rails_rail_descriptor_set_sampling_rate (self:power_rails_rail_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.sampling_rate <- x + +let copy_power_rails_rail_descriptor (self:power_rails_rail_descriptor) : power_rails_rail_descriptor = + { self with index = self.index } + +let make_power_rails_rail_descriptor + ?(index:int32 option) + ?(rail_name:string option) + ?(subsys_name:string option) + ?(sampling_rate:int32 option) + () : power_rails_rail_descriptor = + let _res = default_power_rails_rail_descriptor () in + (match index with + | None -> () + | Some v -> power_rails_rail_descriptor_set_index _res v); + (match rail_name with + | None -> () + | Some v -> power_rails_rail_descriptor_set_rail_name _res v); + (match subsys_name with + | None -> () + | Some v -> power_rails_rail_descriptor_set_subsys_name _res v); + (match sampling_rate with + | None -> () + | Some v -> power_rails_rail_descriptor_set_sampling_rate _res v); + _res + +let[@inline] power_rails_energy_data_has_index (self:power_rails_energy_data) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] power_rails_energy_data_has_timestamp_ms (self:power_rails_energy_data) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] power_rails_energy_data_has_energy (self:power_rails_energy_data) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] power_rails_energy_data_set_index (self:power_rails_energy_data) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.index <- x +let[@inline] power_rails_energy_data_set_timestamp_ms (self:power_rails_energy_data) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.timestamp_ms <- x +let[@inline] power_rails_energy_data_set_energy (self:power_rails_energy_data) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.energy <- x + +let copy_power_rails_energy_data (self:power_rails_energy_data) : power_rails_energy_data = + { self with index = self.index } + +let make_power_rails_energy_data + ?(index:int32 option) + ?(timestamp_ms:int64 option) + ?(energy:int64 option) + () : power_rails_energy_data = + let _res = default_power_rails_energy_data () in + (match index with + | None -> () + | Some v -> power_rails_energy_data_set_index _res v); + (match timestamp_ms with + | None -> () + | Some v -> power_rails_energy_data_set_timestamp_ms _res v); + (match energy with + | None -> () + | Some v -> power_rails_energy_data_set_energy _res v); + _res + +let[@inline] power_rails_has_session_uuid (self:power_rails) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] power_rails_set_rail_descriptor (self:power_rails) (x:power_rails_rail_descriptor list) : unit = + self.rail_descriptor <- x +let[@inline] power_rails_set_energy_data (self:power_rails) (x:power_rails_energy_data list) : unit = + self.energy_data <- x +let[@inline] power_rails_set_session_uuid (self:power_rails) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.session_uuid <- x + +let copy_power_rails (self:power_rails) : power_rails = + { self with rail_descriptor = self.rail_descriptor } + +let make_power_rails + ?(rail_descriptor=[]) + ?(energy_data=[]) + ?(session_uuid:int64 option) + () : power_rails = + let _res = default_power_rails () in + power_rails_set_rail_descriptor _res rail_descriptor; + power_rails_set_energy_data _res energy_data; + (match session_uuid with + | None -> () + | Some v -> power_rails_set_session_uuid _res v); + _res + +let[@inline] obfuscated_member_has_obfuscated_name (self:obfuscated_member) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] obfuscated_member_has_deobfuscated_name (self:obfuscated_member) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] obfuscated_member_set_obfuscated_name (self:obfuscated_member) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.obfuscated_name <- x +let[@inline] obfuscated_member_set_deobfuscated_name (self:obfuscated_member) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.deobfuscated_name <- x + +let copy_obfuscated_member (self:obfuscated_member) : obfuscated_member = + { self with obfuscated_name = self.obfuscated_name } + +let make_obfuscated_member + ?(obfuscated_name:string option) + ?(deobfuscated_name:string option) + () : obfuscated_member = + let _res = default_obfuscated_member () in + (match obfuscated_name with + | None -> () + | Some v -> obfuscated_member_set_obfuscated_name _res v); + (match deobfuscated_name with + | None -> () + | Some v -> obfuscated_member_set_deobfuscated_name _res v); + _res + +let[@inline] obfuscated_class_has_obfuscated_name (self:obfuscated_class) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] obfuscated_class_has_deobfuscated_name (self:obfuscated_class) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] obfuscated_class_set_obfuscated_name (self:obfuscated_class) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.obfuscated_name <- x +let[@inline] obfuscated_class_set_deobfuscated_name (self:obfuscated_class) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.deobfuscated_name <- x +let[@inline] obfuscated_class_set_obfuscated_members (self:obfuscated_class) (x:obfuscated_member list) : unit = + self.obfuscated_members <- x +let[@inline] obfuscated_class_set_obfuscated_methods (self:obfuscated_class) (x:obfuscated_member list) : unit = + self.obfuscated_methods <- x + +let copy_obfuscated_class (self:obfuscated_class) : obfuscated_class = + { self with obfuscated_name = self.obfuscated_name } + +let make_obfuscated_class + ?(obfuscated_name:string option) + ?(deobfuscated_name:string option) + ?(obfuscated_members=[]) + ?(obfuscated_methods=[]) + () : obfuscated_class = + let _res = default_obfuscated_class () in + (match obfuscated_name with + | None -> () + | Some v -> obfuscated_class_set_obfuscated_name _res v); + (match deobfuscated_name with + | None -> () + | Some v -> obfuscated_class_set_deobfuscated_name _res v); + obfuscated_class_set_obfuscated_members _res obfuscated_members; + obfuscated_class_set_obfuscated_methods _res obfuscated_methods; + _res + +let[@inline] deobfuscation_mapping_has_package_name (self:deobfuscation_mapping) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] deobfuscation_mapping_has_version_code (self:deobfuscation_mapping) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] deobfuscation_mapping_set_package_name (self:deobfuscation_mapping) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.package_name <- x +let[@inline] deobfuscation_mapping_set_version_code (self:deobfuscation_mapping) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.version_code <- x +let[@inline] deobfuscation_mapping_set_obfuscated_classes (self:deobfuscation_mapping) (x:obfuscated_class list) : unit = + self.obfuscated_classes <- x + +let copy_deobfuscation_mapping (self:deobfuscation_mapping) : deobfuscation_mapping = + { self with package_name = self.package_name } + +let make_deobfuscation_mapping + ?(package_name:string option) + ?(version_code:int64 option) + ?(obfuscated_classes=[]) + () : deobfuscation_mapping = + let _res = default_deobfuscation_mapping () in + (match package_name with + | None -> () + | Some v -> deobfuscation_mapping_set_package_name _res v); + (match version_code with + | None -> () + | Some v -> deobfuscation_mapping_set_version_code _res v); + deobfuscation_mapping_set_obfuscated_classes _res obfuscated_classes; + _res + +let[@inline] heap_graph_root_has_root_type (self:heap_graph_root) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] heap_graph_root_set_object_ids (self:heap_graph_root) (x:int64 list) : unit = + self.object_ids <- x +let[@inline] heap_graph_root_set_root_type (self:heap_graph_root) (x:heap_graph_root_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.root_type <- x + +let copy_heap_graph_root (self:heap_graph_root) : heap_graph_root = + { self with object_ids = self.object_ids } + +let make_heap_graph_root + ?(object_ids=[]) + ?(root_type:heap_graph_root_type option) + () : heap_graph_root = + let _res = default_heap_graph_root () in + heap_graph_root_set_object_ids _res object_ids; + (match root_type with + | None -> () + | Some v -> heap_graph_root_set_root_type _res v); + _res + +let[@inline] heap_graph_type_has_id (self:heap_graph_type) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] heap_graph_type_has_location_id (self:heap_graph_type) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] heap_graph_type_has_class_name (self:heap_graph_type) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] heap_graph_type_has_object_size (self:heap_graph_type) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] heap_graph_type_has_superclass_id (self:heap_graph_type) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] heap_graph_type_has_kind (self:heap_graph_type) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] heap_graph_type_has_classloader_id (self:heap_graph_type) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] heap_graph_type_set_id (self:heap_graph_type) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.id <- x +let[@inline] heap_graph_type_set_location_id (self:heap_graph_type) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.location_id <- x +let[@inline] heap_graph_type_set_class_name (self:heap_graph_type) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.class_name <- x +let[@inline] heap_graph_type_set_object_size (self:heap_graph_type) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.object_size <- x +let[@inline] heap_graph_type_set_superclass_id (self:heap_graph_type) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.superclass_id <- x +let[@inline] heap_graph_type_set_reference_field_id (self:heap_graph_type) (x:int64 list) : unit = + self.reference_field_id <- x +let[@inline] heap_graph_type_set_kind (self:heap_graph_type) (x:heap_graph_type_kind) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.kind <- x +let[@inline] heap_graph_type_set_classloader_id (self:heap_graph_type) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.classloader_id <- x + +let copy_heap_graph_type (self:heap_graph_type) : heap_graph_type = + { self with id = self.id } + +let make_heap_graph_type + ?(id:int64 option) + ?(location_id:int64 option) + ?(class_name:string option) + ?(object_size:int64 option) + ?(superclass_id:int64 option) + ?(reference_field_id=[]) + ?(kind:heap_graph_type_kind option) + ?(classloader_id:int64 option) + () : heap_graph_type = + let _res = default_heap_graph_type () in + (match id with + | None -> () + | Some v -> heap_graph_type_set_id _res v); + (match location_id with + | None -> () + | Some v -> heap_graph_type_set_location_id _res v); + (match class_name with + | None -> () + | Some v -> heap_graph_type_set_class_name _res v); + (match object_size with + | None -> () + | Some v -> heap_graph_type_set_object_size _res v); + (match superclass_id with + | None -> () + | Some v -> heap_graph_type_set_superclass_id _res v); + heap_graph_type_set_reference_field_id _res reference_field_id; + (match kind with + | None -> () + | Some v -> heap_graph_type_set_kind _res v); + (match classloader_id with + | None -> () + | Some v -> heap_graph_type_set_classloader_id _res v); + _res + +let[@inline] heap_graph_object_has_type_id (self:heap_graph_object) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] heap_graph_object_has_self_size (self:heap_graph_object) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] heap_graph_object_has_reference_field_id_base (self:heap_graph_object) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] heap_graph_object_has_native_allocation_registry_size_field (self:heap_graph_object) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] heap_graph_object_has_heap_type_delta (self:heap_graph_object) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] heap_graph_object_set_identifier (self:heap_graph_object) (x:heap_graph_object_identifier) : unit = + self.identifier <- Some x +let[@inline] heap_graph_object_set_type_id (self:heap_graph_object) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.type_id <- x +let[@inline] heap_graph_object_set_self_size (self:heap_graph_object) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.self_size <- x +let[@inline] heap_graph_object_set_reference_field_id_base (self:heap_graph_object) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.reference_field_id_base <- x +let[@inline] heap_graph_object_set_reference_field_id (self:heap_graph_object) (x:int64 list) : unit = + self.reference_field_id <- x +let[@inline] heap_graph_object_set_reference_object_id (self:heap_graph_object) (x:int64 list) : unit = + self.reference_object_id <- x +let[@inline] heap_graph_object_set_native_allocation_registry_size_field (self:heap_graph_object) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.native_allocation_registry_size_field <- x +let[@inline] heap_graph_object_set_heap_type_delta (self:heap_graph_object) (x:heap_graph_object_heap_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.heap_type_delta <- x +let[@inline] heap_graph_object_set_runtime_internal_object_id (self:heap_graph_object) (x:int64 list) : unit = + self.runtime_internal_object_id <- x + +let copy_heap_graph_object (self:heap_graph_object) : heap_graph_object = + { self with identifier = self.identifier } + +let make_heap_graph_object + ?(identifier:heap_graph_object_identifier option) + ?(type_id:int64 option) + ?(self_size:int64 option) + ?(reference_field_id_base:int64 option) + ?(reference_field_id=[]) + ?(reference_object_id=[]) + ?(native_allocation_registry_size_field:int64 option) + ?(heap_type_delta:heap_graph_object_heap_type option) + ?(runtime_internal_object_id=[]) + () : heap_graph_object = + let _res = default_heap_graph_object () in + (match identifier with + | None -> () + | Some v -> heap_graph_object_set_identifier _res v); + (match type_id with + | None -> () + | Some v -> heap_graph_object_set_type_id _res v); + (match self_size with + | None -> () + | Some v -> heap_graph_object_set_self_size _res v); + (match reference_field_id_base with + | None -> () + | Some v -> heap_graph_object_set_reference_field_id_base _res v); + heap_graph_object_set_reference_field_id _res reference_field_id; + heap_graph_object_set_reference_object_id _res reference_object_id; + (match native_allocation_registry_size_field with + | None -> () + | Some v -> heap_graph_object_set_native_allocation_registry_size_field _res v); + (match heap_type_delta with + | None -> () + | Some v -> heap_graph_object_set_heap_type_delta _res v); + heap_graph_object_set_runtime_internal_object_id _res runtime_internal_object_id; + _res + +let[@inline] heap_graph_has_pid (self:heap_graph) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] heap_graph_has_continued (self:heap_graph) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] heap_graph_has_index (self:heap_graph) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] heap_graph_set_pid (self:heap_graph) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] heap_graph_set_objects (self:heap_graph) (x:heap_graph_object list) : unit = + self.objects <- x +let[@inline] heap_graph_set_roots (self:heap_graph) (x:heap_graph_root list) : unit = + self.roots <- x +let[@inline] heap_graph_set_types (self:heap_graph) (x:heap_graph_type list) : unit = + self.types <- x +let[@inline] heap_graph_set_field_names (self:heap_graph) (x:interned_string list) : unit = + self.field_names <- x +let[@inline] heap_graph_set_location_names (self:heap_graph) (x:interned_string list) : unit = + self.location_names <- x +let[@inline] heap_graph_set_continued (self:heap_graph) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.continued <- x +let[@inline] heap_graph_set_index (self:heap_graph) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.index <- x + +let copy_heap_graph (self:heap_graph) : heap_graph = + { self with pid = self.pid } + +let make_heap_graph + ?(pid:int32 option) + ?(objects=[]) + ?(roots=[]) + ?(types=[]) + ?(field_names=[]) + ?(location_names=[]) + ?(continued:bool option) + ?(index:int64 option) + () : heap_graph = + let _res = default_heap_graph () in + (match pid with + | None -> () + | Some v -> heap_graph_set_pid _res v); + heap_graph_set_objects _res objects; + heap_graph_set_roots _res roots; + heap_graph_set_types _res types; + heap_graph_set_field_names _res field_names; + heap_graph_set_location_names _res location_names; + (match continued with + | None -> () + | Some v -> heap_graph_set_continued _res v); + (match index with + | None -> () + | Some v -> heap_graph_set_index _res v); + _res + +let[@inline] profile_packet_heap_sample_has_callstack_id (self:profile_packet_heap_sample) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] profile_packet_heap_sample_has_self_allocated (self:profile_packet_heap_sample) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] profile_packet_heap_sample_has_self_freed (self:profile_packet_heap_sample) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] profile_packet_heap_sample_has_self_max (self:profile_packet_heap_sample) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] profile_packet_heap_sample_has_self_max_count (self:profile_packet_heap_sample) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] profile_packet_heap_sample_has_timestamp (self:profile_packet_heap_sample) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] profile_packet_heap_sample_has_alloc_count (self:profile_packet_heap_sample) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] profile_packet_heap_sample_has_free_count (self:profile_packet_heap_sample) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] profile_packet_heap_sample_set_callstack_id (self:profile_packet_heap_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.callstack_id <- x +let[@inline] profile_packet_heap_sample_set_self_allocated (self:profile_packet_heap_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.self_allocated <- x +let[@inline] profile_packet_heap_sample_set_self_freed (self:profile_packet_heap_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.self_freed <- x +let[@inline] profile_packet_heap_sample_set_self_max (self:profile_packet_heap_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.self_max <- x +let[@inline] profile_packet_heap_sample_set_self_max_count (self:profile_packet_heap_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.self_max_count <- x +let[@inline] profile_packet_heap_sample_set_timestamp (self:profile_packet_heap_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.timestamp <- x +let[@inline] profile_packet_heap_sample_set_alloc_count (self:profile_packet_heap_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.alloc_count <- x +let[@inline] profile_packet_heap_sample_set_free_count (self:profile_packet_heap_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.free_count <- x + +let copy_profile_packet_heap_sample (self:profile_packet_heap_sample) : profile_packet_heap_sample = + { self with callstack_id = self.callstack_id } + +let make_profile_packet_heap_sample + ?(callstack_id:int64 option) + ?(self_allocated:int64 option) + ?(self_freed:int64 option) + ?(self_max:int64 option) + ?(self_max_count:int64 option) + ?(timestamp:int64 option) + ?(alloc_count:int64 option) + ?(free_count:int64 option) + () : profile_packet_heap_sample = + let _res = default_profile_packet_heap_sample () in + (match callstack_id with + | None -> () + | Some v -> profile_packet_heap_sample_set_callstack_id _res v); + (match self_allocated with + | None -> () + | Some v -> profile_packet_heap_sample_set_self_allocated _res v); + (match self_freed with + | None -> () + | Some v -> profile_packet_heap_sample_set_self_freed _res v); + (match self_max with + | None -> () + | Some v -> profile_packet_heap_sample_set_self_max _res v); + (match self_max_count with + | None -> () + | Some v -> profile_packet_heap_sample_set_self_max_count _res v); + (match timestamp with + | None -> () + | Some v -> profile_packet_heap_sample_set_timestamp _res v); + (match alloc_count with + | None -> () + | Some v -> profile_packet_heap_sample_set_alloc_count _res v); + (match free_count with + | None -> () + | Some v -> profile_packet_heap_sample_set_free_count _res v); + _res + +let[@inline] profile_packet_histogram_bucket_has_upper_limit (self:profile_packet_histogram_bucket) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] profile_packet_histogram_bucket_has_max_bucket (self:profile_packet_histogram_bucket) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] profile_packet_histogram_bucket_has_count (self:profile_packet_histogram_bucket) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] profile_packet_histogram_bucket_set_upper_limit (self:profile_packet_histogram_bucket) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.upper_limit <- x +let[@inline] profile_packet_histogram_bucket_set_max_bucket (self:profile_packet_histogram_bucket) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.max_bucket <- x +let[@inline] profile_packet_histogram_bucket_set_count (self:profile_packet_histogram_bucket) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.count <- x + +let copy_profile_packet_histogram_bucket (self:profile_packet_histogram_bucket) : profile_packet_histogram_bucket = + { self with upper_limit = self.upper_limit } + +let make_profile_packet_histogram_bucket + ?(upper_limit:int64 option) + ?(max_bucket:bool option) + ?(count:int64 option) + () : profile_packet_histogram_bucket = + let _res = default_profile_packet_histogram_bucket () in + (match upper_limit with + | None -> () + | Some v -> profile_packet_histogram_bucket_set_upper_limit _res v); + (match max_bucket with + | None -> () + | Some v -> profile_packet_histogram_bucket_set_max_bucket _res v); + (match count with + | None -> () + | Some v -> profile_packet_histogram_bucket_set_count _res v); + _res + + +let[@inline] profile_packet_histogram_set_buckets (self:profile_packet_histogram) (x:profile_packet_histogram_bucket list) : unit = + self.buckets <- x + +let copy_profile_packet_histogram (self:profile_packet_histogram) : profile_packet_histogram = + { self with buckets = self.buckets } + +let make_profile_packet_histogram + ?(buckets=[]) + () : profile_packet_histogram = + let _res = default_profile_packet_histogram () in + profile_packet_histogram_set_buckets _res buckets; + _res + +let[@inline] profile_packet_process_stats_has_unwinding_errors (self:profile_packet_process_stats) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] profile_packet_process_stats_has_heap_samples (self:profile_packet_process_stats) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] profile_packet_process_stats_has_map_reparses (self:profile_packet_process_stats) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] profile_packet_process_stats_has_total_unwinding_time_us (self:profile_packet_process_stats) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] profile_packet_process_stats_has_client_spinlock_blocked_us (self:profile_packet_process_stats) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] profile_packet_process_stats_set_unwinding_errors (self:profile_packet_process_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.unwinding_errors <- x +let[@inline] profile_packet_process_stats_set_heap_samples (self:profile_packet_process_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.heap_samples <- x +let[@inline] profile_packet_process_stats_set_map_reparses (self:profile_packet_process_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.map_reparses <- x +let[@inline] profile_packet_process_stats_set_unwinding_time_us (self:profile_packet_process_stats) (x:profile_packet_histogram) : unit = + self.unwinding_time_us <- Some x +let[@inline] profile_packet_process_stats_set_total_unwinding_time_us (self:profile_packet_process_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.total_unwinding_time_us <- x +let[@inline] profile_packet_process_stats_set_client_spinlock_blocked_us (self:profile_packet_process_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.client_spinlock_blocked_us <- x + +let copy_profile_packet_process_stats (self:profile_packet_process_stats) : profile_packet_process_stats = + { self with unwinding_errors = self.unwinding_errors } + +let make_profile_packet_process_stats + ?(unwinding_errors:int64 option) + ?(heap_samples:int64 option) + ?(map_reparses:int64 option) + ?(unwinding_time_us:profile_packet_histogram option) + ?(total_unwinding_time_us:int64 option) + ?(client_spinlock_blocked_us:int64 option) + () : profile_packet_process_stats = + let _res = default_profile_packet_process_stats () in + (match unwinding_errors with + | None -> () + | Some v -> profile_packet_process_stats_set_unwinding_errors _res v); + (match heap_samples with + | None -> () + | Some v -> profile_packet_process_stats_set_heap_samples _res v); + (match map_reparses with + | None -> () + | Some v -> profile_packet_process_stats_set_map_reparses _res v); + (match unwinding_time_us with + | None -> () + | Some v -> profile_packet_process_stats_set_unwinding_time_us _res v); + (match total_unwinding_time_us with + | None -> () + | Some v -> profile_packet_process_stats_set_total_unwinding_time_us _res v); + (match client_spinlock_blocked_us with + | None -> () + | Some v -> profile_packet_process_stats_set_client_spinlock_blocked_us _res v); + _res + +let[@inline] profile_packet_process_heap_samples_has_pid (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] profile_packet_process_heap_samples_has_from_startup (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] profile_packet_process_heap_samples_has_rejected_concurrent (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] profile_packet_process_heap_samples_has_disconnected (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] profile_packet_process_heap_samples_has_buffer_overran (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] profile_packet_process_heap_samples_has_client_error (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] profile_packet_process_heap_samples_has_buffer_corrupted (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] profile_packet_process_heap_samples_has_hit_guardrail (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] profile_packet_process_heap_samples_has_heap_name (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] profile_packet_process_heap_samples_has_sampling_interval_bytes (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] profile_packet_process_heap_samples_has_orig_sampling_interval_bytes (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] profile_packet_process_heap_samples_has_timestamp (self:profile_packet_process_heap_samples) : bool = (Pbrt.Bitfield.get self._presence 11) + +let[@inline] profile_packet_process_heap_samples_set_pid (self:profile_packet_process_heap_samples) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] profile_packet_process_heap_samples_set_from_startup (self:profile_packet_process_heap_samples) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.from_startup <- x +let[@inline] profile_packet_process_heap_samples_set_rejected_concurrent (self:profile_packet_process_heap_samples) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.rejected_concurrent <- x +let[@inline] profile_packet_process_heap_samples_set_disconnected (self:profile_packet_process_heap_samples) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.disconnected <- x +let[@inline] profile_packet_process_heap_samples_set_buffer_overran (self:profile_packet_process_heap_samples) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.buffer_overran <- x +let[@inline] profile_packet_process_heap_samples_set_client_error (self:profile_packet_process_heap_samples) (x:profile_packet_process_heap_samples_client_error) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.client_error <- x +let[@inline] profile_packet_process_heap_samples_set_buffer_corrupted (self:profile_packet_process_heap_samples) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.buffer_corrupted <- x +let[@inline] profile_packet_process_heap_samples_set_hit_guardrail (self:profile_packet_process_heap_samples) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.hit_guardrail <- x +let[@inline] profile_packet_process_heap_samples_set_heap_name (self:profile_packet_process_heap_samples) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.heap_name <- x +let[@inline] profile_packet_process_heap_samples_set_sampling_interval_bytes (self:profile_packet_process_heap_samples) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.sampling_interval_bytes <- x +let[@inline] profile_packet_process_heap_samples_set_orig_sampling_interval_bytes (self:profile_packet_process_heap_samples) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.orig_sampling_interval_bytes <- x +let[@inline] profile_packet_process_heap_samples_set_timestamp (self:profile_packet_process_heap_samples) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.timestamp <- x +let[@inline] profile_packet_process_heap_samples_set_stats (self:profile_packet_process_heap_samples) (x:profile_packet_process_stats) : unit = + self.stats <- Some x +let[@inline] profile_packet_process_heap_samples_set_samples (self:profile_packet_process_heap_samples) (x:profile_packet_heap_sample list) : unit = + self.samples <- x + +let copy_profile_packet_process_heap_samples (self:profile_packet_process_heap_samples) : profile_packet_process_heap_samples = + { self with pid = self.pid } + +let make_profile_packet_process_heap_samples + ?(pid:int64 option) + ?(from_startup:bool option) + ?(rejected_concurrent:bool option) + ?(disconnected:bool option) + ?(buffer_overran:bool option) + ?(client_error:profile_packet_process_heap_samples_client_error option) + ?(buffer_corrupted:bool option) + ?(hit_guardrail:bool option) + ?(heap_name:string option) + ?(sampling_interval_bytes:int64 option) + ?(orig_sampling_interval_bytes:int64 option) + ?(timestamp:int64 option) + ?(stats:profile_packet_process_stats option) + ?(samples=[]) + () : profile_packet_process_heap_samples = + let _res = default_profile_packet_process_heap_samples () in + (match pid with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_pid _res v); + (match from_startup with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_from_startup _res v); + (match rejected_concurrent with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_rejected_concurrent _res v); + (match disconnected with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_disconnected _res v); + (match buffer_overran with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_buffer_overran _res v); + (match client_error with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_client_error _res v); + (match buffer_corrupted with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_buffer_corrupted _res v); + (match hit_guardrail with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_hit_guardrail _res v); + (match heap_name with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_heap_name _res v); + (match sampling_interval_bytes with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_sampling_interval_bytes _res v); + (match orig_sampling_interval_bytes with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_orig_sampling_interval_bytes _res v); + (match timestamp with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_timestamp _res v); + (match stats with + | None -> () + | Some v -> profile_packet_process_heap_samples_set_stats _res v); + profile_packet_process_heap_samples_set_samples _res samples; + _res + +let[@inline] profile_packet_has_continued (self:profile_packet) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] profile_packet_has_index (self:profile_packet) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] profile_packet_set_strings (self:profile_packet) (x:interned_string list) : unit = + self.strings <- x +let[@inline] profile_packet_set_mappings (self:profile_packet) (x:mapping list) : unit = + self.mappings <- x +let[@inline] profile_packet_set_frames (self:profile_packet) (x:frame list) : unit = + self.frames <- x +let[@inline] profile_packet_set_callstacks (self:profile_packet) (x:callstack list) : unit = + self.callstacks <- x +let[@inline] profile_packet_set_process_dumps (self:profile_packet) (x:profile_packet_process_heap_samples list) : unit = + self.process_dumps <- x +let[@inline] profile_packet_set_continued (self:profile_packet) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.continued <- x +let[@inline] profile_packet_set_index (self:profile_packet) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.index <- x + +let copy_profile_packet (self:profile_packet) : profile_packet = + { self with strings = self.strings } + +let make_profile_packet + ?(strings=[]) + ?(mappings=[]) + ?(frames=[]) + ?(callstacks=[]) + ?(process_dumps=[]) + ?(continued:bool option) + ?(index:int64 option) + () : profile_packet = + let _res = default_profile_packet () in + profile_packet_set_strings _res strings; + profile_packet_set_mappings _res mappings; + profile_packet_set_frames _res frames; + profile_packet_set_callstacks _res callstacks; + profile_packet_set_process_dumps _res process_dumps; + (match continued with + | None -> () + | Some v -> profile_packet_set_continued _res v); + (match index with + | None -> () + | Some v -> profile_packet_set_index _res v); + _res + + +let[@inline] streaming_allocation_set_address (self:streaming_allocation) (x:int64 list) : unit = + self.address <- x +let[@inline] streaming_allocation_set_size (self:streaming_allocation) (x:int64 list) : unit = + self.size <- x +let[@inline] streaming_allocation_set_sample_size (self:streaming_allocation) (x:int64 list) : unit = + self.sample_size <- x +let[@inline] streaming_allocation_set_clock_monotonic_coarse_timestamp (self:streaming_allocation) (x:int64 list) : unit = + self.clock_monotonic_coarse_timestamp <- x +let[@inline] streaming_allocation_set_heap_id (self:streaming_allocation) (x:int32 list) : unit = + self.heap_id <- x +let[@inline] streaming_allocation_set_sequence_number (self:streaming_allocation) (x:int64 list) : unit = + self.sequence_number <- x + +let copy_streaming_allocation (self:streaming_allocation) : streaming_allocation = + { self with address = self.address } + +let make_streaming_allocation + ?(address=[]) + ?(size=[]) + ?(sample_size=[]) + ?(clock_monotonic_coarse_timestamp=[]) + ?(heap_id=[]) + ?(sequence_number=[]) + () : streaming_allocation = + let _res = default_streaming_allocation () in + streaming_allocation_set_address _res address; + streaming_allocation_set_size _res size; + streaming_allocation_set_sample_size _res sample_size; + streaming_allocation_set_clock_monotonic_coarse_timestamp _res clock_monotonic_coarse_timestamp; + streaming_allocation_set_heap_id _res heap_id; + streaming_allocation_set_sequence_number _res sequence_number; + _res + + +let[@inline] streaming_free_set_address (self:streaming_free) (x:int64 list) : unit = + self.address <- x +let[@inline] streaming_free_set_heap_id (self:streaming_free) (x:int32 list) : unit = + self.heap_id <- x +let[@inline] streaming_free_set_sequence_number (self:streaming_free) (x:int64 list) : unit = + self.sequence_number <- x + +let copy_streaming_free (self:streaming_free) : streaming_free = + { self with address = self.address } + +let make_streaming_free + ?(address=[]) + ?(heap_id=[]) + ?(sequence_number=[]) + () : streaming_free = + let _res = default_streaming_free () in + streaming_free_set_address _res address; + streaming_free_set_heap_id _res heap_id; + streaming_free_set_sequence_number _res sequence_number; + _res + +let[@inline] streaming_profile_packet_has_process_priority (self:streaming_profile_packet) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] streaming_profile_packet_set_callstack_iid (self:streaming_profile_packet) (x:int64 list) : unit = + self.callstack_iid <- x +let[@inline] streaming_profile_packet_set_timestamp_delta_us (self:streaming_profile_packet) (x:int64 list) : unit = + self.timestamp_delta_us <- x +let[@inline] streaming_profile_packet_set_process_priority (self:streaming_profile_packet) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.process_priority <- x + +let copy_streaming_profile_packet (self:streaming_profile_packet) : streaming_profile_packet = + { self with callstack_iid = self.callstack_iid } + +let make_streaming_profile_packet + ?(callstack_iid=[]) + ?(timestamp_delta_us=[]) + ?(process_priority:int32 option) + () : streaming_profile_packet = + let _res = default_streaming_profile_packet () in + streaming_profile_packet_set_callstack_iid _res callstack_iid; + streaming_profile_packet_set_timestamp_delta_us _res timestamp_delta_us; + (match process_priority with + | None -> () + | Some v -> streaming_profile_packet_set_process_priority _res v); + _res + +let[@inline] perf_sample_has_cpu (self:perf_sample) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] perf_sample_has_pid (self:perf_sample) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] perf_sample_has_tid (self:perf_sample) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] perf_sample_has_cpu_mode (self:perf_sample) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] perf_sample_has_timebase_count (self:perf_sample) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] perf_sample_has_callstack_iid (self:perf_sample) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] perf_sample_has_kernel_records_lost (self:perf_sample) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] perf_sample_set_cpu (self:perf_sample) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cpu <- x +let[@inline] perf_sample_set_pid (self:perf_sample) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.pid <- x +let[@inline] perf_sample_set_tid (self:perf_sample) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.tid <- x +let[@inline] perf_sample_set_cpu_mode (self:perf_sample) (x:profiling_cpu_mode) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.cpu_mode <- x +let[@inline] perf_sample_set_timebase_count (self:perf_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.timebase_count <- x +let[@inline] perf_sample_set_follower_counts (self:perf_sample) (x:int64 list) : unit = + self.follower_counts <- x +let[@inline] perf_sample_set_callstack_iid (self:perf_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.callstack_iid <- x +let[@inline] perf_sample_set_optional_unwind_error (self:perf_sample) (x:perf_sample_optional_unwind_error) : unit = + self.optional_unwind_error <- Some x +let[@inline] perf_sample_set_kernel_records_lost (self:perf_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.kernel_records_lost <- x +let[@inline] perf_sample_set_optional_sample_skipped_reason (self:perf_sample) (x:perf_sample_optional_sample_skipped_reason) : unit = + self.optional_sample_skipped_reason <- Some x +let[@inline] perf_sample_set_producer_event (self:perf_sample) (x:perf_sample_producer_event) : unit = + self.producer_event <- Some x + +let copy_perf_sample (self:perf_sample) : perf_sample = + { self with cpu = self.cpu } + +let make_perf_sample + ?(cpu:int32 option) + ?(pid:int32 option) + ?(tid:int32 option) + ?(cpu_mode:profiling_cpu_mode option) + ?(timebase_count:int64 option) + ?(follower_counts=[]) + ?(callstack_iid:int64 option) + ?(optional_unwind_error:perf_sample_optional_unwind_error option) + ?(kernel_records_lost:int64 option) + ?(optional_sample_skipped_reason:perf_sample_optional_sample_skipped_reason option) + ?(producer_event:perf_sample_producer_event option) + () : perf_sample = + let _res = default_perf_sample () in + (match cpu with + | None -> () + | Some v -> perf_sample_set_cpu _res v); + (match pid with + | None -> () + | Some v -> perf_sample_set_pid _res v); + (match tid with + | None -> () + | Some v -> perf_sample_set_tid _res v); + (match cpu_mode with + | None -> () + | Some v -> perf_sample_set_cpu_mode _res v); + (match timebase_count with + | None -> () + | Some v -> perf_sample_set_timebase_count _res v); + perf_sample_set_follower_counts _res follower_counts; + (match callstack_iid with + | None -> () + | Some v -> perf_sample_set_callstack_iid _res v); + (match optional_unwind_error with + | None -> () + | Some v -> perf_sample_set_optional_unwind_error _res v); + (match kernel_records_lost with + | None -> () + | Some v -> perf_sample_set_kernel_records_lost _res v); + (match optional_sample_skipped_reason with + | None -> () + | Some v -> perf_sample_set_optional_sample_skipped_reason _res v); + (match producer_event with + | None -> () + | Some v -> perf_sample_set_producer_event _res v); + _res + +let[@inline] smaps_entry_has_path (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] smaps_entry_has_size_kb (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] smaps_entry_has_private_dirty_kb (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] smaps_entry_has_swap_kb (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] smaps_entry_has_file_name (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] smaps_entry_has_start_address (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] smaps_entry_has_module_timestamp (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] smaps_entry_has_module_debugid (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] smaps_entry_has_module_debug_path (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] smaps_entry_has_protection_flags (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] smaps_entry_has_private_clean_resident_kb (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] smaps_entry_has_shared_dirty_resident_kb (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] smaps_entry_has_shared_clean_resident_kb (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] smaps_entry_has_locked_kb (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] smaps_entry_has_proportional_resident_kb (self:smaps_entry) : bool = (Pbrt.Bitfield.get self._presence 14) + +let[@inline] smaps_entry_set_path (self:smaps_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.path <- x +let[@inline] smaps_entry_set_size_kb (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.size_kb <- x +let[@inline] smaps_entry_set_private_dirty_kb (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.private_dirty_kb <- x +let[@inline] smaps_entry_set_swap_kb (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.swap_kb <- x +let[@inline] smaps_entry_set_file_name (self:smaps_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.file_name <- x +let[@inline] smaps_entry_set_start_address (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.start_address <- x +let[@inline] smaps_entry_set_module_timestamp (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.module_timestamp <- x +let[@inline] smaps_entry_set_module_debugid (self:smaps_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.module_debugid <- x +let[@inline] smaps_entry_set_module_debug_path (self:smaps_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.module_debug_path <- x +let[@inline] smaps_entry_set_protection_flags (self:smaps_entry) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.protection_flags <- x +let[@inline] smaps_entry_set_private_clean_resident_kb (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.private_clean_resident_kb <- x +let[@inline] smaps_entry_set_shared_dirty_resident_kb (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.shared_dirty_resident_kb <- x +let[@inline] smaps_entry_set_shared_clean_resident_kb (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.shared_clean_resident_kb <- x +let[@inline] smaps_entry_set_locked_kb (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.locked_kb <- x +let[@inline] smaps_entry_set_proportional_resident_kb (self:smaps_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.proportional_resident_kb <- x + +let copy_smaps_entry (self:smaps_entry) : smaps_entry = + { self with path = self.path } + +let make_smaps_entry + ?(path:string option) + ?(size_kb:int64 option) + ?(private_dirty_kb:int64 option) + ?(swap_kb:int64 option) + ?(file_name:string option) + ?(start_address:int64 option) + ?(module_timestamp:int64 option) + ?(module_debugid:string option) + ?(module_debug_path:string option) + ?(protection_flags:int32 option) + ?(private_clean_resident_kb:int64 option) + ?(shared_dirty_resident_kb:int64 option) + ?(shared_clean_resident_kb:int64 option) + ?(locked_kb:int64 option) + ?(proportional_resident_kb:int64 option) + () : smaps_entry = + let _res = default_smaps_entry () in + (match path with + | None -> () + | Some v -> smaps_entry_set_path _res v); + (match size_kb with + | None -> () + | Some v -> smaps_entry_set_size_kb _res v); + (match private_dirty_kb with + | None -> () + | Some v -> smaps_entry_set_private_dirty_kb _res v); + (match swap_kb with + | None -> () + | Some v -> smaps_entry_set_swap_kb _res v); + (match file_name with + | None -> () + | Some v -> smaps_entry_set_file_name _res v); + (match start_address with + | None -> () + | Some v -> smaps_entry_set_start_address _res v); + (match module_timestamp with + | None -> () + | Some v -> smaps_entry_set_module_timestamp _res v); + (match module_debugid with + | None -> () + | Some v -> smaps_entry_set_module_debugid _res v); + (match module_debug_path with + | None -> () + | Some v -> smaps_entry_set_module_debug_path _res v); + (match protection_flags with + | None -> () + | Some v -> smaps_entry_set_protection_flags _res v); + (match private_clean_resident_kb with + | None -> () + | Some v -> smaps_entry_set_private_clean_resident_kb _res v); + (match shared_dirty_resident_kb with + | None -> () + | Some v -> smaps_entry_set_shared_dirty_resident_kb _res v); + (match shared_clean_resident_kb with + | None -> () + | Some v -> smaps_entry_set_shared_clean_resident_kb _res v); + (match locked_kb with + | None -> () + | Some v -> smaps_entry_set_locked_kb _res v); + (match proportional_resident_kb with + | None -> () + | Some v -> smaps_entry_set_proportional_resident_kb _res v); + _res + +let[@inline] smaps_packet_has_pid (self:smaps_packet) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] smaps_packet_set_pid (self:smaps_packet) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] smaps_packet_set_entries (self:smaps_packet) (x:smaps_entry list) : unit = + self.entries <- x + +let copy_smaps_packet (self:smaps_packet) : smaps_packet = + { self with pid = self.pid } + +let make_smaps_packet + ?(pid:int32 option) + ?(entries=[]) + () : smaps_packet = + let _res = default_smaps_packet () in + (match pid with + | None -> () + | Some v -> smaps_packet_set_pid _res v); + smaps_packet_set_entries _res entries; + _res + +let[@inline] process_stats_thread_has_tid (self:process_stats_thread) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] process_stats_thread_set_tid (self:process_stats_thread) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.tid <- x + +let copy_process_stats_thread (self:process_stats_thread) : process_stats_thread = + { self with tid = self.tid } + +let make_process_stats_thread + ?(tid:int32 option) + () : process_stats_thread = + let _res = default_process_stats_thread () in + (match tid with + | None -> () + | Some v -> process_stats_thread_set_tid _res v); + _res + +let[@inline] process_stats_fdinfo_has_fd (self:process_stats_fdinfo) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] process_stats_fdinfo_has_path (self:process_stats_fdinfo) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] process_stats_fdinfo_set_fd (self:process_stats_fdinfo) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.fd <- x +let[@inline] process_stats_fdinfo_set_path (self:process_stats_fdinfo) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.path <- x + +let copy_process_stats_fdinfo (self:process_stats_fdinfo) : process_stats_fdinfo = + { self with fd = self.fd } + +let make_process_stats_fdinfo + ?(fd:int64 option) + ?(path:string option) + () : process_stats_fdinfo = + let _res = default_process_stats_fdinfo () in + (match fd with + | None -> () + | Some v -> process_stats_fdinfo_set_fd _res v); + (match path with + | None -> () + | Some v -> process_stats_fdinfo_set_path _res v); + _res + +let[@inline] process_stats_process_has_pid (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] process_stats_process_has_vm_size_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] process_stats_process_has_vm_rss_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] process_stats_process_has_rss_anon_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] process_stats_process_has_rss_file_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] process_stats_process_has_rss_shmem_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] process_stats_process_has_vm_swap_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] process_stats_process_has_vm_locked_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] process_stats_process_has_vm_hwm_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 8) +let[@inline] process_stats_process_has_oom_score_adj (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 9) +let[@inline] process_stats_process_has_is_peak_rss_resettable (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 10) +let[@inline] process_stats_process_has_chrome_private_footprint_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 11) +let[@inline] process_stats_process_has_chrome_peak_resident_set_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 12) +let[@inline] process_stats_process_has_smr_rss_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 13) +let[@inline] process_stats_process_has_smr_pss_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 14) +let[@inline] process_stats_process_has_smr_pss_anon_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 15) +let[@inline] process_stats_process_has_smr_pss_file_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 16) +let[@inline] process_stats_process_has_smr_pss_shmem_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 17) +let[@inline] process_stats_process_has_smr_swap_pss_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 18) +let[@inline] process_stats_process_has_runtime_user_mode (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 19) +let[@inline] process_stats_process_has_runtime_kernel_mode (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 20) +let[@inline] process_stats_process_has_dmabuf_rss_kb (self:process_stats_process) : bool = (Pbrt.Bitfield.get self._presence 21) + +let[@inline] process_stats_process_set_pid (self:process_stats_process) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] process_stats_process_set_threads (self:process_stats_process) (x:process_stats_thread list) : unit = + self.threads <- x +let[@inline] process_stats_process_set_vm_size_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.vm_size_kb <- x +let[@inline] process_stats_process_set_vm_rss_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.vm_rss_kb <- x +let[@inline] process_stats_process_set_rss_anon_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.rss_anon_kb <- x +let[@inline] process_stats_process_set_rss_file_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.rss_file_kb <- x +let[@inline] process_stats_process_set_rss_shmem_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.rss_shmem_kb <- x +let[@inline] process_stats_process_set_vm_swap_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.vm_swap_kb <- x +let[@inline] process_stats_process_set_vm_locked_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.vm_locked_kb <- x +let[@inline] process_stats_process_set_vm_hwm_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.vm_hwm_kb <- x +let[@inline] process_stats_process_set_oom_score_adj (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 9); self.oom_score_adj <- x +let[@inline] process_stats_process_set_is_peak_rss_resettable (self:process_stats_process) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 10); self.is_peak_rss_resettable <- x +let[@inline] process_stats_process_set_chrome_private_footprint_kb (self:process_stats_process) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 11); self.chrome_private_footprint_kb <- x +let[@inline] process_stats_process_set_chrome_peak_resident_set_kb (self:process_stats_process) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 12); self.chrome_peak_resident_set_kb <- x +let[@inline] process_stats_process_set_fds (self:process_stats_process) (x:process_stats_fdinfo list) : unit = + self.fds <- x +let[@inline] process_stats_process_set_smr_rss_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 13); self.smr_rss_kb <- x +let[@inline] process_stats_process_set_smr_pss_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 14); self.smr_pss_kb <- x +let[@inline] process_stats_process_set_smr_pss_anon_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 15); self.smr_pss_anon_kb <- x +let[@inline] process_stats_process_set_smr_pss_file_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 16); self.smr_pss_file_kb <- x +let[@inline] process_stats_process_set_smr_pss_shmem_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 17); self.smr_pss_shmem_kb <- x +let[@inline] process_stats_process_set_smr_swap_pss_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 18); self.smr_swap_pss_kb <- x +let[@inline] process_stats_process_set_runtime_user_mode (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 19); self.runtime_user_mode <- x +let[@inline] process_stats_process_set_runtime_kernel_mode (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 20); self.runtime_kernel_mode <- x +let[@inline] process_stats_process_set_dmabuf_rss_kb (self:process_stats_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 21); self.dmabuf_rss_kb <- x + +let copy_process_stats_process (self:process_stats_process) : process_stats_process = + { self with pid = self.pid } + +let make_process_stats_process + ?(pid:int32 option) + ?(threads=[]) + ?(vm_size_kb:int64 option) + ?(vm_rss_kb:int64 option) + ?(rss_anon_kb:int64 option) + ?(rss_file_kb:int64 option) + ?(rss_shmem_kb:int64 option) + ?(vm_swap_kb:int64 option) + ?(vm_locked_kb:int64 option) + ?(vm_hwm_kb:int64 option) + ?(oom_score_adj:int64 option) + ?(is_peak_rss_resettable:bool option) + ?(chrome_private_footprint_kb:int32 option) + ?(chrome_peak_resident_set_kb:int32 option) + ?(fds=[]) + ?(smr_rss_kb:int64 option) + ?(smr_pss_kb:int64 option) + ?(smr_pss_anon_kb:int64 option) + ?(smr_pss_file_kb:int64 option) + ?(smr_pss_shmem_kb:int64 option) + ?(smr_swap_pss_kb:int64 option) + ?(runtime_user_mode:int64 option) + ?(runtime_kernel_mode:int64 option) + ?(dmabuf_rss_kb:int64 option) + () : process_stats_process = + let _res = default_process_stats_process () in + (match pid with + | None -> () + | Some v -> process_stats_process_set_pid _res v); + process_stats_process_set_threads _res threads; + (match vm_size_kb with + | None -> () + | Some v -> process_stats_process_set_vm_size_kb _res v); + (match vm_rss_kb with + | None -> () + | Some v -> process_stats_process_set_vm_rss_kb _res v); + (match rss_anon_kb with + | None -> () + | Some v -> process_stats_process_set_rss_anon_kb _res v); + (match rss_file_kb with + | None -> () + | Some v -> process_stats_process_set_rss_file_kb _res v); + (match rss_shmem_kb with + | None -> () + | Some v -> process_stats_process_set_rss_shmem_kb _res v); + (match vm_swap_kb with + | None -> () + | Some v -> process_stats_process_set_vm_swap_kb _res v); + (match vm_locked_kb with + | None -> () + | Some v -> process_stats_process_set_vm_locked_kb _res v); + (match vm_hwm_kb with + | None -> () + | Some v -> process_stats_process_set_vm_hwm_kb _res v); + (match oom_score_adj with + | None -> () + | Some v -> process_stats_process_set_oom_score_adj _res v); + (match is_peak_rss_resettable with + | None -> () + | Some v -> process_stats_process_set_is_peak_rss_resettable _res v); + (match chrome_private_footprint_kb with + | None -> () + | Some v -> process_stats_process_set_chrome_private_footprint_kb _res v); + (match chrome_peak_resident_set_kb with + | None -> () + | Some v -> process_stats_process_set_chrome_peak_resident_set_kb _res v); + process_stats_process_set_fds _res fds; + (match smr_rss_kb with + | None -> () + | Some v -> process_stats_process_set_smr_rss_kb _res v); + (match smr_pss_kb with + | None -> () + | Some v -> process_stats_process_set_smr_pss_kb _res v); + (match smr_pss_anon_kb with + | None -> () + | Some v -> process_stats_process_set_smr_pss_anon_kb _res v); + (match smr_pss_file_kb with + | None -> () + | Some v -> process_stats_process_set_smr_pss_file_kb _res v); + (match smr_pss_shmem_kb with + | None -> () + | Some v -> process_stats_process_set_smr_pss_shmem_kb _res v); + (match smr_swap_pss_kb with + | None -> () + | Some v -> process_stats_process_set_smr_swap_pss_kb _res v); + (match runtime_user_mode with + | None -> () + | Some v -> process_stats_process_set_runtime_user_mode _res v); + (match runtime_kernel_mode with + | None -> () + | Some v -> process_stats_process_set_runtime_kernel_mode _res v); + (match dmabuf_rss_kb with + | None -> () + | Some v -> process_stats_process_set_dmabuf_rss_kb _res v); + _res + +let[@inline] process_stats_has_collection_end_timestamp (self:process_stats) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] process_stats_set_processes (self:process_stats) (x:process_stats_process list) : unit = + self.processes <- x +let[@inline] process_stats_set_collection_end_timestamp (self:process_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.collection_end_timestamp <- x + +let copy_process_stats (self:process_stats) : process_stats = + { self with processes = self.processes } + +let make_process_stats + ?(processes=[]) + ?(collection_end_timestamp:int64 option) + () : process_stats = + let _res = default_process_stats () in + process_stats_set_processes _res processes; + (match collection_end_timestamp with + | None -> () + | Some v -> process_stats_set_collection_end_timestamp _res v); + _res + +let[@inline] process_tree_thread_has_tid (self:process_tree_thread) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] process_tree_thread_has_tgid (self:process_tree_thread) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] process_tree_thread_has_name (self:process_tree_thread) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] process_tree_thread_set_tid (self:process_tree_thread) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.tid <- x +let[@inline] process_tree_thread_set_tgid (self:process_tree_thread) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tgid <- x +let[@inline] process_tree_thread_set_name (self:process_tree_thread) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.name <- x +let[@inline] process_tree_thread_set_nstid (self:process_tree_thread) (x:int32 list) : unit = + self.nstid <- x + +let copy_process_tree_thread (self:process_tree_thread) : process_tree_thread = + { self with tid = self.tid } + +let make_process_tree_thread + ?(tid:int32 option) + ?(tgid:int32 option) + ?(name:string option) + ?(nstid=[]) + () : process_tree_thread = + let _res = default_process_tree_thread () in + (match tid with + | None -> () + | Some v -> process_tree_thread_set_tid _res v); + (match tgid with + | None -> () + | Some v -> process_tree_thread_set_tgid _res v); + (match name with + | None -> () + | Some v -> process_tree_thread_set_name _res v); + process_tree_thread_set_nstid _res nstid; + _res + +let[@inline] process_tree_process_has_pid (self:process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] process_tree_process_has_ppid (self:process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] process_tree_process_has_cmdline_is_comm (self:process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] process_tree_process_has_uid (self:process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] process_tree_process_has_process_start_from_boot (self:process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] process_tree_process_has_is_kthread (self:process_tree_process) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] process_tree_process_set_pid (self:process_tree_process) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] process_tree_process_set_ppid (self:process_tree_process) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.ppid <- x +let[@inline] process_tree_process_set_cmdline (self:process_tree_process) (x:string list) : unit = + self.cmdline <- x +let[@inline] process_tree_process_set_cmdline_is_comm (self:process_tree_process) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.cmdline_is_comm <- x +let[@inline] process_tree_process_set_uid (self:process_tree_process) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.uid <- x +let[@inline] process_tree_process_set_nspid (self:process_tree_process) (x:int32 list) : unit = + self.nspid <- x +let[@inline] process_tree_process_set_process_start_from_boot (self:process_tree_process) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.process_start_from_boot <- x +let[@inline] process_tree_process_set_is_kthread (self:process_tree_process) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.is_kthread <- x + +let copy_process_tree_process (self:process_tree_process) : process_tree_process = + { self with pid = self.pid } + +let make_process_tree_process + ?(pid:int32 option) + ?(ppid:int32 option) + ?(cmdline=[]) + ?(cmdline_is_comm:bool option) + ?(uid:int32 option) + ?(nspid=[]) + ?(process_start_from_boot:int64 option) + ?(is_kthread:bool option) + () : process_tree_process = + let _res = default_process_tree_process () in + (match pid with + | None -> () + | Some v -> process_tree_process_set_pid _res v); + (match ppid with + | None -> () + | Some v -> process_tree_process_set_ppid _res v); + process_tree_process_set_cmdline _res cmdline; + (match cmdline_is_comm with + | None -> () + | Some v -> process_tree_process_set_cmdline_is_comm _res v); + (match uid with + | None -> () + | Some v -> process_tree_process_set_uid _res v); + process_tree_process_set_nspid _res nspid; + (match process_start_from_boot with + | None -> () + | Some v -> process_tree_process_set_process_start_from_boot _res v); + (match is_kthread with + | None -> () + | Some v -> process_tree_process_set_is_kthread _res v); + _res + +let[@inline] process_tree_has_collection_end_timestamp (self:process_tree) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] process_tree_set_processes (self:process_tree) (x:process_tree_process list) : unit = + self.processes <- x +let[@inline] process_tree_set_threads (self:process_tree) (x:process_tree_thread list) : unit = + self.threads <- x +let[@inline] process_tree_set_collection_end_timestamp (self:process_tree) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.collection_end_timestamp <- x + +let copy_process_tree (self:process_tree) : process_tree = + { self with processes = self.processes } + +let make_process_tree + ?(processes=[]) + ?(threads=[]) + ?(collection_end_timestamp:int64 option) + () : process_tree = + let _res = default_process_tree () in + process_tree_set_processes _res processes; + process_tree_set_threads _res threads; + (match collection_end_timestamp with + | None -> () + | Some v -> process_tree_set_collection_end_timestamp _res v); + _res + + +let[@inline] remote_clock_sync_synced_clocks_set_client_clocks (self:remote_clock_sync_synced_clocks) (x:clock_snapshot) : unit = + self.client_clocks <- Some x +let[@inline] remote_clock_sync_synced_clocks_set_host_clocks (self:remote_clock_sync_synced_clocks) (x:clock_snapshot) : unit = + self.host_clocks <- Some x + +let copy_remote_clock_sync_synced_clocks (self:remote_clock_sync_synced_clocks) : remote_clock_sync_synced_clocks = + { self with client_clocks = self.client_clocks } + +let make_remote_clock_sync_synced_clocks + ?(client_clocks:clock_snapshot option) + ?(host_clocks:clock_snapshot option) + () : remote_clock_sync_synced_clocks = + let _res = default_remote_clock_sync_synced_clocks () in + (match client_clocks with + | None -> () + | Some v -> remote_clock_sync_synced_clocks_set_client_clocks _res v); + (match host_clocks with + | None -> () + | Some v -> remote_clock_sync_synced_clocks_set_host_clocks _res v); + _res + + +let[@inline] remote_clock_sync_set_synced_clocks (self:remote_clock_sync) (x:remote_clock_sync_synced_clocks list) : unit = + self.synced_clocks <- x + +let copy_remote_clock_sync (self:remote_clock_sync) : remote_clock_sync = + { self with synced_clocks = self.synced_clocks } + +let make_remote_clock_sync + ?(synced_clocks=[]) + () : remote_clock_sync = + let _res = default_remote_clock_sync () in + remote_clock_sync_set_synced_clocks _res synced_clocks; + _res + + +let[@inline] statsd_atom_set_atom (self:statsd_atom) (x:unit list) : unit = + self.atom <- x +let[@inline] statsd_atom_set_timestamp_nanos (self:statsd_atom) (x:int64 list) : unit = + self.timestamp_nanos <- x + +let copy_statsd_atom (self:statsd_atom) : statsd_atom = + { self with atom = self.atom } + +let make_statsd_atom + ?(atom=[]) + ?(timestamp_nanos=[]) + () : statsd_atom = + let _res = default_statsd_atom () in + statsd_atom_set_atom _res atom; + statsd_atom_set_timestamp_nanos _res timestamp_nanos; + _res + +let[@inline] sys_stats_meminfo_value_has_key (self:sys_stats_meminfo_value) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_meminfo_value_has_value (self:sys_stats_meminfo_value) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] sys_stats_meminfo_value_set_key (self:sys_stats_meminfo_value) (x:meminfo_counters) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.key <- x +let[@inline] sys_stats_meminfo_value_set_value (self:sys_stats_meminfo_value) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.value <- x + +let copy_sys_stats_meminfo_value (self:sys_stats_meminfo_value) : sys_stats_meminfo_value = + { self with key = self.key } + +let make_sys_stats_meminfo_value + ?(key:meminfo_counters option) + ?(value:int64 option) + () : sys_stats_meminfo_value = + let _res = default_sys_stats_meminfo_value () in + (match key with + | None -> () + | Some v -> sys_stats_meminfo_value_set_key _res v); + (match value with + | None -> () + | Some v -> sys_stats_meminfo_value_set_value _res v); + _res + +let[@inline] sys_stats_vmstat_value_has_key (self:sys_stats_vmstat_value) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_vmstat_value_has_value (self:sys_stats_vmstat_value) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] sys_stats_vmstat_value_set_key (self:sys_stats_vmstat_value) (x:vmstat_counters) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.key <- x +let[@inline] sys_stats_vmstat_value_set_value (self:sys_stats_vmstat_value) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.value <- x + +let copy_sys_stats_vmstat_value (self:sys_stats_vmstat_value) : sys_stats_vmstat_value = + { self with key = self.key } + +let make_sys_stats_vmstat_value + ?(key:vmstat_counters option) + ?(value:int64 option) + () : sys_stats_vmstat_value = + let _res = default_sys_stats_vmstat_value () in + (match key with + | None -> () + | Some v -> sys_stats_vmstat_value_set_key _res v); + (match value with + | None -> () + | Some v -> sys_stats_vmstat_value_set_value _res v); + _res + +let[@inline] sys_stats_cpu_times_has_cpu_id (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_cpu_times_has_user_ns (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] sys_stats_cpu_times_has_user_nice_ns (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] sys_stats_cpu_times_has_system_mode_ns (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] sys_stats_cpu_times_has_idle_ns (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] sys_stats_cpu_times_has_io_wait_ns (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] sys_stats_cpu_times_has_irq_ns (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] sys_stats_cpu_times_has_softirq_ns (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] sys_stats_cpu_times_has_steal_ns (self:sys_stats_cpu_times) : bool = (Pbrt.Bitfield.get self._presence 8) + +let[@inline] sys_stats_cpu_times_set_cpu_id (self:sys_stats_cpu_times) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cpu_id <- x +let[@inline] sys_stats_cpu_times_set_user_ns (self:sys_stats_cpu_times) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.user_ns <- x +let[@inline] sys_stats_cpu_times_set_user_nice_ns (self:sys_stats_cpu_times) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.user_nice_ns <- x +let[@inline] sys_stats_cpu_times_set_system_mode_ns (self:sys_stats_cpu_times) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.system_mode_ns <- x +let[@inline] sys_stats_cpu_times_set_idle_ns (self:sys_stats_cpu_times) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.idle_ns <- x +let[@inline] sys_stats_cpu_times_set_io_wait_ns (self:sys_stats_cpu_times) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.io_wait_ns <- x +let[@inline] sys_stats_cpu_times_set_irq_ns (self:sys_stats_cpu_times) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.irq_ns <- x +let[@inline] sys_stats_cpu_times_set_softirq_ns (self:sys_stats_cpu_times) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.softirq_ns <- x +let[@inline] sys_stats_cpu_times_set_steal_ns (self:sys_stats_cpu_times) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.steal_ns <- x + +let copy_sys_stats_cpu_times (self:sys_stats_cpu_times) : sys_stats_cpu_times = + { self with cpu_id = self.cpu_id } + +let make_sys_stats_cpu_times + ?(cpu_id:int32 option) + ?(user_ns:int64 option) + ?(user_nice_ns:int64 option) + ?(system_mode_ns:int64 option) + ?(idle_ns:int64 option) + ?(io_wait_ns:int64 option) + ?(irq_ns:int64 option) + ?(softirq_ns:int64 option) + ?(steal_ns:int64 option) + () : sys_stats_cpu_times = + let _res = default_sys_stats_cpu_times () in + (match cpu_id with + | None -> () + | Some v -> sys_stats_cpu_times_set_cpu_id _res v); + (match user_ns with + | None -> () + | Some v -> sys_stats_cpu_times_set_user_ns _res v); + (match user_nice_ns with + | None -> () + | Some v -> sys_stats_cpu_times_set_user_nice_ns _res v); + (match system_mode_ns with + | None -> () + | Some v -> sys_stats_cpu_times_set_system_mode_ns _res v); + (match idle_ns with + | None -> () + | Some v -> sys_stats_cpu_times_set_idle_ns _res v); + (match io_wait_ns with + | None -> () + | Some v -> sys_stats_cpu_times_set_io_wait_ns _res v); + (match irq_ns with + | None -> () + | Some v -> sys_stats_cpu_times_set_irq_ns _res v); + (match softirq_ns with + | None -> () + | Some v -> sys_stats_cpu_times_set_softirq_ns _res v); + (match steal_ns with + | None -> () + | Some v -> sys_stats_cpu_times_set_steal_ns _res v); + _res + +let[@inline] sys_stats_interrupt_count_has_irq (self:sys_stats_interrupt_count) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_interrupt_count_has_count (self:sys_stats_interrupt_count) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] sys_stats_interrupt_count_set_irq (self:sys_stats_interrupt_count) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.irq <- x +let[@inline] sys_stats_interrupt_count_set_count (self:sys_stats_interrupt_count) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.count <- x + +let copy_sys_stats_interrupt_count (self:sys_stats_interrupt_count) : sys_stats_interrupt_count = + { self with irq = self.irq } + +let make_sys_stats_interrupt_count + ?(irq:int32 option) + ?(count:int64 option) + () : sys_stats_interrupt_count = + let _res = default_sys_stats_interrupt_count () in + (match irq with + | None -> () + | Some v -> sys_stats_interrupt_count_set_irq _res v); + (match count with + | None -> () + | Some v -> sys_stats_interrupt_count_set_count _res v); + _res + +let[@inline] sys_stats_devfreq_value_has_key (self:sys_stats_devfreq_value) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_devfreq_value_has_value (self:sys_stats_devfreq_value) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] sys_stats_devfreq_value_set_key (self:sys_stats_devfreq_value) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.key <- x +let[@inline] sys_stats_devfreq_value_set_value (self:sys_stats_devfreq_value) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.value <- x + +let copy_sys_stats_devfreq_value (self:sys_stats_devfreq_value) : sys_stats_devfreq_value = + { self with key = self.key } + +let make_sys_stats_devfreq_value + ?(key:string option) + ?(value:int64 option) + () : sys_stats_devfreq_value = + let _res = default_sys_stats_devfreq_value () in + (match key with + | None -> () + | Some v -> sys_stats_devfreq_value_set_key _res v); + (match value with + | None -> () + | Some v -> sys_stats_devfreq_value_set_value _res v); + _res + +let[@inline] sys_stats_buddy_info_has_node (self:sys_stats_buddy_info) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_buddy_info_has_zone (self:sys_stats_buddy_info) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] sys_stats_buddy_info_set_node (self:sys_stats_buddy_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.node <- x +let[@inline] sys_stats_buddy_info_set_zone (self:sys_stats_buddy_info) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.zone <- x +let[@inline] sys_stats_buddy_info_set_order_pages (self:sys_stats_buddy_info) (x:int32 list) : unit = + self.order_pages <- x + +let copy_sys_stats_buddy_info (self:sys_stats_buddy_info) : sys_stats_buddy_info = + { self with node = self.node } + +let make_sys_stats_buddy_info + ?(node:string option) + ?(zone:string option) + ?(order_pages=[]) + () : sys_stats_buddy_info = + let _res = default_sys_stats_buddy_info () in + (match node with + | None -> () + | Some v -> sys_stats_buddy_info_set_node _res v); + (match zone with + | None -> () + | Some v -> sys_stats_buddy_info_set_zone _res v); + sys_stats_buddy_info_set_order_pages _res order_pages; + _res + +let[@inline] sys_stats_disk_stat_has_device_name (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_disk_stat_has_read_sectors (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] sys_stats_disk_stat_has_read_time_ms (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] sys_stats_disk_stat_has_write_sectors (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] sys_stats_disk_stat_has_write_time_ms (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] sys_stats_disk_stat_has_discard_sectors (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] sys_stats_disk_stat_has_discard_time_ms (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] sys_stats_disk_stat_has_flush_count (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 7) +let[@inline] sys_stats_disk_stat_has_flush_time_ms (self:sys_stats_disk_stat) : bool = (Pbrt.Bitfield.get self._presence 8) + +let[@inline] sys_stats_disk_stat_set_device_name (self:sys_stats_disk_stat) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.device_name <- x +let[@inline] sys_stats_disk_stat_set_read_sectors (self:sys_stats_disk_stat) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.read_sectors <- x +let[@inline] sys_stats_disk_stat_set_read_time_ms (self:sys_stats_disk_stat) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.read_time_ms <- x +let[@inline] sys_stats_disk_stat_set_write_sectors (self:sys_stats_disk_stat) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.write_sectors <- x +let[@inline] sys_stats_disk_stat_set_write_time_ms (self:sys_stats_disk_stat) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.write_time_ms <- x +let[@inline] sys_stats_disk_stat_set_discard_sectors (self:sys_stats_disk_stat) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.discard_sectors <- x +let[@inline] sys_stats_disk_stat_set_discard_time_ms (self:sys_stats_disk_stat) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.discard_time_ms <- x +let[@inline] sys_stats_disk_stat_set_flush_count (self:sys_stats_disk_stat) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.flush_count <- x +let[@inline] sys_stats_disk_stat_set_flush_time_ms (self:sys_stats_disk_stat) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 8); self.flush_time_ms <- x + +let copy_sys_stats_disk_stat (self:sys_stats_disk_stat) : sys_stats_disk_stat = + { self with device_name = self.device_name } + +let make_sys_stats_disk_stat + ?(device_name:string option) + ?(read_sectors:int64 option) + ?(read_time_ms:int64 option) + ?(write_sectors:int64 option) + ?(write_time_ms:int64 option) + ?(discard_sectors:int64 option) + ?(discard_time_ms:int64 option) + ?(flush_count:int64 option) + ?(flush_time_ms:int64 option) + () : sys_stats_disk_stat = + let _res = default_sys_stats_disk_stat () in + (match device_name with + | None -> () + | Some v -> sys_stats_disk_stat_set_device_name _res v); + (match read_sectors with + | None -> () + | Some v -> sys_stats_disk_stat_set_read_sectors _res v); + (match read_time_ms with + | None -> () + | Some v -> sys_stats_disk_stat_set_read_time_ms _res v); + (match write_sectors with + | None -> () + | Some v -> sys_stats_disk_stat_set_write_sectors _res v); + (match write_time_ms with + | None -> () + | Some v -> sys_stats_disk_stat_set_write_time_ms _res v); + (match discard_sectors with + | None -> () + | Some v -> sys_stats_disk_stat_set_discard_sectors _res v); + (match discard_time_ms with + | None -> () + | Some v -> sys_stats_disk_stat_set_discard_time_ms _res v); + (match flush_count with + | None -> () + | Some v -> sys_stats_disk_stat_set_flush_count _res v); + (match flush_time_ms with + | None -> () + | Some v -> sys_stats_disk_stat_set_flush_time_ms _res v); + _res + +let[@inline] sys_stats_psi_sample_has_resource (self:sys_stats_psi_sample) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_psi_sample_has_total_ns (self:sys_stats_psi_sample) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] sys_stats_psi_sample_set_resource (self:sys_stats_psi_sample) (x:sys_stats_psi_sample_psi_resource) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.resource <- x +let[@inline] sys_stats_psi_sample_set_total_ns (self:sys_stats_psi_sample) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.total_ns <- x + +let copy_sys_stats_psi_sample (self:sys_stats_psi_sample) : sys_stats_psi_sample = + { self with resource = self.resource } + +let make_sys_stats_psi_sample + ?(resource:sys_stats_psi_sample_psi_resource option) + ?(total_ns:int64 option) + () : sys_stats_psi_sample = + let _res = default_sys_stats_psi_sample () in + (match resource with + | None -> () + | Some v -> sys_stats_psi_sample_set_resource _res v); + (match total_ns with + | None -> () + | Some v -> sys_stats_psi_sample_set_total_ns _res v); + _res + +let[@inline] sys_stats_thermal_zone_has_name (self:sys_stats_thermal_zone) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_thermal_zone_has_temp (self:sys_stats_thermal_zone) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] sys_stats_thermal_zone_has_type_ (self:sys_stats_thermal_zone) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] sys_stats_thermal_zone_set_name (self:sys_stats_thermal_zone) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.name <- x +let[@inline] sys_stats_thermal_zone_set_temp (self:sys_stats_thermal_zone) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.temp <- x +let[@inline] sys_stats_thermal_zone_set_type_ (self:sys_stats_thermal_zone) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.type_ <- x + +let copy_sys_stats_thermal_zone (self:sys_stats_thermal_zone) : sys_stats_thermal_zone = + { self with name = self.name } + +let make_sys_stats_thermal_zone + ?(name:string option) + ?(temp:int64 option) + ?(type_:string option) + () : sys_stats_thermal_zone = + let _res = default_sys_stats_thermal_zone () in + (match name with + | None -> () + | Some v -> sys_stats_thermal_zone_set_name _res v); + (match temp with + | None -> () + | Some v -> sys_stats_thermal_zone_set_temp _res v); + (match type_ with + | None -> () + | Some v -> sys_stats_thermal_zone_set_type_ _res v); + _res + +let[@inline] sys_stats_cpu_idle_state_entry_has_state (self:sys_stats_cpu_idle_state_entry) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_cpu_idle_state_entry_has_duration_us (self:sys_stats_cpu_idle_state_entry) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] sys_stats_cpu_idle_state_entry_set_state (self:sys_stats_cpu_idle_state_entry) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.state <- x +let[@inline] sys_stats_cpu_idle_state_entry_set_duration_us (self:sys_stats_cpu_idle_state_entry) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.duration_us <- x + +let copy_sys_stats_cpu_idle_state_entry (self:sys_stats_cpu_idle_state_entry) : sys_stats_cpu_idle_state_entry = + { self with state = self.state } + +let make_sys_stats_cpu_idle_state_entry + ?(state:string option) + ?(duration_us:int64 option) + () : sys_stats_cpu_idle_state_entry = + let _res = default_sys_stats_cpu_idle_state_entry () in + (match state with + | None -> () + | Some v -> sys_stats_cpu_idle_state_entry_set_state _res v); + (match duration_us with + | None -> () + | Some v -> sys_stats_cpu_idle_state_entry_set_duration_us _res v); + _res + +let[@inline] sys_stats_cpu_idle_state_has_cpu_id (self:sys_stats_cpu_idle_state) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] sys_stats_cpu_idle_state_set_cpu_id (self:sys_stats_cpu_idle_state) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.cpu_id <- x +let[@inline] sys_stats_cpu_idle_state_set_cpuidle_state_entry (self:sys_stats_cpu_idle_state) (x:sys_stats_cpu_idle_state_entry list) : unit = + self.cpuidle_state_entry <- x + +let copy_sys_stats_cpu_idle_state (self:sys_stats_cpu_idle_state) : sys_stats_cpu_idle_state = + { self with cpu_id = self.cpu_id } + +let make_sys_stats_cpu_idle_state + ?(cpu_id:int32 option) + ?(cpuidle_state_entry=[]) + () : sys_stats_cpu_idle_state = + let _res = default_sys_stats_cpu_idle_state () in + (match cpu_id with + | None -> () + | Some v -> sys_stats_cpu_idle_state_set_cpu_id _res v); + sys_stats_cpu_idle_state_set_cpuidle_state_entry _res cpuidle_state_entry; + _res + +let[@inline] sys_stats_has_num_forks (self:sys_stats) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] sys_stats_has_num_irq_total (self:sys_stats) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] sys_stats_has_num_softirq_total (self:sys_stats) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] sys_stats_has_collection_end_timestamp (self:sys_stats) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] sys_stats_set_meminfo (self:sys_stats) (x:sys_stats_meminfo_value list) : unit = + self.meminfo <- x +let[@inline] sys_stats_set_vmstat (self:sys_stats) (x:sys_stats_vmstat_value list) : unit = + self.vmstat <- x +let[@inline] sys_stats_set_cpu_stat (self:sys_stats) (x:sys_stats_cpu_times list) : unit = + self.cpu_stat <- x +let[@inline] sys_stats_set_num_forks (self:sys_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.num_forks <- x +let[@inline] sys_stats_set_num_irq_total (self:sys_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.num_irq_total <- x +let[@inline] sys_stats_set_num_irq (self:sys_stats) (x:sys_stats_interrupt_count list) : unit = + self.num_irq <- x +let[@inline] sys_stats_set_num_softirq_total (self:sys_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.num_softirq_total <- x +let[@inline] sys_stats_set_num_softirq (self:sys_stats) (x:sys_stats_interrupt_count list) : unit = + self.num_softirq <- x +let[@inline] sys_stats_set_collection_end_timestamp (self:sys_stats) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.collection_end_timestamp <- x +let[@inline] sys_stats_set_devfreq (self:sys_stats) (x:sys_stats_devfreq_value list) : unit = + self.devfreq <- x +let[@inline] sys_stats_set_cpufreq_khz (self:sys_stats) (x:int32 list) : unit = + self.cpufreq_khz <- x +let[@inline] sys_stats_set_buddy_info (self:sys_stats) (x:sys_stats_buddy_info list) : unit = + self.buddy_info <- x +let[@inline] sys_stats_set_disk_stat (self:sys_stats) (x:sys_stats_disk_stat list) : unit = + self.disk_stat <- x +let[@inline] sys_stats_set_psi (self:sys_stats) (x:sys_stats_psi_sample list) : unit = + self.psi <- x +let[@inline] sys_stats_set_thermal_zone (self:sys_stats) (x:sys_stats_thermal_zone list) : unit = + self.thermal_zone <- x +let[@inline] sys_stats_set_cpuidle_state (self:sys_stats) (x:sys_stats_cpu_idle_state list) : unit = + self.cpuidle_state <- x +let[@inline] sys_stats_set_gpufreq_mhz (self:sys_stats) (x:int64 list) : unit = + self.gpufreq_mhz <- x + +let copy_sys_stats (self:sys_stats) : sys_stats = + { self with meminfo = self.meminfo } + +let make_sys_stats + ?(meminfo=[]) + ?(vmstat=[]) + ?(cpu_stat=[]) + ?(num_forks:int64 option) + ?(num_irq_total:int64 option) + ?(num_irq=[]) + ?(num_softirq_total:int64 option) + ?(num_softirq=[]) + ?(collection_end_timestamp:int64 option) + ?(devfreq=[]) + ?(cpufreq_khz=[]) + ?(buddy_info=[]) + ?(disk_stat=[]) + ?(psi=[]) + ?(thermal_zone=[]) + ?(cpuidle_state=[]) + ?(gpufreq_mhz=[]) + () : sys_stats = + let _res = default_sys_stats () in + sys_stats_set_meminfo _res meminfo; + sys_stats_set_vmstat _res vmstat; + sys_stats_set_cpu_stat _res cpu_stat; + (match num_forks with + | None -> () + | Some v -> sys_stats_set_num_forks _res v); + (match num_irq_total with + | None -> () + | Some v -> sys_stats_set_num_irq_total _res v); + sys_stats_set_num_irq _res num_irq; + (match num_softirq_total with + | None -> () + | Some v -> sys_stats_set_num_softirq_total _res v); + sys_stats_set_num_softirq _res num_softirq; + (match collection_end_timestamp with + | None -> () + | Some v -> sys_stats_set_collection_end_timestamp _res v); + sys_stats_set_devfreq _res devfreq; + sys_stats_set_cpufreq_khz _res cpufreq_khz; + sys_stats_set_buddy_info _res buddy_info; + sys_stats_set_disk_stat _res disk_stat; + sys_stats_set_psi _res psi; + sys_stats_set_thermal_zone _res thermal_zone; + sys_stats_set_cpuidle_state _res cpuidle_state; + sys_stats_set_gpufreq_mhz _res gpufreq_mhz; + _res + +let[@inline] cpu_info_arm_cpu_identifier_has_implementer (self:cpu_info_arm_cpu_identifier) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] cpu_info_arm_cpu_identifier_has_architecture (self:cpu_info_arm_cpu_identifier) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] cpu_info_arm_cpu_identifier_has_variant (self:cpu_info_arm_cpu_identifier) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] cpu_info_arm_cpu_identifier_has_part (self:cpu_info_arm_cpu_identifier) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] cpu_info_arm_cpu_identifier_has_revision (self:cpu_info_arm_cpu_identifier) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] cpu_info_arm_cpu_identifier_set_implementer (self:cpu_info_arm_cpu_identifier) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.implementer <- x +let[@inline] cpu_info_arm_cpu_identifier_set_architecture (self:cpu_info_arm_cpu_identifier) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.architecture <- x +let[@inline] cpu_info_arm_cpu_identifier_set_variant (self:cpu_info_arm_cpu_identifier) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.variant <- x +let[@inline] cpu_info_arm_cpu_identifier_set_part (self:cpu_info_arm_cpu_identifier) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.part <- x +let[@inline] cpu_info_arm_cpu_identifier_set_revision (self:cpu_info_arm_cpu_identifier) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.revision <- x + +let copy_cpu_info_arm_cpu_identifier (self:cpu_info_arm_cpu_identifier) : cpu_info_arm_cpu_identifier = + { self with implementer = self.implementer } + +let make_cpu_info_arm_cpu_identifier + ?(implementer:int32 option) + ?(architecture:int32 option) + ?(variant:int32 option) + ?(part:int32 option) + ?(revision:int32 option) + () : cpu_info_arm_cpu_identifier = + let _res = default_cpu_info_arm_cpu_identifier () in + (match implementer with + | None -> () + | Some v -> cpu_info_arm_cpu_identifier_set_implementer _res v); + (match architecture with + | None -> () + | Some v -> cpu_info_arm_cpu_identifier_set_architecture _res v); + (match variant with + | None -> () + | Some v -> cpu_info_arm_cpu_identifier_set_variant _res v); + (match part with + | None -> () + | Some v -> cpu_info_arm_cpu_identifier_set_part _res v); + (match revision with + | None -> () + | Some v -> cpu_info_arm_cpu_identifier_set_revision _res v); + _res + +let[@inline] cpu_info_cpu_has_processor (self:cpu_info_cpu) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] cpu_info_cpu_has_capacity (self:cpu_info_cpu) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] cpu_info_cpu_has_features (self:cpu_info_cpu) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] cpu_info_cpu_set_processor (self:cpu_info_cpu) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.processor <- x +let[@inline] cpu_info_cpu_set_frequencies (self:cpu_info_cpu) (x:int32 list) : unit = + self.frequencies <- x +let[@inline] cpu_info_cpu_set_capacity (self:cpu_info_cpu) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.capacity <- x +let[@inline] cpu_info_cpu_set_identifier (self:cpu_info_cpu) (x:cpu_info_cpu_identifier) : unit = + self.identifier <- Some x +let[@inline] cpu_info_cpu_set_features (self:cpu_info_cpu) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.features <- x + +let copy_cpu_info_cpu (self:cpu_info_cpu) : cpu_info_cpu = + { self with processor = self.processor } + +let make_cpu_info_cpu + ?(processor:string option) + ?(frequencies=[]) + ?(capacity:int32 option) + ?(identifier:cpu_info_cpu_identifier option) + ?(features:int64 option) + () : cpu_info_cpu = + let _res = default_cpu_info_cpu () in + (match processor with + | None -> () + | Some v -> cpu_info_cpu_set_processor _res v); + cpu_info_cpu_set_frequencies _res frequencies; + (match capacity with + | None -> () + | Some v -> cpu_info_cpu_set_capacity _res v); + (match identifier with + | None -> () + | Some v -> cpu_info_cpu_set_identifier _res v); + (match features with + | None -> () + | Some v -> cpu_info_cpu_set_features _res v); + _res + + +let[@inline] cpu_info_set_cpus (self:cpu_info) (x:cpu_info_cpu list) : unit = + self.cpus <- x + +let copy_cpu_info (self:cpu_info) : cpu_info = + { self with cpus = self.cpus } + +let make_cpu_info + ?(cpus=[]) + () : cpu_info = + let _res = default_cpu_info () in + cpu_info_set_cpus _res cpus; + _res + +let[@inline] test_event_test_payload_has_single_string (self:test_event_test_payload) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] test_event_test_payload_has_single_int (self:test_event_test_payload) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] test_event_test_payload_has_remaining_nesting_depth (self:test_event_test_payload) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] test_event_test_payload_set_str (self:test_event_test_payload) (x:string list) : unit = + self.str <- x +let[@inline] test_event_test_payload_set_nested (self:test_event_test_payload) (x:test_event_test_payload list) : unit = + self.nested <- x +let[@inline] test_event_test_payload_set_single_string (self:test_event_test_payload) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.single_string <- x +let[@inline] test_event_test_payload_set_single_int (self:test_event_test_payload) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.single_int <- x +let[@inline] test_event_test_payload_set_repeated_ints (self:test_event_test_payload) (x:int32 list) : unit = + self.repeated_ints <- x +let[@inline] test_event_test_payload_set_remaining_nesting_depth (self:test_event_test_payload) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.remaining_nesting_depth <- x +let[@inline] test_event_test_payload_set_debug_annotations (self:test_event_test_payload) (x:debug_annotation list) : unit = + self.debug_annotations <- x + +let copy_test_event_test_payload (self:test_event_test_payload) : test_event_test_payload = + { self with str = self.str } + +let make_test_event_test_payload + ?(str=[]) + ?(nested=[]) + ?(single_string:string option) + ?(single_int:int32 option) + ?(repeated_ints=[]) + ?(remaining_nesting_depth:int32 option) + ?(debug_annotations=[]) + () : test_event_test_payload = + let _res = default_test_event_test_payload () in + test_event_test_payload_set_str _res str; + test_event_test_payload_set_nested _res nested; + (match single_string with + | None -> () + | Some v -> test_event_test_payload_set_single_string _res v); + (match single_int with + | None -> () + | Some v -> test_event_test_payload_set_single_int _res v); + test_event_test_payload_set_repeated_ints _res repeated_ints; + (match remaining_nesting_depth with + | None -> () + | Some v -> test_event_test_payload_set_remaining_nesting_depth _res v); + test_event_test_payload_set_debug_annotations _res debug_annotations; + _res + +let[@inline] test_event_has_str (self:test_event) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] test_event_has_seq_value (self:test_event) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] test_event_has_counter (self:test_event) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] test_event_has_is_last (self:test_event) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] test_event_set_str (self:test_event) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.str <- x +let[@inline] test_event_set_seq_value (self:test_event) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.seq_value <- x +let[@inline] test_event_set_counter (self:test_event) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.counter <- x +let[@inline] test_event_set_is_last (self:test_event) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.is_last <- x +let[@inline] test_event_set_payload (self:test_event) (x:test_event_test_payload) : unit = + self.payload <- Some x + +let copy_test_event (self:test_event) : test_event = + { self with str = self.str } + +let make_test_event + ?(str:string option) + ?(seq_value:int32 option) + ?(counter:int64 option) + ?(is_last:bool option) + ?(payload:test_event_test_payload option) + () : test_event = + let _res = default_test_event () in + (match str with + | None -> () + | Some v -> test_event_set_str _res v); + (match seq_value with + | None -> () + | Some v -> test_event_set_seq_value _res v); + (match counter with + | None -> () + | Some v -> test_event_set_counter _res v); + (match is_last with + | None -> () + | Some v -> test_event_set_is_last _res v); + (match payload with + | None -> () + | Some v -> test_event_set_payload _res v); + _res + +let[@inline] trace_packet_defaults_has_timestamp_clock_id (self:trace_packet_defaults) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] trace_packet_defaults_set_timestamp_clock_id (self:trace_packet_defaults) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.timestamp_clock_id <- x +let[@inline] trace_packet_defaults_set_track_event_defaults (self:trace_packet_defaults) (x:track_event_defaults) : unit = + self.track_event_defaults <- Some x +let[@inline] trace_packet_defaults_set_v8_code_defaults (self:trace_packet_defaults) (x:v8_code_defaults) : unit = + self.v8_code_defaults <- Some x + +let copy_trace_packet_defaults (self:trace_packet_defaults) : trace_packet_defaults = + { self with timestamp_clock_id = self.timestamp_clock_id } + +let make_trace_packet_defaults + ?(timestamp_clock_id:int32 option) + ?(track_event_defaults:track_event_defaults option) + ?(v8_code_defaults:v8_code_defaults option) + () : trace_packet_defaults = + let _res = default_trace_packet_defaults () in + (match timestamp_clock_id with + | None -> () + | Some v -> trace_packet_defaults_set_timestamp_clock_id _res v); + (match track_event_defaults with + | None -> () + | Some v -> trace_packet_defaults_set_track_event_defaults _res v); + (match v8_code_defaults with + | None -> () + | Some v -> trace_packet_defaults_set_v8_code_defaults _res v); + _res + +let[@inline] trace_uuid_has_msb (self:trace_uuid) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_uuid_has_lsb (self:trace_uuid) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] trace_uuid_set_msb (self:trace_uuid) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.msb <- x +let[@inline] trace_uuid_set_lsb (self:trace_uuid) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.lsb <- x + +let copy_trace_uuid (self:trace_uuid) : trace_uuid = + { self with msb = self.msb } + +let make_trace_uuid + ?(msb:int64 option) + ?(lsb:int64 option) + () : trace_uuid = + let _res = default_trace_uuid () in + (match msb with + | None -> () + | Some v -> trace_uuid_set_msb _res v); + (match lsb with + | None -> () + | Some v -> trace_uuid_set_lsb _res v); + _res + +let[@inline] process_descriptor_has_pid (self:process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] process_descriptor_has_process_name (self:process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] process_descriptor_has_process_priority (self:process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] process_descriptor_has_start_timestamp_ns (self:process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] process_descriptor_has_chrome_process_type (self:process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] process_descriptor_has_legacy_sort_index (self:process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] process_descriptor_set_pid (self:process_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] process_descriptor_set_cmdline (self:process_descriptor) (x:string list) : unit = + self.cmdline <- x +let[@inline] process_descriptor_set_process_name (self:process_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.process_name <- x +let[@inline] process_descriptor_set_process_priority (self:process_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.process_priority <- x +let[@inline] process_descriptor_set_start_timestamp_ns (self:process_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.start_timestamp_ns <- x +let[@inline] process_descriptor_set_chrome_process_type (self:process_descriptor) (x:process_descriptor_chrome_process_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.chrome_process_type <- x +let[@inline] process_descriptor_set_legacy_sort_index (self:process_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.legacy_sort_index <- x +let[@inline] process_descriptor_set_process_labels (self:process_descriptor) (x:string list) : unit = + self.process_labels <- x + +let copy_process_descriptor (self:process_descriptor) : process_descriptor = + { self with pid = self.pid } + +let make_process_descriptor + ?(pid:int32 option) + ?(cmdline=[]) + ?(process_name:string option) + ?(process_priority:int32 option) + ?(start_timestamp_ns:int64 option) + ?(chrome_process_type:process_descriptor_chrome_process_type option) + ?(legacy_sort_index:int32 option) + ?(process_labels=[]) + () : process_descriptor = + let _res = default_process_descriptor () in + (match pid with + | None -> () + | Some v -> process_descriptor_set_pid _res v); + process_descriptor_set_cmdline _res cmdline; + (match process_name with + | None -> () + | Some v -> process_descriptor_set_process_name _res v); + (match process_priority with + | None -> () + | Some v -> process_descriptor_set_process_priority _res v); + (match start_timestamp_ns with + | None -> () + | Some v -> process_descriptor_set_start_timestamp_ns _res v); + (match chrome_process_type with + | None -> () + | Some v -> process_descriptor_set_chrome_process_type _res v); + (match legacy_sort_index with + | None -> () + | Some v -> process_descriptor_set_legacy_sort_index _res v); + process_descriptor_set_process_labels _res process_labels; + _res + +let[@inline] track_event_range_of_interest_has_start_us (self:track_event_range_of_interest) : bool = (Pbrt.Bitfield.get self._presence 0) + +let[@inline] track_event_range_of_interest_set_start_us (self:track_event_range_of_interest) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.start_us <- x + +let copy_track_event_range_of_interest (self:track_event_range_of_interest) : track_event_range_of_interest = + { self with start_us = self.start_us } + +let make_track_event_range_of_interest + ?(start_us:int64 option) + () : track_event_range_of_interest = + let _res = default_track_event_range_of_interest () in + (match start_us with + | None -> () + | Some v -> track_event_range_of_interest_set_start_us _res v); + _res + +let[@inline] thread_descriptor_has_pid (self:thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] thread_descriptor_has_tid (self:thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] thread_descriptor_has_thread_name (self:thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] thread_descriptor_has_chrome_thread_type (self:thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] thread_descriptor_has_reference_timestamp_us (self:thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] thread_descriptor_has_reference_thread_time_us (self:thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] thread_descriptor_has_reference_thread_instruction_count (self:thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] thread_descriptor_has_legacy_sort_index (self:thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] thread_descriptor_set_pid (self:thread_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.pid <- x +let[@inline] thread_descriptor_set_tid (self:thread_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.tid <- x +let[@inline] thread_descriptor_set_thread_name (self:thread_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.thread_name <- x +let[@inline] thread_descriptor_set_chrome_thread_type (self:thread_descriptor) (x:thread_descriptor_chrome_thread_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.chrome_thread_type <- x +let[@inline] thread_descriptor_set_reference_timestamp_us (self:thread_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.reference_timestamp_us <- x +let[@inline] thread_descriptor_set_reference_thread_time_us (self:thread_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.reference_thread_time_us <- x +let[@inline] thread_descriptor_set_reference_thread_instruction_count (self:thread_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.reference_thread_instruction_count <- x +let[@inline] thread_descriptor_set_legacy_sort_index (self:thread_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.legacy_sort_index <- x + +let copy_thread_descriptor (self:thread_descriptor) : thread_descriptor = + { self with pid = self.pid } + +let make_thread_descriptor + ?(pid:int32 option) + ?(tid:int32 option) + ?(thread_name:string option) + ?(chrome_thread_type:thread_descriptor_chrome_thread_type option) + ?(reference_timestamp_us:int64 option) + ?(reference_thread_time_us:int64 option) + ?(reference_thread_instruction_count:int64 option) + ?(legacy_sort_index:int32 option) + () : thread_descriptor = + let _res = default_thread_descriptor () in + (match pid with + | None -> () + | Some v -> thread_descriptor_set_pid _res v); + (match tid with + | None -> () + | Some v -> thread_descriptor_set_tid _res v); + (match thread_name with + | None -> () + | Some v -> thread_descriptor_set_thread_name _res v); + (match chrome_thread_type with + | None -> () + | Some v -> thread_descriptor_set_chrome_thread_type _res v); + (match reference_timestamp_us with + | None -> () + | Some v -> thread_descriptor_set_reference_timestamp_us _res v); + (match reference_thread_time_us with + | None -> () + | Some v -> thread_descriptor_set_reference_thread_time_us _res v); + (match reference_thread_instruction_count with + | None -> () + | Some v -> thread_descriptor_set_reference_thread_instruction_count _res v); + (match legacy_sort_index with + | None -> () + | Some v -> thread_descriptor_set_legacy_sort_index _res v); + _res + +let[@inline] chrome_process_descriptor_has_process_type (self:chrome_process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_process_descriptor_has_process_priority (self:chrome_process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_process_descriptor_has_legacy_sort_index (self:chrome_process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] chrome_process_descriptor_has_host_app_package_name (self:chrome_process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] chrome_process_descriptor_has_crash_trace_id (self:chrome_process_descriptor) : bool = (Pbrt.Bitfield.get self._presence 4) + +let[@inline] chrome_process_descriptor_set_process_type (self:chrome_process_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.process_type <- x +let[@inline] chrome_process_descriptor_set_process_priority (self:chrome_process_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.process_priority <- x +let[@inline] chrome_process_descriptor_set_legacy_sort_index (self:chrome_process_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.legacy_sort_index <- x +let[@inline] chrome_process_descriptor_set_host_app_package_name (self:chrome_process_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.host_app_package_name <- x +let[@inline] chrome_process_descriptor_set_crash_trace_id (self:chrome_process_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.crash_trace_id <- x + +let copy_chrome_process_descriptor (self:chrome_process_descriptor) : chrome_process_descriptor = + { self with process_type = self.process_type } + +let make_chrome_process_descriptor + ?(process_type:int32 option) + ?(process_priority:int32 option) + ?(legacy_sort_index:int32 option) + ?(host_app_package_name:string option) + ?(crash_trace_id:int64 option) + () : chrome_process_descriptor = + let _res = default_chrome_process_descriptor () in + (match process_type with + | None -> () + | Some v -> chrome_process_descriptor_set_process_type _res v); + (match process_priority with + | None -> () + | Some v -> chrome_process_descriptor_set_process_priority _res v); + (match legacy_sort_index with + | None -> () + | Some v -> chrome_process_descriptor_set_legacy_sort_index _res v); + (match host_app_package_name with + | None -> () + | Some v -> chrome_process_descriptor_set_host_app_package_name _res v); + (match crash_trace_id with + | None -> () + | Some v -> chrome_process_descriptor_set_crash_trace_id _res v); + _res + +let[@inline] chrome_thread_descriptor_has_thread_type (self:chrome_thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] chrome_thread_descriptor_has_legacy_sort_index (self:chrome_thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] chrome_thread_descriptor_has_is_sandboxed_tid (self:chrome_thread_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) + +let[@inline] chrome_thread_descriptor_set_thread_type (self:chrome_thread_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.thread_type <- x +let[@inline] chrome_thread_descriptor_set_legacy_sort_index (self:chrome_thread_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.legacy_sort_index <- x +let[@inline] chrome_thread_descriptor_set_is_sandboxed_tid (self:chrome_thread_descriptor) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.is_sandboxed_tid <- x + +let copy_chrome_thread_descriptor (self:chrome_thread_descriptor) : chrome_thread_descriptor = + { self with thread_type = self.thread_type } + +let make_chrome_thread_descriptor + ?(thread_type:int32 option) + ?(legacy_sort_index:int32 option) + ?(is_sandboxed_tid:bool option) + () : chrome_thread_descriptor = + let _res = default_chrome_thread_descriptor () in + (match thread_type with + | None -> () + | Some v -> chrome_thread_descriptor_set_thread_type _res v); + (match legacy_sort_index with + | None -> () + | Some v -> chrome_thread_descriptor_set_legacy_sort_index _res v); + (match is_sandboxed_tid with + | None -> () + | Some v -> chrome_thread_descriptor_set_is_sandboxed_tid _res v); + _res + +let[@inline] counter_descriptor_has_type_ (self:counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] counter_descriptor_has_unit_ (self:counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] counter_descriptor_has_unit_name (self:counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] counter_descriptor_has_unit_multiplier (self:counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] counter_descriptor_has_is_incremental (self:counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] counter_descriptor_has_y_axis_share_key (self:counter_descriptor) : bool = (Pbrt.Bitfield.get self._presence 5) + +let[@inline] counter_descriptor_set_type_ (self:counter_descriptor) (x:counter_descriptor_builtin_counter_type) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.type_ <- x +let[@inline] counter_descriptor_set_categories (self:counter_descriptor) (x:string list) : unit = + self.categories <- x +let[@inline] counter_descriptor_set_unit_ (self:counter_descriptor) (x:counter_descriptor_unit) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.unit_ <- x +let[@inline] counter_descriptor_set_unit_name (self:counter_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.unit_name <- x +let[@inline] counter_descriptor_set_unit_multiplier (self:counter_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.unit_multiplier <- x +let[@inline] counter_descriptor_set_is_incremental (self:counter_descriptor) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.is_incremental <- x +let[@inline] counter_descriptor_set_y_axis_share_key (self:counter_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.y_axis_share_key <- x + +let copy_counter_descriptor (self:counter_descriptor) : counter_descriptor = + { self with type_ = self.type_ } + +let make_counter_descriptor + ?(type_:counter_descriptor_builtin_counter_type option) + ?(categories=[]) + ?(unit_:counter_descriptor_unit option) + ?(unit_name:string option) + ?(unit_multiplier:int64 option) + ?(is_incremental:bool option) + ?(y_axis_share_key:string option) + () : counter_descriptor = + let _res = default_counter_descriptor () in + (match type_ with + | None -> () + | Some v -> counter_descriptor_set_type_ _res v); + counter_descriptor_set_categories _res categories; + (match unit_ with + | None -> () + | Some v -> counter_descriptor_set_unit_ _res v); + (match unit_name with + | None -> () + | Some v -> counter_descriptor_set_unit_name _res v); + (match unit_multiplier with + | None -> () + | Some v -> counter_descriptor_set_unit_multiplier _res v); + (match is_incremental with + | None -> () + | Some v -> counter_descriptor_set_is_incremental _res v); + (match y_axis_share_key with + | None -> () + | Some v -> counter_descriptor_set_y_axis_share_key _res v); + _res + +let[@inline] track_descriptor_has_uuid (self:track_descriptor) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] track_descriptor_has_parent_uuid (self:track_descriptor) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] track_descriptor_has_description (self:track_descriptor) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] track_descriptor_has_disallow_merging_with_system_tracks (self:track_descriptor) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] track_descriptor_has_child_ordering (self:track_descriptor) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] track_descriptor_has_sibling_order_rank (self:track_descriptor) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] track_descriptor_has_sibling_merge_behavior (self:track_descriptor) : bool = (Pbrt.Bitfield.get self._presence 6) + +let[@inline] track_descriptor_set_uuid (self:track_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.uuid <- x +let[@inline] track_descriptor_set_parent_uuid (self:track_descriptor) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.parent_uuid <- x +let[@inline] track_descriptor_set_static_or_dynamic_name (self:track_descriptor) (x:track_descriptor_static_or_dynamic_name) : unit = + self.static_or_dynamic_name <- Some x +let[@inline] track_descriptor_set_description (self:track_descriptor) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.description <- x +let[@inline] track_descriptor_set_process (self:track_descriptor) (x:process_descriptor) : unit = + self.process <- Some x +let[@inline] track_descriptor_set_chrome_process (self:track_descriptor) (x:chrome_process_descriptor) : unit = + self.chrome_process <- Some x +let[@inline] track_descriptor_set_thread (self:track_descriptor) (x:thread_descriptor) : unit = + self.thread <- Some x +let[@inline] track_descriptor_set_chrome_thread (self:track_descriptor) (x:chrome_thread_descriptor) : unit = + self.chrome_thread <- Some x +let[@inline] track_descriptor_set_counter (self:track_descriptor) (x:counter_descriptor) : unit = + self.counter <- Some x +let[@inline] track_descriptor_set_disallow_merging_with_system_tracks (self:track_descriptor) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.disallow_merging_with_system_tracks <- x +let[@inline] track_descriptor_set_child_ordering (self:track_descriptor) (x:track_descriptor_child_tracks_ordering) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.child_ordering <- x +let[@inline] track_descriptor_set_sibling_order_rank (self:track_descriptor) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.sibling_order_rank <- x +let[@inline] track_descriptor_set_sibling_merge_behavior (self:track_descriptor) (x:track_descriptor_sibling_merge_behavior) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.sibling_merge_behavior <- x +let[@inline] track_descriptor_set_sibling_merge_key_field (self:track_descriptor) (x:track_descriptor_sibling_merge_key_field) : unit = + self.sibling_merge_key_field <- Some x + +let copy_track_descriptor (self:track_descriptor) : track_descriptor = + { self with uuid = self.uuid } + +let make_track_descriptor + ?(uuid:int64 option) + ?(parent_uuid:int64 option) + ?(static_or_dynamic_name:track_descriptor_static_or_dynamic_name option) + ?(description:string option) + ?(process:process_descriptor option) + ?(chrome_process:chrome_process_descriptor option) + ?(thread:thread_descriptor option) + ?(chrome_thread:chrome_thread_descriptor option) + ?(counter:counter_descriptor option) + ?(disallow_merging_with_system_tracks:bool option) + ?(child_ordering:track_descriptor_child_tracks_ordering option) + ?(sibling_order_rank:int32 option) + ?(sibling_merge_behavior:track_descriptor_sibling_merge_behavior option) + ?(sibling_merge_key_field:track_descriptor_sibling_merge_key_field option) + () : track_descriptor = + let _res = default_track_descriptor () in + (match uuid with + | None -> () + | Some v -> track_descriptor_set_uuid _res v); + (match parent_uuid with + | None -> () + | Some v -> track_descriptor_set_parent_uuid _res v); + (match static_or_dynamic_name with + | None -> () + | Some v -> track_descriptor_set_static_or_dynamic_name _res v); + (match description with + | None -> () + | Some v -> track_descriptor_set_description _res v); + (match process with + | None -> () + | Some v -> track_descriptor_set_process _res v); + (match chrome_process with + | None -> () + | Some v -> track_descriptor_set_chrome_process _res v); + (match thread with + | None -> () + | Some v -> track_descriptor_set_thread _res v); + (match chrome_thread with + | None -> () + | Some v -> track_descriptor_set_chrome_thread _res v); + (match counter with + | None -> () + | Some v -> track_descriptor_set_counter _res v); + (match disallow_merging_with_system_tracks with + | None -> () + | Some v -> track_descriptor_set_disallow_merging_with_system_tracks _res v); + (match child_ordering with + | None -> () + | Some v -> track_descriptor_set_child_ordering _res v); + (match sibling_order_rank with + | None -> () + | Some v -> track_descriptor_set_sibling_order_rank _res v); + (match sibling_merge_behavior with + | None -> () + | Some v -> track_descriptor_set_sibling_merge_behavior _res v); + (match sibling_merge_key_field with + | None -> () + | Some v -> track_descriptor_set_sibling_merge_key_field _res v); + _res + + +let[@inline] chrome_historgram_translation_table_set_hash_to_name (self:chrome_historgram_translation_table) (x:(int64 * string) list) : unit = + self.hash_to_name <- x + +let copy_chrome_historgram_translation_table (self:chrome_historgram_translation_table) : chrome_historgram_translation_table = + { self with hash_to_name = self.hash_to_name } + +let make_chrome_historgram_translation_table + ?(hash_to_name=[]) + () : chrome_historgram_translation_table = + let _res = default_chrome_historgram_translation_table () in + chrome_historgram_translation_table_set_hash_to_name _res hash_to_name; + _res + + +let[@inline] chrome_user_event_translation_table_set_action_hash_to_name (self:chrome_user_event_translation_table) (x:(int64 * string) list) : unit = + self.action_hash_to_name <- x + +let copy_chrome_user_event_translation_table (self:chrome_user_event_translation_table) : chrome_user_event_translation_table = + { self with action_hash_to_name = self.action_hash_to_name } + +let make_chrome_user_event_translation_table + ?(action_hash_to_name=[]) + () : chrome_user_event_translation_table = + let _res = default_chrome_user_event_translation_table () in + chrome_user_event_translation_table_set_action_hash_to_name _res action_hash_to_name; + _res + + +let[@inline] chrome_performance_mark_translation_table_set_site_hash_to_name (self:chrome_performance_mark_translation_table) (x:(int32 * string) list) : unit = + self.site_hash_to_name <- x +let[@inline] chrome_performance_mark_translation_table_set_mark_hash_to_name (self:chrome_performance_mark_translation_table) (x:(int32 * string) list) : unit = + self.mark_hash_to_name <- x + +let copy_chrome_performance_mark_translation_table (self:chrome_performance_mark_translation_table) : chrome_performance_mark_translation_table = + { self with site_hash_to_name = self.site_hash_to_name } + +let make_chrome_performance_mark_translation_table + ?(site_hash_to_name=[]) + ?(mark_hash_to_name=[]) + () : chrome_performance_mark_translation_table = + let _res = default_chrome_performance_mark_translation_table () in + chrome_performance_mark_translation_table_set_site_hash_to_name _res site_hash_to_name; + chrome_performance_mark_translation_table_set_mark_hash_to_name _res mark_hash_to_name; + _res + + +let[@inline] slice_name_translation_table_set_raw_to_deobfuscated_name (self:slice_name_translation_table) (x:(string * string) list) : unit = + self.raw_to_deobfuscated_name <- x + +let copy_slice_name_translation_table (self:slice_name_translation_table) : slice_name_translation_table = + { self with raw_to_deobfuscated_name = self.raw_to_deobfuscated_name } + +let make_slice_name_translation_table + ?(raw_to_deobfuscated_name=[]) + () : slice_name_translation_table = + let _res = default_slice_name_translation_table () in + slice_name_translation_table_set_raw_to_deobfuscated_name _res raw_to_deobfuscated_name; + _res + + +let[@inline] process_track_name_translation_table_set_raw_to_deobfuscated_name (self:process_track_name_translation_table) (x:(string * string) list) : unit = + self.raw_to_deobfuscated_name <- x + +let copy_process_track_name_translation_table (self:process_track_name_translation_table) : process_track_name_translation_table = + { self with raw_to_deobfuscated_name = self.raw_to_deobfuscated_name } + +let make_process_track_name_translation_table + ?(raw_to_deobfuscated_name=[]) + () : process_track_name_translation_table = + let _res = default_process_track_name_translation_table () in + process_track_name_translation_table_set_raw_to_deobfuscated_name _res raw_to_deobfuscated_name; + _res + + +let[@inline] chrome_study_translation_table_set_hash_to_name (self:chrome_study_translation_table) (x:(int64 * string) list) : unit = + self.hash_to_name <- x + +let copy_chrome_study_translation_table (self:chrome_study_translation_table) : chrome_study_translation_table = + { self with hash_to_name = self.hash_to_name } + +let make_chrome_study_translation_table + ?(hash_to_name=[]) + () : chrome_study_translation_table = + let _res = default_chrome_study_translation_table () in + chrome_study_translation_table_set_hash_to_name _res hash_to_name; + _res + +let[@inline] trigger_has_trigger_name (self:trigger) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trigger_has_producer_name (self:trigger) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trigger_has_trusted_producer_uid (self:trigger) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trigger_has_stop_delay_ms (self:trigger) : bool = (Pbrt.Bitfield.get self._presence 3) + +let[@inline] trigger_set_trigger_name (self:trigger) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.trigger_name <- x +let[@inline] trigger_set_producer_name (self:trigger) (x:string) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.producer_name <- x +let[@inline] trigger_set_trusted_producer_uid (self:trigger) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.trusted_producer_uid <- x +let[@inline] trigger_set_stop_delay_ms (self:trigger) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.stop_delay_ms <- x + +let copy_trigger (self:trigger) : trigger = + { self with trigger_name = self.trigger_name } + +let make_trigger + ?(trigger_name:string option) + ?(producer_name:string option) + ?(trusted_producer_uid:int32 option) + ?(stop_delay_ms:int64 option) + () : trigger = + let _res = default_trigger () in + (match trigger_name with + | None -> () + | Some v -> trigger_set_trigger_name _res v); + (match producer_name with + | None -> () + | Some v -> trigger_set_producer_name _res v); + (match trusted_producer_uid with + | None -> () + | Some v -> trigger_set_trusted_producer_uid _res v); + (match stop_delay_ms with + | None -> () + | Some v -> trigger_set_stop_delay_ms _res v); + _res + +let[@inline] ui_state_has_timeline_start_ts (self:ui_state) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] ui_state_has_timeline_end_ts (self:ui_state) : bool = (Pbrt.Bitfield.get self._presence 1) + +let[@inline] ui_state_set_timeline_start_ts (self:ui_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.timeline_start_ts <- x +let[@inline] ui_state_set_timeline_end_ts (self:ui_state) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.timeline_end_ts <- x +let[@inline] ui_state_set_highlight_process (self:ui_state) (x:ui_state_highlight_process) : unit = + self.highlight_process <- Some x + +let copy_ui_state (self:ui_state) : ui_state = + { self with timeline_start_ts = self.timeline_start_ts } + +let make_ui_state + ?(timeline_start_ts:int64 option) + ?(timeline_end_ts:int64 option) + ?(highlight_process:ui_state_highlight_process option) + () : ui_state = + let _res = default_ui_state () in + (match timeline_start_ts with + | None -> () + | Some v -> ui_state_set_timeline_start_ts _res v); + (match timeline_end_ts with + | None -> () + | Some v -> ui_state_set_timeline_end_ts _res v); + (match highlight_process with + | None -> () + | Some v -> ui_state_set_highlight_process _res v); + _res + +let[@inline] trace_packet_has_timestamp (self:trace_packet) : bool = (Pbrt.Bitfield.get self._presence 0) +let[@inline] trace_packet_has_timestamp_clock_id (self:trace_packet) : bool = (Pbrt.Bitfield.get self._presence 1) +let[@inline] trace_packet_has_trusted_pid (self:trace_packet) : bool = (Pbrt.Bitfield.get self._presence 2) +let[@inline] trace_packet_has_sequence_flags (self:trace_packet) : bool = (Pbrt.Bitfield.get self._presence 3) +let[@inline] trace_packet_has_incremental_state_cleared (self:trace_packet) : bool = (Pbrt.Bitfield.get self._presence 4) +let[@inline] trace_packet_has_previous_packet_dropped (self:trace_packet) : bool = (Pbrt.Bitfield.get self._presence 5) +let[@inline] trace_packet_has_first_packet_on_sequence (self:trace_packet) : bool = (Pbrt.Bitfield.get self._presence 6) +let[@inline] trace_packet_has_machine_id (self:trace_packet) : bool = (Pbrt.Bitfield.get self._presence 7) + +let[@inline] trace_packet_set_timestamp (self:trace_packet) (x:int64) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 0); self.timestamp <- x +let[@inline] trace_packet_set_timestamp_clock_id (self:trace_packet) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 1); self.timestamp_clock_id <- x +let[@inline] trace_packet_set_data (self:trace_packet) (x:trace_packet_data) : unit = + self.data <- Some x +let[@inline] trace_packet_set_optional_trusted_uid (self:trace_packet) (x:trace_packet_optional_trusted_uid) : unit = + self.optional_trusted_uid <- Some x +let[@inline] trace_packet_set_optional_trusted_packet_sequence_id (self:trace_packet) (x:trace_packet_optional_trusted_packet_sequence_id) : unit = + self.optional_trusted_packet_sequence_id <- Some x +let[@inline] trace_packet_set_trusted_pid (self:trace_packet) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 2); self.trusted_pid <- x +let[@inline] trace_packet_set_interned_data (self:trace_packet) (x:interned_data) : unit = + self.interned_data <- Some x +let[@inline] trace_packet_set_sequence_flags (self:trace_packet) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 3); self.sequence_flags <- x +let[@inline] trace_packet_set_incremental_state_cleared (self:trace_packet) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 4); self.incremental_state_cleared <- x +let[@inline] trace_packet_set_trace_packet_defaults (self:trace_packet) (x:trace_packet_defaults) : unit = + self.trace_packet_defaults <- Some x +let[@inline] trace_packet_set_previous_packet_dropped (self:trace_packet) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 5); self.previous_packet_dropped <- x +let[@inline] trace_packet_set_first_packet_on_sequence (self:trace_packet) (x:bool) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 6); self.first_packet_on_sequence <- x +let[@inline] trace_packet_set_machine_id (self:trace_packet) (x:int32) : unit = + self._presence <- (Pbrt.Bitfield.set self._presence 7); self.machine_id <- x + +let copy_trace_packet (self:trace_packet) : trace_packet = + { self with timestamp = self.timestamp } + +let make_trace_packet + ?(timestamp:int64 option) + ?(timestamp_clock_id:int32 option) + ?(data:trace_packet_data option) + ?(optional_trusted_uid:trace_packet_optional_trusted_uid option) + ?(optional_trusted_packet_sequence_id:trace_packet_optional_trusted_packet_sequence_id option) + ?(trusted_pid:int32 option) + ?(interned_data:interned_data option) + ?(sequence_flags:int32 option) + ?(incremental_state_cleared:bool option) + ?(trace_packet_defaults:trace_packet_defaults option) + ?(previous_packet_dropped:bool option) + ?(first_packet_on_sequence:bool option) + ?(machine_id:int32 option) + () : trace_packet = + let _res = default_trace_packet () in + (match timestamp with + | None -> () + | Some v -> trace_packet_set_timestamp _res v); + (match timestamp_clock_id with + | None -> () + | Some v -> trace_packet_set_timestamp_clock_id _res v); + (match data with + | None -> () + | Some v -> trace_packet_set_data _res v); + (match optional_trusted_uid with + | None -> () + | Some v -> trace_packet_set_optional_trusted_uid _res v); + (match optional_trusted_packet_sequence_id with + | None -> () + | Some v -> trace_packet_set_optional_trusted_packet_sequence_id _res v); + (match trusted_pid with + | None -> () + | Some v -> trace_packet_set_trusted_pid _res v); + (match interned_data with + | None -> () + | Some v -> trace_packet_set_interned_data _res v); + (match sequence_flags with + | None -> () + | Some v -> trace_packet_set_sequence_flags _res v); + (match incremental_state_cleared with + | None -> () + | Some v -> trace_packet_set_incremental_state_cleared _res v); + (match trace_packet_defaults with + | None -> () + | Some v -> trace_packet_set_trace_packet_defaults _res v); + (match previous_packet_dropped with + | None -> () + | Some v -> trace_packet_set_previous_packet_dropped _res v); + (match first_packet_on_sequence with + | None -> () + | Some v -> trace_packet_set_first_packet_on_sequence _res v); + (match machine_id with + | None -> () + | Some v -> trace_packet_set_machine_id _res v); + _res + + +let[@inline] trace_set_packet (self:trace) (x:trace_packet list) : unit = + self.packet <- x + +let copy_trace (self:trace) : trace = + { self with packet = self.packet } + +let make_trace + ?(packet=[]) + () : trace = + let _res = default_trace () in + trace_set_packet _res packet; + _res + +[@@@ocaml.warning "-23-27-30-39"] + +(** {2 Formatters} *) + +let rec pp_ftrace_descriptor_atrace_category fmt (v:ftrace_descriptor_atrace_category) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (ftrace_descriptor_atrace_category_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "description" Pbrt.Pp.pp_string fmt v.description; + if not (ftrace_descriptor_atrace_category_has_description v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ftrace_descriptor fmt (v:ftrace_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "atrace_categories" (Pbrt.Pp.pp_list pp_ftrace_descriptor_atrace_category) fmt v.atrace_categories; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_counter_descriptor_gpu_counter_group fmt (v:gpu_counter_descriptor_gpu_counter_group) = + match v with + | Unclassified -> Format.fprintf fmt "Unclassified" + | System -> Format.fprintf fmt "System" + | Vertices -> Format.fprintf fmt "Vertices" + | Fragments -> Format.fprintf fmt "Fragments" + | Primitives -> Format.fprintf fmt "Primitives" + | Memory -> Format.fprintf fmt "Memory" + | Compute -> Format.fprintf fmt "Compute" + | Ray_tracing -> Format.fprintf fmt "Ray_tracing" + +let rec pp_gpu_counter_descriptor_measure_unit fmt (v:gpu_counter_descriptor_measure_unit) = + match v with + | None -> Format.fprintf fmt "None" + | Bit -> Format.fprintf fmt "Bit" + | Kilobit -> Format.fprintf fmt "Kilobit" + | Megabit -> Format.fprintf fmt "Megabit" + | Gigabit -> Format.fprintf fmt "Gigabit" + | Terabit -> Format.fprintf fmt "Terabit" + | Petabit -> Format.fprintf fmt "Petabit" + | Byte -> Format.fprintf fmt "Byte" + | Kilobyte -> Format.fprintf fmt "Kilobyte" + | Megabyte -> Format.fprintf fmt "Megabyte" + | Gigabyte -> Format.fprintf fmt "Gigabyte" + | Terabyte -> Format.fprintf fmt "Terabyte" + | Petabyte -> Format.fprintf fmt "Petabyte" + | Hertz -> Format.fprintf fmt "Hertz" + | Kilohertz -> Format.fprintf fmt "Kilohertz" + | Megahertz -> Format.fprintf fmt "Megahertz" + | Gigahertz -> Format.fprintf fmt "Gigahertz" + | Terahertz -> Format.fprintf fmt "Terahertz" + | Petahertz -> Format.fprintf fmt "Petahertz" + | Nanosecond -> Format.fprintf fmt "Nanosecond" + | Microsecond -> Format.fprintf fmt "Microsecond" + | Millisecond -> Format.fprintf fmt "Millisecond" + | Second -> Format.fprintf fmt "Second" + | Minute -> Format.fprintf fmt "Minute" + | Hour -> Format.fprintf fmt "Hour" + | Vertex -> Format.fprintf fmt "Vertex" + | Pixel -> Format.fprintf fmt "Pixel" + | Triangle -> Format.fprintf fmt "Triangle" + | Primitive -> Format.fprintf fmt "Primitive" + | Fragment -> Format.fprintf fmt "Fragment" + | Milliwatt -> Format.fprintf fmt "Milliwatt" + | Watt -> Format.fprintf fmt "Watt" + | Kilowatt -> Format.fprintf fmt "Kilowatt" + | Joule -> Format.fprintf fmt "Joule" + | Volt -> Format.fprintf fmt "Volt" + | Ampere -> Format.fprintf fmt "Ampere" + | Celsius -> Format.fprintf fmt "Celsius" + | Fahrenheit -> Format.fprintf fmt "Fahrenheit" + | Kelvin -> Format.fprintf fmt "Kelvin" + | Percent -> Format.fprintf fmt "Percent" + | Instruction -> Format.fprintf fmt "Instruction" + +let rec pp_gpu_counter_descriptor_gpu_counter_spec_peak_value fmt (v:gpu_counter_descriptor_gpu_counter_spec_peak_value) = + match v with + | Int_peak_value x -> Format.fprintf fmt "@[Int_peak_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Double_peak_value x -> Format.fprintf fmt "@[Double_peak_value(@,%a)@]" Pbrt.Pp.pp_float x + +and pp_gpu_counter_descriptor_gpu_counter_spec fmt (v:gpu_counter_descriptor_gpu_counter_spec) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "counter_id" Pbrt.Pp.pp_int32 fmt v.counter_id; + if not (gpu_counter_descriptor_gpu_counter_spec_has_counter_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (gpu_counter_descriptor_gpu_counter_spec_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "description" Pbrt.Pp.pp_string fmt v.description; + if not (gpu_counter_descriptor_gpu_counter_spec_has_description v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "peak_value" (Pbrt.Pp.pp_option pp_gpu_counter_descriptor_gpu_counter_spec_peak_value) fmt v.peak_value; + Pbrt.Pp.pp_record_field ~first:false "numerator_units" (Pbrt.Pp.pp_list pp_gpu_counter_descriptor_measure_unit) fmt v.numerator_units; + Pbrt.Pp.pp_record_field ~first:false "denominator_units" (Pbrt.Pp.pp_list pp_gpu_counter_descriptor_measure_unit) fmt v.denominator_units; + Pbrt.Pp.pp_record_field ~first:false "select_by_default" Pbrt.Pp.pp_bool fmt v.select_by_default; + if not (gpu_counter_descriptor_gpu_counter_spec_has_select_by_default v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "groups" (Pbrt.Pp.pp_list pp_gpu_counter_descriptor_gpu_counter_group) fmt v.groups; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_counter_descriptor_gpu_counter_block fmt (v:gpu_counter_descriptor_gpu_counter_block) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "block_id" Pbrt.Pp.pp_int32 fmt v.block_id; + if not (gpu_counter_descriptor_gpu_counter_block_has_block_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "block_capacity" Pbrt.Pp.pp_int32 fmt v.block_capacity; + if not (gpu_counter_descriptor_gpu_counter_block_has_block_capacity v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (gpu_counter_descriptor_gpu_counter_block_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "description" Pbrt.Pp.pp_string fmt v.description; + if not (gpu_counter_descriptor_gpu_counter_block_has_description v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "counter_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.counter_ids; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_counter_descriptor fmt (v:gpu_counter_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "specs" (Pbrt.Pp.pp_list pp_gpu_counter_descriptor_gpu_counter_spec) fmt v.specs; + Pbrt.Pp.pp_record_field ~first:false "blocks" (Pbrt.Pp.pp_list pp_gpu_counter_descriptor_gpu_counter_block) fmt v.blocks; + Pbrt.Pp.pp_record_field ~first:false "min_sampling_period_ns" Pbrt.Pp.pp_int64 fmt v.min_sampling_period_ns; + if not (gpu_counter_descriptor_has_min_sampling_period_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_sampling_period_ns" Pbrt.Pp.pp_int64 fmt v.max_sampling_period_ns; + if not (gpu_counter_descriptor_has_max_sampling_period_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "supports_instrumented_sampling" Pbrt.Pp.pp_bool fmt v.supports_instrumented_sampling; + if not (gpu_counter_descriptor_has_supports_instrumented_sampling v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_category fmt (v:track_event_category) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (track_event_category_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "description" Pbrt.Pp.pp_string fmt v.description; + if not (track_event_category_has_description v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tags" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.tags; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_descriptor fmt (v:track_event_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "available_categories" (Pbrt.Pp.pp_list pp_track_event_category) fmt v.available_categories; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_data_source_descriptor fmt (v:data_source_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (data_source_descriptor_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "id" Pbrt.Pp.pp_int64 fmt v.id; + if not (data_source_descriptor_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "will_notify_on_stop" Pbrt.Pp.pp_bool fmt v.will_notify_on_stop; + if not (data_source_descriptor_has_will_notify_on_stop v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "will_notify_on_start" Pbrt.Pp.pp_bool fmt v.will_notify_on_start; + if not (data_source_descriptor_has_will_notify_on_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "handles_incremental_state_clear" Pbrt.Pp.pp_bool fmt v.handles_incremental_state_clear; + if not (data_source_descriptor_has_handles_incremental_state_clear v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "no_flush" Pbrt.Pp.pp_bool fmt v.no_flush; + if not (data_source_descriptor_has_no_flush v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "gpu_counter_descriptor" (Pbrt.Pp.pp_option pp_gpu_counter_descriptor) fmt v.gpu_counter_descriptor; + Pbrt.Pp.pp_record_field ~first:false "track_event_descriptor" (Pbrt.Pp.pp_option pp_track_event_descriptor) fmt v.track_event_descriptor; + Pbrt.Pp.pp_record_field ~first:false "ftrace_descriptor" (Pbrt.Pp.pp_option pp_ftrace_descriptor) fmt v.ftrace_descriptor; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_tracing_service_state_producer fmt (v:tracing_service_state_producer) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int32 fmt v.id; + if not (tracing_service_state_producer_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (tracing_service_state_producer_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (tracing_service_state_producer_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uid" Pbrt.Pp.pp_int32 fmt v.uid; + if not (tracing_service_state_producer_has_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "sdk_version" Pbrt.Pp.pp_string fmt v.sdk_version; + if not (tracing_service_state_producer_has_sdk_version v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frozen" Pbrt.Pp.pp_bool fmt v.frozen; + if not (tracing_service_state_producer_has_frozen v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_tracing_service_state_data_source fmt (v:tracing_service_state_data_source) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "ds_descriptor" (Pbrt.Pp.pp_option pp_data_source_descriptor) fmt v.ds_descriptor; + Pbrt.Pp.pp_record_field ~first:false "producer_id" Pbrt.Pp.pp_int32 fmt v.producer_id; + if not (tracing_service_state_data_source_has_producer_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_tracing_service_state_tracing_session fmt (v:tracing_service_state_tracing_session) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int64 fmt v.id; + if not (tracing_service_state_tracing_session_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "consumer_uid" Pbrt.Pp.pp_int32 fmt v.consumer_uid; + if not (tracing_service_state_tracing_session_has_consumer_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "state" Pbrt.Pp.pp_string fmt v.state; + if not (tracing_service_state_tracing_session_has_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "unique_session_name" Pbrt.Pp.pp_string fmt v.unique_session_name; + if not (tracing_service_state_tracing_session_has_unique_session_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer_size_kb" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.buffer_size_kb; + Pbrt.Pp.pp_record_field ~first:false "duration_ms" Pbrt.Pp.pp_int32 fmt v.duration_ms; + if not (tracing_service_state_tracing_session_has_duration_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_data_sources" Pbrt.Pp.pp_int32 fmt v.num_data_sources; + if not (tracing_service_state_tracing_session_has_num_data_sources v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start_realtime_ns" Pbrt.Pp.pp_int64 fmt v.start_realtime_ns; + if not (tracing_service_state_tracing_session_has_start_realtime_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bugreport_score" Pbrt.Pp.pp_int32 fmt v.bugreport_score; + if not (tracing_service_state_tracing_session_has_bugreport_score v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bugreport_filename" Pbrt.Pp.pp_string fmt v.bugreport_filename; + if not (tracing_service_state_tracing_session_has_bugreport_filename v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_started" Pbrt.Pp.pp_bool fmt v.is_started; + if not (tracing_service_state_tracing_session_has_is_started v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_tracing_service_state fmt (v:tracing_service_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "producers" (Pbrt.Pp.pp_list pp_tracing_service_state_producer) fmt v.producers; + Pbrt.Pp.pp_record_field ~first:false "data_sources" (Pbrt.Pp.pp_list pp_tracing_service_state_data_source) fmt v.data_sources; + Pbrt.Pp.pp_record_field ~first:false "tracing_sessions" (Pbrt.Pp.pp_list pp_tracing_service_state_tracing_session) fmt v.tracing_sessions; + Pbrt.Pp.pp_record_field ~first:false "supports_tracing_sessions" Pbrt.Pp.pp_bool fmt v.supports_tracing_sessions; + if not (tracing_service_state_has_supports_tracing_sessions v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_sessions" Pbrt.Pp.pp_int32 fmt v.num_sessions; + if not (tracing_service_state_has_num_sessions v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_sessions_started" Pbrt.Pp.pp_int32 fmt v.num_sessions_started; + if not (tracing_service_state_has_num_sessions_started v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tracing_service_version" Pbrt.Pp.pp_string fmt v.tracing_service_version; + if not (tracing_service_state_has_tracing_service_version v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_builtin_clock fmt (v:builtin_clock) = + match v with + | Builtin_clock_unknown -> Format.fprintf fmt "Builtin_clock_unknown" + | Builtin_clock_realtime -> Format.fprintf fmt "Builtin_clock_realtime" + | Builtin_clock_realtime_coarse -> Format.fprintf fmt "Builtin_clock_realtime_coarse" + | Builtin_clock_monotonic -> Format.fprintf fmt "Builtin_clock_monotonic" + | Builtin_clock_monotonic_coarse -> Format.fprintf fmt "Builtin_clock_monotonic_coarse" + | Builtin_clock_monotonic_raw -> Format.fprintf fmt "Builtin_clock_monotonic_raw" + | Builtin_clock_boottime -> Format.fprintf fmt "Builtin_clock_boottime" + | Builtin_clock_tsc -> Format.fprintf fmt "Builtin_clock_tsc" + | Builtin_clock_perf -> Format.fprintf fmt "Builtin_clock_perf" + | Builtin_clock_max_id -> Format.fprintf fmt "Builtin_clock_max_id" + +let rec pp_android_game_intervention_list_config fmt (v:android_game_intervention_list_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "package_name_filter" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.package_name_filter; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_input_event_config_trace_mode fmt (v:android_input_event_config_trace_mode) = + match v with + | Trace_mode_trace_all -> Format.fprintf fmt "Trace_mode_trace_all" + | Trace_mode_use_rules -> Format.fprintf fmt "Trace_mode_use_rules" + +let rec pp_android_input_event_config_trace_level fmt (v:android_input_event_config_trace_level) = + match v with + | Trace_level_none -> Format.fprintf fmt "Trace_level_none" + | Trace_level_redacted -> Format.fprintf fmt "Trace_level_redacted" + | Trace_level_complete -> Format.fprintf fmt "Trace_level_complete" + +let rec pp_android_input_event_config_trace_rule fmt (v:android_input_event_config_trace_rule) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "trace_level" pp_android_input_event_config_trace_level fmt v.trace_level; + if not (android_input_event_config_trace_rule_has_trace_level v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "match_all_packages" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.match_all_packages; + Pbrt.Pp.pp_record_field ~first:false "match_any_packages" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.match_any_packages; + Pbrt.Pp.pp_record_field ~first:false "match_secure" Pbrt.Pp.pp_bool fmt v.match_secure; + if not (android_input_event_config_trace_rule_has_match_secure v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "match_ime_connection_active" Pbrt.Pp.pp_bool fmt v.match_ime_connection_active; + if not (android_input_event_config_trace_rule_has_match_ime_connection_active v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_input_event_config fmt (v:android_input_event_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "mode" pp_android_input_event_config_trace_mode fmt v.mode; + if not (android_input_event_config_has_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rules" (Pbrt.Pp.pp_list pp_android_input_event_config_trace_rule) fmt v.rules; + Pbrt.Pp.pp_record_field ~first:false "trace_dispatcher_input_events" Pbrt.Pp.pp_bool fmt v.trace_dispatcher_input_events; + if not (android_input_event_config_has_trace_dispatcher_input_events v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_dispatcher_window_dispatch" Pbrt.Pp.pp_bool fmt v.trace_dispatcher_window_dispatch; + if not (android_input_event_config_has_trace_dispatcher_window_dispatch v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_log_id fmt (v:android_log_id) = + match v with + | Lid_default -> Format.fprintf fmt "Lid_default" + | Lid_radio -> Format.fprintf fmt "Lid_radio" + | Lid_events -> Format.fprintf fmt "Lid_events" + | Lid_system -> Format.fprintf fmt "Lid_system" + | Lid_crash -> Format.fprintf fmt "Lid_crash" + | Lid_stats -> Format.fprintf fmt "Lid_stats" + | Lid_security -> Format.fprintf fmt "Lid_security" + | Lid_kernel -> Format.fprintf fmt "Lid_kernel" + +let rec pp_android_log_priority fmt (v:android_log_priority) = + match v with + | Prio_unspecified -> Format.fprintf fmt "Prio_unspecified" + | Prio_unused -> Format.fprintf fmt "Prio_unused" + | Prio_verbose -> Format.fprintf fmt "Prio_verbose" + | Prio_debug -> Format.fprintf fmt "Prio_debug" + | Prio_info -> Format.fprintf fmt "Prio_info" + | Prio_warn -> Format.fprintf fmt "Prio_warn" + | Prio_error -> Format.fprintf fmt "Prio_error" + | Prio_fatal -> Format.fprintf fmt "Prio_fatal" + +let rec pp_android_log_config fmt (v:android_log_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "log_ids" (Pbrt.Pp.pp_list pp_android_log_id) fmt v.log_ids; + Pbrt.Pp.pp_record_field ~first:false "min_prio" pp_android_log_priority fmt v.min_prio; + if not (android_log_config_has_min_prio v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "filter_tags" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.filter_tags; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_polled_state_config fmt (v:android_polled_state_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "poll_ms" Pbrt.Pp.pp_int32 fmt v.poll_ms; + if not (android_polled_state_config_has_poll_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_sdk_sysprop_guard_config fmt (v:android_sdk_sysprop_guard_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "surfaceflinger_skia_track_events" Pbrt.Pp.pp_bool fmt v.surfaceflinger_skia_track_events; + if not (android_sdk_sysprop_guard_config_has_surfaceflinger_skia_track_events v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "hwui_skia_track_events" Pbrt.Pp.pp_bool fmt v.hwui_skia_track_events; + if not (android_sdk_sysprop_guard_config_has_hwui_skia_track_events v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "hwui_package_name_filter" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.hwui_package_name_filter; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_system_property_config fmt (v:android_system_property_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "poll_ms" Pbrt.Pp.pp_int32 fmt v.poll_ms; + if not (android_system_property_config_has_poll_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "property_name" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.property_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_app_wakelocks_config fmt (v:app_wakelocks_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "write_delay_ms" Pbrt.Pp.pp_int32 fmt v.write_delay_ms; + if not (app_wakelocks_config_has_write_delay_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "filter_duration_below_ms" Pbrt.Pp.pp_int32 fmt v.filter_duration_below_ms; + if not (app_wakelocks_config_has_filter_duration_below_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "drop_owner_pid" Pbrt.Pp.pp_bool fmt v.drop_owner_pid; + if not (app_wakelocks_config_has_drop_owner_pid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_cpu_per_uid_config fmt (v:cpu_per_uid_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "poll_ms" Pbrt.Pp.pp_int32 fmt v.poll_ms; + if not (cpu_per_uid_config_has_poll_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_kernel_wakelocks_config fmt (v:kernel_wakelocks_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "poll_ms" Pbrt.Pp.pp_int32 fmt v.poll_ms; + if not (kernel_wakelocks_config_has_poll_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_network_packet_trace_config fmt (v:network_packet_trace_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "poll_ms" Pbrt.Pp.pp_int32 fmt v.poll_ms; + if not (network_packet_trace_config_has_poll_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "aggregation_threshold" Pbrt.Pp.pp_int32 fmt v.aggregation_threshold; + if not (network_packet_trace_config_has_aggregation_threshold v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "intern_limit" Pbrt.Pp.pp_int32 fmt v.intern_limit; + if not (network_packet_trace_config_has_intern_limit v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "drop_local_port" Pbrt.Pp.pp_bool fmt v.drop_local_port; + if not (network_packet_trace_config_has_drop_local_port v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "drop_remote_port" Pbrt.Pp.pp_bool fmt v.drop_remote_port; + if not (network_packet_trace_config_has_drop_remote_port v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "drop_tcp_flags" Pbrt.Pp.pp_bool fmt v.drop_tcp_flags; + if not (network_packet_trace_config_has_drop_tcp_flags v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_packages_list_config fmt (v:packages_list_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "package_name_filter" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.package_name_filter; + Pbrt.Pp.pp_record_field ~first:false "only_write_on_cpu_use_every_ms" Pbrt.Pp.pp_int32 fmt v.only_write_on_cpu_use_every_ms; + if not (packages_list_config_has_only_write_on_cpu_use_every_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_pixel_modem_config_event_group fmt (v:pixel_modem_config_event_group) = + match v with + | Event_group_unknown -> Format.fprintf fmt "Event_group_unknown" + | Event_group_low_bandwidth -> Format.fprintf fmt "Event_group_low_bandwidth" + | Event_group_high_and_low_bandwidth -> Format.fprintf fmt "Event_group_high_and_low_bandwidth" + +let rec pp_pixel_modem_config fmt (v:pixel_modem_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "event_group" pp_pixel_modem_config_event_group fmt v.event_group; + if not (pixel_modem_config_has_event_group v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pigweed_hash_allow_list" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.pigweed_hash_allow_list; + Pbrt.Pp.pp_record_field ~first:false "pigweed_hash_deny_list" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.pigweed_hash_deny_list; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_proto_log_level fmt (v:proto_log_level) = + match v with + | Protolog_level_undefined -> Format.fprintf fmt "Protolog_level_undefined" + | Protolog_level_debug -> Format.fprintf fmt "Protolog_level_debug" + | Protolog_level_verbose -> Format.fprintf fmt "Protolog_level_verbose" + | Protolog_level_info -> Format.fprintf fmt "Protolog_level_info" + | Protolog_level_warn -> Format.fprintf fmt "Protolog_level_warn" + | Protolog_level_error -> Format.fprintf fmt "Protolog_level_error" + | Protolog_level_wtf -> Format.fprintf fmt "Protolog_level_wtf" + +let rec pp_proto_log_config_tracing_mode fmt (v:proto_log_config_tracing_mode) = + match v with + | Default -> Format.fprintf fmt "Default" + | Enable_all -> Format.fprintf fmt "Enable_all" + +let rec pp_proto_log_group fmt (v:proto_log_group) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "group_name" Pbrt.Pp.pp_string fmt v.group_name; + if not (proto_log_group_has_group_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "log_from" pp_proto_log_level fmt v.log_from; + if not (proto_log_group_has_log_from v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "collect_stacktrace" Pbrt.Pp.pp_bool fmt v.collect_stacktrace; + if not (proto_log_group_has_collect_stacktrace v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_proto_log_config fmt (v:proto_log_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "group_overrides" (Pbrt.Pp.pp_list pp_proto_log_group) fmt v.group_overrides; + Pbrt.Pp.pp_record_field ~first:false "tracing_mode" pp_proto_log_config_tracing_mode fmt v.tracing_mode; + if not (proto_log_config_has_tracing_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "default_log_from_level" pp_proto_log_level fmt v.default_log_from_level; + if not (proto_log_config_has_default_log_from_level v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_surface_flinger_layers_config_mode fmt (v:surface_flinger_layers_config_mode) = + match v with + | Mode_unspecified -> Format.fprintf fmt "Mode_unspecified" + | Mode_active -> Format.fprintf fmt "Mode_active" + | Mode_generated -> Format.fprintf fmt "Mode_generated" + | Mode_dump -> Format.fprintf fmt "Mode_dump" + | Mode_generated_bugreport_only -> Format.fprintf fmt "Mode_generated_bugreport_only" + +let rec pp_surface_flinger_layers_config_trace_flag fmt (v:surface_flinger_layers_config_trace_flag) = + match v with + | Trace_flag_unspecified -> Format.fprintf fmt "Trace_flag_unspecified" + | Trace_flag_input -> Format.fprintf fmt "Trace_flag_input" + | Trace_flag_composition -> Format.fprintf fmt "Trace_flag_composition" + | Trace_flag_extra -> Format.fprintf fmt "Trace_flag_extra" + | Trace_flag_hwc -> Format.fprintf fmt "Trace_flag_hwc" + | Trace_flag_buffers -> Format.fprintf fmt "Trace_flag_buffers" + | Trace_flag_virtual_displays -> Format.fprintf fmt "Trace_flag_virtual_displays" + | Trace_flag_all -> Format.fprintf fmt "Trace_flag_all" + +let rec pp_surface_flinger_layers_config fmt (v:surface_flinger_layers_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "mode" pp_surface_flinger_layers_config_mode fmt v.mode; + if not (surface_flinger_layers_config_has_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_flags" (Pbrt.Pp.pp_list pp_surface_flinger_layers_config_trace_flag) fmt v.trace_flags; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_surface_flinger_transactions_config_mode fmt (v:surface_flinger_transactions_config_mode) = + match v with + | Mode_unspecified -> Format.fprintf fmt "Mode_unspecified" + | Mode_continuous -> Format.fprintf fmt "Mode_continuous" + | Mode_active -> Format.fprintf fmt "Mode_active" + +let rec pp_surface_flinger_transactions_config fmt (v:surface_flinger_transactions_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "mode" pp_surface_flinger_transactions_config_mode fmt v.mode; + if not (surface_flinger_transactions_config_has_mode v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_window_manager_config_log_frequency fmt (v:window_manager_config_log_frequency) = + match v with + | Log_frequency_unspecified -> Format.fprintf fmt "Log_frequency_unspecified" + | Log_frequency_frame -> Format.fprintf fmt "Log_frequency_frame" + | Log_frequency_transaction -> Format.fprintf fmt "Log_frequency_transaction" + | Log_frequency_single_dump -> Format.fprintf fmt "Log_frequency_single_dump" + +let rec pp_window_manager_config_log_level fmt (v:window_manager_config_log_level) = + match v with + | Log_level_unspecified -> Format.fprintf fmt "Log_level_unspecified" + | Log_level_verbose -> Format.fprintf fmt "Log_level_verbose" + | Log_level_debug -> Format.fprintf fmt "Log_level_debug" + | Log_level_critical -> Format.fprintf fmt "Log_level_critical" + +let rec pp_window_manager_config fmt (v:window_manager_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "log_frequency" pp_window_manager_config_log_frequency fmt v.log_frequency; + if not (window_manager_config_has_log_frequency v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "log_level" pp_window_manager_config_log_level fmt v.log_level; + if not (window_manager_config_has_log_level v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_config_client_priority fmt (v:chrome_config_client_priority) = + match v with + | Unknown -> Format.fprintf fmt "Unknown" + | Background -> Format.fprintf fmt "Background" + | User_initiated -> Format.fprintf fmt "User_initiated" + +let rec pp_chrome_config fmt (v:chrome_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "trace_config" Pbrt.Pp.pp_string fmt v.trace_config; + if not (chrome_config_has_trace_config v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "privacy_filtering_enabled" Pbrt.Pp.pp_bool fmt v.privacy_filtering_enabled; + if not (chrome_config_has_privacy_filtering_enabled v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "convert_to_legacy_json" Pbrt.Pp.pp_bool fmt v.convert_to_legacy_json; + if not (chrome_config_has_convert_to_legacy_json v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "client_priority" pp_chrome_config_client_priority fmt v.client_priority; + if not (chrome_config_has_client_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "json_agent_label_filter" Pbrt.Pp.pp_string fmt v.json_agent_label_filter; + if not (chrome_config_has_json_agent_label_filter v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "event_package_name_filter_enabled" Pbrt.Pp.pp_bool fmt v.event_package_name_filter_enabled; + if not (chrome_config_has_event_package_name_filter_enabled v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chromium_histogram_samples_config_histogram_sample fmt (v:chromium_histogram_samples_config_histogram_sample) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "histogram_name" Pbrt.Pp.pp_string fmt v.histogram_name; + if not (chromium_histogram_samples_config_histogram_sample_has_histogram_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "min_value" Pbrt.Pp.pp_int64 fmt v.min_value; + if not (chromium_histogram_samples_config_histogram_sample_has_min_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_value" Pbrt.Pp.pp_int64 fmt v.max_value; + if not (chromium_histogram_samples_config_histogram_sample_has_max_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chromium_histogram_samples_config fmt (v:chromium_histogram_samples_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "histograms" (Pbrt.Pp.pp_list pp_chromium_histogram_samples_config_histogram_sample) fmt v.histograms; + Pbrt.Pp.pp_record_field ~first:false "filter_histogram_names" Pbrt.Pp.pp_bool fmt v.filter_histogram_names; + if not (chromium_histogram_samples_config_has_filter_histogram_names v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chromium_system_metrics_config fmt (v:chromium_system_metrics_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "sampling_interval_ms" Pbrt.Pp.pp_int32 fmt v.sampling_interval_ms; + if not (chromium_system_metrics_config_has_sampling_interval_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_v8_config fmt (v:v8_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "log_script_sources" Pbrt.Pp.pp_bool fmt v.log_script_sources; + if not (v8_config_has_log_script_sources v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "log_instructions" Pbrt.Pp.pp_bool fmt v.log_instructions; + if not (v8_config_has_log_instructions v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_etw_config_kernel_flag fmt (v:etw_config_kernel_flag) = + match v with + | Cswitch -> Format.fprintf fmt "Cswitch" + | Dispatcher -> Format.fprintf fmt "Dispatcher" + +let rec pp_etw_config fmt (v:etw_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "kernel_flags" (Pbrt.Pp.pp_list pp_etw_config_kernel_flag) fmt v.kernel_flags; + Pbrt.Pp.pp_record_field ~first:false "scheduler_provider_events" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.scheduler_provider_events; + Pbrt.Pp.pp_record_field ~first:false "memory_provider_events" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.memory_provider_events; + Pbrt.Pp.pp_record_field ~first:false "file_provider_events" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.file_provider_events; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_frozen_ftrace_config fmt (v:frozen_ftrace_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "instance_name" Pbrt.Pp.pp_string fmt v.instance_name; + if not (frozen_ftrace_config_has_instance_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ftrace_config_compact_sched_config fmt (v:ftrace_config_compact_sched_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "enabled" Pbrt.Pp.pp_bool fmt v.enabled; + if not (ftrace_config_compact_sched_config_has_enabled v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ftrace_config_print_filter_rule_atrace_message fmt (v:ftrace_config_print_filter_rule_atrace_message) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "type_" Pbrt.Pp.pp_string fmt v.type_; + if not (ftrace_config_print_filter_rule_atrace_message_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prefix" Pbrt.Pp.pp_string fmt v.prefix; + if not (ftrace_config_print_filter_rule_atrace_message_has_prefix v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ftrace_config_print_filter_rule_match fmt (v:ftrace_config_print_filter_rule_match) = + match v with + | Prefix x -> Format.fprintf fmt "@[Prefix(@,%a)@]" Pbrt.Pp.pp_string x + | Atrace_msg x -> Format.fprintf fmt "@[Atrace_msg(@,%a)@]" pp_ftrace_config_print_filter_rule_atrace_message x + +and pp_ftrace_config_print_filter_rule fmt (v:ftrace_config_print_filter_rule) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "match_" (Pbrt.Pp.pp_option pp_ftrace_config_print_filter_rule_match) fmt v.match_; + Pbrt.Pp.pp_record_field ~first:false "allow" Pbrt.Pp.pp_bool fmt v.allow; + if not (ftrace_config_print_filter_rule_has_allow v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ftrace_config_print_filter fmt (v:ftrace_config_print_filter) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "rules" (Pbrt.Pp.pp_list pp_ftrace_config_print_filter_rule) fmt v.rules; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ftrace_config_ksyms_mem_policy fmt (v:ftrace_config_ksyms_mem_policy) = + match v with + | Ksyms_unspecified -> Format.fprintf fmt "Ksyms_unspecified" + | Ksyms_cleanup_on_stop -> Format.fprintf fmt "Ksyms_cleanup_on_stop" + | Ksyms_retain -> Format.fprintf fmt "Ksyms_retain" + +let rec pp_ftrace_config_kprobe_event_kprobe_type fmt (v:ftrace_config_kprobe_event_kprobe_type) = + match v with + | Kprobe_type_unknown -> Format.fprintf fmt "Kprobe_type_unknown" + | Kprobe_type_kprobe -> Format.fprintf fmt "Kprobe_type_kprobe" + | Kprobe_type_kretprobe -> Format.fprintf fmt "Kprobe_type_kretprobe" + | Kprobe_type_both -> Format.fprintf fmt "Kprobe_type_both" + +let rec pp_ftrace_config_kprobe_event fmt (v:ftrace_config_kprobe_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "probe" Pbrt.Pp.pp_string fmt v.probe; + if not (ftrace_config_kprobe_event_has_probe v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" pp_ftrace_config_kprobe_event_kprobe_type fmt v.type_; + if not (ftrace_config_kprobe_event_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ftrace_config_tracefs_option_state fmt (v:ftrace_config_tracefs_option_state) = + match v with + | State_unknown -> Format.fprintf fmt "State_unknown" + | State_enabled -> Format.fprintf fmt "State_enabled" + | State_disabled -> Format.fprintf fmt "State_disabled" + +let rec pp_ftrace_config_tracefs_option fmt (v:ftrace_config_tracefs_option) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (ftrace_config_tracefs_option_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "state" pp_ftrace_config_tracefs_option_state fmt v.state; + if not (ftrace_config_tracefs_option_has_state v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ftrace_config fmt (v:ftrace_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "ftrace_events" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.ftrace_events; + Pbrt.Pp.pp_record_field ~first:false "atrace_categories" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.atrace_categories; + Pbrt.Pp.pp_record_field ~first:false "atrace_apps" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.atrace_apps; + Pbrt.Pp.pp_record_field ~first:false "atrace_categories_prefer_sdk" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.atrace_categories_prefer_sdk; + Pbrt.Pp.pp_record_field ~first:false "atrace_userspace_only" Pbrt.Pp.pp_bool fmt v.atrace_userspace_only; + if not (ftrace_config_has_atrace_userspace_only v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer_size_kb" Pbrt.Pp.pp_int32 fmt v.buffer_size_kb; + if not (ftrace_config_has_buffer_size_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer_size_lower_bound" Pbrt.Pp.pp_bool fmt v.buffer_size_lower_bound; + if not (ftrace_config_has_buffer_size_lower_bound v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "drain_period_ms" Pbrt.Pp.pp_int32 fmt v.drain_period_ms; + if not (ftrace_config_has_drain_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "drain_buffer_percent" Pbrt.Pp.pp_int32 fmt v.drain_buffer_percent; + if not (ftrace_config_has_drain_buffer_percent v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "compact_sched" (Pbrt.Pp.pp_option pp_ftrace_config_compact_sched_config) fmt v.compact_sched; + Pbrt.Pp.pp_record_field ~first:false "print_filter" (Pbrt.Pp.pp_option pp_ftrace_config_print_filter) fmt v.print_filter; + Pbrt.Pp.pp_record_field ~first:false "symbolize_ksyms" Pbrt.Pp.pp_bool fmt v.symbolize_ksyms; + if not (ftrace_config_has_symbolize_ksyms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ksyms_mem_policy" pp_ftrace_config_ksyms_mem_policy fmt v.ksyms_mem_policy; + if not (ftrace_config_has_ksyms_mem_policy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "throttle_rss_stat" Pbrt.Pp.pp_bool fmt v.throttle_rss_stat; + if not (ftrace_config_has_throttle_rss_stat v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "denser_generic_event_encoding" Pbrt.Pp.pp_bool fmt v.denser_generic_event_encoding; + if not (ftrace_config_has_denser_generic_event_encoding v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "disable_generic_events" Pbrt.Pp.pp_bool fmt v.disable_generic_events; + if not (ftrace_config_has_disable_generic_events v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "syscall_events" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.syscall_events; + Pbrt.Pp.pp_record_field ~first:false "enable_function_graph" Pbrt.Pp.pp_bool fmt v.enable_function_graph; + if not (ftrace_config_has_enable_function_graph v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "function_filters" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.function_filters; + Pbrt.Pp.pp_record_field ~first:false "function_graph_roots" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.function_graph_roots; + Pbrt.Pp.pp_record_field ~first:false "function_graph_max_depth" Pbrt.Pp.pp_int32 fmt v.function_graph_max_depth; + if not (ftrace_config_has_function_graph_max_depth v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "kprobe_events" (Pbrt.Pp.pp_list pp_ftrace_config_kprobe_event) fmt v.kprobe_events; + Pbrt.Pp.pp_record_field ~first:false "preserve_ftrace_buffer" Pbrt.Pp.pp_bool fmt v.preserve_ftrace_buffer; + if not (ftrace_config_has_preserve_ftrace_buffer v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "use_monotonic_raw_clock" Pbrt.Pp.pp_bool fmt v.use_monotonic_raw_clock; + if not (ftrace_config_has_use_monotonic_raw_clock v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instance_name" Pbrt.Pp.pp_string fmt v.instance_name; + if not (ftrace_config_has_instance_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "debug_ftrace_abi" Pbrt.Pp.pp_bool fmt v.debug_ftrace_abi; + if not (ftrace_config_has_debug_ftrace_abi v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tids_to_trace" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.tids_to_trace; + Pbrt.Pp.pp_record_field ~first:false "tracefs_options" (Pbrt.Pp.pp_list pp_ftrace_config_tracefs_option) fmt v.tracefs_options; + Pbrt.Pp.pp_record_field ~first:false "tracing_cpumask" Pbrt.Pp.pp_string fmt v.tracing_cpumask; + if not (ftrace_config_has_tracing_cpumask v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "initialize_ksyms_synchronously_for_testing" Pbrt.Pp.pp_bool fmt v.initialize_ksyms_synchronously_for_testing; + if not (ftrace_config_has_initialize_ksyms_synchronously_for_testing v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_counter_config fmt (v:gpu_counter_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "counter_period_ns" Pbrt.Pp.pp_int64 fmt v.counter_period_ns; + if not (gpu_counter_config_has_counter_period_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "counter_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.counter_ids; + Pbrt.Pp.pp_record_field ~first:false "instrumented_sampling" Pbrt.Pp.pp_bool fmt v.instrumented_sampling; + if not (gpu_counter_config_has_instrumented_sampling v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "fix_gpu_clock" Pbrt.Pp.pp_bool fmt v.fix_gpu_clock; + if not (gpu_counter_config_has_fix_gpu_clock v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_render_stages_config fmt (v:gpu_render_stages_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "full_loadstore" Pbrt.Pp.pp_bool fmt v.full_loadstore; + if not (gpu_render_stages_config_has_full_loadstore v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "low_overhead" Pbrt.Pp.pp_bool fmt v.low_overhead; + if not (gpu_render_stages_config_has_low_overhead v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_metrics" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.trace_metrics; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_vulkan_memory_config fmt (v:vulkan_memory_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "track_driver_memory_usage" Pbrt.Pp.pp_bool fmt v.track_driver_memory_usage; + if not (vulkan_memory_config_has_track_driver_memory_usage v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "track_device_memory_usage" Pbrt.Pp.pp_bool fmt v.track_device_memory_usage; + if not (vulkan_memory_config_has_track_device_memory_usage v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_inode_file_config_mount_point_mapping_entry fmt (v:inode_file_config_mount_point_mapping_entry) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "mountpoint" Pbrt.Pp.pp_string fmt v.mountpoint; + if not (inode_file_config_mount_point_mapping_entry_has_mountpoint v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scan_roots" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.scan_roots; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_inode_file_config fmt (v:inode_file_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "scan_interval_ms" Pbrt.Pp.pp_int32 fmt v.scan_interval_ms; + if not (inode_file_config_has_scan_interval_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scan_delay_ms" Pbrt.Pp.pp_int32 fmt v.scan_delay_ms; + if not (inode_file_config_has_scan_delay_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scan_batch_size" Pbrt.Pp.pp_int32 fmt v.scan_batch_size; + if not (inode_file_config_has_scan_batch_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "do_not_scan" Pbrt.Pp.pp_bool fmt v.do_not_scan; + if not (inode_file_config_has_do_not_scan v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scan_mount_points" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.scan_mount_points; + Pbrt.Pp.pp_record_field ~first:false "mount_point_mapping" (Pbrt.Pp.pp_list pp_inode_file_config_mount_point_mapping_entry) fmt v.mount_point_mapping; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_console_config_output fmt (v:console_config_output) = + match v with + | Output_unspecified -> Format.fprintf fmt "Output_unspecified" + | Output_stdout -> Format.fprintf fmt "Output_stdout" + | Output_stderr -> Format.fprintf fmt "Output_stderr" + +let rec pp_console_config fmt (v:console_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "output" pp_console_config_output fmt v.output; + if not (console_config_has_output v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "enable_colors" Pbrt.Pp.pp_bool fmt v.enable_colors; + if not (console_config_has_enable_colors v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interceptor_config fmt (v:interceptor_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (interceptor_config_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "console_config" (Pbrt.Pp.pp_option pp_console_config) fmt v.console_config; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_power_config_battery_counters fmt (v:android_power_config_battery_counters) = + match v with + | Battery_counter_unspecified -> Format.fprintf fmt "Battery_counter_unspecified" + | Battery_counter_charge -> Format.fprintf fmt "Battery_counter_charge" + | Battery_counter_capacity_percent -> Format.fprintf fmt "Battery_counter_capacity_percent" + | Battery_counter_current -> Format.fprintf fmt "Battery_counter_current" + | Battery_counter_current_avg -> Format.fprintf fmt "Battery_counter_current_avg" + | Battery_counter_voltage -> Format.fprintf fmt "Battery_counter_voltage" + +let rec pp_android_power_config fmt (v:android_power_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "battery_poll_ms" Pbrt.Pp.pp_int32 fmt v.battery_poll_ms; + if not (android_power_config_has_battery_poll_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "battery_counters" (Pbrt.Pp.pp_list pp_android_power_config_battery_counters) fmt v.battery_counters; + Pbrt.Pp.pp_record_field ~first:false "collect_power_rails" Pbrt.Pp.pp_bool fmt v.collect_power_rails; + if not (android_power_config_has_collect_power_rails v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "collect_energy_estimation_breakdown" Pbrt.Pp.pp_bool fmt v.collect_energy_estimation_breakdown; + if not (android_power_config_has_collect_energy_estimation_breakdown v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "collect_entity_state_residency" Pbrt.Pp.pp_bool fmt v.collect_entity_state_residency; + if not (android_power_config_has_collect_entity_state_residency v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_priority_boost_config_boost_policy fmt (v:priority_boost_config_boost_policy) = + match v with + | Policy_unspecified -> Format.fprintf fmt "Policy_unspecified" + | Policy_sched_other -> Format.fprintf fmt "Policy_sched_other" + | Policy_sched_fifo -> Format.fprintf fmt "Policy_sched_fifo" + +let rec pp_priority_boost_config fmt (v:priority_boost_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "policy" pp_priority_boost_config_boost_policy fmt v.policy; + if not (priority_boost_config_has_policy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "priority" Pbrt.Pp.pp_int32 fmt v.priority; + if not (priority_boost_config_has_priority v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_stats_config_quirks fmt (v:process_stats_config_quirks) = + match v with + | Quirks_unspecified -> Format.fprintf fmt "Quirks_unspecified" + | Disable_initial_dump -> Format.fprintf fmt "Disable_initial_dump" + | Disable_on_demand -> Format.fprintf fmt "Disable_on_demand" + +let rec pp_process_stats_config fmt (v:process_stats_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "quirks" (Pbrt.Pp.pp_list pp_process_stats_config_quirks) fmt v.quirks; + Pbrt.Pp.pp_record_field ~first:false "scan_all_processes_on_start" Pbrt.Pp.pp_bool fmt v.scan_all_processes_on_start; + if not (process_stats_config_has_scan_all_processes_on_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "record_thread_names" Pbrt.Pp.pp_bool fmt v.record_thread_names; + if not (process_stats_config_has_record_thread_names v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "proc_stats_poll_ms" Pbrt.Pp.pp_int32 fmt v.proc_stats_poll_ms; + if not (process_stats_config_has_proc_stats_poll_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "proc_stats_cache_ttl_ms" Pbrt.Pp.pp_int32 fmt v.proc_stats_cache_ttl_ms; + if not (process_stats_config_has_proc_stats_cache_ttl_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scan_smaps_rollup" Pbrt.Pp.pp_bool fmt v.scan_smaps_rollup; + if not (process_stats_config_has_scan_smaps_rollup v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "record_process_age" Pbrt.Pp.pp_bool fmt v.record_process_age; + if not (process_stats_config_has_record_process_age v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "record_process_runtime" Pbrt.Pp.pp_bool fmt v.record_process_runtime; + if not (process_stats_config_has_record_process_runtime v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "record_process_dmabuf_rss" Pbrt.Pp.pp_bool fmt v.record_process_dmabuf_rss; + if not (process_stats_config_has_record_process_dmabuf_rss v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "resolve_process_fds" Pbrt.Pp.pp_bool fmt v.resolve_process_fds; + if not (process_stats_config_has_resolve_process_fds v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_heapprofd_config_continuous_dump_config fmt (v:heapprofd_config_continuous_dump_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "dump_phase_ms" Pbrt.Pp.pp_int32 fmt v.dump_phase_ms; + if not (heapprofd_config_continuous_dump_config_has_dump_phase_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dump_interval_ms" Pbrt.Pp.pp_int32 fmt v.dump_interval_ms; + if not (heapprofd_config_continuous_dump_config_has_dump_interval_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_heapprofd_config fmt (v:heapprofd_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "sampling_interval_bytes" Pbrt.Pp.pp_int64 fmt v.sampling_interval_bytes; + if not (heapprofd_config_has_sampling_interval_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "adaptive_sampling_shmem_threshold" Pbrt.Pp.pp_int64 fmt v.adaptive_sampling_shmem_threshold; + if not (heapprofd_config_has_adaptive_sampling_shmem_threshold v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "adaptive_sampling_max_sampling_interval_bytes" Pbrt.Pp.pp_int64 fmt v.adaptive_sampling_max_sampling_interval_bytes; + if not (heapprofd_config_has_adaptive_sampling_max_sampling_interval_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "process_cmdline" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.process_cmdline; + Pbrt.Pp.pp_record_field ~first:false "pid" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.pid; + Pbrt.Pp.pp_record_field ~first:false "target_installed_by" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.target_installed_by; + Pbrt.Pp.pp_record_field ~first:false "heaps" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.heaps; + Pbrt.Pp.pp_record_field ~first:false "exclude_heaps" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.exclude_heaps; + Pbrt.Pp.pp_record_field ~first:false "stream_allocations" Pbrt.Pp.pp_bool fmt v.stream_allocations; + if not (heapprofd_config_has_stream_allocations v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "heap_sampling_intervals" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.heap_sampling_intervals; + Pbrt.Pp.pp_record_field ~first:false "all_heaps" Pbrt.Pp.pp_bool fmt v.all_heaps; + if not (heapprofd_config_has_all_heaps v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "all" Pbrt.Pp.pp_bool fmt v.all; + if not (heapprofd_config_has_all v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "min_anonymous_memory_kb" Pbrt.Pp.pp_int32 fmt v.min_anonymous_memory_kb; + if not (heapprofd_config_has_min_anonymous_memory_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_heapprofd_memory_kb" Pbrt.Pp.pp_int32 fmt v.max_heapprofd_memory_kb; + if not (heapprofd_config_has_max_heapprofd_memory_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_heapprofd_cpu_secs" Pbrt.Pp.pp_int64 fmt v.max_heapprofd_cpu_secs; + if not (heapprofd_config_has_max_heapprofd_cpu_secs v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "skip_symbol_prefix" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.skip_symbol_prefix; + Pbrt.Pp.pp_record_field ~first:false "continuous_dump_config" (Pbrt.Pp.pp_option pp_heapprofd_config_continuous_dump_config) fmt v.continuous_dump_config; + Pbrt.Pp.pp_record_field ~first:false "shmem_size_bytes" Pbrt.Pp.pp_int64 fmt v.shmem_size_bytes; + if not (heapprofd_config_has_shmem_size_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "block_client" Pbrt.Pp.pp_bool fmt v.block_client; + if not (heapprofd_config_has_block_client v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "block_client_timeout_us" Pbrt.Pp.pp_int32 fmt v.block_client_timeout_us; + if not (heapprofd_config_has_block_client_timeout_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "no_startup" Pbrt.Pp.pp_bool fmt v.no_startup; + if not (heapprofd_config_has_no_startup v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "no_running" Pbrt.Pp.pp_bool fmt v.no_running; + if not (heapprofd_config_has_no_running v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dump_at_max" Pbrt.Pp.pp_bool fmt v.dump_at_max; + if not (heapprofd_config_has_dump_at_max v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "disable_fork_teardown" Pbrt.Pp.pp_bool fmt v.disable_fork_teardown; + if not (heapprofd_config_has_disable_fork_teardown v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "disable_vfork_detection" Pbrt.Pp.pp_bool fmt v.disable_vfork_detection; + if not (heapprofd_config_has_disable_vfork_detection v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_atom_id fmt (v:atom_id) = + match v with + | Atom_unspecified -> Format.fprintf fmt "Atom_unspecified" + | Atom_ble_scan_state_changed -> Format.fprintf fmt "Atom_ble_scan_state_changed" + | Atom_process_state_changed -> Format.fprintf fmt "Atom_process_state_changed" + | Atom_ble_scan_result_received -> Format.fprintf fmt "Atom_ble_scan_result_received" + | Atom_sensor_state_changed -> Format.fprintf fmt "Atom_sensor_state_changed" + | Atom_gps_scan_state_changed -> Format.fprintf fmt "Atom_gps_scan_state_changed" + | Atom_sync_state_changed -> Format.fprintf fmt "Atom_sync_state_changed" + | Atom_scheduled_job_state_changed -> Format.fprintf fmt "Atom_scheduled_job_state_changed" + | Atom_screen_brightness_changed -> Format.fprintf fmt "Atom_screen_brightness_changed" + | Atom_wakelock_state_changed -> Format.fprintf fmt "Atom_wakelock_state_changed" + | Atom_long_partial_wakelock_state_changed -> Format.fprintf fmt "Atom_long_partial_wakelock_state_changed" + | Atom_mobile_radio_power_state_changed -> Format.fprintf fmt "Atom_mobile_radio_power_state_changed" + | Atom_wifi_radio_power_state_changed -> Format.fprintf fmt "Atom_wifi_radio_power_state_changed" + | Atom_activity_manager_sleep_state_changed -> Format.fprintf fmt "Atom_activity_manager_sleep_state_changed" + | Atom_memory_factor_state_changed -> Format.fprintf fmt "Atom_memory_factor_state_changed" + | Atom_excessive_cpu_usage_reported -> Format.fprintf fmt "Atom_excessive_cpu_usage_reported" + | Atom_cached_kill_reported -> Format.fprintf fmt "Atom_cached_kill_reported" + | Atom_process_memory_stat_reported -> Format.fprintf fmt "Atom_process_memory_stat_reported" + | Atom_launcher_event -> Format.fprintf fmt "Atom_launcher_event" + | Atom_battery_saver_mode_state_changed -> Format.fprintf fmt "Atom_battery_saver_mode_state_changed" + | Atom_device_idle_mode_state_changed -> Format.fprintf fmt "Atom_device_idle_mode_state_changed" + | Atom_device_idling_mode_state_changed -> Format.fprintf fmt "Atom_device_idling_mode_state_changed" + | Atom_audio_state_changed -> Format.fprintf fmt "Atom_audio_state_changed" + | Atom_media_codec_state_changed -> Format.fprintf fmt "Atom_media_codec_state_changed" + | Atom_camera_state_changed -> Format.fprintf fmt "Atom_camera_state_changed" + | Atom_flashlight_state_changed -> Format.fprintf fmt "Atom_flashlight_state_changed" + | Atom_uid_process_state_changed -> Format.fprintf fmt "Atom_uid_process_state_changed" + | Atom_process_life_cycle_state_changed -> Format.fprintf fmt "Atom_process_life_cycle_state_changed" + | Atom_screen_state_changed -> Format.fprintf fmt "Atom_screen_state_changed" + | Atom_battery_level_changed -> Format.fprintf fmt "Atom_battery_level_changed" + | Atom_charging_state_changed -> Format.fprintf fmt "Atom_charging_state_changed" + | Atom_plugged_state_changed -> Format.fprintf fmt "Atom_plugged_state_changed" + | Atom_interactive_state_changed -> Format.fprintf fmt "Atom_interactive_state_changed" + | Atom_touch_event_reported -> Format.fprintf fmt "Atom_touch_event_reported" + | Atom_wakeup_alarm_occurred -> Format.fprintf fmt "Atom_wakeup_alarm_occurred" + | Atom_kernel_wakeup_reported -> Format.fprintf fmt "Atom_kernel_wakeup_reported" + | Atom_wifi_lock_state_changed -> Format.fprintf fmt "Atom_wifi_lock_state_changed" + | Atom_wifi_signal_strength_changed -> Format.fprintf fmt "Atom_wifi_signal_strength_changed" + | Atom_wifi_scan_state_changed -> Format.fprintf fmt "Atom_wifi_scan_state_changed" + | Atom_phone_signal_strength_changed -> Format.fprintf fmt "Atom_phone_signal_strength_changed" + | Atom_setting_changed -> Format.fprintf fmt "Atom_setting_changed" + | Atom_activity_foreground_state_changed -> Format.fprintf fmt "Atom_activity_foreground_state_changed" + | Atom_isolated_uid_changed -> Format.fprintf fmt "Atom_isolated_uid_changed" + | Atom_packet_wakeup_occurred -> Format.fprintf fmt "Atom_packet_wakeup_occurred" + | Atom_wall_clock_time_shifted -> Format.fprintf fmt "Atom_wall_clock_time_shifted" + | Atom_anomaly_detected -> Format.fprintf fmt "Atom_anomaly_detected" + | Atom_app_breadcrumb_reported -> Format.fprintf fmt "Atom_app_breadcrumb_reported" + | Atom_app_start_occurred -> Format.fprintf fmt "Atom_app_start_occurred" + | Atom_app_start_canceled -> Format.fprintf fmt "Atom_app_start_canceled" + | Atom_app_start_fully_drawn -> Format.fprintf fmt "Atom_app_start_fully_drawn" + | Atom_lmk_kill_occurred -> Format.fprintf fmt "Atom_lmk_kill_occurred" + | Atom_picture_in_picture_state_changed -> Format.fprintf fmt "Atom_picture_in_picture_state_changed" + | Atom_wifi_multicast_lock_state_changed -> Format.fprintf fmt "Atom_wifi_multicast_lock_state_changed" + | Atom_app_start_memory_state_captured -> Format.fprintf fmt "Atom_app_start_memory_state_captured" + | Atom_shutdown_sequence_reported -> Format.fprintf fmt "Atom_shutdown_sequence_reported" + | Atom_boot_sequence_reported -> Format.fprintf fmt "Atom_boot_sequence_reported" + | Atom_overlay_state_changed -> Format.fprintf fmt "Atom_overlay_state_changed" + | Atom_foreground_service_state_changed -> Format.fprintf fmt "Atom_foreground_service_state_changed" + | Atom_call_state_changed -> Format.fprintf fmt "Atom_call_state_changed" + | Atom_keyguard_state_changed -> Format.fprintf fmt "Atom_keyguard_state_changed" + | Atom_keyguard_bouncer_state_changed -> Format.fprintf fmt "Atom_keyguard_bouncer_state_changed" + | Atom_keyguard_bouncer_password_entered -> Format.fprintf fmt "Atom_keyguard_bouncer_password_entered" + | Atom_app_died -> Format.fprintf fmt "Atom_app_died" + | Atom_resource_configuration_changed -> Format.fprintf fmt "Atom_resource_configuration_changed" + | Atom_bluetooth_enabled_state_changed -> Format.fprintf fmt "Atom_bluetooth_enabled_state_changed" + | Atom_bluetooth_connection_state_changed -> Format.fprintf fmt "Atom_bluetooth_connection_state_changed" + | Atom_gps_signal_quality_changed -> Format.fprintf fmt "Atom_gps_signal_quality_changed" + | Atom_usb_connector_state_changed -> Format.fprintf fmt "Atom_usb_connector_state_changed" + | Atom_speaker_impedance_reported -> Format.fprintf fmt "Atom_speaker_impedance_reported" + | Atom_hardware_failed -> Format.fprintf fmt "Atom_hardware_failed" + | Atom_physical_drop_detected -> Format.fprintf fmt "Atom_physical_drop_detected" + | Atom_charge_cycles_reported -> Format.fprintf fmt "Atom_charge_cycles_reported" + | Atom_mobile_connection_state_changed -> Format.fprintf fmt "Atom_mobile_connection_state_changed" + | Atom_mobile_radio_technology_changed -> Format.fprintf fmt "Atom_mobile_radio_technology_changed" + | Atom_usb_device_attached -> Format.fprintf fmt "Atom_usb_device_attached" + | Atom_app_crash_occurred -> Format.fprintf fmt "Atom_app_crash_occurred" + | Atom_anr_occurred -> Format.fprintf fmt "Atom_anr_occurred" + | Atom_wtf_occurred -> Format.fprintf fmt "Atom_wtf_occurred" + | Atom_low_mem_reported -> Format.fprintf fmt "Atom_low_mem_reported" + | Atom_generic_atom -> Format.fprintf fmt "Atom_generic_atom" + | Atom_vibrator_state_changed -> Format.fprintf fmt "Atom_vibrator_state_changed" + | Atom_deferred_job_stats_reported -> Format.fprintf fmt "Atom_deferred_job_stats_reported" + | Atom_thermal_throttling -> Format.fprintf fmt "Atom_thermal_throttling" + | Atom_biometric_acquired -> Format.fprintf fmt "Atom_biometric_acquired" + | Atom_biometric_authenticated -> Format.fprintf fmt "Atom_biometric_authenticated" + | Atom_biometric_error_occurred -> Format.fprintf fmt "Atom_biometric_error_occurred" + | Atom_ui_event_reported -> Format.fprintf fmt "Atom_ui_event_reported" + | Atom_battery_health_snapshot -> Format.fprintf fmt "Atom_battery_health_snapshot" + | Atom_slow_io -> Format.fprintf fmt "Atom_slow_io" + | Atom_battery_caused_shutdown -> Format.fprintf fmt "Atom_battery_caused_shutdown" + | Atom_phone_service_state_changed -> Format.fprintf fmt "Atom_phone_service_state_changed" + | Atom_phone_state_changed -> Format.fprintf fmt "Atom_phone_state_changed" + | Atom_user_restriction_changed -> Format.fprintf fmt "Atom_user_restriction_changed" + | Atom_settings_ui_changed -> Format.fprintf fmt "Atom_settings_ui_changed" + | Atom_connectivity_state_changed -> Format.fprintf fmt "Atom_connectivity_state_changed" + | Atom_service_state_changed -> Format.fprintf fmt "Atom_service_state_changed" + | Atom_service_launch_reported -> Format.fprintf fmt "Atom_service_launch_reported" + | Atom_flag_flip_update_occurred -> Format.fprintf fmt "Atom_flag_flip_update_occurred" + | Atom_binary_push_state_changed -> Format.fprintf fmt "Atom_binary_push_state_changed" + | Atom_device_policy_event -> Format.fprintf fmt "Atom_device_policy_event" + | Atom_docs_ui_file_op_canceled -> Format.fprintf fmt "Atom_docs_ui_file_op_canceled" + | Atom_docs_ui_file_op_copy_move_mode_reported -> Format.fprintf fmt "Atom_docs_ui_file_op_copy_move_mode_reported" + | Atom_docs_ui_file_op_failure -> Format.fprintf fmt "Atom_docs_ui_file_op_failure" + | Atom_docs_ui_provider_file_op -> Format.fprintf fmt "Atom_docs_ui_provider_file_op" + | Atom_docs_ui_invalid_scoped_access_request -> Format.fprintf fmt "Atom_docs_ui_invalid_scoped_access_request" + | Atom_docs_ui_launch_reported -> Format.fprintf fmt "Atom_docs_ui_launch_reported" + | Atom_docs_ui_root_visited -> Format.fprintf fmt "Atom_docs_ui_root_visited" + | Atom_docs_ui_startup_ms -> Format.fprintf fmt "Atom_docs_ui_startup_ms" + | Atom_docs_ui_user_action_reported -> Format.fprintf fmt "Atom_docs_ui_user_action_reported" + | Atom_wifi_enabled_state_changed -> Format.fprintf fmt "Atom_wifi_enabled_state_changed" + | Atom_wifi_running_state_changed -> Format.fprintf fmt "Atom_wifi_running_state_changed" + | Atom_app_compacted -> Format.fprintf fmt "Atom_app_compacted" + | Atom_network_dns_event_reported -> Format.fprintf fmt "Atom_network_dns_event_reported" + | Atom_docs_ui_picker_launched_from_reported -> Format.fprintf fmt "Atom_docs_ui_picker_launched_from_reported" + | Atom_docs_ui_pick_result_reported -> Format.fprintf fmt "Atom_docs_ui_pick_result_reported" + | Atom_docs_ui_search_mode_reported -> Format.fprintf fmt "Atom_docs_ui_search_mode_reported" + | Atom_docs_ui_search_type_reported -> Format.fprintf fmt "Atom_docs_ui_search_type_reported" + | Atom_data_stall_event -> Format.fprintf fmt "Atom_data_stall_event" + | Atom_rescue_party_reset_reported -> Format.fprintf fmt "Atom_rescue_party_reset_reported" + | Atom_signed_config_reported -> Format.fprintf fmt "Atom_signed_config_reported" + | Atom_gnss_ni_event_reported -> Format.fprintf fmt "Atom_gnss_ni_event_reported" + | Atom_bluetooth_link_layer_connection_event -> Format.fprintf fmt "Atom_bluetooth_link_layer_connection_event" + | Atom_bluetooth_acl_connection_state_changed -> Format.fprintf fmt "Atom_bluetooth_acl_connection_state_changed" + | Atom_bluetooth_sco_connection_state_changed -> Format.fprintf fmt "Atom_bluetooth_sco_connection_state_changed" + | Atom_app_downgraded -> Format.fprintf fmt "Atom_app_downgraded" + | Atom_app_optimized_after_downgraded -> Format.fprintf fmt "Atom_app_optimized_after_downgraded" + | Atom_low_storage_state_changed -> Format.fprintf fmt "Atom_low_storage_state_changed" + | Atom_gnss_nfw_notification_reported -> Format.fprintf fmt "Atom_gnss_nfw_notification_reported" + | Atom_gnss_configuration_reported -> Format.fprintf fmt "Atom_gnss_configuration_reported" + | Atom_usb_port_overheat_event_reported -> Format.fprintf fmt "Atom_usb_port_overheat_event_reported" + | Atom_nfc_error_occurred -> Format.fprintf fmt "Atom_nfc_error_occurred" + | Atom_nfc_state_changed -> Format.fprintf fmt "Atom_nfc_state_changed" + | Atom_nfc_beam_occurred -> Format.fprintf fmt "Atom_nfc_beam_occurred" + | Atom_nfc_cardemulation_occurred -> Format.fprintf fmt "Atom_nfc_cardemulation_occurred" + | Atom_nfc_tag_occurred -> Format.fprintf fmt "Atom_nfc_tag_occurred" + | Atom_nfc_hce_transaction_occurred -> Format.fprintf fmt "Atom_nfc_hce_transaction_occurred" + | Atom_se_state_changed -> Format.fprintf fmt "Atom_se_state_changed" + | Atom_se_omapi_reported -> Format.fprintf fmt "Atom_se_omapi_reported" + | Atom_broadcast_dispatch_latency_reported -> Format.fprintf fmt "Atom_broadcast_dispatch_latency_reported" + | Atom_attention_manager_service_result_reported -> Format.fprintf fmt "Atom_attention_manager_service_result_reported" + | Atom_adb_connection_changed -> Format.fprintf fmt "Atom_adb_connection_changed" + | Atom_speech_dsp_stat_reported -> Format.fprintf fmt "Atom_speech_dsp_stat_reported" + | Atom_usb_contaminant_reported -> Format.fprintf fmt "Atom_usb_contaminant_reported" + | Atom_watchdog_rollback_occurred -> Format.fprintf fmt "Atom_watchdog_rollback_occurred" + | Atom_biometric_system_health_issue_detected -> Format.fprintf fmt "Atom_biometric_system_health_issue_detected" + | Atom_bubble_ui_changed -> Format.fprintf fmt "Atom_bubble_ui_changed" + | Atom_scheduled_job_constraint_changed -> Format.fprintf fmt "Atom_scheduled_job_constraint_changed" + | Atom_bluetooth_active_device_changed -> Format.fprintf fmt "Atom_bluetooth_active_device_changed" + | Atom_bluetooth_a2_dp_playback_state_changed -> Format.fprintf fmt "Atom_bluetooth_a2_dp_playback_state_changed" + | Atom_bluetooth_a2_dp_codec_config_changed -> Format.fprintf fmt "Atom_bluetooth_a2_dp_codec_config_changed" + | Atom_bluetooth_a2_dp_codec_capability_changed -> Format.fprintf fmt "Atom_bluetooth_a2_dp_codec_capability_changed" + | Atom_bluetooth_a2_dp_audio_underrun_reported -> Format.fprintf fmt "Atom_bluetooth_a2_dp_audio_underrun_reported" + | Atom_bluetooth_a2_dp_audio_overrun_reported -> Format.fprintf fmt "Atom_bluetooth_a2_dp_audio_overrun_reported" + | Atom_bluetooth_device_rssi_reported -> Format.fprintf fmt "Atom_bluetooth_device_rssi_reported" + | Atom_bluetooth_device_failed_contact_counter_reported -> Format.fprintf fmt "Atom_bluetooth_device_failed_contact_counter_reported" + | Atom_bluetooth_device_tx_power_level_reported -> Format.fprintf fmt "Atom_bluetooth_device_tx_power_level_reported" + | Atom_bluetooth_hci_timeout_reported -> Format.fprintf fmt "Atom_bluetooth_hci_timeout_reported" + | Atom_bluetooth_quality_report_reported -> Format.fprintf fmt "Atom_bluetooth_quality_report_reported" + | Atom_bluetooth_device_info_reported -> Format.fprintf fmt "Atom_bluetooth_device_info_reported" + | Atom_bluetooth_remote_version_info_reported -> Format.fprintf fmt "Atom_bluetooth_remote_version_info_reported" + | Atom_bluetooth_sdp_attribute_reported -> Format.fprintf fmt "Atom_bluetooth_sdp_attribute_reported" + | Atom_bluetooth_bond_state_changed -> Format.fprintf fmt "Atom_bluetooth_bond_state_changed" + | Atom_bluetooth_classic_pairing_event_reported -> Format.fprintf fmt "Atom_bluetooth_classic_pairing_event_reported" + | Atom_bluetooth_smp_pairing_event_reported -> Format.fprintf fmt "Atom_bluetooth_smp_pairing_event_reported" + | Atom_screen_timeout_extension_reported -> Format.fprintf fmt "Atom_screen_timeout_extension_reported" + | Atom_process_start_time -> Format.fprintf fmt "Atom_process_start_time" + | Atom_permission_grant_request_result_reported -> Format.fprintf fmt "Atom_permission_grant_request_result_reported" + | Atom_bluetooth_socket_connection_state_changed -> Format.fprintf fmt "Atom_bluetooth_socket_connection_state_changed" + | Atom_device_identifier_access_denied -> Format.fprintf fmt "Atom_device_identifier_access_denied" + | Atom_bubble_developer_error_reported -> Format.fprintf fmt "Atom_bubble_developer_error_reported" + | Atom_assist_gesture_stage_reported -> Format.fprintf fmt "Atom_assist_gesture_stage_reported" + | Atom_assist_gesture_feedback_reported -> Format.fprintf fmt "Atom_assist_gesture_feedback_reported" + | Atom_assist_gesture_progress_reported -> Format.fprintf fmt "Atom_assist_gesture_progress_reported" + | Atom_touch_gesture_classified -> Format.fprintf fmt "Atom_touch_gesture_classified" + | Atom_hidden_api_used -> Format.fprintf fmt "Atom_hidden_api_used" + | Atom_style_ui_changed -> Format.fprintf fmt "Atom_style_ui_changed" + | Atom_privacy_indicators_interacted -> Format.fprintf fmt "Atom_privacy_indicators_interacted" + | Atom_app_install_on_external_storage_reported -> Format.fprintf fmt "Atom_app_install_on_external_storage_reported" + | Atom_network_stack_reported -> Format.fprintf fmt "Atom_network_stack_reported" + | Atom_app_moved_storage_reported -> Format.fprintf fmt "Atom_app_moved_storage_reported" + | Atom_biometric_enrolled -> Format.fprintf fmt "Atom_biometric_enrolled" + | Atom_system_server_watchdog_occurred -> Format.fprintf fmt "Atom_system_server_watchdog_occurred" + | Atom_tomb_stone_occurred -> Format.fprintf fmt "Atom_tomb_stone_occurred" + | Atom_bluetooth_class_of_device_reported -> Format.fprintf fmt "Atom_bluetooth_class_of_device_reported" + | Atom_intelligence_event_reported -> Format.fprintf fmt "Atom_intelligence_event_reported" + | Atom_thermal_throttling_severity_state_changed -> Format.fprintf fmt "Atom_thermal_throttling_severity_state_changed" + | Atom_role_request_result_reported -> Format.fprintf fmt "Atom_role_request_result_reported" + | Atom_mediametrics_audiopolicy_reported -> Format.fprintf fmt "Atom_mediametrics_audiopolicy_reported" + | Atom_mediametrics_audiorecord_reported -> Format.fprintf fmt "Atom_mediametrics_audiorecord_reported" + | Atom_mediametrics_audiothread_reported -> Format.fprintf fmt "Atom_mediametrics_audiothread_reported" + | Atom_mediametrics_audiotrack_reported -> Format.fprintf fmt "Atom_mediametrics_audiotrack_reported" + | Atom_mediametrics_codec_reported -> Format.fprintf fmt "Atom_mediametrics_codec_reported" + | Atom_mediametrics_drm_widevine_reported -> Format.fprintf fmt "Atom_mediametrics_drm_widevine_reported" + | Atom_mediametrics_extractor_reported -> Format.fprintf fmt "Atom_mediametrics_extractor_reported" + | Atom_mediametrics_mediadrm_reported -> Format.fprintf fmt "Atom_mediametrics_mediadrm_reported" + | Atom_mediametrics_nuplayer_reported -> Format.fprintf fmt "Atom_mediametrics_nuplayer_reported" + | Atom_mediametrics_recorder_reported -> Format.fprintf fmt "Atom_mediametrics_recorder_reported" + | Atom_mediametrics_drmmanager_reported -> Format.fprintf fmt "Atom_mediametrics_drmmanager_reported" + | Atom_car_power_state_changed -> Format.fprintf fmt "Atom_car_power_state_changed" + | Atom_garage_mode_info -> Format.fprintf fmt "Atom_garage_mode_info" + | Atom_test_atom_reported -> Format.fprintf fmt "Atom_test_atom_reported" + | Atom_content_capture_caller_mismatch_reported -> Format.fprintf fmt "Atom_content_capture_caller_mismatch_reported" + | Atom_content_capture_service_events -> Format.fprintf fmt "Atom_content_capture_service_events" + | Atom_content_capture_session_events -> Format.fprintf fmt "Atom_content_capture_session_events" + | Atom_content_capture_flushed -> Format.fprintf fmt "Atom_content_capture_flushed" + | Atom_location_manager_api_usage_reported -> Format.fprintf fmt "Atom_location_manager_api_usage_reported" + | Atom_review_permissions_fragment_result_reported -> Format.fprintf fmt "Atom_review_permissions_fragment_result_reported" + | Atom_runtime_permissions_upgrade_result -> Format.fprintf fmt "Atom_runtime_permissions_upgrade_result" + | Atom_grant_permissions_activity_button_actions -> Format.fprintf fmt "Atom_grant_permissions_activity_button_actions" + | Atom_location_access_check_notification_action -> Format.fprintf fmt "Atom_location_access_check_notification_action" + | Atom_app_permission_fragment_action_reported -> Format.fprintf fmt "Atom_app_permission_fragment_action_reported" + | Atom_app_permission_fragment_viewed -> Format.fprintf fmt "Atom_app_permission_fragment_viewed" + | Atom_app_permissions_fragment_viewed -> Format.fprintf fmt "Atom_app_permissions_fragment_viewed" + | Atom_permission_apps_fragment_viewed -> Format.fprintf fmt "Atom_permission_apps_fragment_viewed" + | Atom_text_selection_event -> Format.fprintf fmt "Atom_text_selection_event" + | Atom_text_linkify_event -> Format.fprintf fmt "Atom_text_linkify_event" + | Atom_conversation_actions_event -> Format.fprintf fmt "Atom_conversation_actions_event" + | Atom_language_detection_event -> Format.fprintf fmt "Atom_language_detection_event" + | Atom_exclusion_rect_state_changed -> Format.fprintf fmt "Atom_exclusion_rect_state_changed" + | Atom_back_gesture_reported_reported -> Format.fprintf fmt "Atom_back_gesture_reported_reported" + | Atom_update_engine_update_attempt_reported -> Format.fprintf fmt "Atom_update_engine_update_attempt_reported" + | Atom_update_engine_successful_update_reported -> Format.fprintf fmt "Atom_update_engine_successful_update_reported" + | Atom_camera_action_event -> Format.fprintf fmt "Atom_camera_action_event" + | Atom_app_compatibility_change_reported -> Format.fprintf fmt "Atom_app_compatibility_change_reported" + | Atom_perfetto_uploaded -> Format.fprintf fmt "Atom_perfetto_uploaded" + | Atom_vms_client_connection_state_changed -> Format.fprintf fmt "Atom_vms_client_connection_state_changed" + | Atom_media_provider_scan_occurred -> Format.fprintf fmt "Atom_media_provider_scan_occurred" + | Atom_media_content_deleted -> Format.fprintf fmt "Atom_media_content_deleted" + | Atom_media_provider_permission_requested -> Format.fprintf fmt "Atom_media_provider_permission_requested" + | Atom_media_provider_schema_changed -> Format.fprintf fmt "Atom_media_provider_schema_changed" + | Atom_media_provider_idle_maintenance_finished -> Format.fprintf fmt "Atom_media_provider_idle_maintenance_finished" + | Atom_reboot_escrow_recovery_reported -> Format.fprintf fmt "Atom_reboot_escrow_recovery_reported" + | Atom_boot_time_event_duration_reported -> Format.fprintf fmt "Atom_boot_time_event_duration_reported" + | Atom_boot_time_event_elapsed_time_reported -> Format.fprintf fmt "Atom_boot_time_event_elapsed_time_reported" + | Atom_boot_time_event_utc_time_reported -> Format.fprintf fmt "Atom_boot_time_event_utc_time_reported" + | Atom_boot_time_event_error_code_reported -> Format.fprintf fmt "Atom_boot_time_event_error_code_reported" + | Atom_userspace_reboot_reported -> Format.fprintf fmt "Atom_userspace_reboot_reported" + | Atom_notification_reported -> Format.fprintf fmt "Atom_notification_reported" + | Atom_notification_panel_reported -> Format.fprintf fmt "Atom_notification_panel_reported" + | Atom_notification_channel_modified -> Format.fprintf fmt "Atom_notification_channel_modified" + | Atom_integrity_check_result_reported -> Format.fprintf fmt "Atom_integrity_check_result_reported" + | Atom_integrity_rules_pushed -> Format.fprintf fmt "Atom_integrity_rules_pushed" + | Atom_cb_message_reported -> Format.fprintf fmt "Atom_cb_message_reported" + | Atom_cb_message_error -> Format.fprintf fmt "Atom_cb_message_error" + | Atom_wifi_health_stat_reported -> Format.fprintf fmt "Atom_wifi_health_stat_reported" + | Atom_wifi_failure_stat_reported -> Format.fprintf fmt "Atom_wifi_failure_stat_reported" + | Atom_wifi_connection_result_reported -> Format.fprintf fmt "Atom_wifi_connection_result_reported" + | Atom_app_freeze_changed -> Format.fprintf fmt "Atom_app_freeze_changed" + | Atom_snapshot_merge_reported -> Format.fprintf fmt "Atom_snapshot_merge_reported" + | Atom_foreground_service_app_op_session_ended -> Format.fprintf fmt "Atom_foreground_service_app_op_session_ended" + | Atom_display_jank_reported -> Format.fprintf fmt "Atom_display_jank_reported" + | Atom_app_standby_bucket_changed -> Format.fprintf fmt "Atom_app_standby_bucket_changed" + | Atom_sharesheet_started -> Format.fprintf fmt "Atom_sharesheet_started" + | Atom_ranking_selected -> Format.fprintf fmt "Atom_ranking_selected" + | Atom_tvsettings_ui_interacted -> Format.fprintf fmt "Atom_tvsettings_ui_interacted" + | Atom_launcher_snapshot -> Format.fprintf fmt "Atom_launcher_snapshot" + | Atom_package_installer_v2_reported -> Format.fprintf fmt "Atom_package_installer_v2_reported" + | Atom_user_lifecycle_journey_reported -> Format.fprintf fmt "Atom_user_lifecycle_journey_reported" + | Atom_user_lifecycle_event_occurred -> Format.fprintf fmt "Atom_user_lifecycle_event_occurred" + | Atom_accessibility_shortcut_reported -> Format.fprintf fmt "Atom_accessibility_shortcut_reported" + | Atom_accessibility_service_reported -> Format.fprintf fmt "Atom_accessibility_service_reported" + | Atom_docs_ui_drag_and_drop_reported -> Format.fprintf fmt "Atom_docs_ui_drag_and_drop_reported" + | Atom_app_usage_event_occurred -> Format.fprintf fmt "Atom_app_usage_event_occurred" + | Atom_auto_revoke_notification_clicked -> Format.fprintf fmt "Atom_auto_revoke_notification_clicked" + | Atom_auto_revoke_fragment_app_viewed -> Format.fprintf fmt "Atom_auto_revoke_fragment_app_viewed" + | Atom_auto_revoked_app_interaction -> Format.fprintf fmt "Atom_auto_revoked_app_interaction" + | Atom_app_permission_groups_fragment_auto_revoke_action -> Format.fprintf fmt "Atom_app_permission_groups_fragment_auto_revoke_action" + | Atom_evs_usage_stats_reported -> Format.fprintf fmt "Atom_evs_usage_stats_reported" + | Atom_audio_power_usage_data_reported -> Format.fprintf fmt "Atom_audio_power_usage_data_reported" + | Atom_tv_tuner_state_changed -> Format.fprintf fmt "Atom_tv_tuner_state_changed" + | Atom_mediaoutput_op_switch_reported -> Format.fprintf fmt "Atom_mediaoutput_op_switch_reported" + | Atom_cb_message_filtered -> Format.fprintf fmt "Atom_cb_message_filtered" + | Atom_tv_tuner_dvr_status -> Format.fprintf fmt "Atom_tv_tuner_dvr_status" + | Atom_tv_cas_session_open_status -> Format.fprintf fmt "Atom_tv_cas_session_open_status" + | Atom_assistant_invocation_reported -> Format.fprintf fmt "Atom_assistant_invocation_reported" + | Atom_display_wake_reported -> Format.fprintf fmt "Atom_display_wake_reported" + | Atom_car_user_hal_modify_user_request_reported -> Format.fprintf fmt "Atom_car_user_hal_modify_user_request_reported" + | Atom_car_user_hal_modify_user_response_reported -> Format.fprintf fmt "Atom_car_user_hal_modify_user_response_reported" + | Atom_car_user_hal_post_switch_response_reported -> Format.fprintf fmt "Atom_car_user_hal_post_switch_response_reported" + | Atom_car_user_hal_initial_user_info_request_reported -> Format.fprintf fmt "Atom_car_user_hal_initial_user_info_request_reported" + | Atom_car_user_hal_initial_user_info_response_reported -> Format.fprintf fmt "Atom_car_user_hal_initial_user_info_response_reported" + | Atom_car_user_hal_user_association_request_reported -> Format.fprintf fmt "Atom_car_user_hal_user_association_request_reported" + | Atom_car_user_hal_set_user_association_response_reported -> Format.fprintf fmt "Atom_car_user_hal_set_user_association_response_reported" + | Atom_network_ip_provisioning_reported -> Format.fprintf fmt "Atom_network_ip_provisioning_reported" + | Atom_network_dhcp_renew_reported -> Format.fprintf fmt "Atom_network_dhcp_renew_reported" + | Atom_network_validation_reported -> Format.fprintf fmt "Atom_network_validation_reported" + | Atom_network_stack_quirk_reported -> Format.fprintf fmt "Atom_network_stack_quirk_reported" + | Atom_mediametrics_audiorecorddeviceusage_reported -> Format.fprintf fmt "Atom_mediametrics_audiorecorddeviceusage_reported" + | Atom_mediametrics_audiothreaddeviceusage_reported -> Format.fprintf fmt "Atom_mediametrics_audiothreaddeviceusage_reported" + | Atom_mediametrics_audiotrackdeviceusage_reported -> Format.fprintf fmt "Atom_mediametrics_audiotrackdeviceusage_reported" + | Atom_mediametrics_audiodeviceconnection_reported -> Format.fprintf fmt "Atom_mediametrics_audiodeviceconnection_reported" + | Atom_blob_committed -> Format.fprintf fmt "Atom_blob_committed" + | Atom_blob_leased -> Format.fprintf fmt "Atom_blob_leased" + | Atom_blob_opened -> Format.fprintf fmt "Atom_blob_opened" + | Atom_contacts_provider_status_reported -> Format.fprintf fmt "Atom_contacts_provider_status_reported" + | Atom_keystore_key_event_reported -> Format.fprintf fmt "Atom_keystore_key_event_reported" + | Atom_network_tethering_reported -> Format.fprintf fmt "Atom_network_tethering_reported" + | Atom_ime_touch_reported -> Format.fprintf fmt "Atom_ime_touch_reported" + | Atom_ui_interaction_frame_info_reported -> Format.fprintf fmt "Atom_ui_interaction_frame_info_reported" + | Atom_ui_action_latency_reported -> Format.fprintf fmt "Atom_ui_action_latency_reported" + | Atom_wifi_disconnect_reported -> Format.fprintf fmt "Atom_wifi_disconnect_reported" + | Atom_wifi_connection_state_changed -> Format.fprintf fmt "Atom_wifi_connection_state_changed" + | Atom_hdmi_cec_active_source_changed -> Format.fprintf fmt "Atom_hdmi_cec_active_source_changed" + | Atom_hdmi_cec_message_reported -> Format.fprintf fmt "Atom_hdmi_cec_message_reported" + | Atom_airplane_mode -> Format.fprintf fmt "Atom_airplane_mode" + | Atom_modem_restart -> Format.fprintf fmt "Atom_modem_restart" + | Atom_carrier_id_mismatch_reported -> Format.fprintf fmt "Atom_carrier_id_mismatch_reported" + | Atom_carrier_id_table_updated -> Format.fprintf fmt "Atom_carrier_id_table_updated" + | Atom_data_stall_recovery_reported -> Format.fprintf fmt "Atom_data_stall_recovery_reported" + | Atom_mediametrics_mediaparser_reported -> Format.fprintf fmt "Atom_mediametrics_mediaparser_reported" + | Atom_tls_handshake_reported -> Format.fprintf fmt "Atom_tls_handshake_reported" + | Atom_text_classifier_api_usage_reported -> Format.fprintf fmt "Atom_text_classifier_api_usage_reported" + | Atom_car_watchdog_kill_stats_reported -> Format.fprintf fmt "Atom_car_watchdog_kill_stats_reported" + | Atom_mediametrics_playback_reported -> Format.fprintf fmt "Atom_mediametrics_playback_reported" + | Atom_media_network_info_changed -> Format.fprintf fmt "Atom_media_network_info_changed" + | Atom_media_playback_state_changed -> Format.fprintf fmt "Atom_media_playback_state_changed" + | Atom_media_playback_error_reported -> Format.fprintf fmt "Atom_media_playback_error_reported" + | Atom_media_playback_track_changed -> Format.fprintf fmt "Atom_media_playback_track_changed" + | Atom_wifi_scan_reported -> Format.fprintf fmt "Atom_wifi_scan_reported" + | Atom_wifi_pno_scan_reported -> Format.fprintf fmt "Atom_wifi_pno_scan_reported" + | Atom_tif_tune_changed -> Format.fprintf fmt "Atom_tif_tune_changed" + | Atom_auto_rotate_reported -> Format.fprintf fmt "Atom_auto_rotate_reported" + | Atom_perfetto_trigger -> Format.fprintf fmt "Atom_perfetto_trigger" + | Atom_transcoding_data -> Format.fprintf fmt "Atom_transcoding_data" + | Atom_ims_service_entitlement_updated -> Format.fprintf fmt "Atom_ims_service_entitlement_updated" + | Atom_device_rotated -> Format.fprintf fmt "Atom_device_rotated" + | Atom_sim_specific_settings_restored -> Format.fprintf fmt "Atom_sim_specific_settings_restored" + | Atom_text_classifier_download_reported -> Format.fprintf fmt "Atom_text_classifier_download_reported" + | Atom_pin_storage_event -> Format.fprintf fmt "Atom_pin_storage_event" + | Atom_face_down_reported -> Format.fprintf fmt "Atom_face_down_reported" + | Atom_bluetooth_hal_crash_reason_reported -> Format.fprintf fmt "Atom_bluetooth_hal_crash_reason_reported" + | Atom_reboot_escrow_preparation_reported -> Format.fprintf fmt "Atom_reboot_escrow_preparation_reported" + | Atom_reboot_escrow_lskf_capture_reported -> Format.fprintf fmt "Atom_reboot_escrow_lskf_capture_reported" + | Atom_reboot_escrow_reboot_reported -> Format.fprintf fmt "Atom_reboot_escrow_reboot_reported" + | Atom_binder_latency_reported -> Format.fprintf fmt "Atom_binder_latency_reported" + | Atom_mediametrics_aaudiostream_reported -> Format.fprintf fmt "Atom_mediametrics_aaudiostream_reported" + | Atom_media_transcoding_session_ended -> Format.fprintf fmt "Atom_media_transcoding_session_ended" + | Atom_magnification_usage_reported -> Format.fprintf fmt "Atom_magnification_usage_reported" + | Atom_magnification_mode_with_ime_on_reported -> Format.fprintf fmt "Atom_magnification_mode_with_ime_on_reported" + | Atom_app_search_call_stats_reported -> Format.fprintf fmt "Atom_app_search_call_stats_reported" + | Atom_app_search_put_document_stats_reported -> Format.fprintf fmt "Atom_app_search_put_document_stats_reported" + | Atom_device_control_changed -> Format.fprintf fmt "Atom_device_control_changed" + | Atom_device_state_changed -> Format.fprintf fmt "Atom_device_state_changed" + | Atom_inputdevice_registered -> Format.fprintf fmt "Atom_inputdevice_registered" + | Atom_smartspace_card_reported -> Format.fprintf fmt "Atom_smartspace_card_reported" + | Atom_auth_prompt_authenticate_invoked -> Format.fprintf fmt "Atom_auth_prompt_authenticate_invoked" + | Atom_auth_manager_can_authenticate_invoked -> Format.fprintf fmt "Atom_auth_manager_can_authenticate_invoked" + | Atom_auth_enroll_action_invoked -> Format.fprintf fmt "Atom_auth_enroll_action_invoked" + | Atom_auth_deprecated_api_used -> Format.fprintf fmt "Atom_auth_deprecated_api_used" + | Atom_unattended_reboot_occurred -> Format.fprintf fmt "Atom_unattended_reboot_occurred" + | Atom_long_reboot_blocking_reported -> Format.fprintf fmt "Atom_long_reboot_blocking_reported" + | Atom_location_time_zone_provider_state_changed -> Format.fprintf fmt "Atom_location_time_zone_provider_state_changed" + | Atom_fdtrack_event_occurred -> Format.fprintf fmt "Atom_fdtrack_event_occurred" + | Atom_timeout_auto_extended_reported -> Format.fprintf fmt "Atom_timeout_auto_extended_reported" + | Atom_alarm_batch_delivered -> Format.fprintf fmt "Atom_alarm_batch_delivered" + | Atom_alarm_scheduled -> Format.fprintf fmt "Atom_alarm_scheduled" + | Atom_car_watchdog_io_overuse_stats_reported -> Format.fprintf fmt "Atom_car_watchdog_io_overuse_stats_reported" + | Atom_user_level_hibernation_state_changed -> Format.fprintf fmt "Atom_user_level_hibernation_state_changed" + | Atom_app_search_initialize_stats_reported -> Format.fprintf fmt "Atom_app_search_initialize_stats_reported" + | Atom_app_search_query_stats_reported -> Format.fprintf fmt "Atom_app_search_query_stats_reported" + | Atom_app_process_died -> Format.fprintf fmt "Atom_app_process_died" + | Atom_network_ip_reachability_monitor_reported -> Format.fprintf fmt "Atom_network_ip_reachability_monitor_reported" + | Atom_slow_input_event_reported -> Format.fprintf fmt "Atom_slow_input_event_reported" + | Atom_anr_occurred_processing_started -> Format.fprintf fmt "Atom_anr_occurred_processing_started" + | Atom_app_search_remove_stats_reported -> Format.fprintf fmt "Atom_app_search_remove_stats_reported" + | Atom_media_codec_reported -> Format.fprintf fmt "Atom_media_codec_reported" + | Atom_permission_usage_fragment_interaction -> Format.fprintf fmt "Atom_permission_usage_fragment_interaction" + | Atom_permission_details_interaction -> Format.fprintf fmt "Atom_permission_details_interaction" + | Atom_privacy_sensor_toggle_interaction -> Format.fprintf fmt "Atom_privacy_sensor_toggle_interaction" + | Atom_privacy_toggle_dialog_interaction -> Format.fprintf fmt "Atom_privacy_toggle_dialog_interaction" + | Atom_app_search_optimize_stats_reported -> Format.fprintf fmt "Atom_app_search_optimize_stats_reported" + | Atom_non_a11_y_tool_service_warning_report -> Format.fprintf fmt "Atom_non_a11_y_tool_service_warning_report" + | Atom_app_compat_state_changed -> Format.fprintf fmt "Atom_app_compat_state_changed" + | Atom_size_compat_restart_button_event_reported -> Format.fprintf fmt "Atom_size_compat_restart_button_event_reported" + | Atom_splitscreen_ui_changed -> Format.fprintf fmt "Atom_splitscreen_ui_changed" + | Atom_network_dns_handshake_reported -> Format.fprintf fmt "Atom_network_dns_handshake_reported" + | Atom_bluetooth_code_path_counter -> Format.fprintf fmt "Atom_bluetooth_code_path_counter" + | Atom_bluetooth_le_batch_scan_report_delay -> Format.fprintf fmt "Atom_bluetooth_le_batch_scan_report_delay" + | Atom_accessibility_floating_menu_ui_changed -> Format.fprintf fmt "Atom_accessibility_floating_menu_ui_changed" + | Atom_neuralnetworks_compilation_completed -> Format.fprintf fmt "Atom_neuralnetworks_compilation_completed" + | Atom_neuralnetworks_execution_completed -> Format.fprintf fmt "Atom_neuralnetworks_execution_completed" + | Atom_neuralnetworks_compilation_failed -> Format.fprintf fmt "Atom_neuralnetworks_compilation_failed" + | Atom_neuralnetworks_execution_failed -> Format.fprintf fmt "Atom_neuralnetworks_execution_failed" + | Atom_context_hub_booted -> Format.fprintf fmt "Atom_context_hub_booted" + | Atom_context_hub_restarted -> Format.fprintf fmt "Atom_context_hub_restarted" + | Atom_context_hub_loaded_nanoapp_snapshot_reported -> Format.fprintf fmt "Atom_context_hub_loaded_nanoapp_snapshot_reported" + | Atom_chre_code_download_transacted -> Format.fprintf fmt "Atom_chre_code_download_transacted" + | Atom_uwb_session_inited -> Format.fprintf fmt "Atom_uwb_session_inited" + | Atom_uwb_session_closed -> Format.fprintf fmt "Atom_uwb_session_closed" + | Atom_uwb_first_ranging_received -> Format.fprintf fmt "Atom_uwb_first_ranging_received" + | Atom_uwb_ranging_measurement_received -> Format.fprintf fmt "Atom_uwb_ranging_measurement_received" + | Atom_text_classifier_download_work_scheduled -> Format.fprintf fmt "Atom_text_classifier_download_work_scheduled" + | Atom_text_classifier_download_work_completed -> Format.fprintf fmt "Atom_text_classifier_download_work_completed" + | Atom_clipboard_cleared -> Format.fprintf fmt "Atom_clipboard_cleared" + | Atom_vm_creation_requested -> Format.fprintf fmt "Atom_vm_creation_requested" + | Atom_nearby_device_scan_state_changed -> Format.fprintf fmt "Atom_nearby_device_scan_state_changed" + | Atom_application_locales_changed -> Format.fprintf fmt "Atom_application_locales_changed" + | Atom_mediametrics_audiotrackstatus_reported -> Format.fprintf fmt "Atom_mediametrics_audiotrackstatus_reported" + | Atom_fold_state_duration_reported -> Format.fprintf fmt "Atom_fold_state_duration_reported" + | Atom_location_time_zone_provider_controller_state_changed -> Format.fprintf fmt "Atom_location_time_zone_provider_controller_state_changed" + | Atom_display_hbm_state_changed -> Format.fprintf fmt "Atom_display_hbm_state_changed" + | Atom_display_hbm_brightness_changed -> Format.fprintf fmt "Atom_display_hbm_brightness_changed" + | Atom_persistent_uri_permissions_flushed -> Format.fprintf fmt "Atom_persistent_uri_permissions_flushed" + | Atom_early_boot_comp_os_artifacts_check_reported -> Format.fprintf fmt "Atom_early_boot_comp_os_artifacts_check_reported" + | Atom_vbmeta_digest_reported -> Format.fprintf fmt "Atom_vbmeta_digest_reported" + | Atom_apex_info_gathered -> Format.fprintf fmt "Atom_apex_info_gathered" + | Atom_pvm_info_gathered -> Format.fprintf fmt "Atom_pvm_info_gathered" + | Atom_wear_settings_ui_interacted -> Format.fprintf fmt "Atom_wear_settings_ui_interacted" + | Atom_tracing_service_report_event -> Format.fprintf fmt "Atom_tracing_service_report_event" + | Atom_mediametrics_audiorecordstatus_reported -> Format.fprintf fmt "Atom_mediametrics_audiorecordstatus_reported" + | Atom_launcher_latency -> Format.fprintf fmt "Atom_launcher_latency" + | Atom_dropbox_entry_dropped -> Format.fprintf fmt "Atom_dropbox_entry_dropped" + | Atom_wifi_p2_p_connection_reported -> Format.fprintf fmt "Atom_wifi_p2_p_connection_reported" + | Atom_game_state_changed -> Format.fprintf fmt "Atom_game_state_changed" + | Atom_hotword_detector_create_requested -> Format.fprintf fmt "Atom_hotword_detector_create_requested" + | Atom_hotword_detection_service_init_result_reported -> Format.fprintf fmt "Atom_hotword_detection_service_init_result_reported" + | Atom_hotword_detection_service_restarted -> Format.fprintf fmt "Atom_hotword_detection_service_restarted" + | Atom_hotword_detector_keyphrase_triggered -> Format.fprintf fmt "Atom_hotword_detector_keyphrase_triggered" + | Atom_hotword_detector_events -> Format.fprintf fmt "Atom_hotword_detector_events" + | Atom_boot_completed_broadcast_completion_latency_reported -> Format.fprintf fmt "Atom_boot_completed_broadcast_completion_latency_reported" + | Atom_contacts_indexer_update_stats_reported -> Format.fprintf fmt "Atom_contacts_indexer_update_stats_reported" + | Atom_app_background_restrictions_info -> Format.fprintf fmt "Atom_app_background_restrictions_info" + | Atom_mms_sms_provider_get_thread_id_failed -> Format.fprintf fmt "Atom_mms_sms_provider_get_thread_id_failed" + | Atom_mms_sms_database_helper_on_upgrade_failed -> Format.fprintf fmt "Atom_mms_sms_database_helper_on_upgrade_failed" + | Atom_permission_reminder_notification_interacted -> Format.fprintf fmt "Atom_permission_reminder_notification_interacted" + | Atom_recent_permission_decisions_interacted -> Format.fprintf fmt "Atom_recent_permission_decisions_interacted" + | Atom_gnss_psds_download_reported -> Format.fprintf fmt "Atom_gnss_psds_download_reported" + | Atom_le_audio_connection_session_reported -> Format.fprintf fmt "Atom_le_audio_connection_session_reported" + | Atom_le_audio_broadcast_session_reported -> Format.fprintf fmt "Atom_le_audio_broadcast_session_reported" + | Atom_dream_ui_event_reported -> Format.fprintf fmt "Atom_dream_ui_event_reported" + | Atom_task_manager_event_reported -> Format.fprintf fmt "Atom_task_manager_event_reported" + | Atom_cdm_association_action -> Format.fprintf fmt "Atom_cdm_association_action" + | Atom_magnification_triple_tap_and_hold_activated_session_reported -> Format.fprintf fmt "Atom_magnification_triple_tap_and_hold_activated_session_reported" + | Atom_magnification_follow_typing_focus_activated_session_reported -> Format.fprintf fmt "Atom_magnification_follow_typing_focus_activated_session_reported" + | Atom_accessibility_text_reading_options_changed -> Format.fprintf fmt "Atom_accessibility_text_reading_options_changed" + | Atom_wifi_setup_failure_crash_reported -> Format.fprintf fmt "Atom_wifi_setup_failure_crash_reported" + | Atom_uwb_device_error_reported -> Format.fprintf fmt "Atom_uwb_device_error_reported" + | Atom_isolated_compilation_scheduled -> Format.fprintf fmt "Atom_isolated_compilation_scheduled" + | Atom_isolated_compilation_ended -> Format.fprintf fmt "Atom_isolated_compilation_ended" + | Atom_ons_opportunistic_esim_provisioning_complete -> Format.fprintf fmt "Atom_ons_opportunistic_esim_provisioning_complete" + | Atom_system_server_pre_watchdog_occurred -> Format.fprintf fmt "Atom_system_server_pre_watchdog_occurred" + | Atom_telephony_anomaly_detected -> Format.fprintf fmt "Atom_telephony_anomaly_detected" + | Atom_letterbox_position_changed -> Format.fprintf fmt "Atom_letterbox_position_changed" + | Atom_remote_key_provisioning_attempt -> Format.fprintf fmt "Atom_remote_key_provisioning_attempt" + | Atom_remote_key_provisioning_network_info -> Format.fprintf fmt "Atom_remote_key_provisioning_network_info" + | Atom_remote_key_provisioning_timing -> Format.fprintf fmt "Atom_remote_key_provisioning_timing" + | Atom_mediaoutput_op_interaction_report -> Format.fprintf fmt "Atom_mediaoutput_op_interaction_report" + | Atom_sync_exemption_occurred -> Format.fprintf fmt "Atom_sync_exemption_occurred" + | Atom_autofill_presentation_event_reported -> Format.fprintf fmt "Atom_autofill_presentation_event_reported" + | Atom_dock_state_changed -> Format.fprintf fmt "Atom_dock_state_changed" + | Atom_safety_source_state_collected -> Format.fprintf fmt "Atom_safety_source_state_collected" + | Atom_safety_center_system_event_reported -> Format.fprintf fmt "Atom_safety_center_system_event_reported" + | Atom_safety_center_interaction_reported -> Format.fprintf fmt "Atom_safety_center_interaction_reported" + | Atom_settings_provider_setting_changed -> Format.fprintf fmt "Atom_settings_provider_setting_changed" + | Atom_broadcast_delivery_event_reported -> Format.fprintf fmt "Atom_broadcast_delivery_event_reported" + | Atom_service_request_event_reported -> Format.fprintf fmt "Atom_service_request_event_reported" + | Atom_provider_acquisition_event_reported -> Format.fprintf fmt "Atom_provider_acquisition_event_reported" + | Atom_bluetooth_device_name_reported -> Format.fprintf fmt "Atom_bluetooth_device_name_reported" + | Atom_cb_config_updated -> Format.fprintf fmt "Atom_cb_config_updated" + | Atom_cb_module_error_reported -> Format.fprintf fmt "Atom_cb_module_error_reported" + | Atom_cb_service_feature_changed -> Format.fprintf fmt "Atom_cb_service_feature_changed" + | Atom_cb_receiver_feature_changed -> Format.fprintf fmt "Atom_cb_receiver_feature_changed" + | Atom_privacy_signal_notification_interaction -> Format.fprintf fmt "Atom_privacy_signal_notification_interaction" + | Atom_privacy_signal_issue_card_interaction -> Format.fprintf fmt "Atom_privacy_signal_issue_card_interaction" + | Atom_privacy_signals_job_failure -> Format.fprintf fmt "Atom_privacy_signals_job_failure" + | Atom_vibration_reported -> Format.fprintf fmt "Atom_vibration_reported" + | Atom_uwb_ranging_start -> Format.fprintf fmt "Atom_uwb_ranging_start" + | Atom_app_compacted_v2 -> Format.fprintf fmt "Atom_app_compacted_v2" + | Atom_display_brightness_changed -> Format.fprintf fmt "Atom_display_brightness_changed" + | Atom_activity_action_blocked -> Format.fprintf fmt "Atom_activity_action_blocked" + | Atom_network_dns_server_support_reported -> Format.fprintf fmt "Atom_network_dns_server_support_reported" + | Atom_vm_booted -> Format.fprintf fmt "Atom_vm_booted" + | Atom_vm_exited -> Format.fprintf fmt "Atom_vm_exited" + | Atom_ambient_brightness_stats_reported -> Format.fprintf fmt "Atom_ambient_brightness_stats_reported" + | Atom_mediametrics_spatializercapabilities_reported -> Format.fprintf fmt "Atom_mediametrics_spatializercapabilities_reported" + | Atom_mediametrics_spatializerdeviceenabled_reported -> Format.fprintf fmt "Atom_mediametrics_spatializerdeviceenabled_reported" + | Atom_mediametrics_headtrackerdeviceenabled_reported -> Format.fprintf fmt "Atom_mediametrics_headtrackerdeviceenabled_reported" + | Atom_mediametrics_headtrackerdevicesupported_reported -> Format.fprintf fmt "Atom_mediametrics_headtrackerdevicesupported_reported" + | Atom_hearing_aid_info_reported -> Format.fprintf fmt "Atom_hearing_aid_info_reported" + | Atom_device_wide_job_constraint_changed -> Format.fprintf fmt "Atom_device_wide_job_constraint_changed" + | Atom_ambient_mode_changed -> Format.fprintf fmt "Atom_ambient_mode_changed" + | Atom_anr_latency_reported -> Format.fprintf fmt "Atom_anr_latency_reported" + | Atom_resource_api_info -> Format.fprintf fmt "Atom_resource_api_info" + | Atom_system_default_network_changed -> Format.fprintf fmt "Atom_system_default_network_changed" + | Atom_iwlan_setup_data_call_result_reported -> Format.fprintf fmt "Atom_iwlan_setup_data_call_result_reported" + | Atom_iwlan_pdn_disconnected_reason_reported -> Format.fprintf fmt "Atom_iwlan_pdn_disconnected_reason_reported" + | Atom_airplane_mode_session_reported -> Format.fprintf fmt "Atom_airplane_mode_session_reported" + | Atom_vm_cpu_status_reported -> Format.fprintf fmt "Atom_vm_cpu_status_reported" + | Atom_vm_mem_status_reported -> Format.fprintf fmt "Atom_vm_mem_status_reported" + | Atom_package_installation_session_reported -> Format.fprintf fmt "Atom_package_installation_session_reported" + | Atom_default_network_rematch_info -> Format.fprintf fmt "Atom_default_network_rematch_info" + | Atom_network_selection_performance -> Format.fprintf fmt "Atom_network_selection_performance" + | Atom_network_nsd_reported -> Format.fprintf fmt "Atom_network_nsd_reported" + | Atom_bluetooth_disconnection_reason_reported -> Format.fprintf fmt "Atom_bluetooth_disconnection_reason_reported" + | Atom_bluetooth_local_versions_reported -> Format.fprintf fmt "Atom_bluetooth_local_versions_reported" + | Atom_bluetooth_remote_supported_features_reported -> Format.fprintf fmt "Atom_bluetooth_remote_supported_features_reported" + | Atom_bluetooth_local_supported_features_reported -> Format.fprintf fmt "Atom_bluetooth_local_supported_features_reported" + | Atom_bluetooth_gatt_app_info -> Format.fprintf fmt "Atom_bluetooth_gatt_app_info" + | Atom_brightness_configuration_updated -> Format.fprintf fmt "Atom_brightness_configuration_updated" + | Atom_wear_media_output_switcher_launched -> Format.fprintf fmt "Atom_wear_media_output_switcher_launched" + | Atom_wear_media_output_switcher_finished -> Format.fprintf fmt "Atom_wear_media_output_switcher_finished" + | Atom_wear_media_output_switcher_connection_reported -> Format.fprintf fmt "Atom_wear_media_output_switcher_connection_reported" + | Atom_wear_media_output_switcher_device_scan_triggered -> Format.fprintf fmt "Atom_wear_media_output_switcher_device_scan_triggered" + | Atom_wear_media_output_switcher_first_device_scan_latency -> Format.fprintf fmt "Atom_wear_media_output_switcher_first_device_scan_latency" + | Atom_wear_media_output_switcher_connect_device_latency -> Format.fprintf fmt "Atom_wear_media_output_switcher_connect_device_latency" + | Atom_package_manager_snapshot_reported -> Format.fprintf fmt "Atom_package_manager_snapshot_reported" + | Atom_package_manager_apps_filter_cache_build_reported -> Format.fprintf fmt "Atom_package_manager_apps_filter_cache_build_reported" + | Atom_package_manager_apps_filter_cache_update_reported -> Format.fprintf fmt "Atom_package_manager_apps_filter_cache_update_reported" + | Atom_launcher_impression_event -> Format.fprintf fmt "Atom_launcher_impression_event" + | Atom_wear_media_output_switcher_all_devices_scan_latency -> Format.fprintf fmt "Atom_wear_media_output_switcher_all_devices_scan_latency" + | Atom_ws_watch_face_edited -> Format.fprintf fmt "Atom_ws_watch_face_edited" + | Atom_ws_watch_face_favorite_action_reported -> Format.fprintf fmt "Atom_ws_watch_face_favorite_action_reported" + | Atom_ws_watch_face_set_action_reported -> Format.fprintf fmt "Atom_ws_watch_face_set_action_reported" + | Atom_package_uninstallation_reported -> Format.fprintf fmt "Atom_package_uninstallation_reported" + | Atom_game_mode_changed -> Format.fprintf fmt "Atom_game_mode_changed" + | Atom_game_mode_configuration_changed -> Format.fprintf fmt "Atom_game_mode_configuration_changed" + | Atom_bedtime_mode_state_changed -> Format.fprintf fmt "Atom_bedtime_mode_state_changed" + | Atom_network_slice_session_ended -> Format.fprintf fmt "Atom_network_slice_session_ended" + | Atom_network_slice_daily_data_usage_reported -> Format.fprintf fmt "Atom_network_slice_daily_data_usage_reported" + | Atom_nfc_tag_type_occurred -> Format.fprintf fmt "Atom_nfc_tag_type_occurred" + | Atom_nfc_aid_conflict_occurred -> Format.fprintf fmt "Atom_nfc_aid_conflict_occurred" + | Atom_nfc_reader_conflict_occurred -> Format.fprintf fmt "Atom_nfc_reader_conflict_occurred" + | Atom_ws_tile_list_changed -> Format.fprintf fmt "Atom_ws_tile_list_changed" + | Atom_get_type_accessed_without_permission -> Format.fprintf fmt "Atom_get_type_accessed_without_permission" + | Atom_mobile_bundled_app_info_gathered -> Format.fprintf fmt "Atom_mobile_bundled_app_info_gathered" + | Atom_ws_watch_face_complication_set_changed -> Format.fprintf fmt "Atom_ws_watch_face_complication_set_changed" + | Atom_media_drm_created -> Format.fprintf fmt "Atom_media_drm_created" + | Atom_media_drm_errored -> Format.fprintf fmt "Atom_media_drm_errored" + | Atom_media_drm_session_opened -> Format.fprintf fmt "Atom_media_drm_session_opened" + | Atom_media_drm_session_closed -> Format.fprintf fmt "Atom_media_drm_session_closed" + | Atom_user_selected_resolution -> Format.fprintf fmt "Atom_user_selected_resolution" + | Atom_unsafe_intent_event_reported -> Format.fprintf fmt "Atom_unsafe_intent_event_reported" + | Atom_performance_hint_session_reported -> Format.fprintf fmt "Atom_performance_hint_session_reported" + | Atom_mediametrics_midi_device_close_reported -> Format.fprintf fmt "Atom_mediametrics_midi_device_close_reported" + | Atom_biometric_touch_reported -> Format.fprintf fmt "Atom_biometric_touch_reported" + | Atom_hotword_audio_egress_event_reported -> Format.fprintf fmt "Atom_hotword_audio_egress_event_reported" + | Atom_location_enabled_state_changed -> Format.fprintf fmt "Atom_location_enabled_state_changed" + | Atom_ime_request_finished -> Format.fprintf fmt "Atom_ime_request_finished" + | Atom_usb_compliance_warnings_reported -> Format.fprintf fmt "Atom_usb_compliance_warnings_reported" + | Atom_app_supported_locales_changed -> Format.fprintf fmt "Atom_app_supported_locales_changed" + | Atom_media_provider_volume_recovery_reported -> Format.fprintf fmt "Atom_media_provider_volume_recovery_reported" + | Atom_biometric_properties_collected -> Format.fprintf fmt "Atom_biometric_properties_collected" + | Atom_kernel_wakeup_attributed -> Format.fprintf fmt "Atom_kernel_wakeup_attributed" + | Atom_screen_state_changed_v2 -> Format.fprintf fmt "Atom_screen_state_changed_v2" + | Atom_ws_backup_action_reported -> Format.fprintf fmt "Atom_ws_backup_action_reported" + | Atom_ws_restore_action_reported -> Format.fprintf fmt "Atom_ws_restore_action_reported" + | Atom_device_log_access_event_reported -> Format.fprintf fmt "Atom_device_log_access_event_reported" + | Atom_media_session_updated -> Format.fprintf fmt "Atom_media_session_updated" + | Atom_wear_oobe_state_changed -> Format.fprintf fmt "Atom_wear_oobe_state_changed" + | Atom_ws_notification_updated -> Format.fprintf fmt "Atom_ws_notification_updated" + | Atom_network_validation_failure_stats_daily_reported -> Format.fprintf fmt "Atom_network_validation_failure_stats_daily_reported" + | Atom_ws_complication_tapped -> Format.fprintf fmt "Atom_ws_complication_tapped" + | Atom_ws_notification_blocking -> Format.fprintf fmt "Atom_ws_notification_blocking" + | Atom_ws_notification_bridgemode_updated -> Format.fprintf fmt "Atom_ws_notification_bridgemode_updated" + | Atom_ws_notification_dismissal_actioned -> Format.fprintf fmt "Atom_ws_notification_dismissal_actioned" + | Atom_ws_notification_actioned -> Format.fprintf fmt "Atom_ws_notification_actioned" + | Atom_ws_notification_latency -> Format.fprintf fmt "Atom_ws_notification_latency" + | Atom_wifi_bytes_transfer -> Format.fprintf fmt "Atom_wifi_bytes_transfer" + | Atom_wifi_bytes_transfer_by_fg_bg -> Format.fprintf fmt "Atom_wifi_bytes_transfer_by_fg_bg" + | Atom_mobile_bytes_transfer -> Format.fprintf fmt "Atom_mobile_bytes_transfer" + | Atom_mobile_bytes_transfer_by_fg_bg -> Format.fprintf fmt "Atom_mobile_bytes_transfer_by_fg_bg" + | Atom_bluetooth_bytes_transfer -> Format.fprintf fmt "Atom_bluetooth_bytes_transfer" + | Atom_kernel_wakelock -> Format.fprintf fmt "Atom_kernel_wakelock" + | Atom_subsystem_sleep_state -> Format.fprintf fmt "Atom_subsystem_sleep_state" + | Atom_cpu_time_per_uid -> Format.fprintf fmt "Atom_cpu_time_per_uid" + | Atom_cpu_time_per_uid_freq -> Format.fprintf fmt "Atom_cpu_time_per_uid_freq" + | Atom_wifi_activity_info -> Format.fprintf fmt "Atom_wifi_activity_info" + | Atom_modem_activity_info -> Format.fprintf fmt "Atom_modem_activity_info" + | Atom_bluetooth_activity_info -> Format.fprintf fmt "Atom_bluetooth_activity_info" + | Atom_process_memory_state -> Format.fprintf fmt "Atom_process_memory_state" + | Atom_system_elapsed_realtime -> Format.fprintf fmt "Atom_system_elapsed_realtime" + | Atom_system_uptime -> Format.fprintf fmt "Atom_system_uptime" + | Atom_cpu_active_time -> Format.fprintf fmt "Atom_cpu_active_time" + | Atom_cpu_cluster_time -> Format.fprintf fmt "Atom_cpu_cluster_time" + | Atom_disk_space -> Format.fprintf fmt "Atom_disk_space" + | Atom_remaining_battery_capacity -> Format.fprintf fmt "Atom_remaining_battery_capacity" + | Atom_full_battery_capacity -> Format.fprintf fmt "Atom_full_battery_capacity" + | Atom_temperature -> Format.fprintf fmt "Atom_temperature" + | Atom_binder_calls -> Format.fprintf fmt "Atom_binder_calls" + | Atom_binder_calls_exceptions -> Format.fprintf fmt "Atom_binder_calls_exceptions" + | Atom_looper_stats -> Format.fprintf fmt "Atom_looper_stats" + | Atom_disk_stats -> Format.fprintf fmt "Atom_disk_stats" + | Atom_directory_usage -> Format.fprintf fmt "Atom_directory_usage" + | Atom_app_size -> Format.fprintf fmt "Atom_app_size" + | Atom_category_size -> Format.fprintf fmt "Atom_category_size" + | Atom_proc_stats -> Format.fprintf fmt "Atom_proc_stats" + | Atom_battery_voltage -> Format.fprintf fmt "Atom_battery_voltage" + | Atom_num_fingerprints_enrolled -> Format.fprintf fmt "Atom_num_fingerprints_enrolled" + | Atom_disk_io -> Format.fprintf fmt "Atom_disk_io" + | Atom_power_profile -> Format.fprintf fmt "Atom_power_profile" + | Atom_proc_stats_pkg_proc -> Format.fprintf fmt "Atom_proc_stats_pkg_proc" + | Atom_process_cpu_time -> Format.fprintf fmt "Atom_process_cpu_time" + | Atom_cpu_time_per_thread_freq -> Format.fprintf fmt "Atom_cpu_time_per_thread_freq" + | Atom_on_device_power_measurement -> Format.fprintf fmt "Atom_on_device_power_measurement" + | Atom_device_calculated_power_use -> Format.fprintf fmt "Atom_device_calculated_power_use" + | Atom_process_memory_high_water_mark -> Format.fprintf fmt "Atom_process_memory_high_water_mark" + | Atom_battery_level -> Format.fprintf fmt "Atom_battery_level" + | Atom_build_information -> Format.fprintf fmt "Atom_build_information" + | Atom_battery_cycle_count -> Format.fprintf fmt "Atom_battery_cycle_count" + | Atom_debug_elapsed_clock -> Format.fprintf fmt "Atom_debug_elapsed_clock" + | Atom_debug_failing_elapsed_clock -> Format.fprintf fmt "Atom_debug_failing_elapsed_clock" + | Atom_num_faces_enrolled -> Format.fprintf fmt "Atom_num_faces_enrolled" + | Atom_role_holder -> Format.fprintf fmt "Atom_role_holder" + | Atom_dangerous_permission_state -> Format.fprintf fmt "Atom_dangerous_permission_state" + | Atom_train_info -> Format.fprintf fmt "Atom_train_info" + | Atom_time_zone_data_info -> Format.fprintf fmt "Atom_time_zone_data_info" + | Atom_external_storage_info -> Format.fprintf fmt "Atom_external_storage_info" + | Atom_gpu_stats_global_info -> Format.fprintf fmt "Atom_gpu_stats_global_info" + | Atom_gpu_stats_app_info -> Format.fprintf fmt "Atom_gpu_stats_app_info" + | Atom_system_ion_heap_size -> Format.fprintf fmt "Atom_system_ion_heap_size" + | Atom_apps_on_external_storage_info -> Format.fprintf fmt "Atom_apps_on_external_storage_info" + | Atom_face_settings -> Format.fprintf fmt "Atom_face_settings" + | Atom_cooling_device -> Format.fprintf fmt "Atom_cooling_device" + | Atom_app_ops -> Format.fprintf fmt "Atom_app_ops" + | Atom_process_system_ion_heap_size -> Format.fprintf fmt "Atom_process_system_ion_heap_size" + | Atom_surfaceflinger_stats_global_info -> Format.fprintf fmt "Atom_surfaceflinger_stats_global_info" + | Atom_surfaceflinger_stats_layer_info -> Format.fprintf fmt "Atom_surfaceflinger_stats_layer_info" + | Atom_process_memory_snapshot -> Format.fprintf fmt "Atom_process_memory_snapshot" + | Atom_vms_client_stats -> Format.fprintf fmt "Atom_vms_client_stats" + | Atom_notification_remote_views -> Format.fprintf fmt "Atom_notification_remote_views" + | Atom_dangerous_permission_state_sampled -> Format.fprintf fmt "Atom_dangerous_permission_state_sampled" + | Atom_graphics_stats -> Format.fprintf fmt "Atom_graphics_stats" + | Atom_runtime_app_op_access -> Format.fprintf fmt "Atom_runtime_app_op_access" + | Atom_ion_heap_size -> Format.fprintf fmt "Atom_ion_heap_size" + | Atom_package_notification_preferences -> Format.fprintf fmt "Atom_package_notification_preferences" + | Atom_package_notification_channel_preferences -> Format.fprintf fmt "Atom_package_notification_channel_preferences" + | Atom_package_notification_channel_group_preferences -> Format.fprintf fmt "Atom_package_notification_channel_group_preferences" + | Atom_gnss_stats -> Format.fprintf fmt "Atom_gnss_stats" + | Atom_attributed_app_ops -> Format.fprintf fmt "Atom_attributed_app_ops" + | Atom_voice_call_session -> Format.fprintf fmt "Atom_voice_call_session" + | Atom_voice_call_rat_usage -> Format.fprintf fmt "Atom_voice_call_rat_usage" + | Atom_sim_slot_state -> Format.fprintf fmt "Atom_sim_slot_state" + | Atom_supported_radio_access_family -> Format.fprintf fmt "Atom_supported_radio_access_family" + | Atom_setting_snapshot -> Format.fprintf fmt "Atom_setting_snapshot" + | Atom_blob_info -> Format.fprintf fmt "Atom_blob_info" + | Atom_data_usage_bytes_transfer -> Format.fprintf fmt "Atom_data_usage_bytes_transfer" + | Atom_bytes_transfer_by_tag_and_metered -> Format.fprintf fmt "Atom_bytes_transfer_by_tag_and_metered" + | Atom_dnd_mode_rule -> Format.fprintf fmt "Atom_dnd_mode_rule" + | Atom_general_external_storage_access_stats -> Format.fprintf fmt "Atom_general_external_storage_access_stats" + | Atom_incoming_sms -> Format.fprintf fmt "Atom_incoming_sms" + | Atom_outgoing_sms -> Format.fprintf fmt "Atom_outgoing_sms" + | Atom_carrier_id_table_version -> Format.fprintf fmt "Atom_carrier_id_table_version" + | Atom_data_call_session -> Format.fprintf fmt "Atom_data_call_session" + | Atom_cellular_service_state -> Format.fprintf fmt "Atom_cellular_service_state" + | Atom_cellular_data_service_switch -> Format.fprintf fmt "Atom_cellular_data_service_switch" + | Atom_system_memory -> Format.fprintf fmt "Atom_system_memory" + | Atom_ims_registration_termination -> Format.fprintf fmt "Atom_ims_registration_termination" + | Atom_ims_registration_stats -> Format.fprintf fmt "Atom_ims_registration_stats" + | Atom_cpu_time_per_cluster_freq -> Format.fprintf fmt "Atom_cpu_time_per_cluster_freq" + | Atom_cpu_cycles_per_uid_cluster -> Format.fprintf fmt "Atom_cpu_cycles_per_uid_cluster" + | Atom_device_rotated_data -> Format.fprintf fmt "Atom_device_rotated_data" + | Atom_cpu_cycles_per_thread_group_cluster -> Format.fprintf fmt "Atom_cpu_cycles_per_thread_group_cluster" + | Atom_media_drm_activity_info -> Format.fprintf fmt "Atom_media_drm_activity_info" + | Atom_oem_managed_bytes_transfer -> Format.fprintf fmt "Atom_oem_managed_bytes_transfer" + | Atom_gnss_power_stats -> Format.fprintf fmt "Atom_gnss_power_stats" + | Atom_time_zone_detector_state -> Format.fprintf fmt "Atom_time_zone_detector_state" + | Atom_keystore2_storage_stats -> Format.fprintf fmt "Atom_keystore2_storage_stats" + | Atom_rkp_pool_stats -> Format.fprintf fmt "Atom_rkp_pool_stats" + | Atom_process_dmabuf_memory -> Format.fprintf fmt "Atom_process_dmabuf_memory" + | Atom_pending_alarm_info -> Format.fprintf fmt "Atom_pending_alarm_info" + | Atom_user_level_hibernated_apps -> Format.fprintf fmt "Atom_user_level_hibernated_apps" + | Atom_launcher_layout_snapshot -> Format.fprintf fmt "Atom_launcher_layout_snapshot" + | Atom_global_hibernated_apps -> Format.fprintf fmt "Atom_global_hibernated_apps" + | Atom_input_event_latency_sketch -> Format.fprintf fmt "Atom_input_event_latency_sketch" + | Atom_battery_usage_stats_before_reset -> Format.fprintf fmt "Atom_battery_usage_stats_before_reset" + | Atom_battery_usage_stats_since_reset -> Format.fprintf fmt "Atom_battery_usage_stats_since_reset" + | Atom_battery_usage_stats_since_reset_using_power_profile_model -> Format.fprintf fmt "Atom_battery_usage_stats_since_reset_using_power_profile_model" + | Atom_installed_incremental_package -> Format.fprintf fmt "Atom_installed_incremental_package" + | Atom_telephony_network_requests -> Format.fprintf fmt "Atom_telephony_network_requests" + | Atom_app_search_storage_info -> Format.fprintf fmt "Atom_app_search_storage_info" + | Atom_vmstat -> Format.fprintf fmt "Atom_vmstat" + | Atom_keystore2_key_creation_with_general_info -> Format.fprintf fmt "Atom_keystore2_key_creation_with_general_info" + | Atom_keystore2_key_creation_with_auth_info -> Format.fprintf fmt "Atom_keystore2_key_creation_with_auth_info" + | Atom_keystore2_key_creation_with_purpose_and_modes_info -> Format.fprintf fmt "Atom_keystore2_key_creation_with_purpose_and_modes_info" + | Atom_keystore2_atom_with_overflow -> Format.fprintf fmt "Atom_keystore2_atom_with_overflow" + | Atom_keystore2_key_operation_with_purpose_and_modes_info -> Format.fprintf fmt "Atom_keystore2_key_operation_with_purpose_and_modes_info" + | Atom_keystore2_key_operation_with_general_info -> Format.fprintf fmt "Atom_keystore2_key_operation_with_general_info" + | Atom_rkp_error_stats -> Format.fprintf fmt "Atom_rkp_error_stats" + | Atom_keystore2_crash_stats -> Format.fprintf fmt "Atom_keystore2_crash_stats" + | Atom_vendor_apex_info -> Format.fprintf fmt "Atom_vendor_apex_info" + | Atom_accessibility_shortcut_stats -> Format.fprintf fmt "Atom_accessibility_shortcut_stats" + | Atom_accessibility_floating_menu_stats -> Format.fprintf fmt "Atom_accessibility_floating_menu_stats" + | Atom_data_usage_bytes_transfer_v2 -> Format.fprintf fmt "Atom_data_usage_bytes_transfer_v2" + | Atom_media_capabilities -> Format.fprintf fmt "Atom_media_capabilities" + | Atom_car_watchdog_system_io_usage_summary -> Format.fprintf fmt "Atom_car_watchdog_system_io_usage_summary" + | Atom_car_watchdog_uid_io_usage_summary -> Format.fprintf fmt "Atom_car_watchdog_uid_io_usage_summary" + | Atom_ims_registration_feature_tag_stats -> Format.fprintf fmt "Atom_ims_registration_feature_tag_stats" + | Atom_rcs_client_provisioning_stats -> Format.fprintf fmt "Atom_rcs_client_provisioning_stats" + | Atom_rcs_acs_provisioning_stats -> Format.fprintf fmt "Atom_rcs_acs_provisioning_stats" + | Atom_sip_delegate_stats -> Format.fprintf fmt "Atom_sip_delegate_stats" + | Atom_sip_transport_feature_tag_stats -> Format.fprintf fmt "Atom_sip_transport_feature_tag_stats" + | Atom_sip_message_response -> Format.fprintf fmt "Atom_sip_message_response" + | Atom_sip_transport_session -> Format.fprintf fmt "Atom_sip_transport_session" + | Atom_ims_dedicated_bearer_listener_event -> Format.fprintf fmt "Atom_ims_dedicated_bearer_listener_event" + | Atom_ims_dedicated_bearer_event -> Format.fprintf fmt "Atom_ims_dedicated_bearer_event" + | Atom_ims_registration_service_desc_stats -> Format.fprintf fmt "Atom_ims_registration_service_desc_stats" + | Atom_uce_event_stats -> Format.fprintf fmt "Atom_uce_event_stats" + | Atom_presence_notify_event -> Format.fprintf fmt "Atom_presence_notify_event" + | Atom_gba_event -> Format.fprintf fmt "Atom_gba_event" + | Atom_per_sim_status -> Format.fprintf fmt "Atom_per_sim_status" + | Atom_gpu_work_per_uid -> Format.fprintf fmt "Atom_gpu_work_per_uid" + | Atom_persistent_uri_permissions_amount_per_package -> Format.fprintf fmt "Atom_persistent_uri_permissions_amount_per_package" + | Atom_signed_partition_info -> Format.fprintf fmt "Atom_signed_partition_info" + | Atom_pinned_file_sizes_per_package -> Format.fprintf fmt "Atom_pinned_file_sizes_per_package" + | Atom_pending_intents_per_package -> Format.fprintf fmt "Atom_pending_intents_per_package" + | Atom_user_info -> Format.fprintf fmt "Atom_user_info" + | Atom_telephony_network_requests_v2 -> Format.fprintf fmt "Atom_telephony_network_requests_v2" + | Atom_device_telephony_properties -> Format.fprintf fmt "Atom_device_telephony_properties" + | Atom_remote_key_provisioning_error_counts -> Format.fprintf fmt "Atom_remote_key_provisioning_error_counts" + | Atom_safety_state -> Format.fprintf fmt "Atom_safety_state" + | Atom_incoming_mms -> Format.fprintf fmt "Atom_incoming_mms" + | Atom_outgoing_mms -> Format.fprintf fmt "Atom_outgoing_mms" + | Atom_multi_user_info -> Format.fprintf fmt "Atom_multi_user_info" + | Atom_network_bpf_map_info -> Format.fprintf fmt "Atom_network_bpf_map_info" + | Atom_outgoing_short_code_sms -> Format.fprintf fmt "Atom_outgoing_short_code_sms" + | Atom_connectivity_state_sample -> Format.fprintf fmt "Atom_connectivity_state_sample" + | Atom_network_selection_rematch_reasons_info -> Format.fprintf fmt "Atom_network_selection_rematch_reasons_info" + | Atom_game_mode_info -> Format.fprintf fmt "Atom_game_mode_info" + | Atom_game_mode_configuration -> Format.fprintf fmt "Atom_game_mode_configuration" + | Atom_game_mode_listener -> Format.fprintf fmt "Atom_game_mode_listener" + | Atom_network_slice_request_count -> Format.fprintf fmt "Atom_network_slice_request_count" + | Atom_ws_tile_snapshot -> Format.fprintf fmt "Atom_ws_tile_snapshot" + | Atom_ws_active_watch_face_complication_set_snapshot -> Format.fprintf fmt "Atom_ws_active_watch_face_complication_set_snapshot" + | Atom_process_state -> Format.fprintf fmt "Atom_process_state" + | Atom_process_association -> Format.fprintf fmt "Atom_process_association" + | Atom_adpf_system_component_info -> Format.fprintf fmt "Atom_adpf_system_component_info" + | Atom_notification_memory_use -> Format.fprintf fmt "Atom_notification_memory_use" + | Atom_hdr_capabilities -> Format.fprintf fmt "Atom_hdr_capabilities" + | Atom_ws_favourite_watch_face_list_snapshot -> Format.fprintf fmt "Atom_ws_favourite_watch_face_list_snapshot" + | Atom_accessibility_check_result_reported -> Format.fprintf fmt "Atom_accessibility_check_result_reported" + | Atom_adaptive_auth_unlock_after_lock_reported -> Format.fprintf fmt "Atom_adaptive_auth_unlock_after_lock_reported" + | Atom_thermal_status_called -> Format.fprintf fmt "Atom_thermal_status_called" + | Atom_thermal_headroom_called -> Format.fprintf fmt "Atom_thermal_headroom_called" + | Atom_thermal_headroom_thresholds_called -> Format.fprintf fmt "Atom_thermal_headroom_thresholds_called" + | Atom_adpf_hint_session_tid_cleanup -> Format.fprintf fmt "Atom_adpf_hint_session_tid_cleanup" + | Atom_thermal_headroom_thresholds -> Format.fprintf fmt "Atom_thermal_headroom_thresholds" + | Atom_adpf_session_snapshot -> Format.fprintf fmt "Atom_adpf_session_snapshot" + | Atom_jsscriptengine_latency_reported -> Format.fprintf fmt "Atom_jsscriptengine_latency_reported" + | Atom_ad_services_api_called -> Format.fprintf fmt "Atom_ad_services_api_called" + | Atom_ad_services_mesurement_reports_uploaded -> Format.fprintf fmt "Atom_ad_services_mesurement_reports_uploaded" + | Atom_mobile_data_download_file_group_status_reported -> Format.fprintf fmt "Atom_mobile_data_download_file_group_status_reported" + | Atom_mobile_data_download_download_result_reported -> Format.fprintf fmt "Atom_mobile_data_download_download_result_reported" + | Atom_ad_services_settings_usage_reported -> Format.fprintf fmt "Atom_ad_services_settings_usage_reported" + | Atom_background_fetch_process_reported -> Format.fprintf fmt "Atom_background_fetch_process_reported" + | Atom_update_custom_audience_process_reported -> Format.fprintf fmt "Atom_update_custom_audience_process_reported" + | Atom_run_ad_bidding_process_reported -> Format.fprintf fmt "Atom_run_ad_bidding_process_reported" + | Atom_run_ad_scoring_process_reported -> Format.fprintf fmt "Atom_run_ad_scoring_process_reported" + | Atom_run_ad_selection_process_reported -> Format.fprintf fmt "Atom_run_ad_selection_process_reported" + | Atom_run_ad_bidding_per_ca_process_reported -> Format.fprintf fmt "Atom_run_ad_bidding_per_ca_process_reported" + | Atom_mobile_data_download_file_group_storage_stats_reported -> Format.fprintf fmt "Atom_mobile_data_download_file_group_storage_stats_reported" + | Atom_ad_services_measurement_registrations -> Format.fprintf fmt "Atom_ad_services_measurement_registrations" + | Atom_ad_services_get_topics_reported -> Format.fprintf fmt "Atom_ad_services_get_topics_reported" + | Atom_ad_services_epoch_computation_get_top_topics_reported -> Format.fprintf fmt "Atom_ad_services_epoch_computation_get_top_topics_reported" + | Atom_ad_services_epoch_computation_classifier_reported -> Format.fprintf fmt "Atom_ad_services_epoch_computation_classifier_reported" + | Atom_ad_services_back_compat_get_topics_reported -> Format.fprintf fmt "Atom_ad_services_back_compat_get_topics_reported" + | Atom_ad_services_back_compat_epoch_computation_classifier_reported -> Format.fprintf fmt "Atom_ad_services_back_compat_epoch_computation_classifier_reported" + | Atom_ad_services_measurement_debug_keys -> Format.fprintf fmt "Atom_ad_services_measurement_debug_keys" + | Atom_ad_services_error_reported -> Format.fprintf fmt "Atom_ad_services_error_reported" + | Atom_ad_services_background_jobs_execution_reported -> Format.fprintf fmt "Atom_ad_services_background_jobs_execution_reported" + | Atom_ad_services_measurement_delayed_source_registration -> Format.fprintf fmt "Atom_ad_services_measurement_delayed_source_registration" + | Atom_ad_services_measurement_attribution -> Format.fprintf fmt "Atom_ad_services_measurement_attribution" + | Atom_ad_services_measurement_jobs -> Format.fprintf fmt "Atom_ad_services_measurement_jobs" + | Atom_ad_services_measurement_wipeout -> Format.fprintf fmt "Atom_ad_services_measurement_wipeout" + | Atom_ad_services_measurement_ad_id_match_for_debug_keys -> Format.fprintf fmt "Atom_ad_services_measurement_ad_id_match_for_debug_keys" + | Atom_ad_services_enrollment_data_stored -> Format.fprintf fmt "Atom_ad_services_enrollment_data_stored" + | Atom_ad_services_enrollment_file_downloaded -> Format.fprintf fmt "Atom_ad_services_enrollment_file_downloaded" + | Atom_ad_services_enrollment_matched -> Format.fprintf fmt "Atom_ad_services_enrollment_matched" + | Atom_ad_services_consent_migrated -> Format.fprintf fmt "Atom_ad_services_consent_migrated" + | Atom_ad_services_enrollment_failed -> Format.fprintf fmt "Atom_ad_services_enrollment_failed" + | Atom_ad_services_measurement_click_verification -> Format.fprintf fmt "Atom_ad_services_measurement_click_verification" + | Atom_ad_services_encryption_key_fetched -> Format.fprintf fmt "Atom_ad_services_encryption_key_fetched" + | Atom_ad_services_encryption_key_db_transaction_ended -> Format.fprintf fmt "Atom_ad_services_encryption_key_db_transaction_ended" + | Atom_destination_registered_beacons -> Format.fprintf fmt "Atom_destination_registered_beacons" + | Atom_report_interaction_api_called -> Format.fprintf fmt "Atom_report_interaction_api_called" + | Atom_interaction_reporting_table_cleared -> Format.fprintf fmt "Atom_interaction_reporting_table_cleared" + | Atom_app_manifest_config_helper_called -> Format.fprintf fmt "Atom_app_manifest_config_helper_called" + | Atom_ad_filtering_process_join_ca_reported -> Format.fprintf fmt "Atom_ad_filtering_process_join_ca_reported" + | Atom_ad_filtering_process_ad_selection_reported -> Format.fprintf fmt "Atom_ad_filtering_process_ad_selection_reported" + | Atom_ad_counter_histogram_updater_reported -> Format.fprintf fmt "Atom_ad_counter_histogram_updater_reported" + | Atom_signature_verification -> Format.fprintf fmt "Atom_signature_verification" + | Atom_k_anon_immediate_sign_join_status_reported -> Format.fprintf fmt "Atom_k_anon_immediate_sign_join_status_reported" + | Atom_k_anon_background_job_status_reported -> Format.fprintf fmt "Atom_k_anon_background_job_status_reported" + | Atom_k_anon_initialize_status_reported -> Format.fprintf fmt "Atom_k_anon_initialize_status_reported" + | Atom_k_anon_sign_status_reported -> Format.fprintf fmt "Atom_k_anon_sign_status_reported" + | Atom_k_anon_join_status_reported -> Format.fprintf fmt "Atom_k_anon_join_status_reported" + | Atom_k_anon_key_attestation_status_reported -> Format.fprintf fmt "Atom_k_anon_key_attestation_status_reported" + | Atom_get_ad_selection_data_api_called -> Format.fprintf fmt "Atom_get_ad_selection_data_api_called" + | Atom_get_ad_selection_data_buyer_input_generated -> Format.fprintf fmt "Atom_get_ad_selection_data_buyer_input_generated" + | Atom_background_job_scheduling_reported -> Format.fprintf fmt "Atom_background_job_scheduling_reported" + | Atom_topics_encryption_epoch_computation_reported -> Format.fprintf fmt "Atom_topics_encryption_epoch_computation_reported" + | Atom_topics_encryption_get_topics_reported -> Format.fprintf fmt "Atom_topics_encryption_get_topics_reported" + | Atom_adservices_shell_command_called -> Format.fprintf fmt "Atom_adservices_shell_command_called" + | Atom_update_signals_api_called -> Format.fprintf fmt "Atom_update_signals_api_called" + | Atom_encoding_job_run -> Format.fprintf fmt "Atom_encoding_job_run" + | Atom_encoding_js_fetch -> Format.fprintf fmt "Atom_encoding_js_fetch" + | Atom_encoding_js_execution -> Format.fprintf fmt "Atom_encoding_js_execution" + | Atom_persist_ad_selection_result_called -> Format.fprintf fmt "Atom_persist_ad_selection_result_called" + | Atom_server_auction_key_fetch_called -> Format.fprintf fmt "Atom_server_auction_key_fetch_called" + | Atom_server_auction_background_key_fetch_enabled -> Format.fprintf fmt "Atom_server_auction_background_key_fetch_enabled" + | Atom_ad_services_measurement_process_odp_registration -> Format.fprintf fmt "Atom_ad_services_measurement_process_odp_registration" + | Atom_ad_services_measurement_notify_registration_to_odp -> Format.fprintf fmt "Atom_ad_services_measurement_notify_registration_to_odp" + | Atom_select_ads_from_outcomes_api_called -> Format.fprintf fmt "Atom_select_ads_from_outcomes_api_called" + | Atom_report_impression_api_called -> Format.fprintf fmt "Atom_report_impression_api_called" + | Atom_ad_services_enrollment_transaction_stats -> Format.fprintf fmt "Atom_ad_services_enrollment_transaction_stats" + | Atom_ad_services_cobalt_logger_event_reported -> Format.fprintf fmt "Atom_ad_services_cobalt_logger_event_reported" + | Atom_ad_services_cobalt_periodic_job_event_reported -> Format.fprintf fmt "Atom_ad_services_cobalt_periodic_job_event_reported" + | Atom_update_signals_process_reported -> Format.fprintf fmt "Atom_update_signals_process_reported" + | Atom_topics_schedule_epoch_job_setting_reported -> Format.fprintf fmt "Atom_topics_schedule_epoch_job_setting_reported" + | Atom_ai_wallpapers_button_pressed -> Format.fprintf fmt "Atom_ai_wallpapers_button_pressed" + | Atom_ai_wallpapers_template_selected -> Format.fprintf fmt "Atom_ai_wallpapers_template_selected" + | Atom_ai_wallpapers_term_selected -> Format.fprintf fmt "Atom_ai_wallpapers_term_selected" + | Atom_ai_wallpapers_wallpaper_set -> Format.fprintf fmt "Atom_ai_wallpapers_wallpaper_set" + | Atom_ai_wallpapers_session_summary -> Format.fprintf fmt "Atom_ai_wallpapers_session_summary" + | Atom_apex_installation_requested -> Format.fprintf fmt "Atom_apex_installation_requested" + | Atom_apex_installation_staged -> Format.fprintf fmt "Atom_apex_installation_staged" + | Atom_apex_installation_ended -> Format.fprintf fmt "Atom_apex_installation_ended" + | Atom_app_search_set_schema_stats_reported -> Format.fprintf fmt "Atom_app_search_set_schema_stats_reported" + | Atom_app_search_schema_migration_stats_reported -> Format.fprintf fmt "Atom_app_search_schema_migration_stats_reported" + | Atom_app_search_usage_search_intent_stats_reported -> Format.fprintf fmt "Atom_app_search_usage_search_intent_stats_reported" + | Atom_app_search_usage_search_intent_raw_query_stats_reported -> Format.fprintf fmt "Atom_app_search_usage_search_intent_raw_query_stats_reported" + | Atom_app_search_apps_indexer_stats_reported -> Format.fprintf fmt "Atom_app_search_apps_indexer_stats_reported" + | Atom_art_datum_reported -> Format.fprintf fmt "Atom_art_datum_reported" + | Atom_art_device_datum_reported -> Format.fprintf fmt "Atom_art_device_datum_reported" + | Atom_art_datum_delta_reported -> Format.fprintf fmt "Atom_art_datum_delta_reported" + | Atom_art_dex2_oat_reported -> Format.fprintf fmt "Atom_art_dex2_oat_reported" + | Atom_art_device_status -> Format.fprintf fmt "Atom_art_device_status" + | Atom_background_dexopt_job_ended -> Format.fprintf fmt "Atom_background_dexopt_job_ended" + | Atom_prereboot_dexopt_job_ended -> Format.fprintf fmt "Atom_prereboot_dexopt_job_ended" + | Atom_odrefresh_reported -> Format.fprintf fmt "Atom_odrefresh_reported" + | Atom_odsign_reported -> Format.fprintf fmt "Atom_odsign_reported" + | Atom_autofill_ui_event_reported -> Format.fprintf fmt "Atom_autofill_ui_event_reported" + | Atom_autofill_fill_request_reported -> Format.fprintf fmt "Atom_autofill_fill_request_reported" + | Atom_autofill_fill_response_reported -> Format.fprintf fmt "Atom_autofill_fill_response_reported" + | Atom_autofill_save_event_reported -> Format.fprintf fmt "Atom_autofill_save_event_reported" + | Atom_autofill_session_committed -> Format.fprintf fmt "Atom_autofill_session_committed" + | Atom_autofill_field_classification_event_reported -> Format.fprintf fmt "Atom_autofill_field_classification_event_reported" + | Atom_car_recents_event_reported -> Format.fprintf fmt "Atom_car_recents_event_reported" + | Atom_car_calm_mode_event_reported -> Format.fprintf fmt "Atom_car_calm_mode_event_reported" + | Atom_car_wakeup_from_suspend_reported -> Format.fprintf fmt "Atom_car_wakeup_from_suspend_reported" + | Atom_plugin_initialized -> Format.fprintf fmt "Atom_plugin_initialized" + | Atom_bluetooth_hashed_device_name_reported -> Format.fprintf fmt "Atom_bluetooth_hashed_device_name_reported" + | Atom_bluetooth_l2_cap_coc_client_connection -> Format.fprintf fmt "Atom_bluetooth_l2_cap_coc_client_connection" + | Atom_bluetooth_l2_cap_coc_server_connection -> Format.fprintf fmt "Atom_bluetooth_l2_cap_coc_server_connection" + | Atom_bluetooth_le_session_connected -> Format.fprintf fmt "Atom_bluetooth_le_session_connected" + | Atom_restricted_bluetooth_device_name_reported -> Format.fprintf fmt "Atom_restricted_bluetooth_device_name_reported" + | Atom_bluetooth_profile_connection_attempted -> Format.fprintf fmt "Atom_bluetooth_profile_connection_attempted" + | Atom_bluetooth_content_profile_error_reported -> Format.fprintf fmt "Atom_bluetooth_content_profile_error_reported" + | Atom_bluetooth_rfcomm_connection_attempted -> Format.fprintf fmt "Atom_bluetooth_rfcomm_connection_attempted" + | Atom_remote_device_information_with_metric_id -> Format.fprintf fmt "Atom_remote_device_information_with_metric_id" + | Atom_le_app_scan_state_changed -> Format.fprintf fmt "Atom_le_app_scan_state_changed" + | Atom_le_radio_scan_stopped -> Format.fprintf fmt "Atom_le_radio_scan_stopped" + | Atom_le_scan_result_received -> Format.fprintf fmt "Atom_le_scan_result_received" + | Atom_le_scan_abused -> Format.fprintf fmt "Atom_le_scan_abused" + | Atom_le_adv_state_changed -> Format.fprintf fmt "Atom_le_adv_state_changed" + | Atom_le_adv_error_reported -> Format.fprintf fmt "Atom_le_adv_error_reported" + | Atom_a2_dp_session_reported -> Format.fprintf fmt "Atom_a2_dp_session_reported" + | Atom_bluetooth_cross_layer_event_reported -> Format.fprintf fmt "Atom_bluetooth_cross_layer_event_reported" + | Atom_broadcast_audio_session_reported -> Format.fprintf fmt "Atom_broadcast_audio_session_reported" + | Atom_broadcast_audio_sync_reported -> Format.fprintf fmt "Atom_broadcast_audio_sync_reported" + | Atom_bluetooth_rfcomm_connection_reported_at_close -> Format.fprintf fmt "Atom_bluetooth_rfcomm_connection_reported_at_close" + | Atom_bluetooth_le_connection -> Format.fprintf fmt "Atom_bluetooth_le_connection" + | Atom_broadcast_sent -> Format.fprintf fmt "Atom_broadcast_sent" + | Atom_camera_feature_combination_query_event -> Format.fprintf fmt "Atom_camera_feature_combination_query_event" + | Atom_certificate_transparency_log_list_state_changed -> Format.fprintf fmt "Atom_certificate_transparency_log_list_state_changed" + | Atom_certificate_transparency_log_list_update_failed -> Format.fprintf fmt "Atom_certificate_transparency_log_list_update_failed" + | Atom_daily_keepalive_info_reported -> Format.fprintf fmt "Atom_daily_keepalive_info_reported" + | Atom_network_request_state_changed -> Format.fprintf fmt "Atom_network_request_state_changed" + | Atom_tethering_active_sessions_reported -> Format.fprintf fmt "Atom_tethering_active_sessions_reported" + | Atom_network_stats_recorder_file_operated -> Format.fprintf fmt "Atom_network_stats_recorder_file_operated" + | Atom_core_networking_terrible_error_occurred -> Format.fprintf fmt "Atom_core_networking_terrible_error_occurred" + | Atom_apf_session_info_reported -> Format.fprintf fmt "Atom_apf_session_info_reported" + | Atom_ip_client_ra_info_reported -> Format.fprintf fmt "Atom_ip_client_ra_info_reported" + | Atom_vpn_connection_state_changed -> Format.fprintf fmt "Atom_vpn_connection_state_changed" + | Atom_vpn_connection_reported -> Format.fprintf fmt "Atom_vpn_connection_reported" + | Atom_cpu_policy -> Format.fprintf fmt "Atom_cpu_policy" + | Atom_credential_manager_api_called -> Format.fprintf fmt "Atom_credential_manager_api_called" + | Atom_credential_manager_init_phase_reported -> Format.fprintf fmt "Atom_credential_manager_init_phase_reported" + | Atom_credential_manager_candidate_phase_reported -> Format.fprintf fmt "Atom_credential_manager_candidate_phase_reported" + | Atom_credential_manager_final_phase_reported -> Format.fprintf fmt "Atom_credential_manager_final_phase_reported" + | Atom_credential_manager_total_reported -> Format.fprintf fmt "Atom_credential_manager_total_reported" + | Atom_credential_manager_finalnouid_reported -> Format.fprintf fmt "Atom_credential_manager_finalnouid_reported" + | Atom_credential_manager_get_reported -> Format.fprintf fmt "Atom_credential_manager_get_reported" + | Atom_credential_manager_auth_click_reported -> Format.fprintf fmt "Atom_credential_manager_auth_click_reported" + | Atom_credential_manager_apiv2_called -> Format.fprintf fmt "Atom_credential_manager_apiv2_called" + | Atom_cronet_engine_created -> Format.fprintf fmt "Atom_cronet_engine_created" + | Atom_cronet_traffic_reported -> Format.fprintf fmt "Atom_cronet_traffic_reported" + | Atom_cronet_engine_builder_initialized -> Format.fprintf fmt "Atom_cronet_engine_builder_initialized" + | Atom_cronet_http_flags_initialized -> Format.fprintf fmt "Atom_cronet_http_flags_initialized" + | Atom_cronet_initialized -> Format.fprintf fmt "Atom_cronet_initialized" + | Atom_desktop_mode_ui_changed -> Format.fprintf fmt "Atom_desktop_mode_ui_changed" + | Atom_desktop_mode_session_task_update -> Format.fprintf fmt "Atom_desktop_mode_session_task_update" + | Atom_desktop_mode_task_size_updated -> Format.fprintf fmt "Atom_desktop_mode_task_size_updated" + | Atom_device_lock_check_in_request_reported -> Format.fprintf fmt "Atom_device_lock_check_in_request_reported" + | Atom_device_lock_provisioning_complete_reported -> Format.fprintf fmt "Atom_device_lock_provisioning_complete_reported" + | Atom_device_lock_kiosk_app_request_reported -> Format.fprintf fmt "Atom_device_lock_kiosk_app_request_reported" + | Atom_device_lock_check_in_retry_reported -> Format.fprintf fmt "Atom_device_lock_check_in_retry_reported" + | Atom_device_lock_provision_failure_reported -> Format.fprintf fmt "Atom_device_lock_provision_failure_reported" + | Atom_device_lock_lock_unlock_device_failure_reported -> Format.fprintf fmt "Atom_device_lock_lock_unlock_device_failure_reported" + | Atom_device_policy_management_mode -> Format.fprintf fmt "Atom_device_policy_management_mode" + | Atom_device_policy_state -> Format.fprintf fmt "Atom_device_policy_state" + | Atom_display_mode_director_vote_changed -> Format.fprintf fmt "Atom_display_mode_director_vote_changed" + | Atom_external_display_state_changed -> Format.fprintf fmt "Atom_external_display_state_changed" + | Atom_dnd_state_changed -> Format.fprintf fmt "Atom_dnd_state_changed" + | Atom_dream_setting_changed -> Format.fprintf fmt "Atom_dream_setting_changed" + | Atom_dream_setting_snapshot -> Format.fprintf fmt "Atom_dream_setting_snapshot" + | Atom_express_event_reported -> Format.fprintf fmt "Atom_express_event_reported" + | Atom_express_histogram_sample_reported -> Format.fprintf fmt "Atom_express_histogram_sample_reported" + | Atom_express_uid_event_reported -> Format.fprintf fmt "Atom_express_uid_event_reported" + | Atom_express_uid_histogram_sample_reported -> Format.fprintf fmt "Atom_express_uid_histogram_sample_reported" + | Atom_federated_compute_api_called -> Format.fprintf fmt "Atom_federated_compute_api_called" + | Atom_federated_compute_training_event_reported -> Format.fprintf fmt "Atom_federated_compute_training_event_reported" + | Atom_example_iterator_next_latency_reported -> Format.fprintf fmt "Atom_example_iterator_next_latency_reported" + | Atom_full_screen_intent_launched -> Format.fprintf fmt "Atom_full_screen_intent_launched" + | Atom_bal_allowed -> Format.fprintf fmt "Atom_bal_allowed" + | Atom_in_task_activity_started -> Format.fprintf fmt "Atom_in_task_activity_started" + | Atom_device_orientation_changed -> Format.fprintf fmt "Atom_device_orientation_changed" + | Atom_cached_apps_high_watermark -> Format.fprintf fmt "Atom_cached_apps_high_watermark" + | Atom_stylus_prediction_metrics_reported -> Format.fprintf fmt "Atom_stylus_prediction_metrics_reported" + | Atom_user_risk_event_reported -> Format.fprintf fmt "Atom_user_risk_event_reported" + | Atom_media_projection_state_changed -> Format.fprintf fmt "Atom_media_projection_state_changed" + | Atom_media_projection_target_changed -> Format.fprintf fmt "Atom_media_projection_target_changed" + | Atom_excessive_binder_proxy_count_reported -> Format.fprintf fmt "Atom_excessive_binder_proxy_count_reported" + | Atom_proxy_bytes_transfer_by_fg_bg -> Format.fprintf fmt "Atom_proxy_bytes_transfer_by_fg_bg" + | Atom_mobile_bytes_transfer_by_proc_state -> Format.fprintf fmt "Atom_mobile_bytes_transfer_by_proc_state" + | Atom_biometric_frr_notification -> Format.fprintf fmt "Atom_biometric_frr_notification" + | Atom_sensitive_content_media_projection_session -> Format.fprintf fmt "Atom_sensitive_content_media_projection_session" + | Atom_sensitive_notification_app_protection_session -> Format.fprintf fmt "Atom_sensitive_notification_app_protection_session" + | Atom_sensitive_notification_app_protection_applied -> Format.fprintf fmt "Atom_sensitive_notification_app_protection_applied" + | Atom_sensitive_notification_redaction -> Format.fprintf fmt "Atom_sensitive_notification_redaction" + | Atom_sensitive_content_app_protection -> Format.fprintf fmt "Atom_sensitive_content_app_protection" + | Atom_app_restriction_state_changed -> Format.fprintf fmt "Atom_app_restriction_state_changed" + | Atom_battery_usage_stats_per_uid -> Format.fprintf fmt "Atom_battery_usage_stats_per_uid" + | Atom_postgc_memory_snapshot -> Format.fprintf fmt "Atom_postgc_memory_snapshot" + | Atom_power_save_temp_allowlist_changed -> Format.fprintf fmt "Atom_power_save_temp_allowlist_changed" + | Atom_app_op_access_tracked -> Format.fprintf fmt "Atom_app_op_access_tracked" + | Atom_content_or_file_uri_event_reported -> Format.fprintf fmt "Atom_content_or_file_uri_event_reported" + | Atom_application_grammatical_inflection_changed -> Format.fprintf fmt "Atom_application_grammatical_inflection_changed" + | Atom_system_grammatical_inflection_changed -> Format.fprintf fmt "Atom_system_grammatical_inflection_changed" + | Atom_battery_health -> Format.fprintf fmt "Atom_battery_health" + | Atom_hdmi_earc_status_reported -> Format.fprintf fmt "Atom_hdmi_earc_status_reported" + | Atom_hdmi_soundbar_mode_status_reported -> Format.fprintf fmt "Atom_hdmi_soundbar_mode_status_reported" + | Atom_health_connect_api_called -> Format.fprintf fmt "Atom_health_connect_api_called" + | Atom_health_connect_usage_stats -> Format.fprintf fmt "Atom_health_connect_usage_stats" + | Atom_health_connect_storage_stats -> Format.fprintf fmt "Atom_health_connect_storage_stats" + | Atom_health_connect_api_invoked -> Format.fprintf fmt "Atom_health_connect_api_invoked" + | Atom_exercise_route_api_called -> Format.fprintf fmt "Atom_exercise_route_api_called" + | Atom_health_connect_export_invoked -> Format.fprintf fmt "Atom_health_connect_export_invoked" + | Atom_health_connect_import_invoked -> Format.fprintf fmt "Atom_health_connect_import_invoked" + | Atom_health_connect_export_import_stats_reported -> Format.fprintf fmt "Atom_health_connect_export_import_stats_reported" + | Atom_health_connect_ui_impression -> Format.fprintf fmt "Atom_health_connect_ui_impression" + | Atom_health_connect_ui_interaction -> Format.fprintf fmt "Atom_health_connect_ui_interaction" + | Atom_health_connect_app_opened_reported -> Format.fprintf fmt "Atom_health_connect_app_opened_reported" + | Atom_hotword_egress_size_atom_reported -> Format.fprintf fmt "Atom_hotword_egress_size_atom_reported" + | Atom_ike_session_terminated -> Format.fprintf fmt "Atom_ike_session_terminated" + | Atom_ike_liveness_check_session_validated -> Format.fprintf fmt "Atom_ike_liveness_check_session_validated" + | Atom_negotiated_security_association -> Format.fprintf fmt "Atom_negotiated_security_association" + | Atom_keyboard_configured -> Format.fprintf fmt "Atom_keyboard_configured" + | Atom_keyboard_systems_event_reported -> Format.fprintf fmt "Atom_keyboard_systems_event_reported" + | Atom_inputdevice_usage_reported -> Format.fprintf fmt "Atom_inputdevice_usage_reported" + | Atom_input_event_latency_reported -> Format.fprintf fmt "Atom_input_event_latency_reported" + | Atom_touchpad_usage -> Format.fprintf fmt "Atom_touchpad_usage" + | Atom_kernel_oom_kill_occurred -> Format.fprintf fmt "Atom_kernel_oom_kill_occurred" + | Atom_emergency_state_changed -> Format.fprintf fmt "Atom_emergency_state_changed" + | Atom_chre_significant_motion_state_changed -> Format.fprintf fmt "Atom_chre_significant_motion_state_changed" + | Atom_population_density_provider_loading_reported -> Format.fprintf fmt "Atom_population_density_provider_loading_reported" + | Atom_density_based_coarse_locations_usage_reported -> Format.fprintf fmt "Atom_density_based_coarse_locations_usage_reported" + | Atom_density_based_coarse_locations_provider_query_reported -> Format.fprintf fmt "Atom_density_based_coarse_locations_provider_query_reported" + | Atom_media_codec_reclaim_request_completed -> Format.fprintf fmt "Atom_media_codec_reclaim_request_completed" + | Atom_media_codec_started -> Format.fprintf fmt "Atom_media_codec_started" + | Atom_media_codec_stopped -> Format.fprintf fmt "Atom_media_codec_stopped" + | Atom_media_codec_rendered -> Format.fprintf fmt "Atom_media_codec_rendered" + | Atom_media_editing_ended_reported -> Format.fprintf fmt "Atom_media_editing_ended_reported" + | Atom_mte_state -> Format.fprintf fmt "Atom_mte_state" + | Atom_microxr_device_boot_complete_reported -> Format.fprintf fmt "Atom_microxr_device_boot_complete_reported" + | Atom_nfc_observe_mode_state_changed -> Format.fprintf fmt "Atom_nfc_observe_mode_state_changed" + | Atom_nfc_field_changed -> Format.fprintf fmt "Atom_nfc_field_changed" + | Atom_nfc_polling_loop_notification_reported -> Format.fprintf fmt "Atom_nfc_polling_loop_notification_reported" + | Atom_nfc_proprietary_capabilities_reported -> Format.fprintf fmt "Atom_nfc_proprietary_capabilities_reported" + | Atom_ondevicepersonalization_api_called -> Format.fprintf fmt "Atom_ondevicepersonalization_api_called" + | Atom_component_state_changed_reported -> Format.fprintf fmt "Atom_component_state_changed_reported" + | Atom_pdf_load_reported -> Format.fprintf fmt "Atom_pdf_load_reported" + | Atom_pdf_api_usage_reported -> Format.fprintf fmt "Atom_pdf_api_usage_reported" + | Atom_pdf_search_reported -> Format.fprintf fmt "Atom_pdf_search_reported" + | Atom_pressure_stall_information -> Format.fprintf fmt "Atom_pressure_stall_information" + | Atom_permission_rationale_dialog_viewed -> Format.fprintf fmt "Atom_permission_rationale_dialog_viewed" + | Atom_permission_rationale_dialog_action_reported -> Format.fprintf fmt "Atom_permission_rationale_dialog_action_reported" + | Atom_app_data_sharing_updates_notification_interaction -> Format.fprintf fmt "Atom_app_data_sharing_updates_notification_interaction" + | Atom_app_data_sharing_updates_fragment_viewed -> Format.fprintf fmt "Atom_app_data_sharing_updates_fragment_viewed" + | Atom_app_data_sharing_updates_fragment_action_reported -> Format.fprintf fmt "Atom_app_data_sharing_updates_fragment_action_reported" + | Atom_enhanced_confirmation_dialog_result_reported -> Format.fprintf fmt "Atom_enhanced_confirmation_dialog_result_reported" + | Atom_enhanced_confirmation_restriction_cleared -> Format.fprintf fmt "Atom_enhanced_confirmation_restriction_cleared" + | Atom_photopicker_session_info_reported -> Format.fprintf fmt "Atom_photopicker_session_info_reported" + | Atom_photopicker_api_info_reported -> Format.fprintf fmt "Atom_photopicker_api_info_reported" + | Atom_photopicker_ui_event_logged -> Format.fprintf fmt "Atom_photopicker_ui_event_logged" + | Atom_photopicker_media_item_status_reported -> Format.fprintf fmt "Atom_photopicker_media_item_status_reported" + | Atom_photopicker_preview_info_logged -> Format.fprintf fmt "Atom_photopicker_preview_info_logged" + | Atom_photopicker_menu_interaction_logged -> Format.fprintf fmt "Atom_photopicker_menu_interaction_logged" + | Atom_photopicker_banner_interaction_logged -> Format.fprintf fmt "Atom_photopicker_banner_interaction_logged" + | Atom_photopicker_media_library_info_logged -> Format.fprintf fmt "Atom_photopicker_media_library_info_logged" + | Atom_photopicker_page_info_logged -> Format.fprintf fmt "Atom_photopicker_page_info_logged" + | Atom_photopicker_media_grid_sync_info_reported -> Format.fprintf fmt "Atom_photopicker_media_grid_sync_info_reported" + | Atom_photopicker_album_sync_info_reported -> Format.fprintf fmt "Atom_photopicker_album_sync_info_reported" + | Atom_photopicker_search_info_reported -> Format.fprintf fmt "Atom_photopicker_search_info_reported" + | Atom_search_data_extraction_details_reported -> Format.fprintf fmt "Atom_search_data_extraction_details_reported" + | Atom_embedded_photopicker_info_reported -> Format.fprintf fmt "Atom_embedded_photopicker_info_reported" + | Atom_atom_9999 -> Format.fprintf fmt "Atom_atom_9999" + | Atom_atom_99999 -> Format.fprintf fmt "Atom_atom_99999" + | Atom_screen_off_reported -> Format.fprintf fmt "Atom_screen_off_reported" + | Atom_screen_timeout_override_reported -> Format.fprintf fmt "Atom_screen_timeout_override_reported" + | Atom_screen_interactive_session_reported -> Format.fprintf fmt "Atom_screen_interactive_session_reported" + | Atom_screen_dim_reported -> Format.fprintf fmt "Atom_screen_dim_reported" + | Atom_media_provider_database_rollback_reported -> Format.fprintf fmt "Atom_media_provider_database_rollback_reported" + | Atom_backup_setup_status_reported -> Format.fprintf fmt "Atom_backup_setup_status_reported" + | Atom_ranging_session_configured -> Format.fprintf fmt "Atom_ranging_session_configured" + | Atom_ranging_session_started -> Format.fprintf fmt "Atom_ranging_session_started" + | Atom_ranging_session_closed -> Format.fprintf fmt "Atom_ranging_session_closed" + | Atom_ranging_technology_started -> Format.fprintf fmt "Atom_ranging_technology_started" + | Atom_ranging_technology_stopped -> Format.fprintf fmt "Atom_ranging_technology_stopped" + | Atom_rkpd_pool_stats -> Format.fprintf fmt "Atom_rkpd_pool_stats" + | Atom_rkpd_client_operation -> Format.fprintf fmt "Atom_rkpd_client_operation" + | Atom_sandbox_api_called -> Format.fprintf fmt "Atom_sandbox_api_called" + | Atom_sandbox_activity_event_occurred -> Format.fprintf fmt "Atom_sandbox_activity_event_occurred" + | Atom_sdk_sandbox_restricted_access_in_session -> Format.fprintf fmt "Atom_sdk_sandbox_restricted_access_in_session" + | Atom_sandbox_sdk_storage -> Format.fprintf fmt "Atom_sandbox_sdk_storage" + | Atom_selinux_audit_log -> Format.fprintf fmt "Atom_selinux_audit_log" + | Atom_settings_spa_reported -> Format.fprintf fmt "Atom_settings_spa_reported" + | Atom_test_extension_atom_reported -> Format.fprintf fmt "Atom_test_extension_atom_reported" + | Atom_test_restricted_atom_reported -> Format.fprintf fmt "Atom_test_restricted_atom_reported" + | Atom_stats_socket_loss_reported -> Format.fprintf fmt "Atom_stats_socket_loss_reported" + | Atom_lockscreen_shortcut_selected -> Format.fprintf fmt "Atom_lockscreen_shortcut_selected" + | Atom_lockscreen_shortcut_triggered -> Format.fprintf fmt "Atom_lockscreen_shortcut_triggered" + | Atom_launcher_impression_event_v2 -> Format.fprintf fmt "Atom_launcher_impression_event_v2" + | Atom_display_switch_latency_tracked -> Format.fprintf fmt "Atom_display_switch_latency_tracked" + | Atom_notification_listener_service -> Format.fprintf fmt "Atom_notification_listener_service" + | Atom_nav_handle_touch_points -> Format.fprintf fmt "Atom_nav_handle_touch_points" + | Atom_communal_hub_widget_event_reported -> Format.fprintf fmt "Atom_communal_hub_widget_event_reported" + | Atom_communal_hub_snapshot -> Format.fprintf fmt "Atom_communal_hub_snapshot" + | Atom_emergency_number_dialed -> Format.fprintf fmt "Atom_emergency_number_dialed" + | Atom_call_stats -> Format.fprintf fmt "Atom_call_stats" + | Atom_call_audio_route_stats -> Format.fprintf fmt "Atom_call_audio_route_stats" + | Atom_telecom_api_stats -> Format.fprintf fmt "Atom_telecom_api_stats" + | Atom_telecom_error_stats -> Format.fprintf fmt "Atom_telecom_error_stats" + | Atom_cellular_radio_power_state_changed -> Format.fprintf fmt "Atom_cellular_radio_power_state_changed" + | Atom_emergency_numbers_info -> Format.fprintf fmt "Atom_emergency_numbers_info" + | Atom_data_network_validation -> Format.fprintf fmt "Atom_data_network_validation" + | Atom_data_rat_state_changed -> Format.fprintf fmt "Atom_data_rat_state_changed" + | Atom_connected_channel_changed -> Format.fprintf fmt "Atom_connected_channel_changed" + | Atom_iwlan_underlying_network_validation_result_reported -> Format.fprintf fmt "Atom_iwlan_underlying_network_validation_result_reported" + | Atom_qualified_rat_list_changed -> Format.fprintf fmt "Atom_qualified_rat_list_changed" + | Atom_qns_ims_call_drop_stats -> Format.fprintf fmt "Atom_qns_ims_call_drop_stats" + | Atom_qns_fallback_restriction_changed -> Format.fprintf fmt "Atom_qns_fallback_restriction_changed" + | Atom_qns_rat_preference_mismatch_info -> Format.fprintf fmt "Atom_qns_rat_preference_mismatch_info" + | Atom_qns_handover_time_millis -> Format.fprintf fmt "Atom_qns_handover_time_millis" + | Atom_qns_handover_pingpong -> Format.fprintf fmt "Atom_qns_handover_pingpong" + | Atom_satellite_controller -> Format.fprintf fmt "Atom_satellite_controller" + | Atom_satellite_session -> Format.fprintf fmt "Atom_satellite_session" + | Atom_satellite_incoming_datagram -> Format.fprintf fmt "Atom_satellite_incoming_datagram" + | Atom_satellite_outgoing_datagram -> Format.fprintf fmt "Atom_satellite_outgoing_datagram" + | Atom_satellite_provision -> Format.fprintf fmt "Atom_satellite_provision" + | Atom_satellite_sos_message_recommender -> Format.fprintf fmt "Atom_satellite_sos_message_recommender" + | Atom_carrier_roaming_satellite_session -> Format.fprintf fmt "Atom_carrier_roaming_satellite_session" + | Atom_carrier_roaming_satellite_controller_stats -> Format.fprintf fmt "Atom_carrier_roaming_satellite_controller_stats" + | Atom_controller_stats_per_package -> Format.fprintf fmt "Atom_controller_stats_per_package" + | Atom_satellite_entitlement -> Format.fprintf fmt "Atom_satellite_entitlement" + | Atom_satellite_config_updater -> Format.fprintf fmt "Atom_satellite_config_updater" + | Atom_satellite_access_controller -> Format.fprintf fmt "Atom_satellite_access_controller" + | Atom_cellular_identifier_disclosed -> Format.fprintf fmt "Atom_cellular_identifier_disclosed" + | Atom_threadnetwork_telemetry_data_reported -> Format.fprintf fmt "Atom_threadnetwork_telemetry_data_reported" + | Atom_threadnetwork_topo_entry_repeated -> Format.fprintf fmt "Atom_threadnetwork_topo_entry_repeated" + | Atom_threadnetwork_device_info_reported -> Format.fprintf fmt "Atom_threadnetwork_device_info_reported" + | Atom_boot_integrity_info_reported -> Format.fprintf fmt "Atom_boot_integrity_info_reported" + | Atom_tv_low_power_standby_policy -> Format.fprintf fmt "Atom_tv_low_power_standby_policy" + | Atom_external_tv_input_event -> Format.fprintf fmt "Atom_external_tv_input_event" + | Atom_test_uprobestats_atom_reported -> Format.fprintf fmt "Atom_test_uprobestats_atom_reported" + | Atom_uwb_activity_info -> Format.fprintf fmt "Atom_uwb_activity_info" + | Atom_mediator_updated -> Format.fprintf fmt "Atom_mediator_updated" + | Atom_sysproxy_bluetooth_bytes_transfer -> Format.fprintf fmt "Atom_sysproxy_bluetooth_bytes_transfer" + | Atom_sysproxy_connection_updated -> Format.fprintf fmt "Atom_sysproxy_connection_updated" + | Atom_wear_companion_connection_state -> Format.fprintf fmt "Atom_wear_companion_connection_state" + | Atom_media_action_reported -> Format.fprintf fmt "Atom_media_action_reported" + | Atom_media_controls_launched -> Format.fprintf fmt "Atom_media_controls_launched" + | Atom_media_session_state_changed -> Format.fprintf fmt "Atom_media_session_state_changed" + | Atom_wear_media_output_switcher_device_scan_api_latency -> Format.fprintf fmt "Atom_wear_media_output_switcher_device_scan_api_latency" + | Atom_wear_media_output_switcher_sass_device_unavailable -> Format.fprintf fmt "Atom_wear_media_output_switcher_sass_device_unavailable" + | Atom_wear_media_output_switcher_fastpair_api_timeout -> Format.fprintf fmt "Atom_wear_media_output_switcher_fastpair_api_timeout" + | Atom_wear_mode_state_changed -> Format.fprintf fmt "Atom_wear_mode_state_changed" + | Atom_renderer_initialized -> Format.fprintf fmt "Atom_renderer_initialized" + | Atom_schema_version_received -> Format.fprintf fmt "Atom_schema_version_received" + | Atom_layout_inspected -> Format.fprintf fmt "Atom_layout_inspected" + | Atom_layout_expression_inspected -> Format.fprintf fmt "Atom_layout_expression_inspected" + | Atom_layout_animations_inspected -> Format.fprintf fmt "Atom_layout_animations_inspected" + | Atom_material_components_inspected -> Format.fprintf fmt "Atom_material_components_inspected" + | Atom_tile_requested -> Format.fprintf fmt "Atom_tile_requested" + | Atom_state_response_received -> Format.fprintf fmt "Atom_state_response_received" + | Atom_tile_response_received -> Format.fprintf fmt "Atom_tile_response_received" + | Atom_inflation_finished -> Format.fprintf fmt "Atom_inflation_finished" + | Atom_inflation_failed -> Format.fprintf fmt "Atom_inflation_failed" + | Atom_ignored_inflation_failures_reported -> Format.fprintf fmt "Atom_ignored_inflation_failures_reported" + | Atom_drawable_rendered -> Format.fprintf fmt "Atom_drawable_rendered" + | Atom_wear_time_sync_requested -> Format.fprintf fmt "Atom_wear_time_sync_requested" + | Atom_wear_time_update_started -> Format.fprintf fmt "Atom_wear_time_update_started" + | Atom_wear_time_sync_attempt_completed -> Format.fprintf fmt "Atom_wear_time_sync_attempt_completed" + | Atom_wear_time_changed -> Format.fprintf fmt "Atom_wear_time_changed" + | Atom_wear_adaptive_suspend_stats_reported -> Format.fprintf fmt "Atom_wear_adaptive_suspend_stats_reported" + | Atom_wear_power_anomaly_service_operational_stats_reported -> Format.fprintf fmt "Atom_wear_power_anomaly_service_operational_stats_reported" + | Atom_wear_power_anomaly_service_event_stats_reported -> Format.fprintf fmt "Atom_wear_power_anomaly_service_event_stats_reported" + | Atom_ws_wear_time_session -> Format.fprintf fmt "Atom_ws_wear_time_session" + | Atom_ws_incoming_call_action_reported -> Format.fprintf fmt "Atom_ws_incoming_call_action_reported" + | Atom_ws_call_disconnection_reported -> Format.fprintf fmt "Atom_ws_call_disconnection_reported" + | Atom_ws_call_duration_reported -> Format.fprintf fmt "Atom_ws_call_duration_reported" + | Atom_ws_call_user_experience_latency_reported -> Format.fprintf fmt "Atom_ws_call_user_experience_latency_reported" + | Atom_ws_call_interaction_reported -> Format.fprintf fmt "Atom_ws_call_interaction_reported" + | Atom_ws_on_body_state_changed -> Format.fprintf fmt "Atom_ws_on_body_state_changed" + | Atom_ws_watch_face_restricted_complications_impacted -> Format.fprintf fmt "Atom_ws_watch_face_restricted_complications_impacted" + | Atom_ws_watch_face_default_restricted_complications_removed -> Format.fprintf fmt "Atom_ws_watch_face_default_restricted_complications_removed" + | Atom_ws_complications_impacted_notification_event_reported -> Format.fprintf fmt "Atom_ws_complications_impacted_notification_event_reported" + | Atom_ws_remote_event_usage_reported -> Format.fprintf fmt "Atom_ws_remote_event_usage_reported" + | Atom_ws_bugreport_requested -> Format.fprintf fmt "Atom_ws_bugreport_requested" + | Atom_ws_bugreport_triggered -> Format.fprintf fmt "Atom_ws_bugreport_triggered" + | Atom_ws_bugreport_finished -> Format.fprintf fmt "Atom_ws_bugreport_finished" + | Atom_ws_bugreport_result_received -> Format.fprintf fmt "Atom_ws_bugreport_result_received" + | Atom_ws_standalone_mode_snapshot -> Format.fprintf fmt "Atom_ws_standalone_mode_snapshot" + | Atom_ws_favorite_watch_face_snapshot -> Format.fprintf fmt "Atom_ws_favorite_watch_face_snapshot" + | Atom_ws_photos_watch_face_feature_snapshot -> Format.fprintf fmt "Atom_ws_photos_watch_face_feature_snapshot" + | Atom_ws_watch_face_customization_snapshot -> Format.fprintf fmt "Atom_ws_watch_face_customization_snapshot" + | Atom_wear_power_menu_opened -> Format.fprintf fmt "Atom_wear_power_menu_opened" + | Atom_wear_assistant_opened -> Format.fprintf fmt "Atom_wear_assistant_opened" + | Atom_first_overlay_state_changed -> Format.fprintf fmt "Atom_first_overlay_state_changed" + | Atom_wifi_aware_ndp_reported -> Format.fprintf fmt "Atom_wifi_aware_ndp_reported" + | Atom_wifi_aware_attach_reported -> Format.fprintf fmt "Atom_wifi_aware_attach_reported" + | Atom_wifi_self_recovery_triggered -> Format.fprintf fmt "Atom_wifi_self_recovery_triggered" + | Atom_soft_ap_started -> Format.fprintf fmt "Atom_soft_ap_started" + | Atom_soft_ap_stopped -> Format.fprintf fmt "Atom_soft_ap_stopped" + | Atom_wifi_lock_released -> Format.fprintf fmt "Atom_wifi_lock_released" + | Atom_wifi_lock_deactivated -> Format.fprintf fmt "Atom_wifi_lock_deactivated" + | Atom_wifi_config_saved -> Format.fprintf fmt "Atom_wifi_config_saved" + | Atom_wifi_aware_resource_using_changed -> Format.fprintf fmt "Atom_wifi_aware_resource_using_changed" + | Atom_wifi_aware_hal_api_called -> Format.fprintf fmt "Atom_wifi_aware_hal_api_called" + | Atom_wifi_local_only_request_received -> Format.fprintf fmt "Atom_wifi_local_only_request_received" + | Atom_wifi_local_only_request_scan_triggered -> Format.fprintf fmt "Atom_wifi_local_only_request_scan_triggered" + | Atom_wifi_thread_task_executed -> Format.fprintf fmt "Atom_wifi_thread_task_executed" + | Atom_wifi_state_changed -> Format.fprintf fmt "Atom_wifi_state_changed" + | Atom_pno_scan_started -> Format.fprintf fmt "Atom_pno_scan_started" + | Atom_pno_scan_stopped -> Format.fprintf fmt "Atom_pno_scan_stopped" + | Atom_wifi_is_unusable_reported -> Format.fprintf fmt "Atom_wifi_is_unusable_reported" + | Atom_wifi_ap_capabilities_reported -> Format.fprintf fmt "Atom_wifi_ap_capabilities_reported" + | Atom_soft_ap_state_changed -> Format.fprintf fmt "Atom_soft_ap_state_changed" + | Atom_scorer_prediction_result_reported -> Format.fprintf fmt "Atom_scorer_prediction_result_reported" + | Atom_wifi_aware_capabilities -> Format.fprintf fmt "Atom_wifi_aware_capabilities" + | Atom_wifi_module_info -> Format.fprintf fmt "Atom_wifi_module_info" + | Atom_wifi_setting_info -> Format.fprintf fmt "Atom_wifi_setting_info" + | Atom_wifi_complex_setting_info -> Format.fprintf fmt "Atom_wifi_complex_setting_info" + | Atom_wifi_configured_network_info -> Format.fprintf fmt "Atom_wifi_configured_network_info" + +let rec pp_statsd_pull_atom_config fmt (v:statsd_pull_atom_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pull_atom_id" (Pbrt.Pp.pp_list pp_atom_id) fmt v.pull_atom_id; + Pbrt.Pp.pp_record_field ~first:false "raw_pull_atom_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.raw_pull_atom_id; + Pbrt.Pp.pp_record_field ~first:false "pull_frequency_ms" Pbrt.Pp.pp_int32 fmt v.pull_frequency_ms; + if not (statsd_pull_atom_config_has_pull_frequency_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "packages" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.packages; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_statsd_tracing_config fmt (v:statsd_tracing_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "push_atom_id" (Pbrt.Pp.pp_list pp_atom_id) fmt v.push_atom_id; + Pbrt.Pp.pp_record_field ~first:false "raw_push_atom_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.raw_push_atom_id; + Pbrt.Pp.pp_record_field ~first:false "pull_config" (Pbrt.Pp.pp_list pp_statsd_pull_atom_config) fmt v.pull_config; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_meminfo_counters fmt (v:meminfo_counters) = + match v with + | Meminfo_unspecified -> Format.fprintf fmt "Meminfo_unspecified" + | Meminfo_mem_total -> Format.fprintf fmt "Meminfo_mem_total" + | Meminfo_mem_free -> Format.fprintf fmt "Meminfo_mem_free" + | Meminfo_mem_available -> Format.fprintf fmt "Meminfo_mem_available" + | Meminfo_buffers -> Format.fprintf fmt "Meminfo_buffers" + | Meminfo_cached -> Format.fprintf fmt "Meminfo_cached" + | Meminfo_swap_cached -> Format.fprintf fmt "Meminfo_swap_cached" + | Meminfo_active -> Format.fprintf fmt "Meminfo_active" + | Meminfo_inactive -> Format.fprintf fmt "Meminfo_inactive" + | Meminfo_active_anon -> Format.fprintf fmt "Meminfo_active_anon" + | Meminfo_inactive_anon -> Format.fprintf fmt "Meminfo_inactive_anon" + | Meminfo_active_file -> Format.fprintf fmt "Meminfo_active_file" + | Meminfo_inactive_file -> Format.fprintf fmt "Meminfo_inactive_file" + | Meminfo_unevictable -> Format.fprintf fmt "Meminfo_unevictable" + | Meminfo_mlocked -> Format.fprintf fmt "Meminfo_mlocked" + | Meminfo_swap_total -> Format.fprintf fmt "Meminfo_swap_total" + | Meminfo_swap_free -> Format.fprintf fmt "Meminfo_swap_free" + | Meminfo_dirty -> Format.fprintf fmt "Meminfo_dirty" + | Meminfo_writeback -> Format.fprintf fmt "Meminfo_writeback" + | Meminfo_anon_pages -> Format.fprintf fmt "Meminfo_anon_pages" + | Meminfo_mapped -> Format.fprintf fmt "Meminfo_mapped" + | Meminfo_shmem -> Format.fprintf fmt "Meminfo_shmem" + | Meminfo_slab -> Format.fprintf fmt "Meminfo_slab" + | Meminfo_slab_reclaimable -> Format.fprintf fmt "Meminfo_slab_reclaimable" + | Meminfo_slab_unreclaimable -> Format.fprintf fmt "Meminfo_slab_unreclaimable" + | Meminfo_kernel_stack -> Format.fprintf fmt "Meminfo_kernel_stack" + | Meminfo_page_tables -> Format.fprintf fmt "Meminfo_page_tables" + | Meminfo_commit_limit -> Format.fprintf fmt "Meminfo_commit_limit" + | Meminfo_commited_as -> Format.fprintf fmt "Meminfo_commited_as" + | Meminfo_vmalloc_total -> Format.fprintf fmt "Meminfo_vmalloc_total" + | Meminfo_vmalloc_used -> Format.fprintf fmt "Meminfo_vmalloc_used" + | Meminfo_vmalloc_chunk -> Format.fprintf fmt "Meminfo_vmalloc_chunk" + | Meminfo_cma_total -> Format.fprintf fmt "Meminfo_cma_total" + | Meminfo_cma_free -> Format.fprintf fmt "Meminfo_cma_free" + | Meminfo_gpu -> Format.fprintf fmt "Meminfo_gpu" + | Meminfo_zram -> Format.fprintf fmt "Meminfo_zram" + | Meminfo_misc -> Format.fprintf fmt "Meminfo_misc" + | Meminfo_ion_heap -> Format.fprintf fmt "Meminfo_ion_heap" + | Meminfo_ion_heap_pool -> Format.fprintf fmt "Meminfo_ion_heap_pool" + +let rec pp_vmstat_counters fmt (v:vmstat_counters) = + match v with + | Vmstat_unspecified -> Format.fprintf fmt "Vmstat_unspecified" + | Vmstat_nr_free_pages -> Format.fprintf fmt "Vmstat_nr_free_pages" + | Vmstat_nr_alloc_batch -> Format.fprintf fmt "Vmstat_nr_alloc_batch" + | Vmstat_nr_inactive_anon -> Format.fprintf fmt "Vmstat_nr_inactive_anon" + | Vmstat_nr_active_anon -> Format.fprintf fmt "Vmstat_nr_active_anon" + | Vmstat_nr_inactive_file -> Format.fprintf fmt "Vmstat_nr_inactive_file" + | Vmstat_nr_active_file -> Format.fprintf fmt "Vmstat_nr_active_file" + | Vmstat_nr_unevictable -> Format.fprintf fmt "Vmstat_nr_unevictable" + | Vmstat_nr_mlock -> Format.fprintf fmt "Vmstat_nr_mlock" + | Vmstat_nr_anon_pages -> Format.fprintf fmt "Vmstat_nr_anon_pages" + | Vmstat_nr_mapped -> Format.fprintf fmt "Vmstat_nr_mapped" + | Vmstat_nr_file_pages -> Format.fprintf fmt "Vmstat_nr_file_pages" + | Vmstat_nr_dirty -> Format.fprintf fmt "Vmstat_nr_dirty" + | Vmstat_nr_writeback -> Format.fprintf fmt "Vmstat_nr_writeback" + | Vmstat_nr_slab_reclaimable -> Format.fprintf fmt "Vmstat_nr_slab_reclaimable" + | Vmstat_nr_slab_unreclaimable -> Format.fprintf fmt "Vmstat_nr_slab_unreclaimable" + | Vmstat_nr_page_table_pages -> Format.fprintf fmt "Vmstat_nr_page_table_pages" + | Vmstat_nr_kernel_stack -> Format.fprintf fmt "Vmstat_nr_kernel_stack" + | Vmstat_nr_overhead -> Format.fprintf fmt "Vmstat_nr_overhead" + | Vmstat_nr_unstable -> Format.fprintf fmt "Vmstat_nr_unstable" + | Vmstat_nr_bounce -> Format.fprintf fmt "Vmstat_nr_bounce" + | Vmstat_nr_vmscan_write -> Format.fprintf fmt "Vmstat_nr_vmscan_write" + | Vmstat_nr_vmscan_immediate_reclaim -> Format.fprintf fmt "Vmstat_nr_vmscan_immediate_reclaim" + | Vmstat_nr_writeback_temp -> Format.fprintf fmt "Vmstat_nr_writeback_temp" + | Vmstat_nr_isolated_anon -> Format.fprintf fmt "Vmstat_nr_isolated_anon" + | Vmstat_nr_isolated_file -> Format.fprintf fmt "Vmstat_nr_isolated_file" + | Vmstat_nr_shmem -> Format.fprintf fmt "Vmstat_nr_shmem" + | Vmstat_nr_dirtied -> Format.fprintf fmt "Vmstat_nr_dirtied" + | Vmstat_nr_written -> Format.fprintf fmt "Vmstat_nr_written" + | Vmstat_nr_pages_scanned -> Format.fprintf fmt "Vmstat_nr_pages_scanned" + | Vmstat_workingset_refault -> Format.fprintf fmt "Vmstat_workingset_refault" + | Vmstat_workingset_activate -> Format.fprintf fmt "Vmstat_workingset_activate" + | Vmstat_workingset_nodereclaim -> Format.fprintf fmt "Vmstat_workingset_nodereclaim" + | Vmstat_nr_anon_transparent_hugepages -> Format.fprintf fmt "Vmstat_nr_anon_transparent_hugepages" + | Vmstat_nr_free_cma -> Format.fprintf fmt "Vmstat_nr_free_cma" + | Vmstat_nr_swapcache -> Format.fprintf fmt "Vmstat_nr_swapcache" + | Vmstat_nr_dirty_threshold -> Format.fprintf fmt "Vmstat_nr_dirty_threshold" + | Vmstat_nr_dirty_background_threshold -> Format.fprintf fmt "Vmstat_nr_dirty_background_threshold" + | Vmstat_pgpgin -> Format.fprintf fmt "Vmstat_pgpgin" + | Vmstat_pgpgout -> Format.fprintf fmt "Vmstat_pgpgout" + | Vmstat_pgpgoutclean -> Format.fprintf fmt "Vmstat_pgpgoutclean" + | Vmstat_pswpin -> Format.fprintf fmt "Vmstat_pswpin" + | Vmstat_pswpout -> Format.fprintf fmt "Vmstat_pswpout" + | Vmstat_pgalloc_dma -> Format.fprintf fmt "Vmstat_pgalloc_dma" + | Vmstat_pgalloc_normal -> Format.fprintf fmt "Vmstat_pgalloc_normal" + | Vmstat_pgalloc_movable -> Format.fprintf fmt "Vmstat_pgalloc_movable" + | Vmstat_pgfree -> Format.fprintf fmt "Vmstat_pgfree" + | Vmstat_pgactivate -> Format.fprintf fmt "Vmstat_pgactivate" + | Vmstat_pgdeactivate -> Format.fprintf fmt "Vmstat_pgdeactivate" + | Vmstat_pgfault -> Format.fprintf fmt "Vmstat_pgfault" + | Vmstat_pgmajfault -> Format.fprintf fmt "Vmstat_pgmajfault" + | Vmstat_pgrefill_dma -> Format.fprintf fmt "Vmstat_pgrefill_dma" + | Vmstat_pgrefill_normal -> Format.fprintf fmt "Vmstat_pgrefill_normal" + | Vmstat_pgrefill_movable -> Format.fprintf fmt "Vmstat_pgrefill_movable" + | Vmstat_pgsteal_kswapd_dma -> Format.fprintf fmt "Vmstat_pgsteal_kswapd_dma" + | Vmstat_pgsteal_kswapd_normal -> Format.fprintf fmt "Vmstat_pgsteal_kswapd_normal" + | Vmstat_pgsteal_kswapd_movable -> Format.fprintf fmt "Vmstat_pgsteal_kswapd_movable" + | Vmstat_pgsteal_direct_dma -> Format.fprintf fmt "Vmstat_pgsteal_direct_dma" + | Vmstat_pgsteal_direct_normal -> Format.fprintf fmt "Vmstat_pgsteal_direct_normal" + | Vmstat_pgsteal_direct_movable -> Format.fprintf fmt "Vmstat_pgsteal_direct_movable" + | Vmstat_pgscan_kswapd_dma -> Format.fprintf fmt "Vmstat_pgscan_kswapd_dma" + | Vmstat_pgscan_kswapd_normal -> Format.fprintf fmt "Vmstat_pgscan_kswapd_normal" + | Vmstat_pgscan_kswapd_movable -> Format.fprintf fmt "Vmstat_pgscan_kswapd_movable" + | Vmstat_pgscan_direct_dma -> Format.fprintf fmt "Vmstat_pgscan_direct_dma" + | Vmstat_pgscan_direct_normal -> Format.fprintf fmt "Vmstat_pgscan_direct_normal" + | Vmstat_pgscan_direct_movable -> Format.fprintf fmt "Vmstat_pgscan_direct_movable" + | Vmstat_pgscan_direct_throttle -> Format.fprintf fmt "Vmstat_pgscan_direct_throttle" + | Vmstat_pginodesteal -> Format.fprintf fmt "Vmstat_pginodesteal" + | Vmstat_slabs_scanned -> Format.fprintf fmt "Vmstat_slabs_scanned" + | Vmstat_kswapd_inodesteal -> Format.fprintf fmt "Vmstat_kswapd_inodesteal" + | Vmstat_kswapd_low_wmark_hit_quickly -> Format.fprintf fmt "Vmstat_kswapd_low_wmark_hit_quickly" + | Vmstat_kswapd_high_wmark_hit_quickly -> Format.fprintf fmt "Vmstat_kswapd_high_wmark_hit_quickly" + | Vmstat_pageoutrun -> Format.fprintf fmt "Vmstat_pageoutrun" + | Vmstat_allocstall -> Format.fprintf fmt "Vmstat_allocstall" + | Vmstat_pgrotated -> Format.fprintf fmt "Vmstat_pgrotated" + | Vmstat_drop_pagecache -> Format.fprintf fmt "Vmstat_drop_pagecache" + | Vmstat_drop_slab -> Format.fprintf fmt "Vmstat_drop_slab" + | Vmstat_pgmigrate_success -> Format.fprintf fmt "Vmstat_pgmigrate_success" + | Vmstat_pgmigrate_fail -> Format.fprintf fmt "Vmstat_pgmigrate_fail" + | Vmstat_compact_migrate_scanned -> Format.fprintf fmt "Vmstat_compact_migrate_scanned" + | Vmstat_compact_free_scanned -> Format.fprintf fmt "Vmstat_compact_free_scanned" + | Vmstat_compact_isolated -> Format.fprintf fmt "Vmstat_compact_isolated" + | Vmstat_compact_stall -> Format.fprintf fmt "Vmstat_compact_stall" + | Vmstat_compact_fail -> Format.fprintf fmt "Vmstat_compact_fail" + | Vmstat_compact_success -> Format.fprintf fmt "Vmstat_compact_success" + | Vmstat_compact_daemon_wake -> Format.fprintf fmt "Vmstat_compact_daemon_wake" + | Vmstat_unevictable_pgs_culled -> Format.fprintf fmt "Vmstat_unevictable_pgs_culled" + | Vmstat_unevictable_pgs_scanned -> Format.fprintf fmt "Vmstat_unevictable_pgs_scanned" + | Vmstat_unevictable_pgs_rescued -> Format.fprintf fmt "Vmstat_unevictable_pgs_rescued" + | Vmstat_unevictable_pgs_mlocked -> Format.fprintf fmt "Vmstat_unevictable_pgs_mlocked" + | Vmstat_unevictable_pgs_munlocked -> Format.fprintf fmt "Vmstat_unevictable_pgs_munlocked" + | Vmstat_unevictable_pgs_cleared -> Format.fprintf fmt "Vmstat_unevictable_pgs_cleared" + | Vmstat_unevictable_pgs_stranded -> Format.fprintf fmt "Vmstat_unevictable_pgs_stranded" + | Vmstat_nr_zspages -> Format.fprintf fmt "Vmstat_nr_zspages" + | Vmstat_nr_ion_heap -> Format.fprintf fmt "Vmstat_nr_ion_heap" + | Vmstat_nr_gpu_heap -> Format.fprintf fmt "Vmstat_nr_gpu_heap" + | Vmstat_allocstall_dma -> Format.fprintf fmt "Vmstat_allocstall_dma" + | Vmstat_allocstall_movable -> Format.fprintf fmt "Vmstat_allocstall_movable" + | Vmstat_allocstall_normal -> Format.fprintf fmt "Vmstat_allocstall_normal" + | Vmstat_compact_daemon_free_scanned -> Format.fprintf fmt "Vmstat_compact_daemon_free_scanned" + | Vmstat_compact_daemon_migrate_scanned -> Format.fprintf fmt "Vmstat_compact_daemon_migrate_scanned" + | Vmstat_nr_fastrpc -> Format.fprintf fmt "Vmstat_nr_fastrpc" + | Vmstat_nr_indirectly_reclaimable -> Format.fprintf fmt "Vmstat_nr_indirectly_reclaimable" + | Vmstat_nr_ion_heap_pool -> Format.fprintf fmt "Vmstat_nr_ion_heap_pool" + | Vmstat_nr_kernel_misc_reclaimable -> Format.fprintf fmt "Vmstat_nr_kernel_misc_reclaimable" + | Vmstat_nr_shadow_call_stack_bytes -> Format.fprintf fmt "Vmstat_nr_shadow_call_stack_bytes" + | Vmstat_nr_shmem_hugepages -> Format.fprintf fmt "Vmstat_nr_shmem_hugepages" + | Vmstat_nr_shmem_pmdmapped -> Format.fprintf fmt "Vmstat_nr_shmem_pmdmapped" + | Vmstat_nr_unreclaimable_pages -> Format.fprintf fmt "Vmstat_nr_unreclaimable_pages" + | Vmstat_nr_zone_active_anon -> Format.fprintf fmt "Vmstat_nr_zone_active_anon" + | Vmstat_nr_zone_active_file -> Format.fprintf fmt "Vmstat_nr_zone_active_file" + | Vmstat_nr_zone_inactive_anon -> Format.fprintf fmt "Vmstat_nr_zone_inactive_anon" + | Vmstat_nr_zone_inactive_file -> Format.fprintf fmt "Vmstat_nr_zone_inactive_file" + | Vmstat_nr_zone_unevictable -> Format.fprintf fmt "Vmstat_nr_zone_unevictable" + | Vmstat_nr_zone_write_pending -> Format.fprintf fmt "Vmstat_nr_zone_write_pending" + | Vmstat_oom_kill -> Format.fprintf fmt "Vmstat_oom_kill" + | Vmstat_pglazyfree -> Format.fprintf fmt "Vmstat_pglazyfree" + | Vmstat_pglazyfreed -> Format.fprintf fmt "Vmstat_pglazyfreed" + | Vmstat_pgrefill -> Format.fprintf fmt "Vmstat_pgrefill" + | Vmstat_pgscan_direct -> Format.fprintf fmt "Vmstat_pgscan_direct" + | Vmstat_pgscan_kswapd -> Format.fprintf fmt "Vmstat_pgscan_kswapd" + | Vmstat_pgskip_dma -> Format.fprintf fmt "Vmstat_pgskip_dma" + | Vmstat_pgskip_movable -> Format.fprintf fmt "Vmstat_pgskip_movable" + | Vmstat_pgskip_normal -> Format.fprintf fmt "Vmstat_pgskip_normal" + | Vmstat_pgsteal_direct -> Format.fprintf fmt "Vmstat_pgsteal_direct" + | Vmstat_pgsteal_kswapd -> Format.fprintf fmt "Vmstat_pgsteal_kswapd" + | Vmstat_swap_ra -> Format.fprintf fmt "Vmstat_swap_ra" + | Vmstat_swap_ra_hit -> Format.fprintf fmt "Vmstat_swap_ra_hit" + | Vmstat_workingset_restore -> Format.fprintf fmt "Vmstat_workingset_restore" + | Vmstat_allocstall_device -> Format.fprintf fmt "Vmstat_allocstall_device" + | Vmstat_allocstall_dma32 -> Format.fprintf fmt "Vmstat_allocstall_dma32" + | Vmstat_balloon_deflate -> Format.fprintf fmt "Vmstat_balloon_deflate" + | Vmstat_balloon_inflate -> Format.fprintf fmt "Vmstat_balloon_inflate" + | Vmstat_balloon_migrate -> Format.fprintf fmt "Vmstat_balloon_migrate" + | Vmstat_cma_alloc_fail -> Format.fprintf fmt "Vmstat_cma_alloc_fail" + | Vmstat_cma_alloc_success -> Format.fprintf fmt "Vmstat_cma_alloc_success" + | Vmstat_nr_file_hugepages -> Format.fprintf fmt "Vmstat_nr_file_hugepages" + | Vmstat_nr_file_pmdmapped -> Format.fprintf fmt "Vmstat_nr_file_pmdmapped" + | Vmstat_nr_foll_pin_acquired -> Format.fprintf fmt "Vmstat_nr_foll_pin_acquired" + | Vmstat_nr_foll_pin_released -> Format.fprintf fmt "Vmstat_nr_foll_pin_released" + | Vmstat_nr_sec_page_table_pages -> Format.fprintf fmt "Vmstat_nr_sec_page_table_pages" + | Vmstat_nr_shadow_call_stack -> Format.fprintf fmt "Vmstat_nr_shadow_call_stack" + | Vmstat_nr_swapcached -> Format.fprintf fmt "Vmstat_nr_swapcached" + | Vmstat_nr_throttled_written -> Format.fprintf fmt "Vmstat_nr_throttled_written" + | Vmstat_pgalloc_device -> Format.fprintf fmt "Vmstat_pgalloc_device" + | Vmstat_pgalloc_dma32 -> Format.fprintf fmt "Vmstat_pgalloc_dma32" + | Vmstat_pgdemote_direct -> Format.fprintf fmt "Vmstat_pgdemote_direct" + | Vmstat_pgdemote_kswapd -> Format.fprintf fmt "Vmstat_pgdemote_kswapd" + | Vmstat_pgreuse -> Format.fprintf fmt "Vmstat_pgreuse" + | Vmstat_pgscan_anon -> Format.fprintf fmt "Vmstat_pgscan_anon" + | Vmstat_pgscan_file -> Format.fprintf fmt "Vmstat_pgscan_file" + | Vmstat_pgskip_device -> Format.fprintf fmt "Vmstat_pgskip_device" + | Vmstat_pgskip_dma32 -> Format.fprintf fmt "Vmstat_pgskip_dma32" + | Vmstat_pgsteal_anon -> Format.fprintf fmt "Vmstat_pgsteal_anon" + | Vmstat_pgsteal_file -> Format.fprintf fmt "Vmstat_pgsteal_file" + | Vmstat_thp_collapse_alloc -> Format.fprintf fmt "Vmstat_thp_collapse_alloc" + | Vmstat_thp_collapse_alloc_failed -> Format.fprintf fmt "Vmstat_thp_collapse_alloc_failed" + | Vmstat_thp_deferred_split_page -> Format.fprintf fmt "Vmstat_thp_deferred_split_page" + | Vmstat_thp_fault_alloc -> Format.fprintf fmt "Vmstat_thp_fault_alloc" + | Vmstat_thp_fault_fallback -> Format.fprintf fmt "Vmstat_thp_fault_fallback" + | Vmstat_thp_fault_fallback_charge -> Format.fprintf fmt "Vmstat_thp_fault_fallback_charge" + | Vmstat_thp_file_alloc -> Format.fprintf fmt "Vmstat_thp_file_alloc" + | Vmstat_thp_file_fallback -> Format.fprintf fmt "Vmstat_thp_file_fallback" + | Vmstat_thp_file_fallback_charge -> Format.fprintf fmt "Vmstat_thp_file_fallback_charge" + | Vmstat_thp_file_mapped -> Format.fprintf fmt "Vmstat_thp_file_mapped" + | Vmstat_thp_migration_fail -> Format.fprintf fmt "Vmstat_thp_migration_fail" + | Vmstat_thp_migration_split -> Format.fprintf fmt "Vmstat_thp_migration_split" + | Vmstat_thp_migration_success -> Format.fprintf fmt "Vmstat_thp_migration_success" + | Vmstat_thp_scan_exceed_none_pte -> Format.fprintf fmt "Vmstat_thp_scan_exceed_none_pte" + | Vmstat_thp_scan_exceed_share_pte -> Format.fprintf fmt "Vmstat_thp_scan_exceed_share_pte" + | Vmstat_thp_scan_exceed_swap_pte -> Format.fprintf fmt "Vmstat_thp_scan_exceed_swap_pte" + | Vmstat_thp_split_page -> Format.fprintf fmt "Vmstat_thp_split_page" + | Vmstat_thp_split_page_failed -> Format.fprintf fmt "Vmstat_thp_split_page_failed" + | Vmstat_thp_split_pmd -> Format.fprintf fmt "Vmstat_thp_split_pmd" + | Vmstat_thp_swpout -> Format.fprintf fmt "Vmstat_thp_swpout" + | Vmstat_thp_swpout_fallback -> Format.fprintf fmt "Vmstat_thp_swpout_fallback" + | Vmstat_thp_zero_page_alloc -> Format.fprintf fmt "Vmstat_thp_zero_page_alloc" + | Vmstat_thp_zero_page_alloc_failed -> Format.fprintf fmt "Vmstat_thp_zero_page_alloc_failed" + | Vmstat_vma_lock_abort -> Format.fprintf fmt "Vmstat_vma_lock_abort" + | Vmstat_vma_lock_miss -> Format.fprintf fmt "Vmstat_vma_lock_miss" + | Vmstat_vma_lock_retry -> Format.fprintf fmt "Vmstat_vma_lock_retry" + | Vmstat_vma_lock_success -> Format.fprintf fmt "Vmstat_vma_lock_success" + | Vmstat_workingset_activate_anon -> Format.fprintf fmt "Vmstat_workingset_activate_anon" + | Vmstat_workingset_activate_file -> Format.fprintf fmt "Vmstat_workingset_activate_file" + | Vmstat_workingset_nodes -> Format.fprintf fmt "Vmstat_workingset_nodes" + | Vmstat_workingset_refault_anon -> Format.fprintf fmt "Vmstat_workingset_refault_anon" + | Vmstat_workingset_refault_file -> Format.fprintf fmt "Vmstat_workingset_refault_file" + | Vmstat_workingset_restore_anon -> Format.fprintf fmt "Vmstat_workingset_restore_anon" + | Vmstat_workingset_restore_file -> Format.fprintf fmt "Vmstat_workingset_restore_file" + +let rec pp_sys_stats_config_stat_counters fmt (v:sys_stats_config_stat_counters) = + match v with + | Stat_unspecified -> Format.fprintf fmt "Stat_unspecified" + | Stat_cpu_times -> Format.fprintf fmt "Stat_cpu_times" + | Stat_irq_counts -> Format.fprintf fmt "Stat_irq_counts" + | Stat_softirq_counts -> Format.fprintf fmt "Stat_softirq_counts" + | Stat_fork_count -> Format.fprintf fmt "Stat_fork_count" + +let rec pp_sys_stats_config fmt (v:sys_stats_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "meminfo_period_ms" Pbrt.Pp.pp_int32 fmt v.meminfo_period_ms; + if not (sys_stats_config_has_meminfo_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "meminfo_counters" (Pbrt.Pp.pp_list pp_meminfo_counters) fmt v.meminfo_counters; + Pbrt.Pp.pp_record_field ~first:false "vmstat_period_ms" Pbrt.Pp.pp_int32 fmt v.vmstat_period_ms; + if not (sys_stats_config_has_vmstat_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vmstat_counters" (Pbrt.Pp.pp_list pp_vmstat_counters) fmt v.vmstat_counters; + Pbrt.Pp.pp_record_field ~first:false "stat_period_ms" Pbrt.Pp.pp_int32 fmt v.stat_period_ms; + if not (sys_stats_config_has_stat_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "stat_counters" (Pbrt.Pp.pp_list pp_sys_stats_config_stat_counters) fmt v.stat_counters; + Pbrt.Pp.pp_record_field ~first:false "devfreq_period_ms" Pbrt.Pp.pp_int32 fmt v.devfreq_period_ms; + if not (sys_stats_config_has_devfreq_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cpufreq_period_ms" Pbrt.Pp.pp_int32 fmt v.cpufreq_period_ms; + if not (sys_stats_config_has_cpufreq_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buddyinfo_period_ms" Pbrt.Pp.pp_int32 fmt v.buddyinfo_period_ms; + if not (sys_stats_config_has_buddyinfo_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "diskstat_period_ms" Pbrt.Pp.pp_int32 fmt v.diskstat_period_ms; + if not (sys_stats_config_has_diskstat_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "psi_period_ms" Pbrt.Pp.pp_int32 fmt v.psi_period_ms; + if not (sys_stats_config_has_psi_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thermal_period_ms" Pbrt.Pp.pp_int32 fmt v.thermal_period_ms; + if not (sys_stats_config_has_thermal_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cpuidle_period_ms" Pbrt.Pp.pp_int32 fmt v.cpuidle_period_ms; + if not (sys_stats_config_has_cpuidle_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "gpufreq_period_ms" Pbrt.Pp.pp_int32 fmt v.gpufreq_period_ms; + if not (sys_stats_config_has_gpufreq_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_system_info_config fmt (v:system_info_config) = + let pp_i fmt () = + Pbrt.Pp.pp_unit fmt () + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_test_config_dummy_fields fmt (v:test_config_dummy_fields) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "field_uint32" Pbrt.Pp.pp_int32 fmt v.field_uint32; + if not (test_config_dummy_fields_has_field_uint32 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_int32" Pbrt.Pp.pp_int32 fmt v.field_int32; + if not (test_config_dummy_fields_has_field_int32 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_uint64" Pbrt.Pp.pp_int64 fmt v.field_uint64; + if not (test_config_dummy_fields_has_field_uint64 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_int64" Pbrt.Pp.pp_int64 fmt v.field_int64; + if not (test_config_dummy_fields_has_field_int64 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_fixed64" Pbrt.Pp.pp_int64 fmt v.field_fixed64; + if not (test_config_dummy_fields_has_field_fixed64 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_sfixed64" Pbrt.Pp.pp_int64 fmt v.field_sfixed64; + if not (test_config_dummy_fields_has_field_sfixed64 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_fixed32" Pbrt.Pp.pp_int32 fmt v.field_fixed32; + if not (test_config_dummy_fields_has_field_fixed32 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_sfixed32" Pbrt.Pp.pp_int32 fmt v.field_sfixed32; + if not (test_config_dummy_fields_has_field_sfixed32 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_double" Pbrt.Pp.pp_float fmt v.field_double; + if not (test_config_dummy_fields_has_field_double v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_float" Pbrt.Pp.pp_float fmt v.field_float; + if not (test_config_dummy_fields_has_field_float v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_sint64" Pbrt.Pp.pp_int64 fmt v.field_sint64; + if not (test_config_dummy_fields_has_field_sint64 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_sint32" Pbrt.Pp.pp_int32 fmt v.field_sint32; + if not (test_config_dummy_fields_has_field_sint32 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_string" Pbrt.Pp.pp_string fmt v.field_string; + if not (test_config_dummy_fields_has_field_string v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_bytes" Pbrt.Pp.pp_bytes fmt v.field_bytes; + if not (test_config_dummy_fields_has_field_bytes v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_test_config fmt (v:test_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "message_count" Pbrt.Pp.pp_int32 fmt v.message_count; + if not (test_config_has_message_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_messages_per_second" Pbrt.Pp.pp_int32 fmt v.max_messages_per_second; + if not (test_config_has_max_messages_per_second v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "seed" Pbrt.Pp.pp_int32 fmt v.seed; + if not (test_config_has_seed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "message_size" Pbrt.Pp.pp_int32 fmt v.message_size; + if not (test_config_has_message_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "send_batch_on_register" Pbrt.Pp.pp_bool fmt v.send_batch_on_register; + if not (test_config_has_send_batch_on_register v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dummy_fields" (Pbrt.Pp.pp_option pp_test_config_dummy_fields) fmt v.dummy_fields; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_config fmt (v:track_event_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "disabled_categories" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.disabled_categories; + Pbrt.Pp.pp_record_field ~first:false "enabled_categories" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.enabled_categories; + Pbrt.Pp.pp_record_field ~first:false "disabled_tags" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.disabled_tags; + Pbrt.Pp.pp_record_field ~first:false "enabled_tags" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.enabled_tags; + Pbrt.Pp.pp_record_field ~first:false "disable_incremental_timestamps" Pbrt.Pp.pp_bool fmt v.disable_incremental_timestamps; + if not (track_event_config_has_disable_incremental_timestamps v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp_unit_multiplier" Pbrt.Pp.pp_int64 fmt v.timestamp_unit_multiplier; + if not (track_event_config_has_timestamp_unit_multiplier v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "filter_debug_annotations" Pbrt.Pp.pp_bool fmt v.filter_debug_annotations; + if not (track_event_config_has_filter_debug_annotations v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "enable_thread_time_sampling" Pbrt.Pp.pp_bool fmt v.enable_thread_time_sampling; + if not (track_event_config_has_enable_thread_time_sampling v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_time_subsampling_ns" Pbrt.Pp.pp_int64 fmt v.thread_time_subsampling_ns; + if not (track_event_config_has_thread_time_subsampling_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "filter_dynamic_event_names" Pbrt.Pp.pp_bool fmt v.filter_dynamic_event_names; + if not (track_event_config_has_filter_dynamic_event_names v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_data_source_config_session_initiator fmt (v:data_source_config_session_initiator) = + match v with + | Session_initiator_unspecified -> Format.fprintf fmt "Session_initiator_unspecified" + | Session_initiator_trusted_system -> Format.fprintf fmt "Session_initiator_trusted_system" + +let rec pp_data_source_config_buffer_exhausted_policy fmt (v:data_source_config_buffer_exhausted_policy) = + match v with + | Buffer_exhausted_unspecified -> Format.fprintf fmt "Buffer_exhausted_unspecified" + | Buffer_exhausted_drop -> Format.fprintf fmt "Buffer_exhausted_drop" + | Buffer_exhausted_stall_then_abort -> Format.fprintf fmt "Buffer_exhausted_stall_then_abort" + | Buffer_exhausted_stall_then_drop -> Format.fprintf fmt "Buffer_exhausted_stall_then_drop" + +let rec pp_data_source_config fmt (v:data_source_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (data_source_config_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "target_buffer" Pbrt.Pp.pp_int32 fmt v.target_buffer; + if not (data_source_config_has_target_buffer v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_duration_ms" Pbrt.Pp.pp_int32 fmt v.trace_duration_ms; + if not (data_source_config_has_trace_duration_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prefer_suspend_clock_for_duration" Pbrt.Pp.pp_bool fmt v.prefer_suspend_clock_for_duration; + if not (data_source_config_has_prefer_suspend_clock_for_duration v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "stop_timeout_ms" Pbrt.Pp.pp_int32 fmt v.stop_timeout_ms; + if not (data_source_config_has_stop_timeout_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "enable_extra_guardrails" Pbrt.Pp.pp_bool fmt v.enable_extra_guardrails; + if not (data_source_config_has_enable_extra_guardrails v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "session_initiator" pp_data_source_config_session_initiator fmt v.session_initiator; + if not (data_source_config_has_session_initiator v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tracing_session_id" Pbrt.Pp.pp_int64 fmt v.tracing_session_id; + if not (data_source_config_has_tracing_session_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer_exhausted_policy" pp_data_source_config_buffer_exhausted_policy fmt v.buffer_exhausted_policy; + if not (data_source_config_has_buffer_exhausted_policy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "priority_boost" (Pbrt.Pp.pp_option pp_priority_boost_config) fmt v.priority_boost; + Pbrt.Pp.pp_record_field ~first:false "ftrace_config" (Pbrt.Pp.pp_option pp_ftrace_config) fmt v.ftrace_config; + Pbrt.Pp.pp_record_field ~first:false "inode_file_config" (Pbrt.Pp.pp_option pp_inode_file_config) fmt v.inode_file_config; + Pbrt.Pp.pp_record_field ~first:false "process_stats_config" (Pbrt.Pp.pp_option pp_process_stats_config) fmt v.process_stats_config; + Pbrt.Pp.pp_record_field ~first:false "sys_stats_config" (Pbrt.Pp.pp_option pp_sys_stats_config) fmt v.sys_stats_config; + Pbrt.Pp.pp_record_field ~first:false "heapprofd_config" (Pbrt.Pp.pp_option pp_heapprofd_config) fmt v.heapprofd_config; + Pbrt.Pp.pp_record_field ~first:false "android_power_config" (Pbrt.Pp.pp_option pp_android_power_config) fmt v.android_power_config; + Pbrt.Pp.pp_record_field ~first:false "android_log_config" (Pbrt.Pp.pp_option pp_android_log_config) fmt v.android_log_config; + Pbrt.Pp.pp_record_field ~first:false "gpu_counter_config" (Pbrt.Pp.pp_option pp_gpu_counter_config) fmt v.gpu_counter_config; + Pbrt.Pp.pp_record_field ~first:false "android_game_intervention_list_config" (Pbrt.Pp.pp_option pp_android_game_intervention_list_config) fmt v.android_game_intervention_list_config; + Pbrt.Pp.pp_record_field ~first:false "packages_list_config" (Pbrt.Pp.pp_option pp_packages_list_config) fmt v.packages_list_config; + Pbrt.Pp.pp_record_field ~first:false "vulkan_memory_config" (Pbrt.Pp.pp_option pp_vulkan_memory_config) fmt v.vulkan_memory_config; + Pbrt.Pp.pp_record_field ~first:false "track_event_config" (Pbrt.Pp.pp_option pp_track_event_config) fmt v.track_event_config; + Pbrt.Pp.pp_record_field ~first:false "android_polled_state_config" (Pbrt.Pp.pp_option pp_android_polled_state_config) fmt v.android_polled_state_config; + Pbrt.Pp.pp_record_field ~first:false "android_system_property_config" (Pbrt.Pp.pp_option pp_android_system_property_config) fmt v.android_system_property_config; + Pbrt.Pp.pp_record_field ~first:false "statsd_tracing_config" (Pbrt.Pp.pp_option pp_statsd_tracing_config) fmt v.statsd_tracing_config; + Pbrt.Pp.pp_record_field ~first:false "system_info_config" Pbrt.Pp.pp_unit fmt v.system_info_config; + if not (data_source_config_has_system_info_config v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frozen_ftrace_config" (Pbrt.Pp.pp_option pp_frozen_ftrace_config) fmt v.frozen_ftrace_config; + Pbrt.Pp.pp_record_field ~first:false "chrome_config" (Pbrt.Pp.pp_option pp_chrome_config) fmt v.chrome_config; + Pbrt.Pp.pp_record_field ~first:false "v8_config" (Pbrt.Pp.pp_option pp_v8_config) fmt v.v8_config; + Pbrt.Pp.pp_record_field ~first:false "interceptor_config" (Pbrt.Pp.pp_option pp_interceptor_config) fmt v.interceptor_config; + Pbrt.Pp.pp_record_field ~first:false "network_packet_trace_config" (Pbrt.Pp.pp_option pp_network_packet_trace_config) fmt v.network_packet_trace_config; + Pbrt.Pp.pp_record_field ~first:false "surfaceflinger_layers_config" (Pbrt.Pp.pp_option pp_surface_flinger_layers_config) fmt v.surfaceflinger_layers_config; + Pbrt.Pp.pp_record_field ~first:false "surfaceflinger_transactions_config" (Pbrt.Pp.pp_option pp_surface_flinger_transactions_config) fmt v.surfaceflinger_transactions_config; + Pbrt.Pp.pp_record_field ~first:false "android_sdk_sysprop_guard_config" (Pbrt.Pp.pp_option pp_android_sdk_sysprop_guard_config) fmt v.android_sdk_sysprop_guard_config; + Pbrt.Pp.pp_record_field ~first:false "etw_config" (Pbrt.Pp.pp_option pp_etw_config) fmt v.etw_config; + Pbrt.Pp.pp_record_field ~first:false "protolog_config" (Pbrt.Pp.pp_option pp_proto_log_config) fmt v.protolog_config; + Pbrt.Pp.pp_record_field ~first:false "android_input_event_config" (Pbrt.Pp.pp_option pp_android_input_event_config) fmt v.android_input_event_config; + Pbrt.Pp.pp_record_field ~first:false "pixel_modem_config" (Pbrt.Pp.pp_option pp_pixel_modem_config) fmt v.pixel_modem_config; + Pbrt.Pp.pp_record_field ~first:false "windowmanager_config" (Pbrt.Pp.pp_option pp_window_manager_config) fmt v.windowmanager_config; + Pbrt.Pp.pp_record_field ~first:false "chromium_system_metrics" (Pbrt.Pp.pp_option pp_chromium_system_metrics_config) fmt v.chromium_system_metrics; + Pbrt.Pp.pp_record_field ~first:false "kernel_wakelocks_config" (Pbrt.Pp.pp_option pp_kernel_wakelocks_config) fmt v.kernel_wakelocks_config; + Pbrt.Pp.pp_record_field ~first:false "gpu_renderstages_config" (Pbrt.Pp.pp_option pp_gpu_render_stages_config) fmt v.gpu_renderstages_config; + Pbrt.Pp.pp_record_field ~first:false "chromium_histogram_samples" (Pbrt.Pp.pp_option pp_chromium_histogram_samples_config) fmt v.chromium_histogram_samples; + Pbrt.Pp.pp_record_field ~first:false "app_wakelocks_config" (Pbrt.Pp.pp_option pp_app_wakelocks_config) fmt v.app_wakelocks_config; + Pbrt.Pp.pp_record_field ~first:false "cpu_per_uid_config" (Pbrt.Pp.pp_option pp_cpu_per_uid_config) fmt v.cpu_per_uid_config; + Pbrt.Pp.pp_record_field ~first:false "legacy_config" Pbrt.Pp.pp_string fmt v.legacy_config; + if not (data_source_config_has_legacy_config v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "for_testing" (Pbrt.Pp.pp_option pp_test_config) fmt v.for_testing; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_buffer_config_fill_policy fmt (v:trace_config_buffer_config_fill_policy) = + match v with + | Unspecified -> Format.fprintf fmt "Unspecified" + | Ring_buffer -> Format.fprintf fmt "Ring_buffer" + | Discard -> Format.fprintf fmt "Discard" + +let rec pp_trace_config_buffer_config fmt (v:trace_config_buffer_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "size_kb" Pbrt.Pp.pp_int32 fmt v.size_kb; + if not (trace_config_buffer_config_has_size_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "fill_policy" pp_trace_config_buffer_config_fill_policy fmt v.fill_policy; + if not (trace_config_buffer_config_has_fill_policy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transfer_on_clone" Pbrt.Pp.pp_bool fmt v.transfer_on_clone; + if not (trace_config_buffer_config_has_transfer_on_clone v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "clear_before_clone" Pbrt.Pp.pp_bool fmt v.clear_before_clone; + if not (trace_config_buffer_config_has_clear_before_clone v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_data_source fmt (v:trace_config_data_source) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "config" (Pbrt.Pp.pp_option pp_data_source_config) fmt v.config; + Pbrt.Pp.pp_record_field ~first:false "producer_name_filter" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.producer_name_filter; + Pbrt.Pp.pp_record_field ~first:false "producer_name_regex_filter" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.producer_name_regex_filter; + Pbrt.Pp.pp_record_field ~first:false "machine_name_filter" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.machine_name_filter; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_builtin_data_source fmt (v:trace_config_builtin_data_source) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "disable_clock_snapshotting" Pbrt.Pp.pp_bool fmt v.disable_clock_snapshotting; + if not (trace_config_builtin_data_source_has_disable_clock_snapshotting v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "disable_trace_config" Pbrt.Pp.pp_bool fmt v.disable_trace_config; + if not (trace_config_builtin_data_source_has_disable_trace_config v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "disable_system_info" Pbrt.Pp.pp_bool fmt v.disable_system_info; + if not (trace_config_builtin_data_source_has_disable_system_info v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "disable_service_events" Pbrt.Pp.pp_bool fmt v.disable_service_events; + if not (trace_config_builtin_data_source_has_disable_service_events v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "primary_trace_clock" pp_builtin_clock fmt v.primary_trace_clock; + if not (trace_config_builtin_data_source_has_primary_trace_clock v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "snapshot_interval_ms" Pbrt.Pp.pp_int32 fmt v.snapshot_interval_ms; + if not (trace_config_builtin_data_source_has_snapshot_interval_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prefer_suspend_clock_for_snapshot" Pbrt.Pp.pp_bool fmt v.prefer_suspend_clock_for_snapshot; + if not (trace_config_builtin_data_source_has_prefer_suspend_clock_for_snapshot v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "disable_chunk_usage_histograms" Pbrt.Pp.pp_bool fmt v.disable_chunk_usage_histograms; + if not (trace_config_builtin_data_source_has_disable_chunk_usage_histograms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_lockdown_mode_operation fmt (v:trace_config_lockdown_mode_operation) = + match v with + | Lockdown_unchanged -> Format.fprintf fmt "Lockdown_unchanged" + | Lockdown_clear -> Format.fprintf fmt "Lockdown_clear" + | Lockdown_set -> Format.fprintf fmt "Lockdown_set" + +let rec pp_trace_config_producer_config fmt (v:trace_config_producer_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "producer_name" Pbrt.Pp.pp_string fmt v.producer_name; + if not (trace_config_producer_config_has_producer_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "shm_size_kb" Pbrt.Pp.pp_int32 fmt v.shm_size_kb; + if not (trace_config_producer_config_has_shm_size_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "page_size_kb" Pbrt.Pp.pp_int32 fmt v.page_size_kb; + if not (trace_config_producer_config_has_page_size_kb v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_statsd_metadata fmt (v:trace_config_statsd_metadata) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "triggering_alert_id" Pbrt.Pp.pp_int64 fmt v.triggering_alert_id; + if not (trace_config_statsd_metadata_has_triggering_alert_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "triggering_config_uid" Pbrt.Pp.pp_int32 fmt v.triggering_config_uid; + if not (trace_config_statsd_metadata_has_triggering_config_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "triggering_config_id" Pbrt.Pp.pp_int64 fmt v.triggering_config_id; + if not (trace_config_statsd_metadata_has_triggering_config_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "triggering_subscription_id" Pbrt.Pp.pp_int64 fmt v.triggering_subscription_id; + if not (trace_config_statsd_metadata_has_triggering_subscription_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_guardrail_overrides fmt (v:trace_config_guardrail_overrides) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "max_upload_per_day_bytes" Pbrt.Pp.pp_int64 fmt v.max_upload_per_day_bytes; + if not (trace_config_guardrail_overrides_has_max_upload_per_day_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_tracing_buffer_size_kb" Pbrt.Pp.pp_int32 fmt v.max_tracing_buffer_size_kb; + if not (trace_config_guardrail_overrides_has_max_tracing_buffer_size_kb v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_trigger_config_trigger_mode fmt (v:trace_config_trigger_config_trigger_mode) = + match v with + | Unspecified -> Format.fprintf fmt "Unspecified" + | Start_tracing -> Format.fprintf fmt "Start_tracing" + | Stop_tracing -> Format.fprintf fmt "Stop_tracing" + | Clone_snapshot -> Format.fprintf fmt "Clone_snapshot" + +let rec pp_trace_config_trigger_config_trigger fmt (v:trace_config_trigger_config_trigger) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (trace_config_trigger_config_trigger_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "producer_name_regex" Pbrt.Pp.pp_string fmt v.producer_name_regex; + if not (trace_config_trigger_config_trigger_has_producer_name_regex v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "stop_delay_ms" Pbrt.Pp.pp_int32 fmt v.stop_delay_ms; + if not (trace_config_trigger_config_trigger_has_stop_delay_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_per_24_h" Pbrt.Pp.pp_int32 fmt v.max_per_24_h; + if not (trace_config_trigger_config_trigger_has_max_per_24_h v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "skip_probability" Pbrt.Pp.pp_float fmt v.skip_probability; + if not (trace_config_trigger_config_trigger_has_skip_probability v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_trigger_config fmt (v:trace_config_trigger_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "trigger_mode" pp_trace_config_trigger_config_trigger_mode fmt v.trigger_mode; + if not (trace_config_trigger_config_has_trigger_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "use_clone_snapshot_if_available" Pbrt.Pp.pp_bool fmt v.use_clone_snapshot_if_available; + if not (trace_config_trigger_config_has_use_clone_snapshot_if_available v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "triggers" (Pbrt.Pp.pp_list pp_trace_config_trigger_config_trigger) fmt v.triggers; + Pbrt.Pp.pp_record_field ~first:false "trigger_timeout_ms" Pbrt.Pp.pp_int32 fmt v.trigger_timeout_ms; + if not (trace_config_trigger_config_has_trigger_timeout_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_incremental_state_config fmt (v:trace_config_incremental_state_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "clear_period_ms" Pbrt.Pp.pp_int32 fmt v.clear_period_ms; + if not (trace_config_incremental_state_config_has_clear_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_compression_type fmt (v:trace_config_compression_type) = + match v with + | Compression_type_unspecified -> Format.fprintf fmt "Compression_type_unspecified" + | Compression_type_deflate -> Format.fprintf fmt "Compression_type_deflate" + +let rec pp_trace_config_incident_report_config fmt (v:trace_config_incident_report_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "destination_package" Pbrt.Pp.pp_string fmt v.destination_package; + if not (trace_config_incident_report_config_has_destination_package v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "destination_class" Pbrt.Pp.pp_string fmt v.destination_class; + if not (trace_config_incident_report_config_has_destination_class v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "privacy_level" Pbrt.Pp.pp_int32 fmt v.privacy_level; + if not (trace_config_incident_report_config_has_privacy_level v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "skip_incidentd" Pbrt.Pp.pp_bool fmt v.skip_incidentd; + if not (trace_config_incident_report_config_has_skip_incidentd v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "skip_dropbox" Pbrt.Pp.pp_bool fmt v.skip_dropbox; + if not (trace_config_incident_report_config_has_skip_dropbox v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_statsd_logging fmt (v:trace_config_statsd_logging) = + match v with + | Statsd_logging_unspecified -> Format.fprintf fmt "Statsd_logging_unspecified" + | Statsd_logging_enabled -> Format.fprintf fmt "Statsd_logging_enabled" + | Statsd_logging_disabled -> Format.fprintf fmt "Statsd_logging_disabled" + +let rec pp_trace_config_trace_filter_string_filter_policy fmt (v:trace_config_trace_filter_string_filter_policy) = + match v with + | Sfp_unspecified -> Format.fprintf fmt "Sfp_unspecified" + | Sfp_match_redact_groups -> Format.fprintf fmt "Sfp_match_redact_groups" + | Sfp_atrace_match_redact_groups -> Format.fprintf fmt "Sfp_atrace_match_redact_groups" + | Sfp_match_break -> Format.fprintf fmt "Sfp_match_break" + | Sfp_atrace_match_break -> Format.fprintf fmt "Sfp_atrace_match_break" + | Sfp_atrace_repeated_search_redact_groups -> Format.fprintf fmt "Sfp_atrace_repeated_search_redact_groups" + +let rec pp_trace_config_trace_filter_string_filter_rule fmt (v:trace_config_trace_filter_string_filter_rule) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "policy" pp_trace_config_trace_filter_string_filter_policy fmt v.policy; + if not (trace_config_trace_filter_string_filter_rule_has_policy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "regex_pattern" Pbrt.Pp.pp_string fmt v.regex_pattern; + if not (trace_config_trace_filter_string_filter_rule_has_regex_pattern v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "atrace_payload_starts_with" Pbrt.Pp.pp_string fmt v.atrace_payload_starts_with; + if not (trace_config_trace_filter_string_filter_rule_has_atrace_payload_starts_with v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_trace_filter_string_filter_chain fmt (v:trace_config_trace_filter_string_filter_chain) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "rules" (Pbrt.Pp.pp_list pp_trace_config_trace_filter_string_filter_rule) fmt v.rules; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_trace_filter fmt (v:trace_config_trace_filter) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "bytecode" Pbrt.Pp.pp_bytes fmt v.bytecode; + if not (trace_config_trace_filter_has_bytecode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bytecode_v2" Pbrt.Pp.pp_bytes fmt v.bytecode_v2; + if not (trace_config_trace_filter_has_bytecode_v2 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "string_filter_chain" (Pbrt.Pp.pp_option pp_trace_config_trace_filter_string_filter_chain) fmt v.string_filter_chain; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_android_report_config fmt (v:trace_config_android_report_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "reporter_service_package" Pbrt.Pp.pp_string fmt v.reporter_service_package; + if not (trace_config_android_report_config_has_reporter_service_package v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "reporter_service_class" Pbrt.Pp.pp_string fmt v.reporter_service_class; + if not (trace_config_android_report_config_has_reporter_service_class v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "skip_report" Pbrt.Pp.pp_bool fmt v.skip_report; + if not (trace_config_android_report_config_has_skip_report v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "use_pipe_in_framework_for_testing" Pbrt.Pp.pp_bool fmt v.use_pipe_in_framework_for_testing; + if not (trace_config_android_report_config_has_use_pipe_in_framework_for_testing v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_cmd_trace_start_delay fmt (v:trace_config_cmd_trace_start_delay) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "min_delay_ms" Pbrt.Pp.pp_int32 fmt v.min_delay_ms; + if not (trace_config_cmd_trace_start_delay_has_min_delay_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_delay_ms" Pbrt.Pp.pp_int32 fmt v.max_delay_ms; + if not (trace_config_cmd_trace_start_delay_has_max_delay_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config_session_semaphore fmt (v:trace_config_session_semaphore) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (trace_config_session_semaphore_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_other_session_count" Pbrt.Pp.pp_int64 fmt v.max_other_session_count; + if not (trace_config_session_semaphore_has_max_other_session_count v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_config fmt (v:trace_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "buffers" (Pbrt.Pp.pp_list pp_trace_config_buffer_config) fmt v.buffers; + Pbrt.Pp.pp_record_field ~first:false "data_sources" (Pbrt.Pp.pp_list pp_trace_config_data_source) fmt v.data_sources; + Pbrt.Pp.pp_record_field ~first:false "builtin_data_sources" (Pbrt.Pp.pp_option pp_trace_config_builtin_data_source) fmt v.builtin_data_sources; + Pbrt.Pp.pp_record_field ~first:false "duration_ms" Pbrt.Pp.pp_int32 fmt v.duration_ms; + if not (trace_config_has_duration_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prefer_suspend_clock_for_duration" Pbrt.Pp.pp_bool fmt v.prefer_suspend_clock_for_duration; + if not (trace_config_has_prefer_suspend_clock_for_duration v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "enable_extra_guardrails" Pbrt.Pp.pp_bool fmt v.enable_extra_guardrails; + if not (trace_config_has_enable_extra_guardrails v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "lockdown_mode" pp_trace_config_lockdown_mode_operation fmt v.lockdown_mode; + if not (trace_config_has_lockdown_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "producers" (Pbrt.Pp.pp_list pp_trace_config_producer_config) fmt v.producers; + Pbrt.Pp.pp_record_field ~first:false "statsd_metadata" (Pbrt.Pp.pp_option pp_trace_config_statsd_metadata) fmt v.statsd_metadata; + Pbrt.Pp.pp_record_field ~first:false "write_into_file" Pbrt.Pp.pp_bool fmt v.write_into_file; + if not (trace_config_has_write_into_file v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "output_path" Pbrt.Pp.pp_string fmt v.output_path; + if not (trace_config_has_output_path v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_write_period_ms" Pbrt.Pp.pp_int32 fmt v.file_write_period_ms; + if not (trace_config_has_file_write_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_file_size_bytes" Pbrt.Pp.pp_int64 fmt v.max_file_size_bytes; + if not (trace_config_has_max_file_size_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "guardrail_overrides" (Pbrt.Pp.pp_option pp_trace_config_guardrail_overrides) fmt v.guardrail_overrides; + Pbrt.Pp.pp_record_field ~first:false "deferred_start" Pbrt.Pp.pp_bool fmt v.deferred_start; + if not (trace_config_has_deferred_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flush_period_ms" Pbrt.Pp.pp_int32 fmt v.flush_period_ms; + if not (trace_config_has_flush_period_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flush_timeout_ms" Pbrt.Pp.pp_int32 fmt v.flush_timeout_ms; + if not (trace_config_has_flush_timeout_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "data_source_stop_timeout_ms" Pbrt.Pp.pp_int32 fmt v.data_source_stop_timeout_ms; + if not (trace_config_has_data_source_stop_timeout_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "notify_traceur" Pbrt.Pp.pp_bool fmt v.notify_traceur; + if not (trace_config_has_notify_traceur v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bugreport_score" Pbrt.Pp.pp_int32 fmt v.bugreport_score; + if not (trace_config_has_bugreport_score v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bugreport_filename" Pbrt.Pp.pp_string fmt v.bugreport_filename; + if not (trace_config_has_bugreport_filename v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trigger_config" (Pbrt.Pp.pp_option pp_trace_config_trigger_config) fmt v.trigger_config; + Pbrt.Pp.pp_record_field ~first:false "activate_triggers" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.activate_triggers; + Pbrt.Pp.pp_record_field ~first:false "incremental_state_config" (Pbrt.Pp.pp_option pp_trace_config_incremental_state_config) fmt v.incremental_state_config; + Pbrt.Pp.pp_record_field ~first:false "allow_user_build_tracing" Pbrt.Pp.pp_bool fmt v.allow_user_build_tracing; + if not (trace_config_has_allow_user_build_tracing v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "unique_session_name" Pbrt.Pp.pp_string fmt v.unique_session_name; + if not (trace_config_has_unique_session_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "compression_type" pp_trace_config_compression_type fmt v.compression_type; + if not (trace_config_has_compression_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "incident_report_config" (Pbrt.Pp.pp_option pp_trace_config_incident_report_config) fmt v.incident_report_config; + Pbrt.Pp.pp_record_field ~first:false "statsd_logging" pp_trace_config_statsd_logging fmt v.statsd_logging; + if not (trace_config_has_statsd_logging v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_uuid_msb" Pbrt.Pp.pp_int64 fmt v.trace_uuid_msb; + if not (trace_config_has_trace_uuid_msb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_uuid_lsb" Pbrt.Pp.pp_int64 fmt v.trace_uuid_lsb; + if not (trace_config_has_trace_uuid_lsb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_filter" (Pbrt.Pp.pp_option pp_trace_config_trace_filter) fmt v.trace_filter; + Pbrt.Pp.pp_record_field ~first:false "android_report_config" (Pbrt.Pp.pp_option pp_trace_config_android_report_config) fmt v.android_report_config; + Pbrt.Pp.pp_record_field ~first:false "cmd_trace_start_delay" (Pbrt.Pp.pp_option pp_trace_config_cmd_trace_start_delay) fmt v.cmd_trace_start_delay; + Pbrt.Pp.pp_record_field ~first:false "session_semaphores" (Pbrt.Pp.pp_list pp_trace_config_session_semaphore) fmt v.session_semaphores; + Pbrt.Pp.pp_record_field ~first:false "priority_boost" (Pbrt.Pp.pp_option pp_priority_boost_config) fmt v.priority_boost; + Pbrt.Pp.pp_record_field ~first:false "exclusive_prio" Pbrt.Pp.pp_int32 fmt v.exclusive_prio; + if not (trace_config_has_exclusive_prio v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "no_flush_before_write_into_file" Pbrt.Pp.pp_bool fmt v.no_flush_before_write_into_file; + if not (trace_config_has_no_flush_before_write_into_file v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_utsname fmt (v:utsname) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "sysname" Pbrt.Pp.pp_string fmt v.sysname; + if not (utsname_has_sysname v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "version" Pbrt.Pp.pp_string fmt v.version; + if not (utsname_has_version v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "release" Pbrt.Pp.pp_string fmt v.release; + if not (utsname_has_release v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "machine" Pbrt.Pp.pp_string fmt v.machine; + if not (utsname_has_machine v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_system_info fmt (v:system_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "utsname" (Pbrt.Pp.pp_option pp_utsname) fmt v.utsname; + Pbrt.Pp.pp_record_field ~first:false "android_build_fingerprint" Pbrt.Pp.pp_string fmt v.android_build_fingerprint; + if not (system_info_has_android_build_fingerprint v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "android_device_manufacturer" Pbrt.Pp.pp_string fmt v.android_device_manufacturer; + if not (system_info_has_android_device_manufacturer v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "android_soc_model" Pbrt.Pp.pp_string fmt v.android_soc_model; + if not (system_info_has_android_soc_model v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "android_guest_soc_model" Pbrt.Pp.pp_string fmt v.android_guest_soc_model; + if not (system_info_has_android_guest_soc_model v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "android_hardware_revision" Pbrt.Pp.pp_string fmt v.android_hardware_revision; + if not (system_info_has_android_hardware_revision v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "android_storage_model" Pbrt.Pp.pp_string fmt v.android_storage_model; + if not (system_info_has_android_storage_model v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "android_ram_model" Pbrt.Pp.pp_string fmt v.android_ram_model; + if not (system_info_has_android_ram_model v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "android_serial_console" Pbrt.Pp.pp_string fmt v.android_serial_console; + if not (system_info_has_android_serial_console v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tracing_service_version" Pbrt.Pp.pp_string fmt v.tracing_service_version; + if not (system_info_has_tracing_service_version v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "android_sdk_version" Pbrt.Pp.pp_int64 fmt v.android_sdk_version; + if not (system_info_has_android_sdk_version v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "page_size" Pbrt.Pp.pp_int32 fmt v.page_size; + if not (system_info_has_page_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_cpus" Pbrt.Pp.pp_int32 fmt v.num_cpus; + if not (system_info_has_num_cpus v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timezone_off_mins" Pbrt.Pp.pp_int32 fmt v.timezone_off_mins; + if not (system_info_has_timezone_off_mins v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "hz" Pbrt.Pp.pp_int64 fmt v.hz; + if not (system_info_has_hz v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_stats_buffer_stats fmt (v:trace_stats_buffer_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "buffer_size" Pbrt.Pp.pp_int64 fmt v.buffer_size; + if not (trace_stats_buffer_stats_has_buffer_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bytes_written" Pbrt.Pp.pp_int64 fmt v.bytes_written; + if not (trace_stats_buffer_stats_has_bytes_written v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bytes_overwritten" Pbrt.Pp.pp_int64 fmt v.bytes_overwritten; + if not (trace_stats_buffer_stats_has_bytes_overwritten v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bytes_read" Pbrt.Pp.pp_int64 fmt v.bytes_read; + if not (trace_stats_buffer_stats_has_bytes_read v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "padding_bytes_written" Pbrt.Pp.pp_int64 fmt v.padding_bytes_written; + if not (trace_stats_buffer_stats_has_padding_bytes_written v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "padding_bytes_cleared" Pbrt.Pp.pp_int64 fmt v.padding_bytes_cleared; + if not (trace_stats_buffer_stats_has_padding_bytes_cleared v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chunks_written" Pbrt.Pp.pp_int64 fmt v.chunks_written; + if not (trace_stats_buffer_stats_has_chunks_written v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chunks_rewritten" Pbrt.Pp.pp_int64 fmt v.chunks_rewritten; + if not (trace_stats_buffer_stats_has_chunks_rewritten v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chunks_overwritten" Pbrt.Pp.pp_int64 fmt v.chunks_overwritten; + if not (trace_stats_buffer_stats_has_chunks_overwritten v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chunks_discarded" Pbrt.Pp.pp_int64 fmt v.chunks_discarded; + if not (trace_stats_buffer_stats_has_chunks_discarded v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chunks_read" Pbrt.Pp.pp_int64 fmt v.chunks_read; + if not (trace_stats_buffer_stats_has_chunks_read v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chunks_committed_out_of_order" Pbrt.Pp.pp_int64 fmt v.chunks_committed_out_of_order; + if not (trace_stats_buffer_stats_has_chunks_committed_out_of_order v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "write_wrap_count" Pbrt.Pp.pp_int64 fmt v.write_wrap_count; + if not (trace_stats_buffer_stats_has_write_wrap_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "patches_succeeded" Pbrt.Pp.pp_int64 fmt v.patches_succeeded; + if not (trace_stats_buffer_stats_has_patches_succeeded v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "patches_failed" Pbrt.Pp.pp_int64 fmt v.patches_failed; + if not (trace_stats_buffer_stats_has_patches_failed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "readaheads_succeeded" Pbrt.Pp.pp_int64 fmt v.readaheads_succeeded; + if not (trace_stats_buffer_stats_has_readaheads_succeeded v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "readaheads_failed" Pbrt.Pp.pp_int64 fmt v.readaheads_failed; + if not (trace_stats_buffer_stats_has_readaheads_failed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "abi_violations" Pbrt.Pp.pp_int64 fmt v.abi_violations; + if not (trace_stats_buffer_stats_has_abi_violations v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_writer_packet_loss" Pbrt.Pp.pp_int64 fmt v.trace_writer_packet_loss; + if not (trace_stats_buffer_stats_has_trace_writer_packet_loss v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_stats_writer_stats fmt (v:trace_stats_writer_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "sequence_id" Pbrt.Pp.pp_int64 fmt v.sequence_id; + if not (trace_stats_writer_stats_has_sequence_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer" Pbrt.Pp.pp_int32 fmt v.buffer; + if not (trace_stats_writer_stats_has_buffer v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chunk_payload_histogram_counts" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.chunk_payload_histogram_counts; + Pbrt.Pp.pp_record_field ~first:false "chunk_payload_histogram_sum" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.chunk_payload_histogram_sum; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_stats_filter_stats fmt (v:trace_stats_filter_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "input_packets" Pbrt.Pp.pp_int64 fmt v.input_packets; + if not (trace_stats_filter_stats_has_input_packets v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "input_bytes" Pbrt.Pp.pp_int64 fmt v.input_bytes; + if not (trace_stats_filter_stats_has_input_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "output_bytes" Pbrt.Pp.pp_int64 fmt v.output_bytes; + if not (trace_stats_filter_stats_has_output_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "errors" Pbrt.Pp.pp_int64 fmt v.errors; + if not (trace_stats_filter_stats_has_errors v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "time_taken_ns" Pbrt.Pp.pp_int64 fmt v.time_taken_ns; + if not (trace_stats_filter_stats_has_time_taken_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bytes_discarded_per_buffer" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.bytes_discarded_per_buffer; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_stats_final_flush_outcome fmt (v:trace_stats_final_flush_outcome) = + match v with + | Final_flush_unspecified -> Format.fprintf fmt "Final_flush_unspecified" + | Final_flush_succeeded -> Format.fprintf fmt "Final_flush_succeeded" + | Final_flush_failed -> Format.fprintf fmt "Final_flush_failed" + +let rec pp_trace_stats fmt (v:trace_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "buffer_stats" (Pbrt.Pp.pp_list pp_trace_stats_buffer_stats) fmt v.buffer_stats; + Pbrt.Pp.pp_record_field ~first:false "chunk_payload_histogram_def" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.chunk_payload_histogram_def; + Pbrt.Pp.pp_record_field ~first:false "writer_stats" (Pbrt.Pp.pp_list pp_trace_stats_writer_stats) fmt v.writer_stats; + Pbrt.Pp.pp_record_field ~first:false "producers_connected" Pbrt.Pp.pp_int32 fmt v.producers_connected; + if not (trace_stats_has_producers_connected v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "producers_seen" Pbrt.Pp.pp_int64 fmt v.producers_seen; + if not (trace_stats_has_producers_seen v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "data_sources_registered" Pbrt.Pp.pp_int32 fmt v.data_sources_registered; + if not (trace_stats_has_data_sources_registered v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "data_sources_seen" Pbrt.Pp.pp_int64 fmt v.data_sources_seen; + if not (trace_stats_has_data_sources_seen v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tracing_sessions" Pbrt.Pp.pp_int32 fmt v.tracing_sessions; + if not (trace_stats_has_tracing_sessions v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "total_buffers" Pbrt.Pp.pp_int32 fmt v.total_buffers; + if not (trace_stats_has_total_buffers v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chunks_discarded" Pbrt.Pp.pp_int64 fmt v.chunks_discarded; + if not (trace_stats_has_chunks_discarded v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "patches_discarded" Pbrt.Pp.pp_int64 fmt v.patches_discarded; + if not (trace_stats_has_patches_discarded v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "invalid_packets" Pbrt.Pp.pp_int64 fmt v.invalid_packets; + if not (trace_stats_has_invalid_packets v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "filter_stats" (Pbrt.Pp.pp_option pp_trace_stats_filter_stats) fmt v.filter_stats; + Pbrt.Pp.pp_record_field ~first:false "flushes_requested" Pbrt.Pp.pp_int64 fmt v.flushes_requested; + if not (trace_stats_has_flushes_requested v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flushes_succeeded" Pbrt.Pp.pp_int64 fmt v.flushes_succeeded; + if not (trace_stats_has_flushes_succeeded v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flushes_failed" Pbrt.Pp.pp_int64 fmt v.flushes_failed; + if not (trace_stats_has_flushes_failed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "final_flush_outcome" pp_trace_stats_final_flush_outcome fmt v.final_flush_outcome; + if not (trace_stats_has_final_flush_outcome v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_game_intervention_list_game_mode_info fmt (v:android_game_intervention_list_game_mode_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "mode" Pbrt.Pp.pp_int32 fmt v.mode; + if not (android_game_intervention_list_game_mode_info_has_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "use_angle" Pbrt.Pp.pp_bool fmt v.use_angle; + if not (android_game_intervention_list_game_mode_info_has_use_angle v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "resolution_downscale" Pbrt.Pp.pp_float fmt v.resolution_downscale; + if not (android_game_intervention_list_game_mode_info_has_resolution_downscale v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "fps" Pbrt.Pp.pp_float fmt v.fps; + if not (android_game_intervention_list_game_mode_info_has_fps v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_game_intervention_list_game_package_info fmt (v:android_game_intervention_list_game_package_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (android_game_intervention_list_game_package_info_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uid" Pbrt.Pp.pp_int64 fmt v.uid; + if not (android_game_intervention_list_game_package_info_has_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "current_mode" Pbrt.Pp.pp_int32 fmt v.current_mode; + if not (android_game_intervention_list_game_package_info_has_current_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "game_mode_info" (Pbrt.Pp.pp_list pp_android_game_intervention_list_game_mode_info) fmt v.game_mode_info; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_game_intervention_list fmt (v:android_game_intervention_list) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "game_packages" (Pbrt.Pp.pp_list pp_android_game_intervention_list_game_package_info) fmt v.game_packages; + Pbrt.Pp.pp_record_field ~first:false "parse_error" Pbrt.Pp.pp_bool fmt v.parse_error; + if not (android_game_intervention_list_has_parse_error v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "read_error" Pbrt.Pp.pp_bool fmt v.read_error; + if not (android_game_intervention_list_has_read_error v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_log_packet_log_event_arg_value fmt (v:android_log_packet_log_event_arg_value) = + match v with + | Int_value x -> Format.fprintf fmt "@[Int_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Float_value x -> Format.fprintf fmt "@[Float_value(@,%a)@]" Pbrt.Pp.pp_float x + | String_value x -> Format.fprintf fmt "@[String_value(@,%a)@]" Pbrt.Pp.pp_string x + +and pp_android_log_packet_log_event_arg fmt (v:android_log_packet_log_event_arg) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (android_log_packet_log_event_arg_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" (Pbrt.Pp.pp_option pp_android_log_packet_log_event_arg_value) fmt v.value; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_log_packet_log_event fmt (v:android_log_packet_log_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "log_id" pp_android_log_id fmt v.log_id; + if not (android_log_packet_log_event_has_log_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (android_log_packet_log_event_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (android_log_packet_log_event_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uid" Pbrt.Pp.pp_int32 fmt v.uid; + if not (android_log_packet_log_event_has_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp" Pbrt.Pp.pp_int64 fmt v.timestamp; + if not (android_log_packet_log_event_has_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tag" Pbrt.Pp.pp_string fmt v.tag; + if not (android_log_packet_log_event_has_tag v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prio" pp_android_log_priority fmt v.prio; + if not (android_log_packet_log_event_has_prio v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "message" Pbrt.Pp.pp_string fmt v.message; + if not (android_log_packet_log_event_has_message v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "args" (Pbrt.Pp.pp_list pp_android_log_packet_log_event_arg) fmt v.args; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_log_packet_stats fmt (v:android_log_packet_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "num_total" Pbrt.Pp.pp_int64 fmt v.num_total; + if not (android_log_packet_stats_has_num_total v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_failed" Pbrt.Pp.pp_int64 fmt v.num_failed; + if not (android_log_packet_stats_has_num_failed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_skipped" Pbrt.Pp.pp_int64 fmt v.num_skipped; + if not (android_log_packet_stats_has_num_skipped v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_log_packet fmt (v:android_log_packet) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "events" (Pbrt.Pp.pp_list pp_android_log_packet_log_event) fmt v.events; + Pbrt.Pp.pp_record_field ~first:false "stats" (Pbrt.Pp.pp_option pp_android_log_packet_stats) fmt v.stats; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_system_property_property_value fmt (v:android_system_property_property_value) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (android_system_property_property_value_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_string fmt v.value; + if not (android_system_property_property_value_has_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_system_property fmt (v:android_system_property) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "values" (Pbrt.Pp.pp_list pp_android_system_property_property_value) fmt v.values; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_app_wakelock_info fmt (v:app_wakelock_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int32 fmt v.iid; + if not (app_wakelock_info_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tag" Pbrt.Pp.pp_string fmt v.tag; + if not (app_wakelock_info_has_tag v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (app_wakelock_info_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "owner_pid" Pbrt.Pp.pp_int32 fmt v.owner_pid; + if not (app_wakelock_info_has_owner_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "owner_uid" Pbrt.Pp.pp_int32 fmt v.owner_uid; + if not (app_wakelock_info_has_owner_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "work_uid" Pbrt.Pp.pp_int32 fmt v.work_uid; + if not (app_wakelock_info_has_work_uid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_app_wakelock_bundle fmt (v:app_wakelock_bundle) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "intern_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.intern_id; + Pbrt.Pp.pp_record_field ~first:false "encoded_ts" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.encoded_ts; + Pbrt.Pp.pp_record_field ~first:false "info" (Pbrt.Pp.pp_option pp_app_wakelock_info) fmt v.info; + Pbrt.Pp.pp_record_field ~first:false "acquired" Pbrt.Pp.pp_bool fmt v.acquired; + if not (app_wakelock_bundle_has_acquired v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_bluetooth_trace_packet_type fmt (v:bluetooth_trace_packet_type) = + match v with + | Hci_cmd -> Format.fprintf fmt "Hci_cmd" + | Hci_evt -> Format.fprintf fmt "Hci_evt" + | Hci_acl_rx -> Format.fprintf fmt "Hci_acl_rx" + | Hci_acl_tx -> Format.fprintf fmt "Hci_acl_tx" + | Hci_sco_rx -> Format.fprintf fmt "Hci_sco_rx" + | Hci_sco_tx -> Format.fprintf fmt "Hci_sco_tx" + | Hci_iso_rx -> Format.fprintf fmt "Hci_iso_rx" + | Hci_iso_tx -> Format.fprintf fmt "Hci_iso_tx" + +let rec pp_bluetooth_trace_event fmt (v:bluetooth_trace_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "packet_type" pp_bluetooth_trace_packet_type fmt v.packet_type; + if not (bluetooth_trace_event_has_packet_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "count" Pbrt.Pp.pp_int32 fmt v.count; + if not (bluetooth_trace_event_has_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "length" Pbrt.Pp.pp_int32 fmt v.length; + if not (bluetooth_trace_event_has_length v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "duration" Pbrt.Pp.pp_int32 fmt v.duration; + if not (bluetooth_trace_event_has_duration v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "op_code" Pbrt.Pp.pp_int32 fmt v.op_code; + if not (bluetooth_trace_event_has_op_code v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "event_code" Pbrt.Pp.pp_int32 fmt v.event_code; + if not (bluetooth_trace_event_has_event_code v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "subevent_code" Pbrt.Pp.pp_int32 fmt v.subevent_code; + if not (bluetooth_trace_event_has_subevent_code v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "connection_handle" Pbrt.Pp.pp_int32 fmt v.connection_handle; + if not (bluetooth_trace_event_has_connection_handle v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_camera_frame_event_capture_result_status fmt (v:android_camera_frame_event_capture_result_status) = + match v with + | Status_unspecified -> Format.fprintf fmt "Status_unspecified" + | Status_ok -> Format.fprintf fmt "Status_ok" + | Status_early_metadata_error -> Format.fprintf fmt "Status_early_metadata_error" + | Status_final_metadata_error -> Format.fprintf fmt "Status_final_metadata_error" + | Status_buffer_error -> Format.fprintf fmt "Status_buffer_error" + | Status_flush_error -> Format.fprintf fmt "Status_flush_error" + +let rec pp_android_camera_frame_event_camera_node_processing_details fmt (v:android_camera_frame_event_camera_node_processing_details) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "node_id" Pbrt.Pp.pp_int64 fmt v.node_id; + if not (android_camera_frame_event_camera_node_processing_details_has_node_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start_processing_ns" Pbrt.Pp.pp_int64 fmt v.start_processing_ns; + if not (android_camera_frame_event_camera_node_processing_details_has_start_processing_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "end_processing_ns" Pbrt.Pp.pp_int64 fmt v.end_processing_ns; + if not (android_camera_frame_event_camera_node_processing_details_has_end_processing_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scheduling_latency_ns" Pbrt.Pp.pp_int64 fmt v.scheduling_latency_ns; + if not (android_camera_frame_event_camera_node_processing_details_has_scheduling_latency_ns v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_camera_frame_event fmt (v:android_camera_frame_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "session_id" Pbrt.Pp.pp_int64 fmt v.session_id; + if not (android_camera_frame_event_has_session_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "camera_id" Pbrt.Pp.pp_int32 fmt v.camera_id; + if not (android_camera_frame_event_has_camera_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_number" Pbrt.Pp.pp_int64 fmt v.frame_number; + if not (android_camera_frame_event_has_frame_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "request_id" Pbrt.Pp.pp_int64 fmt v.request_id; + if not (android_camera_frame_event_has_request_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "request_received_ns" Pbrt.Pp.pp_int64 fmt v.request_received_ns; + if not (android_camera_frame_event_has_request_received_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "request_processing_started_ns" Pbrt.Pp.pp_int64 fmt v.request_processing_started_ns; + if not (android_camera_frame_event_has_request_processing_started_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start_of_exposure_ns" Pbrt.Pp.pp_int64 fmt v.start_of_exposure_ns; + if not (android_camera_frame_event_has_start_of_exposure_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start_of_frame_ns" Pbrt.Pp.pp_int64 fmt v.start_of_frame_ns; + if not (android_camera_frame_event_has_start_of_frame_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "responses_all_sent_ns" Pbrt.Pp.pp_int64 fmt v.responses_all_sent_ns; + if not (android_camera_frame_event_has_responses_all_sent_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "capture_result_status" pp_android_camera_frame_event_capture_result_status fmt v.capture_result_status; + if not (android_camera_frame_event_has_capture_result_status v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "skipped_sensor_frames" Pbrt.Pp.pp_int32 fmt v.skipped_sensor_frames; + if not (android_camera_frame_event_has_skipped_sensor_frames v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "capture_intent" Pbrt.Pp.pp_int32 fmt v.capture_intent; + if not (android_camera_frame_event_has_capture_intent v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_streams" Pbrt.Pp.pp_int32 fmt v.num_streams; + if not (android_camera_frame_event_has_num_streams v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "node_processing_details" (Pbrt.Pp.pp_list pp_android_camera_frame_event_camera_node_processing_details) fmt v.node_processing_details; + Pbrt.Pp.pp_record_field ~first:false "vendor_data_version" Pbrt.Pp.pp_int32 fmt v.vendor_data_version; + if not (android_camera_frame_event_has_vendor_data_version v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vendor_data" Pbrt.Pp.pp_bytes fmt v.vendor_data; + if not (android_camera_frame_event_has_vendor_data v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_camera_session_stats_camera_graph_camera_node fmt (v:android_camera_session_stats_camera_graph_camera_node) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "node_id" Pbrt.Pp.pp_int64 fmt v.node_id; + if not (android_camera_session_stats_camera_graph_camera_node_has_node_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "input_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.input_ids; + Pbrt.Pp.pp_record_field ~first:false "output_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.output_ids; + Pbrt.Pp.pp_record_field ~first:false "vendor_data_version" Pbrt.Pp.pp_int32 fmt v.vendor_data_version; + if not (android_camera_session_stats_camera_graph_camera_node_has_vendor_data_version v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vendor_data" Pbrt.Pp.pp_bytes fmt v.vendor_data; + if not (android_camera_session_stats_camera_graph_camera_node_has_vendor_data v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_camera_session_stats_camera_graph_camera_edge fmt (v:android_camera_session_stats_camera_graph_camera_edge) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "output_node_id" Pbrt.Pp.pp_int64 fmt v.output_node_id; + if not (android_camera_session_stats_camera_graph_camera_edge_has_output_node_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "output_id" Pbrt.Pp.pp_int64 fmt v.output_id; + if not (android_camera_session_stats_camera_graph_camera_edge_has_output_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "input_node_id" Pbrt.Pp.pp_int64 fmt v.input_node_id; + if not (android_camera_session_stats_camera_graph_camera_edge_has_input_node_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "input_id" Pbrt.Pp.pp_int64 fmt v.input_id; + if not (android_camera_session_stats_camera_graph_camera_edge_has_input_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vendor_data_version" Pbrt.Pp.pp_int32 fmt v.vendor_data_version; + if not (android_camera_session_stats_camera_graph_camera_edge_has_vendor_data_version v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vendor_data" Pbrt.Pp.pp_bytes fmt v.vendor_data; + if not (android_camera_session_stats_camera_graph_camera_edge_has_vendor_data v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_camera_session_stats_camera_graph fmt (v:android_camera_session_stats_camera_graph) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "nodes" (Pbrt.Pp.pp_list pp_android_camera_session_stats_camera_graph_camera_node) fmt v.nodes; + Pbrt.Pp.pp_record_field ~first:false "edges" (Pbrt.Pp.pp_list pp_android_camera_session_stats_camera_graph_camera_edge) fmt v.edges; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_camera_session_stats fmt (v:android_camera_session_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "session_id" Pbrt.Pp.pp_int64 fmt v.session_id; + if not (android_camera_session_stats_has_session_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "graph" (Pbrt.Pp.pp_option pp_android_camera_session_stats_camera_graph) fmt v.graph; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_cpu_per_uid_data fmt (v:cpu_per_uid_data) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cluster_count" Pbrt.Pp.pp_int32 fmt v.cluster_count; + if not (cpu_per_uid_data_has_cluster_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uid" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.uid; + Pbrt.Pp.pp_record_field ~first:false "total_time_ms" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.total_time_ms; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_frame_timeline_event_jank_type fmt (v:frame_timeline_event_jank_type) = + match v with + | Jank_unspecified -> Format.fprintf fmt "Jank_unspecified" + | Jank_none -> Format.fprintf fmt "Jank_none" + | Jank_sf_scheduling -> Format.fprintf fmt "Jank_sf_scheduling" + | Jank_prediction_error -> Format.fprintf fmt "Jank_prediction_error" + | Jank_display_hal -> Format.fprintf fmt "Jank_display_hal" + | Jank_sf_cpu_deadline_missed -> Format.fprintf fmt "Jank_sf_cpu_deadline_missed" + | Jank_sf_gpu_deadline_missed -> Format.fprintf fmt "Jank_sf_gpu_deadline_missed" + | Jank_app_deadline_missed -> Format.fprintf fmt "Jank_app_deadline_missed" + | Jank_buffer_stuffing -> Format.fprintf fmt "Jank_buffer_stuffing" + | Jank_unknown -> Format.fprintf fmt "Jank_unknown" + | Jank_sf_stuffing -> Format.fprintf fmt "Jank_sf_stuffing" + | Jank_dropped -> Format.fprintf fmt "Jank_dropped" + | Jank_non_animating -> Format.fprintf fmt "Jank_non_animating" + | Jank_app_resynced_jitter -> Format.fprintf fmt "Jank_app_resynced_jitter" + | Jank_display_not_on -> Format.fprintf fmt "Jank_display_not_on" + +let rec pp_frame_timeline_event_jank_severity_type fmt (v:frame_timeline_event_jank_severity_type) = + match v with + | Severity_unknown -> Format.fprintf fmt "Severity_unknown" + | Severity_none -> Format.fprintf fmt "Severity_none" + | Severity_partial -> Format.fprintf fmt "Severity_partial" + | Severity_full -> Format.fprintf fmt "Severity_full" + +let rec pp_frame_timeline_event_present_type fmt (v:frame_timeline_event_present_type) = + match v with + | Present_unspecified -> Format.fprintf fmt "Present_unspecified" + | Present_on_time -> Format.fprintf fmt "Present_on_time" + | Present_late -> Format.fprintf fmt "Present_late" + | Present_early -> Format.fprintf fmt "Present_early" + | Present_dropped -> Format.fprintf fmt "Present_dropped" + | Present_unknown -> Format.fprintf fmt "Present_unknown" + +let rec pp_frame_timeline_event_prediction_type fmt (v:frame_timeline_event_prediction_type) = + match v with + | Prediction_unspecified -> Format.fprintf fmt "Prediction_unspecified" + | Prediction_valid -> Format.fprintf fmt "Prediction_valid" + | Prediction_expired -> Format.fprintf fmt "Prediction_expired" + | Prediction_unknown -> Format.fprintf fmt "Prediction_unknown" + +let rec pp_frame_timeline_event_expected_surface_frame_start fmt (v:frame_timeline_event_expected_surface_frame_start) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cookie" Pbrt.Pp.pp_int64 fmt v.cookie; + if not (frame_timeline_event_expected_surface_frame_start_has_cookie v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "token" Pbrt.Pp.pp_int64 fmt v.token; + if not (frame_timeline_event_expected_surface_frame_start_has_token v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "display_frame_token" Pbrt.Pp.pp_int64 fmt v.display_frame_token; + if not (frame_timeline_event_expected_surface_frame_start_has_display_frame_token v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (frame_timeline_event_expected_surface_frame_start_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_name" Pbrt.Pp.pp_string fmt v.layer_name; + if not (frame_timeline_event_expected_surface_frame_start_has_layer_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_frame_timeline_event_actual_surface_frame_start fmt (v:frame_timeline_event_actual_surface_frame_start) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cookie" Pbrt.Pp.pp_int64 fmt v.cookie; + if not (frame_timeline_event_actual_surface_frame_start_has_cookie v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "token" Pbrt.Pp.pp_int64 fmt v.token; + if not (frame_timeline_event_actual_surface_frame_start_has_token v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "display_frame_token" Pbrt.Pp.pp_int64 fmt v.display_frame_token; + if not (frame_timeline_event_actual_surface_frame_start_has_display_frame_token v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (frame_timeline_event_actual_surface_frame_start_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_name" Pbrt.Pp.pp_string fmt v.layer_name; + if not (frame_timeline_event_actual_surface_frame_start_has_layer_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "present_type" pp_frame_timeline_event_present_type fmt v.present_type; + if not (frame_timeline_event_actual_surface_frame_start_has_present_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "on_time_finish" Pbrt.Pp.pp_bool fmt v.on_time_finish; + if not (frame_timeline_event_actual_surface_frame_start_has_on_time_finish v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "gpu_composition" Pbrt.Pp.pp_bool fmt v.gpu_composition; + if not (frame_timeline_event_actual_surface_frame_start_has_gpu_composition v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "jank_type" Pbrt.Pp.pp_int32 fmt v.jank_type; + if not (frame_timeline_event_actual_surface_frame_start_has_jank_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prediction_type" pp_frame_timeline_event_prediction_type fmt v.prediction_type; + if not (frame_timeline_event_actual_surface_frame_start_has_prediction_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_buffer" Pbrt.Pp.pp_bool fmt v.is_buffer; + if not (frame_timeline_event_actual_surface_frame_start_has_is_buffer v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "jank_severity_type" pp_frame_timeline_event_jank_severity_type fmt v.jank_severity_type; + if not (frame_timeline_event_actual_surface_frame_start_has_jank_severity_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "present_delay_millis" Pbrt.Pp.pp_float fmt v.present_delay_millis; + if not (frame_timeline_event_actual_surface_frame_start_has_present_delay_millis v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vsync_resynced_jitter_millis" Pbrt.Pp.pp_float fmt v.vsync_resynced_jitter_millis; + if not (frame_timeline_event_actual_surface_frame_start_has_vsync_resynced_jitter_millis v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "jank_severity_score" Pbrt.Pp.pp_float fmt v.jank_severity_score; + if not (frame_timeline_event_actual_surface_frame_start_has_jank_severity_score v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "jank_type_experimental" Pbrt.Pp.pp_int32 fmt v.jank_type_experimental; + if not (frame_timeline_event_actual_surface_frame_start_has_jank_type_experimental v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "present_type_experimental" pp_frame_timeline_event_present_type fmt v.present_type_experimental; + if not (frame_timeline_event_actual_surface_frame_start_has_present_type_experimental v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_frame_timeline_event_expected_display_frame_start fmt (v:frame_timeline_event_expected_display_frame_start) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cookie" Pbrt.Pp.pp_int64 fmt v.cookie; + if not (frame_timeline_event_expected_display_frame_start_has_cookie v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "token" Pbrt.Pp.pp_int64 fmt v.token; + if not (frame_timeline_event_expected_display_frame_start_has_token v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (frame_timeline_event_expected_display_frame_start_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_frame_timeline_event_actual_display_frame_start fmt (v:frame_timeline_event_actual_display_frame_start) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cookie" Pbrt.Pp.pp_int64 fmt v.cookie; + if not (frame_timeline_event_actual_display_frame_start_has_cookie v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "token" Pbrt.Pp.pp_int64 fmt v.token; + if not (frame_timeline_event_actual_display_frame_start_has_token v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (frame_timeline_event_actual_display_frame_start_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "present_type" pp_frame_timeline_event_present_type fmt v.present_type; + if not (frame_timeline_event_actual_display_frame_start_has_present_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "on_time_finish" Pbrt.Pp.pp_bool fmt v.on_time_finish; + if not (frame_timeline_event_actual_display_frame_start_has_on_time_finish v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "gpu_composition" Pbrt.Pp.pp_bool fmt v.gpu_composition; + if not (frame_timeline_event_actual_display_frame_start_has_gpu_composition v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "jank_type" Pbrt.Pp.pp_int32 fmt v.jank_type; + if not (frame_timeline_event_actual_display_frame_start_has_jank_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prediction_type" pp_frame_timeline_event_prediction_type fmt v.prediction_type; + if not (frame_timeline_event_actual_display_frame_start_has_prediction_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "jank_severity_type" pp_frame_timeline_event_jank_severity_type fmt v.jank_severity_type; + if not (frame_timeline_event_actual_display_frame_start_has_jank_severity_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "present_delay_millis" Pbrt.Pp.pp_float fmt v.present_delay_millis; + if not (frame_timeline_event_actual_display_frame_start_has_present_delay_millis v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "jank_severity_score" Pbrt.Pp.pp_float fmt v.jank_severity_score; + if not (frame_timeline_event_actual_display_frame_start_has_jank_severity_score v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "jank_type_experimental" Pbrt.Pp.pp_int32 fmt v.jank_type_experimental; + if not (frame_timeline_event_actual_display_frame_start_has_jank_type_experimental v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "present_type_experimental" pp_frame_timeline_event_present_type fmt v.present_type_experimental; + if not (frame_timeline_event_actual_display_frame_start_has_present_type_experimental v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_frame_timeline_event_frame_end fmt (v:frame_timeline_event_frame_end) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cookie" Pbrt.Pp.pp_int64 fmt v.cookie; + if not (frame_timeline_event_frame_end_has_cookie v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_frame_timeline_event fmt (v:frame_timeline_event) = + match v with + | Expected_display_frame_start x -> Format.fprintf fmt "@[Expected_display_frame_start(@,%a)@]" pp_frame_timeline_event_expected_display_frame_start x + | Actual_display_frame_start x -> Format.fprintf fmt "@[Actual_display_frame_start(@,%a)@]" pp_frame_timeline_event_actual_display_frame_start x + | Expected_surface_frame_start x -> Format.fprintf fmt "@[Expected_surface_frame_start(@,%a)@]" pp_frame_timeline_event_expected_surface_frame_start x + | Actual_surface_frame_start x -> Format.fprintf fmt "@[Actual_surface_frame_start(@,%a)@]" pp_frame_timeline_event_actual_surface_frame_start x + | Frame_end x -> Format.fprintf fmt "@[Frame_end(@,%a)@]" pp_frame_timeline_event_frame_end x + +let rec pp_gpu_mem_total_event fmt (v:gpu_mem_total_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "gpu_id" Pbrt.Pp.pp_int32 fmt v.gpu_id; + if not (gpu_mem_total_event_has_gpu_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (gpu_mem_total_event_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "size" Pbrt.Pp.pp_int64 fmt v.size; + if not (gpu_mem_total_event_has_size v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_graphics_frame_event_buffer_event_type fmt (v:graphics_frame_event_buffer_event_type) = + match v with + | Unspecified -> Format.fprintf fmt "Unspecified" + | Dequeue -> Format.fprintf fmt "Dequeue" + | Queue -> Format.fprintf fmt "Queue" + | Post -> Format.fprintf fmt "Post" + | Acquire_fence -> Format.fprintf fmt "Acquire_fence" + | Latch -> Format.fprintf fmt "Latch" + | Hwc_composition_queued -> Format.fprintf fmt "Hwc_composition_queued" + | Fallback_composition -> Format.fprintf fmt "Fallback_composition" + | Present_fence -> Format.fprintf fmt "Present_fence" + | Release_fence -> Format.fprintf fmt "Release_fence" + | Modify -> Format.fprintf fmt "Modify" + | Detach -> Format.fprintf fmt "Detach" + | Attach -> Format.fprintf fmt "Attach" + | Cancel -> Format.fprintf fmt "Cancel" + +let rec pp_graphics_frame_event_buffer_event fmt (v:graphics_frame_event_buffer_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "frame_number" Pbrt.Pp.pp_int32 fmt v.frame_number; + if not (graphics_frame_event_buffer_event_has_frame_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" pp_graphics_frame_event_buffer_event_type fmt v.type_; + if not (graphics_frame_event_buffer_event_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_name" Pbrt.Pp.pp_string fmt v.layer_name; + if not (graphics_frame_event_buffer_event_has_layer_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "duration_ns" Pbrt.Pp.pp_int64 fmt v.duration_ns; + if not (graphics_frame_event_buffer_event_has_duration_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer_id" Pbrt.Pp.pp_int32 fmt v.buffer_id; + if not (graphics_frame_event_buffer_event_has_buffer_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_graphics_frame_event fmt (v:graphics_frame_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "buffer_event" (Pbrt.Pp.pp_option pp_graphics_frame_event_buffer_event) fmt v.buffer_event; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_initial_display_state fmt (v:initial_display_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "display_state" Pbrt.Pp.pp_int32 fmt v.display_state; + if not (initial_display_state_has_display_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "brightness" Pbrt.Pp.pp_float fmt v.brightness; + if not (initial_display_state_has_brightness v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_kernel_wakelock_data_wakelock_type fmt (v:kernel_wakelock_data_wakelock_type) = + match v with + | Wakelock_type_unknown -> Format.fprintf fmt "Wakelock_type_unknown" + | Wakelock_type_kernel -> Format.fprintf fmt "Wakelock_type_kernel" + | Wakelock_type_native -> Format.fprintf fmt "Wakelock_type_native" + +let rec pp_kernel_wakelock_data_wakelock fmt (v:kernel_wakelock_data_wakelock) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "wakelock_id" Pbrt.Pp.pp_int32 fmt v.wakelock_id; + if not (kernel_wakelock_data_wakelock_has_wakelock_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "wakelock_name" Pbrt.Pp.pp_string fmt v.wakelock_name; + if not (kernel_wakelock_data_wakelock_has_wakelock_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "wakelock_type" pp_kernel_wakelock_data_wakelock_type fmt v.wakelock_type; + if not (kernel_wakelock_data_wakelock_has_wakelock_type v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_kernel_wakelock_data fmt (v:kernel_wakelock_data) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "wakelock" (Pbrt.Pp.pp_list pp_kernel_wakelock_data_wakelock) fmt v.wakelock; + Pbrt.Pp.pp_record_field ~first:false "wakelock_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.wakelock_id; + Pbrt.Pp.pp_record_field ~first:false "time_held_millis" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.time_held_millis; + Pbrt.Pp.pp_record_field ~first:false "error_flags" Pbrt.Pp.pp_int64 fmt v.error_flags; + if not (kernel_wakelock_data_has_error_flags v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_traffic_direction fmt (v:traffic_direction) = + match v with + | Dir_unspecified -> Format.fprintf fmt "Dir_unspecified" + | Dir_ingress -> Format.fprintf fmt "Dir_ingress" + | Dir_egress -> Format.fprintf fmt "Dir_egress" + +let rec pp_network_packet_event fmt (v:network_packet_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "direction" pp_traffic_direction fmt v.direction; + if not (network_packet_event_has_direction v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "network_interface" Pbrt.Pp.pp_string fmt v.network_interface; + if not (network_packet_event_has_network_interface v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "length" Pbrt.Pp.pp_int32 fmt v.length; + if not (network_packet_event_has_length v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uid" Pbrt.Pp.pp_int32 fmt v.uid; + if not (network_packet_event_has_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tag" Pbrt.Pp.pp_int32 fmt v.tag; + if not (network_packet_event_has_tag v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ip_proto" Pbrt.Pp.pp_int32 fmt v.ip_proto; + if not (network_packet_event_has_ip_proto v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tcp_flags" Pbrt.Pp.pp_int32 fmt v.tcp_flags; + if not (network_packet_event_has_tcp_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "local_port" Pbrt.Pp.pp_int32 fmt v.local_port; + if not (network_packet_event_has_local_port v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "remote_port" Pbrt.Pp.pp_int32 fmt v.remote_port; + if not (network_packet_event_has_remote_port v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "icmp_type" Pbrt.Pp.pp_int32 fmt v.icmp_type; + if not (network_packet_event_has_icmp_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "icmp_code" Pbrt.Pp.pp_int32 fmt v.icmp_code; + if not (network_packet_event_has_icmp_code v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_network_packet_bundle_packet_context fmt (v:network_packet_bundle_packet_context) = + match v with + | Iid x -> Format.fprintf fmt "@[Iid(@,%a)@]" Pbrt.Pp.pp_int64 x + | Ctx x -> Format.fprintf fmt "@[Ctx(@,%a)@]" pp_network_packet_event x + +and pp_network_packet_bundle fmt (v:network_packet_bundle) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "packet_context" (Pbrt.Pp.pp_option pp_network_packet_bundle_packet_context) fmt v.packet_context; + Pbrt.Pp.pp_record_field ~first:false "packet_timestamps" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.packet_timestamps; + Pbrt.Pp.pp_record_field ~first:false "packet_lengths" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.packet_lengths; + Pbrt.Pp.pp_record_field ~first:false "total_packets" Pbrt.Pp.pp_int32 fmt v.total_packets; + if not (network_packet_bundle_has_total_packets v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "total_duration" Pbrt.Pp.pp_int64 fmt v.total_duration; + if not (network_packet_bundle_has_total_duration v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "total_length" Pbrt.Pp.pp_int64 fmt v.total_length; + if not (network_packet_bundle_has_total_length v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_network_packet_context fmt (v:network_packet_context) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (network_packet_context_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ctx" (Pbrt.Pp.pp_option pp_network_packet_event) fmt v.ctx; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_packages_list_package_info fmt (v:packages_list_package_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (packages_list_package_info_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uid" Pbrt.Pp.pp_int64 fmt v.uid; + if not (packages_list_package_info_has_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "debuggable" Pbrt.Pp.pp_bool fmt v.debuggable; + if not (packages_list_package_info_has_debuggable v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "profileable_from_shell" Pbrt.Pp.pp_bool fmt v.profileable_from_shell; + if not (packages_list_package_info_has_profileable_from_shell v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "version_code" Pbrt.Pp.pp_int64 fmt v.version_code; + if not (packages_list_package_info_has_version_code v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_packages_list fmt (v:packages_list) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "packages" (Pbrt.Pp.pp_list pp_packages_list_package_info) fmt v.packages; + Pbrt.Pp.pp_record_field ~first:false "parse_error" Pbrt.Pp.pp_bool fmt v.parse_error; + if not (packages_list_has_parse_error v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "read_error" Pbrt.Pp.pp_bool fmt v.read_error; + if not (packages_list_has_read_error v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_pixel_modem_events fmt (v:pixel_modem_events) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "events" (Pbrt.Pp.pp_list Pbrt.Pp.pp_bytes) fmt v.events; + Pbrt.Pp.pp_record_field ~first:false "event_time_nanos" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.event_time_nanos; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_pixel_modem_token_database fmt (v:pixel_modem_token_database) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "database" Pbrt.Pp.pp_bytes fmt v.database; + if not (pixel_modem_token_database_has_database v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_proto_log_message fmt (v:proto_log_message) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "message_id" Pbrt.Pp.pp_int64 fmt v.message_id; + if not (proto_log_message_has_message_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "str_param_iids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.str_param_iids; + Pbrt.Pp.pp_record_field ~first:false "sint64_params" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.sint64_params; + Pbrt.Pp.pp_record_field ~first:false "double_params" (Pbrt.Pp.pp_list Pbrt.Pp.pp_float) fmt v.double_params; + Pbrt.Pp.pp_record_field ~first:false "boolean_params" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.boolean_params; + Pbrt.Pp.pp_record_field ~first:false "stacktrace_iid" Pbrt.Pp.pp_int32 fmt v.stacktrace_iid; + if not (proto_log_message_has_stacktrace_iid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_proto_log_viewer_config_message_data fmt (v:proto_log_viewer_config_message_data) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "message_id" Pbrt.Pp.pp_int64 fmt v.message_id; + if not (proto_log_viewer_config_message_data_has_message_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "message" Pbrt.Pp.pp_string fmt v.message; + if not (proto_log_viewer_config_message_data_has_message v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "level" pp_proto_log_level fmt v.level; + if not (proto_log_viewer_config_message_data_has_level v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "group_id" Pbrt.Pp.pp_int32 fmt v.group_id; + if not (proto_log_viewer_config_message_data_has_group_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "location" Pbrt.Pp.pp_string fmt v.location; + if not (proto_log_viewer_config_message_data_has_location v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_proto_log_viewer_config_group fmt (v:proto_log_viewer_config_group) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int32 fmt v.id; + if not (proto_log_viewer_config_group_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (proto_log_viewer_config_group_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tag" Pbrt.Pp.pp_string fmt v.tag; + if not (proto_log_viewer_config_group_has_tag v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_proto_log_viewer_config fmt (v:proto_log_viewer_config) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "messages" (Pbrt.Pp.pp_list pp_proto_log_viewer_config_message_data) fmt v.messages; + Pbrt.Pp.pp_record_field ~first:false "groups" (Pbrt.Pp.pp_list pp_proto_log_viewer_config_group) fmt v.groups; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_shell_transition_target fmt (v:shell_transition_target) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "mode" Pbrt.Pp.pp_int32 fmt v.mode; + if not (shell_transition_target_has_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_id" Pbrt.Pp.pp_int32 fmt v.layer_id; + if not (shell_transition_target_has_layer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "window_id" Pbrt.Pp.pp_int32 fmt v.window_id; + if not (shell_transition_target_has_window_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (shell_transition_target_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_shell_transition fmt (v:shell_transition) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int32 fmt v.id; + if not (shell_transition_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "create_time_ns" Pbrt.Pp.pp_int64 fmt v.create_time_ns; + if not (shell_transition_has_create_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "send_time_ns" Pbrt.Pp.pp_int64 fmt v.send_time_ns; + if not (shell_transition_has_send_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dispatch_time_ns" Pbrt.Pp.pp_int64 fmt v.dispatch_time_ns; + if not (shell_transition_has_dispatch_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "merge_time_ns" Pbrt.Pp.pp_int64 fmt v.merge_time_ns; + if not (shell_transition_has_merge_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "merge_request_time_ns" Pbrt.Pp.pp_int64 fmt v.merge_request_time_ns; + if not (shell_transition_has_merge_request_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "shell_abort_time_ns" Pbrt.Pp.pp_int64 fmt v.shell_abort_time_ns; + if not (shell_transition_has_shell_abort_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "wm_abort_time_ns" Pbrt.Pp.pp_int64 fmt v.wm_abort_time_ns; + if not (shell_transition_has_wm_abort_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "finish_time_ns" Pbrt.Pp.pp_int64 fmt v.finish_time_ns; + if not (shell_transition_has_finish_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start_transaction_id" Pbrt.Pp.pp_int64 fmt v.start_transaction_id; + if not (shell_transition_has_start_transaction_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "finish_transaction_id" Pbrt.Pp.pp_int64 fmt v.finish_transaction_id; + if not (shell_transition_has_finish_transaction_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "handler" Pbrt.Pp.pp_int32 fmt v.handler; + if not (shell_transition_has_handler v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" Pbrt.Pp.pp_int32 fmt v.type_; + if not (shell_transition_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "targets" (Pbrt.Pp.pp_list pp_shell_transition_target) fmt v.targets; + Pbrt.Pp.pp_record_field ~first:false "merge_target" Pbrt.Pp.pp_int32 fmt v.merge_target; + if not (shell_transition_has_merge_target v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (shell_transition_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "starting_window_remove_time_ns" Pbrt.Pp.pp_int64 fmt v.starting_window_remove_time_ns; + if not (shell_transition_has_starting_window_remove_time_ns v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_shell_handler_mapping fmt (v:shell_handler_mapping) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int32 fmt v.id; + if not (shell_handler_mapping_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (shell_handler_mapping_has_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_shell_handler_mappings fmt (v:shell_handler_mappings) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "mapping" (Pbrt.Pp.pp_list pp_shell_handler_mapping) fmt v.mapping; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_rect_proto fmt (v:rect_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "left" Pbrt.Pp.pp_int32 fmt v.left; + if not (rect_proto_has_left v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "top" Pbrt.Pp.pp_int32 fmt v.top; + if not (rect_proto_has_top v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "right" Pbrt.Pp.pp_int32 fmt v.right; + if not (rect_proto_has_right v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bottom" Pbrt.Pp.pp_int32 fmt v.bottom; + if not (rect_proto_has_bottom v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_region_proto fmt (v:region_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "rect" (Pbrt.Pp.pp_list pp_rect_proto) fmt v.rect; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_size_proto fmt (v:size_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "w" Pbrt.Pp.pp_int32 fmt v.w; + if not (size_proto_has_w v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "h" Pbrt.Pp.pp_int32 fmt v.h; + if not (size_proto_has_h v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_transform_proto fmt (v:transform_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "dsdx" Pbrt.Pp.pp_float fmt v.dsdx; + if not (transform_proto_has_dsdx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dtdx" Pbrt.Pp.pp_float fmt v.dtdx; + if not (transform_proto_has_dtdx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dsdy" Pbrt.Pp.pp_float fmt v.dsdy; + if not (transform_proto_has_dsdy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dtdy" Pbrt.Pp.pp_float fmt v.dtdy; + if not (transform_proto_has_dtdy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" Pbrt.Pp.pp_int32 fmt v.type_; + if not (transform_proto_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_color_proto fmt (v:color_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "r" Pbrt.Pp.pp_float fmt v.r; + if not (color_proto_has_r v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "g" Pbrt.Pp.pp_float fmt v.g; + if not (color_proto_has_g v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "b" Pbrt.Pp.pp_float fmt v.b; + if not (color_proto_has_b v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "a" Pbrt.Pp.pp_float fmt v.a; + if not (color_proto_has_a v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_input_window_info_proto fmt (v:input_window_info_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "layout_params_flags" Pbrt.Pp.pp_int32 fmt v.layout_params_flags; + if not (input_window_info_proto_has_layout_params_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layout_params_type" Pbrt.Pp.pp_int32 fmt v.layout_params_type; + if not (input_window_info_proto_has_layout_params_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.frame; + Pbrt.Pp.pp_record_field ~first:false "touchable_region" (Pbrt.Pp.pp_option pp_region_proto) fmt v.touchable_region; + Pbrt.Pp.pp_record_field ~first:false "surface_inset" Pbrt.Pp.pp_int32 fmt v.surface_inset; + if not (input_window_info_proto_has_surface_inset v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "visible" Pbrt.Pp.pp_bool fmt v.visible; + if not (input_window_info_proto_has_visible v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "can_receive_keys" Pbrt.Pp.pp_bool fmt v.can_receive_keys; + if not (input_window_info_proto_has_can_receive_keys v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "focusable" Pbrt.Pp.pp_bool fmt v.focusable; + if not (input_window_info_proto_has_focusable v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_wallpaper" Pbrt.Pp.pp_bool fmt v.has_wallpaper; + if not (input_window_info_proto_has_has_wallpaper v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "global_scale_factor" Pbrt.Pp.pp_float fmt v.global_scale_factor; + if not (input_window_info_proto_has_global_scale_factor v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "window_x_scale" Pbrt.Pp.pp_float fmt v.window_x_scale; + if not (input_window_info_proto_has_window_x_scale v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "window_y_scale" Pbrt.Pp.pp_float fmt v.window_y_scale; + if not (input_window_info_proto_has_window_y_scale v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "crop_layer_id" Pbrt.Pp.pp_int32 fmt v.crop_layer_id; + if not (input_window_info_proto_has_crop_layer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "replace_touchable_region_with_crop" Pbrt.Pp.pp_bool fmt v.replace_touchable_region_with_crop; + if not (input_window_info_proto_has_replace_touchable_region_with_crop v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "touchable_region_crop" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.touchable_region_crop; + Pbrt.Pp.pp_record_field ~first:false "transform" (Pbrt.Pp.pp_option pp_transform_proto) fmt v.transform; + Pbrt.Pp.pp_record_field ~first:false "input_config" Pbrt.Pp.pp_int32 fmt v.input_config; + if not (input_window_info_proto_has_input_config v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_blur_region fmt (v:blur_region) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "blur_radius" Pbrt.Pp.pp_int32 fmt v.blur_radius; + if not (blur_region_has_blur_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_tl" Pbrt.Pp.pp_int32 fmt v.corner_radius_tl; + if not (blur_region_has_corner_radius_tl v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_tr" Pbrt.Pp.pp_int32 fmt v.corner_radius_tr; + if not (blur_region_has_corner_radius_tr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_bl" Pbrt.Pp.pp_int32 fmt v.corner_radius_bl; + if not (blur_region_has_corner_radius_bl v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_br" Pbrt.Pp.pp_float fmt v.corner_radius_br; + if not (blur_region_has_corner_radius_br v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_tlx" Pbrt.Pp.pp_float fmt v.corner_radius_tlx; + if not (blur_region_has_corner_radius_tlx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_tly" Pbrt.Pp.pp_float fmt v.corner_radius_tly; + if not (blur_region_has_corner_radius_tly v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_trx" Pbrt.Pp.pp_float fmt v.corner_radius_trx; + if not (blur_region_has_corner_radius_trx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_try" Pbrt.Pp.pp_float fmt v.corner_radius_try; + if not (blur_region_has_corner_radius_try v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_blx" Pbrt.Pp.pp_float fmt v.corner_radius_blx; + if not (blur_region_has_corner_radius_blx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_bly" Pbrt.Pp.pp_float fmt v.corner_radius_bly; + if not (blur_region_has_corner_radius_bly v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_brx" Pbrt.Pp.pp_float fmt v.corner_radius_brx; + if not (blur_region_has_corner_radius_brx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_bry" Pbrt.Pp.pp_float fmt v.corner_radius_bry; + if not (blur_region_has_corner_radius_bry v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "alpha" Pbrt.Pp.pp_float fmt v.alpha; + if not (blur_region_has_alpha v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "left" Pbrt.Pp.pp_int32 fmt v.left; + if not (blur_region_has_left v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "top" Pbrt.Pp.pp_int32 fmt v.top; + if not (blur_region_has_top v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "right" Pbrt.Pp.pp_int32 fmt v.right; + if not (blur_region_has_right v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bottom" Pbrt.Pp.pp_int32 fmt v.bottom; + if not (blur_region_has_bottom v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_color_transform_proto fmt (v:color_transform_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "val_" (Pbrt.Pp.pp_list Pbrt.Pp.pp_float) fmt v.val_; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trusted_overlay fmt (v:trusted_overlay) = + match v with + | Unset -> Format.fprintf fmt "Unset" + | Disabled -> Format.fprintf fmt "Disabled" + | Enabled -> Format.fprintf fmt "Enabled" + +let rec pp_box_shadow_settings_box_shadow_params fmt (v:box_shadow_settings_box_shadow_params) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "blur_radius" Pbrt.Pp.pp_float fmt v.blur_radius; + if not (box_shadow_settings_box_shadow_params_has_blur_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "spread_radius" Pbrt.Pp.pp_float fmt v.spread_radius; + if not (box_shadow_settings_box_shadow_params_has_spread_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "color" Pbrt.Pp.pp_int32 fmt v.color; + if not (box_shadow_settings_box_shadow_params_has_color v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "offset_x" Pbrt.Pp.pp_float fmt v.offset_x; + if not (box_shadow_settings_box_shadow_params_has_offset_x v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "offset_y" Pbrt.Pp.pp_float fmt v.offset_y; + if not (box_shadow_settings_box_shadow_params_has_offset_y v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_box_shadow_settings fmt (v:box_shadow_settings) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "box_shadows" (Pbrt.Pp.pp_list pp_box_shadow_settings_box_shadow_params) fmt v.box_shadows; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_border_settings fmt (v:border_settings) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "stroke_width" Pbrt.Pp.pp_float fmt v.stroke_width; + if not (border_settings_has_stroke_width v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "color" Pbrt.Pp.pp_int32 fmt v.color; + if not (border_settings_has_color v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layers_trace_file_proto_magic_number fmt (v:layers_trace_file_proto_magic_number) = + match v with + | Invalid -> Format.fprintf fmt "Invalid" + | Magic_number_l -> Format.fprintf fmt "Magic_number_l" + | Magic_number_h -> Format.fprintf fmt "Magic_number_h" + +let rec pp_position_proto fmt (v:position_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "x" Pbrt.Pp.pp_float fmt v.x; + if not (position_proto_has_x v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "y" Pbrt.Pp.pp_float fmt v.y; + if not (position_proto_has_y v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_active_buffer_proto fmt (v:active_buffer_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "width" Pbrt.Pp.pp_int32 fmt v.width; + if not (active_buffer_proto_has_width v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "height" Pbrt.Pp.pp_int32 fmt v.height; + if not (active_buffer_proto_has_height v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "stride" Pbrt.Pp.pp_int32 fmt v.stride; + if not (active_buffer_proto_has_stride v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "format" Pbrt.Pp.pp_int32 fmt v.format; + if not (active_buffer_proto_has_format v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "usage" Pbrt.Pp.pp_int64 fmt v.usage; + if not (active_buffer_proto_has_usage v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_float_rect_proto fmt (v:float_rect_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "left" Pbrt.Pp.pp_float fmt v.left; + if not (float_rect_proto_has_left v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "top" Pbrt.Pp.pp_float fmt v.top; + if not (float_rect_proto_has_top v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "right" Pbrt.Pp.pp_float fmt v.right; + if not (float_rect_proto_has_right v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bottom" Pbrt.Pp.pp_float fmt v.bottom; + if not (float_rect_proto_has_bottom v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_hwc_composition_type fmt (v:hwc_composition_type) = + match v with + | Hwc_type_unspecified -> Format.fprintf fmt "Hwc_type_unspecified" + | Hwc_type_client -> Format.fprintf fmt "Hwc_type_client" + | Hwc_type_device -> Format.fprintf fmt "Hwc_type_device" + | Hwc_type_solid_color -> Format.fprintf fmt "Hwc_type_solid_color" + | Hwc_type_cursor -> Format.fprintf fmt "Hwc_type_cursor" + | Hwc_type_sideband -> Format.fprintf fmt "Hwc_type_sideband" + | Hwc_type_display_decoration -> Format.fprintf fmt "Hwc_type_display_decoration" + +let rec pp_barrier_layer_proto fmt (v:barrier_layer_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int32 fmt v.id; + if not (barrier_layer_proto_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_number" Pbrt.Pp.pp_int64 fmt v.frame_number; + if not (barrier_layer_proto_has_frame_number v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_corner_radii_proto fmt (v:corner_radii_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "tl" Pbrt.Pp.pp_float fmt v.tl; + if not (corner_radii_proto_has_tl v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tr" Pbrt.Pp.pp_float fmt v.tr; + if not (corner_radii_proto_has_tr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bl" Pbrt.Pp.pp_float fmt v.bl; + if not (corner_radii_proto_has_bl v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "br" Pbrt.Pp.pp_float fmt v.br; + if not (corner_radii_proto_has_br v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layer_proto fmt (v:layer_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int32 fmt v.id; + if not (layer_proto_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (layer_proto_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "children" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.children; + Pbrt.Pp.pp_record_field ~first:false "relatives" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.relatives; + Pbrt.Pp.pp_record_field ~first:false "type_" Pbrt.Pp.pp_string fmt v.type_; + if not (layer_proto_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transparent_region" (Pbrt.Pp.pp_option pp_region_proto) fmt v.transparent_region; + Pbrt.Pp.pp_record_field ~first:false "visible_region" (Pbrt.Pp.pp_option pp_region_proto) fmt v.visible_region; + Pbrt.Pp.pp_record_field ~first:false "damage_region" (Pbrt.Pp.pp_option pp_region_proto) fmt v.damage_region; + Pbrt.Pp.pp_record_field ~first:false "layer_stack" Pbrt.Pp.pp_int32 fmt v.layer_stack; + if not (layer_proto_has_layer_stack v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "z" Pbrt.Pp.pp_int32 fmt v.z; + if not (layer_proto_has_z v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "position" (Pbrt.Pp.pp_option pp_position_proto) fmt v.position; + Pbrt.Pp.pp_record_field ~first:false "requested_position" (Pbrt.Pp.pp_option pp_position_proto) fmt v.requested_position; + Pbrt.Pp.pp_record_field ~first:false "size" (Pbrt.Pp.pp_option pp_size_proto) fmt v.size; + Pbrt.Pp.pp_record_field ~first:false "crop" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.crop; + Pbrt.Pp.pp_record_field ~first:false "final_crop" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.final_crop; + Pbrt.Pp.pp_record_field ~first:false "is_opaque" Pbrt.Pp.pp_bool fmt v.is_opaque; + if not (layer_proto_has_is_opaque v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "invalidate" Pbrt.Pp.pp_bool fmt v.invalidate; + if not (layer_proto_has_invalidate v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dataspace" Pbrt.Pp.pp_string fmt v.dataspace; + if not (layer_proto_has_dataspace v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pixel_format" Pbrt.Pp.pp_string fmt v.pixel_format; + if not (layer_proto_has_pixel_format v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "color" (Pbrt.Pp.pp_option pp_color_proto) fmt v.color; + Pbrt.Pp.pp_record_field ~first:false "requested_color" (Pbrt.Pp.pp_option pp_color_proto) fmt v.requested_color; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (layer_proto_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transform" (Pbrt.Pp.pp_option pp_transform_proto) fmt v.transform; + Pbrt.Pp.pp_record_field ~first:false "requested_transform" (Pbrt.Pp.pp_option pp_transform_proto) fmt v.requested_transform; + Pbrt.Pp.pp_record_field ~first:false "parent" Pbrt.Pp.pp_int32 fmt v.parent; + if not (layer_proto_has_parent v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "z_order_relative_of" Pbrt.Pp.pp_int32 fmt v.z_order_relative_of; + if not (layer_proto_has_z_order_relative_of v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "active_buffer" (Pbrt.Pp.pp_option pp_active_buffer_proto) fmt v.active_buffer; + Pbrt.Pp.pp_record_field ~first:false "queued_frames" Pbrt.Pp.pp_int32 fmt v.queued_frames; + if not (layer_proto_has_queued_frames v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "refresh_pending" Pbrt.Pp.pp_bool fmt v.refresh_pending; + if not (layer_proto_has_refresh_pending v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "hwc_frame" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.hwc_frame; + Pbrt.Pp.pp_record_field ~first:false "hwc_crop" (Pbrt.Pp.pp_option pp_float_rect_proto) fmt v.hwc_crop; + Pbrt.Pp.pp_record_field ~first:false "hwc_transform" Pbrt.Pp.pp_int32 fmt v.hwc_transform; + if not (layer_proto_has_hwc_transform v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "window_type" Pbrt.Pp.pp_int32 fmt v.window_type; + if not (layer_proto_has_window_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "app_id" Pbrt.Pp.pp_int32 fmt v.app_id; + if not (layer_proto_has_app_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "hwc_composition_type" pp_hwc_composition_type fmt v.hwc_composition_type; + if not (layer_proto_has_hwc_composition_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_protected" Pbrt.Pp.pp_bool fmt v.is_protected; + if not (layer_proto_has_is_protected v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "curr_frame" Pbrt.Pp.pp_int64 fmt v.curr_frame; + if not (layer_proto_has_curr_frame v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "barrier_layer" (Pbrt.Pp.pp_list pp_barrier_layer_proto) fmt v.barrier_layer; + Pbrt.Pp.pp_record_field ~first:false "buffer_transform" (Pbrt.Pp.pp_option pp_transform_proto) fmt v.buffer_transform; + Pbrt.Pp.pp_record_field ~first:false "effective_scaling_mode" Pbrt.Pp.pp_int32 fmt v.effective_scaling_mode; + if not (layer_proto_has_effective_scaling_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radius" Pbrt.Pp.pp_float fmt v.corner_radius; + if not (layer_proto_has_corner_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "metadata" (Pbrt.Pp.pp_associative_list Pbrt.Pp.pp_int32 Pbrt.Pp.pp_string) fmt v.metadata; + Pbrt.Pp.pp_record_field ~first:false "effective_transform" (Pbrt.Pp.pp_option pp_transform_proto) fmt v.effective_transform; + Pbrt.Pp.pp_record_field ~first:false "source_bounds" (Pbrt.Pp.pp_option pp_float_rect_proto) fmt v.source_bounds; + Pbrt.Pp.pp_record_field ~first:false "bounds" (Pbrt.Pp.pp_option pp_float_rect_proto) fmt v.bounds; + Pbrt.Pp.pp_record_field ~first:false "screen_bounds" (Pbrt.Pp.pp_option pp_float_rect_proto) fmt v.screen_bounds; + Pbrt.Pp.pp_record_field ~first:false "input_window_info" (Pbrt.Pp.pp_option pp_input_window_info_proto) fmt v.input_window_info; + Pbrt.Pp.pp_record_field ~first:false "corner_radius_crop" (Pbrt.Pp.pp_option pp_float_rect_proto) fmt v.corner_radius_crop; + Pbrt.Pp.pp_record_field ~first:false "shadow_radius" Pbrt.Pp.pp_float fmt v.shadow_radius; + if not (layer_proto_has_shadow_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "color_transform" (Pbrt.Pp.pp_option pp_color_transform_proto) fmt v.color_transform; + Pbrt.Pp.pp_record_field ~first:false "is_relative_of" Pbrt.Pp.pp_bool fmt v.is_relative_of; + if not (layer_proto_has_is_relative_of v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "background_blur_radius" Pbrt.Pp.pp_int32 fmt v.background_blur_radius; + if not (layer_proto_has_background_blur_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "owner_uid" Pbrt.Pp.pp_int32 fmt v.owner_uid; + if not (layer_proto_has_owner_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "blur_regions" (Pbrt.Pp.pp_list pp_blur_region) fmt v.blur_regions; + Pbrt.Pp.pp_record_field ~first:false "is_trusted_overlay" Pbrt.Pp.pp_bool fmt v.is_trusted_overlay; + if not (layer_proto_has_is_trusted_overlay v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "requested_corner_radius" Pbrt.Pp.pp_float fmt v.requested_corner_radius; + if not (layer_proto_has_requested_corner_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "destination_frame" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.destination_frame; + Pbrt.Pp.pp_record_field ~first:false "original_id" Pbrt.Pp.pp_int32 fmt v.original_id; + if not (layer_proto_has_original_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trusted_overlay" pp_trusted_overlay fmt v.trusted_overlay; + if not (layer_proto_has_trusted_overlay v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "background_blur_scale" Pbrt.Pp.pp_float fmt v.background_blur_scale; + if not (layer_proto_has_background_blur_scale v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radii" (Pbrt.Pp.pp_option pp_corner_radii_proto) fmt v.corner_radii; + Pbrt.Pp.pp_record_field ~first:false "requested_corner_radii" (Pbrt.Pp.pp_option pp_corner_radii_proto) fmt v.requested_corner_radii; + Pbrt.Pp.pp_record_field ~first:false "client_drawn_corner_radii" (Pbrt.Pp.pp_option pp_corner_radii_proto) fmt v.client_drawn_corner_radii; + Pbrt.Pp.pp_record_field ~first:false "system_content_priority" Pbrt.Pp.pp_int32 fmt v.system_content_priority; + if not (layer_proto_has_system_content_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "box_shadow_settings" (Pbrt.Pp.pp_option pp_box_shadow_settings) fmt v.box_shadow_settings; + Pbrt.Pp.pp_record_field ~first:false "border_settings" (Pbrt.Pp.pp_option pp_border_settings) fmt v.border_settings; + Pbrt.Pp.pp_record_field ~first:false "effective_radii" (Pbrt.Pp.pp_option pp_corner_radii_proto) fmt v.effective_radii; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layers_proto fmt (v:layers_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "layers" (Pbrt.Pp.pp_list pp_layer_proto) fmt v.layers; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_display_proto fmt (v:display_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int64 fmt v.id; + if not (display_proto_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (display_proto_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_stack" Pbrt.Pp.pp_int32 fmt v.layer_stack; + if not (display_proto_has_layer_stack v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "size" (Pbrt.Pp.pp_option pp_size_proto) fmt v.size; + Pbrt.Pp.pp_record_field ~first:false "layer_stack_space_rect" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.layer_stack_space_rect; + Pbrt.Pp.pp_record_field ~first:false "transform" (Pbrt.Pp.pp_option pp_transform_proto) fmt v.transform; + Pbrt.Pp.pp_record_field ~first:false "is_virtual" Pbrt.Pp.pp_bool fmt v.is_virtual; + if not (display_proto_has_is_virtual v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dpi_x" Pbrt.Pp.pp_float fmt v.dpi_x; + if not (display_proto_has_dpi_x v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dpi_y" Pbrt.Pp.pp_float fmt v.dpi_y; + if not (display_proto_has_dpi_y v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layers_snapshot_proto fmt (v:layers_snapshot_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "elapsed_realtime_nanos" Pbrt.Pp.pp_int64 fmt v.elapsed_realtime_nanos; + if not (layers_snapshot_proto_has_elapsed_realtime_nanos v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "where" Pbrt.Pp.pp_string fmt v.where; + if not (layers_snapshot_proto_has_where v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layers" (Pbrt.Pp.pp_option pp_layers_proto) fmt v.layers; + Pbrt.Pp.pp_record_field ~first:false "hwc_blob" Pbrt.Pp.pp_string fmt v.hwc_blob; + if not (layers_snapshot_proto_has_hwc_blob v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "excludes_composition_state" Pbrt.Pp.pp_bool fmt v.excludes_composition_state; + if not (layers_snapshot_proto_has_excludes_composition_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "missed_entries" Pbrt.Pp.pp_int32 fmt v.missed_entries; + if not (layers_snapshot_proto_has_missed_entries v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "displays" (Pbrt.Pp.pp_list pp_display_proto) fmt v.displays; + Pbrt.Pp.pp_record_field ~first:false "vsync_id" Pbrt.Pp.pp_int64 fmt v.vsync_id; + if not (layers_snapshot_proto_has_vsync_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layers_trace_file_proto fmt (v:layers_trace_file_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "magic_number" Pbrt.Pp.pp_int64 fmt v.magic_number; + if not (layers_trace_file_proto_has_magic_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "entry" (Pbrt.Pp.pp_list pp_layers_snapshot_proto) fmt v.entry; + Pbrt.Pp.pp_record_field ~first:false "real_to_elapsed_time_offset_nanos" Pbrt.Pp.pp_int64 fmt v.real_to_elapsed_time_offset_nanos; + if not (layers_trace_file_proto_has_real_to_elapsed_time_offset_nanos v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_transaction_trace_file_magic_number fmt (v:transaction_trace_file_magic_number) = + match v with + | Invalid -> Format.fprintf fmt "Invalid" + | Magic_number_l -> Format.fprintf fmt "Magic_number_l" + | Magic_number_h -> Format.fprintf fmt "Magic_number_h" + +let rec pp_layer_state_matrix22 fmt (v:layer_state_matrix22) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "dsdx" Pbrt.Pp.pp_float fmt v.dsdx; + if not (layer_state_matrix22_has_dsdx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dtdx" Pbrt.Pp.pp_float fmt v.dtdx; + if not (layer_state_matrix22_has_dtdx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dtdy" Pbrt.Pp.pp_float fmt v.dtdy; + if not (layer_state_matrix22_has_dtdy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dsdy" Pbrt.Pp.pp_float fmt v.dsdy; + if not (layer_state_matrix22_has_dsdy v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layer_state_color3 fmt (v:layer_state_color3) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "r" Pbrt.Pp.pp_float fmt v.r; + if not (layer_state_color3_has_r v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "g" Pbrt.Pp.pp_float fmt v.g; + if not (layer_state_color3_has_g v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "b" Pbrt.Pp.pp_float fmt v.b; + if not (layer_state_color3_has_b v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layer_state_buffer_data_pixel_format fmt (v:layer_state_buffer_data_pixel_format) = + match v with + | Pixel_format_unknown -> Format.fprintf fmt "Pixel_format_unknown" + | Pixel_format_custom -> Format.fprintf fmt "Pixel_format_custom" + | Pixel_format_translucent -> Format.fprintf fmt "Pixel_format_translucent" + | Pixel_format_transparent -> Format.fprintf fmt "Pixel_format_transparent" + | Pixel_format_opaque -> Format.fprintf fmt "Pixel_format_opaque" + | Pixel_format_rgba_8888 -> Format.fprintf fmt "Pixel_format_rgba_8888" + | Pixel_format_rgbx_8888 -> Format.fprintf fmt "Pixel_format_rgbx_8888" + | Pixel_format_rgb_888 -> Format.fprintf fmt "Pixel_format_rgb_888" + | Pixel_format_rgb_565 -> Format.fprintf fmt "Pixel_format_rgb_565" + | Pixel_format_bgra_8888 -> Format.fprintf fmt "Pixel_format_bgra_8888" + | Pixel_format_rgba_5551 -> Format.fprintf fmt "Pixel_format_rgba_5551" + | Pixel_format_rgba_4444 -> Format.fprintf fmt "Pixel_format_rgba_4444" + | Pixel_format_rgba_fp16 -> Format.fprintf fmt "Pixel_format_rgba_fp16" + | Pixel_format_rgba_1010102 -> Format.fprintf fmt "Pixel_format_rgba_1010102" + | Pixel_format_r_8 -> Format.fprintf fmt "Pixel_format_r_8" + +let rec pp_layer_state_buffer_data fmt (v:layer_state_buffer_data) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "buffer_id" Pbrt.Pp.pp_int64 fmt v.buffer_id; + if not (layer_state_buffer_data_has_buffer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "width" Pbrt.Pp.pp_int32 fmt v.width; + if not (layer_state_buffer_data_has_width v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "height" Pbrt.Pp.pp_int32 fmt v.height; + if not (layer_state_buffer_data_has_height v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_number" Pbrt.Pp.pp_int64 fmt v.frame_number; + if not (layer_state_buffer_data_has_frame_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (layer_state_buffer_data_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cached_buffer_id" Pbrt.Pp.pp_int64 fmt v.cached_buffer_id; + if not (layer_state_buffer_data_has_cached_buffer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pixel_format" pp_layer_state_buffer_data_pixel_format fmt v.pixel_format; + if not (layer_state_buffer_data_has_pixel_format v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "usage" Pbrt.Pp.pp_int64 fmt v.usage; + if not (layer_state_buffer_data_has_usage v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_transform fmt (v:transform) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "dsdx" Pbrt.Pp.pp_float fmt v.dsdx; + if not (transform_has_dsdx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dtdx" Pbrt.Pp.pp_float fmt v.dtdx; + if not (transform_has_dtdx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dtdy" Pbrt.Pp.pp_float fmt v.dtdy; + if not (transform_has_dtdy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dsdy" Pbrt.Pp.pp_float fmt v.dsdy; + if not (transform_has_dsdy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tx" Pbrt.Pp.pp_float fmt v.tx; + if not (transform_has_tx v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ty" Pbrt.Pp.pp_float fmt v.ty; + if not (transform_has_ty v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layer_state_window_info fmt (v:layer_state_window_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "layout_params_flags" Pbrt.Pp.pp_int32 fmt v.layout_params_flags; + if not (layer_state_window_info_has_layout_params_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layout_params_type" Pbrt.Pp.pp_int32 fmt v.layout_params_type; + if not (layer_state_window_info_has_layout_params_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "touchable_region" (Pbrt.Pp.pp_option pp_region_proto) fmt v.touchable_region; + Pbrt.Pp.pp_record_field ~first:false "surface_inset" Pbrt.Pp.pp_int32 fmt v.surface_inset; + if not (layer_state_window_info_has_surface_inset v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "focusable" Pbrt.Pp.pp_bool fmt v.focusable; + if not (layer_state_window_info_has_focusable v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_wallpaper" Pbrt.Pp.pp_bool fmt v.has_wallpaper; + if not (layer_state_window_info_has_has_wallpaper v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "global_scale_factor" Pbrt.Pp.pp_float fmt v.global_scale_factor; + if not (layer_state_window_info_has_global_scale_factor v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "crop_layer_id" Pbrt.Pp.pp_int32 fmt v.crop_layer_id; + if not (layer_state_window_info_has_crop_layer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "replace_touchable_region_with_crop" Pbrt.Pp.pp_bool fmt v.replace_touchable_region_with_crop; + if not (layer_state_window_info_has_replace_touchable_region_with_crop v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "touchable_region_crop" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.touchable_region_crop; + Pbrt.Pp.pp_record_field ~first:false "transform" (Pbrt.Pp.pp_option pp_transform) fmt v.transform; + Pbrt.Pp.pp_record_field ~first:false "input_config" Pbrt.Pp.pp_int32 fmt v.input_config; + if not (layer_state_window_info_has_input_config v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layer_state_drop_input_mode fmt (v:layer_state_drop_input_mode) = + match v with + | None -> Format.fprintf fmt "None" + | All -> Format.fprintf fmt "All" + | Obscured -> Format.fprintf fmt "Obscured" + +let rec pp_layer_state_corner_radii fmt (v:layer_state_corner_radii) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "tl" Pbrt.Pp.pp_float fmt v.tl; + if not (layer_state_corner_radii_has_tl v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tr" Pbrt.Pp.pp_float fmt v.tr; + if not (layer_state_corner_radii_has_tr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bl" Pbrt.Pp.pp_float fmt v.bl; + if not (layer_state_corner_radii_has_bl v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "br" Pbrt.Pp.pp_float fmt v.br; + if not (layer_state_corner_radii_has_br v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layer_state fmt (v:layer_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "layer_id" Pbrt.Pp.pp_int32 fmt v.layer_id; + if not (layer_state_has_layer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "what" Pbrt.Pp.pp_int64 fmt v.what; + if not (layer_state_has_what v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "x" Pbrt.Pp.pp_float fmt v.x; + if not (layer_state_has_x v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "y" Pbrt.Pp.pp_float fmt v.y; + if not (layer_state_has_y v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "z" Pbrt.Pp.pp_int32 fmt v.z; + if not (layer_state_has_z v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "w" Pbrt.Pp.pp_int32 fmt v.w; + if not (layer_state_has_w v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "h" Pbrt.Pp.pp_int32 fmt v.h; + if not (layer_state_has_h v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_stack" Pbrt.Pp.pp_int32 fmt v.layer_stack; + if not (layer_state_has_layer_stack v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (layer_state_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "mask" Pbrt.Pp.pp_int32 fmt v.mask; + if not (layer_state_has_mask v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "matrix" (Pbrt.Pp.pp_option pp_layer_state_matrix22) fmt v.matrix; + Pbrt.Pp.pp_record_field ~first:false "corner_radius" Pbrt.Pp.pp_float fmt v.corner_radius; + if not (layer_state_has_corner_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "background_blur_radius" Pbrt.Pp.pp_int32 fmt v.background_blur_radius; + if not (layer_state_has_background_blur_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "parent_id" Pbrt.Pp.pp_int32 fmt v.parent_id; + if not (layer_state_has_parent_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "relative_parent_id" Pbrt.Pp.pp_int32 fmt v.relative_parent_id; + if not (layer_state_has_relative_parent_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "alpha" Pbrt.Pp.pp_float fmt v.alpha; + if not (layer_state_has_alpha v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "color" (Pbrt.Pp.pp_option pp_layer_state_color3) fmt v.color; + Pbrt.Pp.pp_record_field ~first:false "transparent_region" (Pbrt.Pp.pp_option pp_region_proto) fmt v.transparent_region; + Pbrt.Pp.pp_record_field ~first:false "transform" Pbrt.Pp.pp_int32 fmt v.transform; + if not (layer_state_has_transform v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transform_to_display_inverse" Pbrt.Pp.pp_bool fmt v.transform_to_display_inverse; + if not (layer_state_has_transform_to_display_inverse v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "crop" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.crop; + Pbrt.Pp.pp_record_field ~first:false "buffer_data" (Pbrt.Pp.pp_option pp_layer_state_buffer_data) fmt v.buffer_data; + Pbrt.Pp.pp_record_field ~first:false "api" Pbrt.Pp.pp_int32 fmt v.api; + if not (layer_state_has_api v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_sideband_stream" Pbrt.Pp.pp_bool fmt v.has_sideband_stream; + if not (layer_state_has_has_sideband_stream v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "color_transform" (Pbrt.Pp.pp_option pp_color_transform_proto) fmt v.color_transform; + Pbrt.Pp.pp_record_field ~first:false "blur_regions" (Pbrt.Pp.pp_list pp_blur_region) fmt v.blur_regions; + Pbrt.Pp.pp_record_field ~first:false "window_info_handle" (Pbrt.Pp.pp_option pp_layer_state_window_info) fmt v.window_info_handle; + Pbrt.Pp.pp_record_field ~first:false "bg_color_alpha" Pbrt.Pp.pp_float fmt v.bg_color_alpha; + if not (layer_state_has_bg_color_alpha v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bg_color_dataspace" Pbrt.Pp.pp_int32 fmt v.bg_color_dataspace; + if not (layer_state_has_bg_color_dataspace v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "color_space_agnostic" Pbrt.Pp.pp_bool fmt v.color_space_agnostic; + if not (layer_state_has_color_space_agnostic v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "shadow_radius" Pbrt.Pp.pp_float fmt v.shadow_radius; + if not (layer_state_has_shadow_radius v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_rate_selection_priority" Pbrt.Pp.pp_int32 fmt v.frame_rate_selection_priority; + if not (layer_state_has_frame_rate_selection_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_rate" Pbrt.Pp.pp_float fmt v.frame_rate; + if not (layer_state_has_frame_rate v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_rate_compatibility" Pbrt.Pp.pp_int32 fmt v.frame_rate_compatibility; + if not (layer_state_has_frame_rate_compatibility v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "change_frame_rate_strategy" Pbrt.Pp.pp_int32 fmt v.change_frame_rate_strategy; + if not (layer_state_has_change_frame_rate_strategy v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "fixed_transform_hint" Pbrt.Pp.pp_int32 fmt v.fixed_transform_hint; + if not (layer_state_has_fixed_transform_hint v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_number" Pbrt.Pp.pp_int64 fmt v.frame_number; + if not (layer_state_has_frame_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "auto_refresh" Pbrt.Pp.pp_bool fmt v.auto_refresh; + if not (layer_state_has_auto_refresh v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_trusted_overlay" Pbrt.Pp.pp_bool fmt v.is_trusted_overlay; + if not (layer_state_has_is_trusted_overlay v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer_crop" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.buffer_crop; + Pbrt.Pp.pp_record_field ~first:false "destination_frame" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.destination_frame; + Pbrt.Pp.pp_record_field ~first:false "drop_input_mode" pp_layer_state_drop_input_mode fmt v.drop_input_mode; + if not (layer_state_has_drop_input_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trusted_overlay" pp_trusted_overlay fmt v.trusted_overlay; + if not (layer_state_has_trusted_overlay v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "background_blur_scale" Pbrt.Pp.pp_float fmt v.background_blur_scale; + if not (layer_state_has_background_blur_scale v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "corner_radii" (Pbrt.Pp.pp_option pp_layer_state_corner_radii) fmt v.corner_radii; + Pbrt.Pp.pp_record_field ~first:false "client_drawn_corner_radii" (Pbrt.Pp.pp_option pp_layer_state_corner_radii) fmt v.client_drawn_corner_radii; + Pbrt.Pp.pp_record_field ~first:false "system_content_priority" Pbrt.Pp.pp_int32 fmt v.system_content_priority; + if not (layer_state_has_system_content_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "box_shadow_settings" (Pbrt.Pp.pp_option pp_box_shadow_settings) fmt v.box_shadow_settings; + Pbrt.Pp.pp_record_field ~first:false "border_settings" (Pbrt.Pp.pp_option pp_border_settings) fmt v.border_settings; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_display_state fmt (v:display_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int32 fmt v.id; + if not (display_state_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "what" Pbrt.Pp.pp_int32 fmt v.what; + if not (display_state_has_what v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (display_state_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_stack" Pbrt.Pp.pp_int32 fmt v.layer_stack; + if not (display_state_has_layer_stack v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "orientation" Pbrt.Pp.pp_int32 fmt v.orientation; + if not (display_state_has_orientation v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_stack_space_rect" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.layer_stack_space_rect; + Pbrt.Pp.pp_record_field ~first:false "oriented_display_space_rect" (Pbrt.Pp.pp_option pp_rect_proto) fmt v.oriented_display_space_rect; + Pbrt.Pp.pp_record_field ~first:false "width" Pbrt.Pp.pp_int32 fmt v.width; + if not (display_state_has_width v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "height" Pbrt.Pp.pp_int32 fmt v.height; + if not (display_state_has_height v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_transaction_barrier fmt (v:transaction_barrier) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "barrier_token" Pbrt.Pp.pp_string fmt v.barrier_token; + if not (transaction_barrier_has_barrier_token v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "kind" Pbrt.Pp.pp_int32 fmt v.kind; + if not (transaction_barrier_has_kind v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_transaction_state fmt (v:transaction_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (transaction_state_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uid" Pbrt.Pp.pp_int32 fmt v.uid; + if not (transaction_state_has_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vsync_id" Pbrt.Pp.pp_int64 fmt v.vsync_id; + if not (transaction_state_has_vsync_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "input_event_id" Pbrt.Pp.pp_int32 fmt v.input_event_id; + if not (transaction_state_has_input_event_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "post_time" Pbrt.Pp.pp_int64 fmt v.post_time; + if not (transaction_state_has_post_time v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transaction_id" Pbrt.Pp.pp_int64 fmt v.transaction_id; + if not (transaction_state_has_transaction_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_changes" (Pbrt.Pp.pp_list pp_layer_state) fmt v.layer_changes; + Pbrt.Pp.pp_record_field ~first:false "display_changes" (Pbrt.Pp.pp_list pp_display_state) fmt v.display_changes; + Pbrt.Pp.pp_record_field ~first:false "merged_transaction_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.merged_transaction_ids; + Pbrt.Pp.pp_record_field ~first:false "apply_token" Pbrt.Pp.pp_int64 fmt v.apply_token; + if not (transaction_state_has_apply_token v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transaction_barriers" (Pbrt.Pp.pp_list pp_transaction_barrier) fmt v.transaction_barriers; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layer_creation_args fmt (v:layer_creation_args) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "layer_id" Pbrt.Pp.pp_int32 fmt v.layer_id; + if not (layer_creation_args_has_layer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (layer_creation_args_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (layer_creation_args_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "parent_id" Pbrt.Pp.pp_int32 fmt v.parent_id; + if not (layer_creation_args_has_parent_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "mirror_from_id" Pbrt.Pp.pp_int32 fmt v.mirror_from_id; + if not (layer_creation_args_has_mirror_from_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "add_to_root" Pbrt.Pp.pp_bool fmt v.add_to_root; + if not (layer_creation_args_has_add_to_root v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_stack_to_mirror" Pbrt.Pp.pp_int32 fmt v.layer_stack_to_mirror; + if not (layer_creation_args_has_layer_stack_to_mirror v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_display_info fmt (v:display_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "layer_stack" Pbrt.Pp.pp_int32 fmt v.layer_stack; + if not (display_info_has_layer_stack v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "display_id" Pbrt.Pp.pp_int32 fmt v.display_id; + if not (display_info_has_display_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "logical_width" Pbrt.Pp.pp_int32 fmt v.logical_width; + if not (display_info_has_logical_width v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "logical_height" Pbrt.Pp.pp_int32 fmt v.logical_height; + if not (display_info_has_logical_height v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transform_inverse" (Pbrt.Pp.pp_option pp_transform) fmt v.transform_inverse; + Pbrt.Pp.pp_record_field ~first:false "transform" (Pbrt.Pp.pp_option pp_transform) fmt v.transform; + Pbrt.Pp.pp_record_field ~first:false "receives_input" Pbrt.Pp.pp_bool fmt v.receives_input; + if not (display_info_has_receives_input v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_secure" Pbrt.Pp.pp_bool fmt v.is_secure; + if not (display_info_has_is_secure v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_primary" Pbrt.Pp.pp_bool fmt v.is_primary; + if not (display_info_has_is_primary v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_virtual" Pbrt.Pp.pp_bool fmt v.is_virtual; + if not (display_info_has_is_virtual v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rotation_flags" Pbrt.Pp.pp_int32 fmt v.rotation_flags; + if not (display_info_has_rotation_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transform_hint" Pbrt.Pp.pp_int32 fmt v.transform_hint; + if not (display_info_has_transform_hint v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_transaction_trace_entry fmt (v:transaction_trace_entry) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "elapsed_realtime_nanos" Pbrt.Pp.pp_int64 fmt v.elapsed_realtime_nanos; + if not (transaction_trace_entry_has_elapsed_realtime_nanos v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vsync_id" Pbrt.Pp.pp_int64 fmt v.vsync_id; + if not (transaction_trace_entry_has_vsync_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "transactions" (Pbrt.Pp.pp_list pp_transaction_state) fmt v.transactions; + Pbrt.Pp.pp_record_field ~first:false "added_layers" (Pbrt.Pp.pp_list pp_layer_creation_args) fmt v.added_layers; + Pbrt.Pp.pp_record_field ~first:false "destroyed_layers" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.destroyed_layers; + Pbrt.Pp.pp_record_field ~first:false "added_displays" (Pbrt.Pp.pp_list pp_display_state) fmt v.added_displays; + Pbrt.Pp.pp_record_field ~first:false "removed_displays" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.removed_displays; + Pbrt.Pp.pp_record_field ~first:false "destroyed_layer_handles" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.destroyed_layer_handles; + Pbrt.Pp.pp_record_field ~first:false "displays_changed" Pbrt.Pp.pp_bool fmt v.displays_changed; + if not (transaction_trace_entry_has_displays_changed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "displays" (Pbrt.Pp.pp_list pp_display_info) fmt v.displays; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_transaction_trace_file fmt (v:transaction_trace_file) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "magic_number" Pbrt.Pp.pp_int64 fmt v.magic_number; + if not (transaction_trace_file_has_magic_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "entry" (Pbrt.Pp.pp_list pp_transaction_trace_entry) fmt v.entry; + Pbrt.Pp.pp_record_field ~first:false "real_to_elapsed_time_offset_nanos" Pbrt.Pp.pp_int64 fmt v.real_to_elapsed_time_offset_nanos; + if not (transaction_trace_file_has_real_to_elapsed_time_offset_nanos v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "version" Pbrt.Pp.pp_int32 fmt v.version; + if not (transaction_trace_file_has_version v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_layer_state_changes_lsb fmt (v:layer_state_changes_lsb) = + match v with + | E_changes_lsb_none -> Format.fprintf fmt "E_changes_lsb_none" + | E_position_changed -> Format.fprintf fmt "E_position_changed" + | E_layer_changed -> Format.fprintf fmt "E_layer_changed" + | E_alpha_changed -> Format.fprintf fmt "E_alpha_changed" + | E_matrix_changed -> Format.fprintf fmt "E_matrix_changed" + | E_transparent_region_changed -> Format.fprintf fmt "E_transparent_region_changed" + | E_flags_changed -> Format.fprintf fmt "E_flags_changed" + | E_layer_stack_changed -> Format.fprintf fmt "E_layer_stack_changed" + | E_release_buffer_listener_changed -> Format.fprintf fmt "E_release_buffer_listener_changed" + | E_shadow_radius_changed -> Format.fprintf fmt "E_shadow_radius_changed" + | E_buffer_crop_changed -> Format.fprintf fmt "E_buffer_crop_changed" + | E_relative_layer_changed -> Format.fprintf fmt "E_relative_layer_changed" + | E_reparent -> Format.fprintf fmt "E_reparent" + | E_color_changed -> Format.fprintf fmt "E_color_changed" + | E_buffer_transform_changed -> Format.fprintf fmt "E_buffer_transform_changed" + | E_transform_to_display_inverse_changed -> Format.fprintf fmt "E_transform_to_display_inverse_changed" + | E_crop_changed -> Format.fprintf fmt "E_crop_changed" + | E_buffer_changed -> Format.fprintf fmt "E_buffer_changed" + | E_acquire_fence_changed -> Format.fprintf fmt "E_acquire_fence_changed" + | E_dataspace_changed -> Format.fprintf fmt "E_dataspace_changed" + | E_hdr_metadata_changed -> Format.fprintf fmt "E_hdr_metadata_changed" + | E_surface_damage_region_changed -> Format.fprintf fmt "E_surface_damage_region_changed" + | E_api_changed -> Format.fprintf fmt "E_api_changed" + | E_sideband_stream_changed -> Format.fprintf fmt "E_sideband_stream_changed" + | E_color_transform_changed -> Format.fprintf fmt "E_color_transform_changed" + | E_has_listener_callbacks_changed -> Format.fprintf fmt "E_has_listener_callbacks_changed" + | E_input_info_changed -> Format.fprintf fmt "E_input_info_changed" + | E_corner_radius_changed -> Format.fprintf fmt "E_corner_radius_changed" + +let rec pp_layer_state_changes_msb fmt (v:layer_state_changes_msb) = + match v with + | E_changes_msb_none -> Format.fprintf fmt "E_changes_msb_none" + | E_destination_frame_changed -> Format.fprintf fmt "E_destination_frame_changed" + | E_cached_buffer_changed -> Format.fprintf fmt "E_cached_buffer_changed" + | E_background_color_changed -> Format.fprintf fmt "E_background_color_changed" + | E_metadata_changed -> Format.fprintf fmt "E_metadata_changed" + | E_color_space_agnostic_changed -> Format.fprintf fmt "E_color_space_agnostic_changed" + | E_frame_rate_selection_priority -> Format.fprintf fmt "E_frame_rate_selection_priority" + | E_frame_rate_changed -> Format.fprintf fmt "E_frame_rate_changed" + | E_background_blur_radius_changed -> Format.fprintf fmt "E_background_blur_radius_changed" + | E_producer_disconnect -> Format.fprintf fmt "E_producer_disconnect" + | E_fixed_transform_hint_changed -> Format.fprintf fmt "E_fixed_transform_hint_changed" + | E_frame_number_changed -> Format.fprintf fmt "E_frame_number_changed" + | E_blur_regions_changed -> Format.fprintf fmt "E_blur_regions_changed" + | E_auto_refresh_changed -> Format.fprintf fmt "E_auto_refresh_changed" + | E_stretch_changed -> Format.fprintf fmt "E_stretch_changed" + | E_trusted_overlay_changed -> Format.fprintf fmt "E_trusted_overlay_changed" + | E_drop_input_mode_changed -> Format.fprintf fmt "E_drop_input_mode_changed" + | E_client_drawn_corner_radius_changed -> Format.fprintf fmt "E_client_drawn_corner_radius_changed" + | E_system_content_priority_changed -> Format.fprintf fmt "E_system_content_priority_changed" + | E_box_shadow_settings_changed -> Format.fprintf fmt "E_box_shadow_settings_changed" + | E_border_settings_changed -> Format.fprintf fmt "E_border_settings_changed" + +let rec pp_layer_state_flags fmt (v:layer_state_flags) = + match v with + | E_flags_none -> Format.fprintf fmt "E_flags_none" + | E_layer_hidden -> Format.fprintf fmt "E_layer_hidden" + | E_layer_opaque -> Format.fprintf fmt "E_layer_opaque" + | E_layer_skip_screenshot -> Format.fprintf fmt "E_layer_skip_screenshot" + | E_layer_secure -> Format.fprintf fmt "E_layer_secure" + | E_enable_backpressure -> Format.fprintf fmt "E_enable_backpressure" + | E_layer_is_display_decoration -> Format.fprintf fmt "E_layer_is_display_decoration" + +let rec pp_layer_state_buffer_data_buffer_data_change fmt (v:layer_state_buffer_data_buffer_data_change) = + match v with + | Buffer_data_change_none -> Format.fprintf fmt "Buffer_data_change_none" + | Fence_changed -> Format.fprintf fmt "Fence_changed" + | Frame_number_changed -> Format.fprintf fmt "Frame_number_changed" + | Cached_buffer_changed -> Format.fprintf fmt "Cached_buffer_changed" + +let rec pp_display_state_changes fmt (v:display_state_changes) = + match v with + | E_changes_none -> Format.fprintf fmt "E_changes_none" + | E_surface_changed -> Format.fprintf fmt "E_surface_changed" + | E_layer_stack_changed -> Format.fprintf fmt "E_layer_stack_changed" + | E_display_projection_changed -> Format.fprintf fmt "E_display_projection_changed" + | E_display_size_changed -> Format.fprintf fmt "E_display_size_changed" + | E_flags_changed -> Format.fprintf fmt "E_flags_changed" + +let rec pp_winscope_extensions fmt (v:winscope_extensions) = + let pp_i fmt () = + Pbrt.Pp.pp_unit fmt () + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_benchmark_metadata fmt (v:chrome_benchmark_metadata) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "benchmark_start_time_us" Pbrt.Pp.pp_int64 fmt v.benchmark_start_time_us; + if not (chrome_benchmark_metadata_has_benchmark_start_time_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "story_run_time_us" Pbrt.Pp.pp_int64 fmt v.story_run_time_us; + if not (chrome_benchmark_metadata_has_story_run_time_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "benchmark_name" Pbrt.Pp.pp_string fmt v.benchmark_name; + if not (chrome_benchmark_metadata_has_benchmark_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "benchmark_description" Pbrt.Pp.pp_string fmt v.benchmark_description; + if not (chrome_benchmark_metadata_has_benchmark_description v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "label" Pbrt.Pp.pp_string fmt v.label; + if not (chrome_benchmark_metadata_has_label v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "story_name" Pbrt.Pp.pp_string fmt v.story_name; + if not (chrome_benchmark_metadata_has_story_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "story_tags" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.story_tags; + Pbrt.Pp.pp_record_field ~first:false "story_run_index" Pbrt.Pp.pp_int32 fmt v.story_run_index; + if not (chrome_benchmark_metadata_has_story_run_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "had_failures" Pbrt.Pp.pp_bool fmt v.had_failures; + if not (chrome_benchmark_metadata_has_had_failures v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_metadata_packet_finch_hash fmt (v:chrome_metadata_packet_finch_hash) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_int32 fmt v.name; + if not (chrome_metadata_packet_finch_hash_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "group" Pbrt.Pp.pp_int32 fmt v.group; + if not (chrome_metadata_packet_finch_hash_has_group v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_background_tracing_metadata_trigger_rule_trigger_type fmt (v:background_tracing_metadata_trigger_rule_trigger_type) = + match v with + | Trigger_unspecified -> Format.fprintf fmt "Trigger_unspecified" + | Monitor_and_dump_when_specific_histogram_and_value -> Format.fprintf fmt "Monitor_and_dump_when_specific_histogram_and_value" + | Monitor_and_dump_when_trigger_named -> Format.fprintf fmt "Monitor_and_dump_when_trigger_named" + +let rec pp_background_tracing_metadata_trigger_rule_histogram_rule fmt (v:background_tracing_metadata_trigger_rule_histogram_rule) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "histogram_name_hash" Pbrt.Pp.pp_int64 fmt v.histogram_name_hash; + if not (background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_name_hash v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "histogram_min_trigger" Pbrt.Pp.pp_int64 fmt v.histogram_min_trigger; + if not (background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_min_trigger v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "histogram_max_trigger" Pbrt.Pp.pp_int64 fmt v.histogram_max_trigger; + if not (background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_max_trigger v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_background_tracing_metadata_trigger_rule_named_rule_event_type fmt (v:background_tracing_metadata_trigger_rule_named_rule_event_type) = + match v with + | Unspecified -> Format.fprintf fmt "Unspecified" + | Session_restore -> Format.fprintf fmt "Session_restore" + | Navigation -> Format.fprintf fmt "Navigation" + | Startup -> Format.fprintf fmt "Startup" + | Reached_code -> Format.fprintf fmt "Reached_code" + | Content_trigger -> Format.fprintf fmt "Content_trigger" + | Test_rule -> Format.fprintf fmt "Test_rule" + +let rec pp_background_tracing_metadata_trigger_rule_named_rule fmt (v:background_tracing_metadata_trigger_rule_named_rule) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "event_type" pp_background_tracing_metadata_trigger_rule_named_rule_event_type fmt v.event_type; + if not (background_tracing_metadata_trigger_rule_named_rule_has_event_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "content_trigger_name_hash" Pbrt.Pp.pp_int64 fmt v.content_trigger_name_hash; + if not (background_tracing_metadata_trigger_rule_named_rule_has_content_trigger_name_hash v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_background_tracing_metadata_trigger_rule fmt (v:background_tracing_metadata_trigger_rule) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "trigger_type" pp_background_tracing_metadata_trigger_rule_trigger_type fmt v.trigger_type; + if not (background_tracing_metadata_trigger_rule_has_trigger_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "histogram_rule" (Pbrt.Pp.pp_option pp_background_tracing_metadata_trigger_rule_histogram_rule) fmt v.histogram_rule; + Pbrt.Pp.pp_record_field ~first:false "named_rule" (Pbrt.Pp.pp_option pp_background_tracing_metadata_trigger_rule_named_rule) fmt v.named_rule; + Pbrt.Pp.pp_record_field ~first:false "name_hash" Pbrt.Pp.pp_int32 fmt v.name_hash; + if not (background_tracing_metadata_trigger_rule_has_name_hash v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_background_tracing_metadata fmt (v:background_tracing_metadata) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "triggered_rule" (Pbrt.Pp.pp_option pp_background_tracing_metadata_trigger_rule) fmt v.triggered_rule; + Pbrt.Pp.pp_record_field ~first:false "active_rules" (Pbrt.Pp.pp_list pp_background_tracing_metadata_trigger_rule) fmt v.active_rules; + Pbrt.Pp.pp_record_field ~first:false "scenario_name_hash" Pbrt.Pp.pp_int32 fmt v.scenario_name_hash; + if not (background_tracing_metadata_has_scenario_name_hash v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_metadata_packet fmt (v:chrome_metadata_packet) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "background_tracing_metadata" (Pbrt.Pp.pp_option pp_background_tracing_metadata) fmt v.background_tracing_metadata; + Pbrt.Pp.pp_record_field ~first:false "chrome_version_code" Pbrt.Pp.pp_int32 fmt v.chrome_version_code; + if not (chrome_metadata_packet_has_chrome_version_code v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "enabled_categories" Pbrt.Pp.pp_string fmt v.enabled_categories; + if not (chrome_metadata_packet_has_enabled_categories v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field_trial_hashes" (Pbrt.Pp.pp_list pp_chrome_metadata_packet_finch_hash) fmt v.field_trial_hashes; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_traced_value_nested_type fmt (v:chrome_traced_value_nested_type) = + match v with + | Dict -> Format.fprintf fmt "Dict" + | Array -> Format.fprintf fmt "Array" + +let rec pp_chrome_traced_value fmt (v:chrome_traced_value) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "nested_type" pp_chrome_traced_value_nested_type fmt v.nested_type; + if not (chrome_traced_value_has_nested_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dict_keys" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.dict_keys; + Pbrt.Pp.pp_record_field ~first:false "dict_values" (Pbrt.Pp.pp_list pp_chrome_traced_value) fmt v.dict_values; + Pbrt.Pp.pp_record_field ~first:false "array_values" (Pbrt.Pp.pp_list pp_chrome_traced_value) fmt v.array_values; + Pbrt.Pp.pp_record_field ~first:false "int_value" Pbrt.Pp.pp_int32 fmt v.int_value; + if not (chrome_traced_value_has_int_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "double_value" Pbrt.Pp.pp_float fmt v.double_value; + if not (chrome_traced_value_has_double_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bool_value" Pbrt.Pp.pp_bool fmt v.bool_value; + if not (chrome_traced_value_has_bool_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "string_value" Pbrt.Pp.pp_string fmt v.string_value; + if not (chrome_traced_value_has_string_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_string_table_entry fmt (v:chrome_string_table_entry) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "value" Pbrt.Pp.pp_string fmt v.value; + if not (chrome_string_table_entry_has_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "index" Pbrt.Pp.pp_int32 fmt v.index; + if not (chrome_string_table_entry_has_index v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_trace_event_arg_value fmt (v:chrome_trace_event_arg_value) = + match v with + | Bool_value x -> Format.fprintf fmt "@[Bool_value(@,%a)@]" Pbrt.Pp.pp_bool x + | Uint_value x -> Format.fprintf fmt "@[Uint_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Int_value x -> Format.fprintf fmt "@[Int_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Double_value x -> Format.fprintf fmt "@[Double_value(@,%a)@]" Pbrt.Pp.pp_float x + | String_value x -> Format.fprintf fmt "@[String_value(@,%a)@]" Pbrt.Pp.pp_string x + | Pointer_value x -> Format.fprintf fmt "@[Pointer_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Json_value x -> Format.fprintf fmt "@[Json_value(@,%a)@]" Pbrt.Pp.pp_string x + | Traced_value x -> Format.fprintf fmt "@[Traced_value(@,%a)@]" pp_chrome_traced_value x + +and pp_chrome_trace_event_arg fmt (v:chrome_trace_event_arg) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (chrome_trace_event_arg_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" (Pbrt.Pp.pp_option pp_chrome_trace_event_arg_value) fmt v.value; + Pbrt.Pp.pp_record_field ~first:false "name_index" Pbrt.Pp.pp_int32 fmt v.name_index; + if not (chrome_trace_event_arg_has_name_index v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_trace_event fmt (v:chrome_trace_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (chrome_trace_event_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp" Pbrt.Pp.pp_int64 fmt v.timestamp; + if not (chrome_trace_event_has_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "phase" Pbrt.Pp.pp_int32 fmt v.phase; + if not (chrome_trace_event_has_phase v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_id" Pbrt.Pp.pp_int32 fmt v.thread_id; + if not (chrome_trace_event_has_thread_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "duration" Pbrt.Pp.pp_int64 fmt v.duration; + if not (chrome_trace_event_has_duration v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_duration" Pbrt.Pp.pp_int64 fmt v.thread_duration; + if not (chrome_trace_event_has_thread_duration v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scope" Pbrt.Pp.pp_string fmt v.scope; + if not (chrome_trace_event_has_scope v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "id" Pbrt.Pp.pp_int64 fmt v.id; + if not (chrome_trace_event_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flags" Pbrt.Pp.pp_int32 fmt v.flags; + if not (chrome_trace_event_has_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "category_group_name" Pbrt.Pp.pp_string fmt v.category_group_name; + if not (chrome_trace_event_has_category_group_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "process_id" Pbrt.Pp.pp_int32 fmt v.process_id; + if not (chrome_trace_event_has_process_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_timestamp" Pbrt.Pp.pp_int64 fmt v.thread_timestamp; + if not (chrome_trace_event_has_thread_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bind_id" Pbrt.Pp.pp_int64 fmt v.bind_id; + if not (chrome_trace_event_has_bind_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "args" (Pbrt.Pp.pp_list pp_chrome_trace_event_arg) fmt v.args; + Pbrt.Pp.pp_record_field ~first:false "name_index" Pbrt.Pp.pp_int32 fmt v.name_index; + if not (chrome_trace_event_has_name_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "category_group_name_index" Pbrt.Pp.pp_int32 fmt v.category_group_name_index; + if not (chrome_trace_event_has_category_group_name_index v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_metadata_value fmt (v:chrome_metadata_value) = + match v with + | String_value x -> Format.fprintf fmt "@[String_value(@,%a)@]" Pbrt.Pp.pp_string x + | Bool_value x -> Format.fprintf fmt "@[Bool_value(@,%a)@]" Pbrt.Pp.pp_bool x + | Int_value x -> Format.fprintf fmt "@[Int_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Json_value x -> Format.fprintf fmt "@[Json_value(@,%a)@]" Pbrt.Pp.pp_string x + +and pp_chrome_metadata fmt (v:chrome_metadata) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (chrome_metadata_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" (Pbrt.Pp.pp_option pp_chrome_metadata_value) fmt v.value; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_legacy_json_trace_trace_type fmt (v:chrome_legacy_json_trace_trace_type) = + match v with + | User_trace -> Format.fprintf fmt "User_trace" + | System_trace -> Format.fprintf fmt "System_trace" + +let rec pp_chrome_legacy_json_trace fmt (v:chrome_legacy_json_trace) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "type_" pp_chrome_legacy_json_trace_trace_type fmt v.type_; + if not (chrome_legacy_json_trace_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "data" Pbrt.Pp.pp_string fmt v.data; + if not (chrome_legacy_json_trace_has_data v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_event_bundle fmt (v:chrome_event_bundle) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "trace_events" (Pbrt.Pp.pp_list pp_chrome_trace_event) fmt v.trace_events; + Pbrt.Pp.pp_record_field ~first:false "metadata" (Pbrt.Pp.pp_list pp_chrome_metadata) fmt v.metadata; + Pbrt.Pp.pp_record_field ~first:false "legacy_ftrace_output" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.legacy_ftrace_output; + Pbrt.Pp.pp_record_field ~first:false "legacy_json_trace" (Pbrt.Pp.pp_list pp_chrome_legacy_json_trace) fmt v.legacy_json_trace; + Pbrt.Pp.pp_record_field ~first:false "string_table" (Pbrt.Pp.pp_list pp_chrome_string_table_entry) fmt v.string_table; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_trigger fmt (v:chrome_trigger) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "trigger_name" Pbrt.Pp.pp_string fmt v.trigger_name; + if not (chrome_trigger_has_trigger_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trigger_name_hash" Pbrt.Pp.pp_int32 fmt v.trigger_name_hash; + if not (chrome_trigger_has_trigger_name_hash v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flow_id" Pbrt.Pp.pp_int64 fmt v.flow_id; + if not (chrome_trigger_has_flow_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_v8_string fmt (v:v8_string) = + match v with + | Latin1 x -> Format.fprintf fmt "@[Latin1(@,%a)@]" Pbrt.Pp.pp_bytes x + | Utf16_le x -> Format.fprintf fmt "@[Utf16_le(@,%a)@]" Pbrt.Pp.pp_bytes x + | Utf16_be x -> Format.fprintf fmt "@[Utf16_be(@,%a)@]" Pbrt.Pp.pp_bytes x + +let rec pp_interned_v8_string_encoded_string fmt (v:interned_v8_string_encoded_string) = + match v with + | Latin1 x -> Format.fprintf fmt "@[Latin1(@,%a)@]" Pbrt.Pp.pp_bytes x + | Utf16_le x -> Format.fprintf fmt "@[Utf16_le(@,%a)@]" Pbrt.Pp.pp_bytes x + | Utf16_be x -> Format.fprintf fmt "@[Utf16_be(@,%a)@]" Pbrt.Pp.pp_bytes x + +and pp_interned_v8_string fmt (v:interned_v8_string) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (interned_v8_string_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "encoded_string" (Pbrt.Pp.pp_option pp_interned_v8_string_encoded_string) fmt v.encoded_string; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_v8_js_script_type fmt (v:interned_v8_js_script_type) = + match v with + | Type_unknown -> Format.fprintf fmt "Type_unknown" + | Type_normal -> Format.fprintf fmt "Type_normal" + | Type_eval -> Format.fprintf fmt "Type_eval" + | Type_module -> Format.fprintf fmt "Type_module" + | Type_native -> Format.fprintf fmt "Type_native" + | Type_extension -> Format.fprintf fmt "Type_extension" + | Type_inspector -> Format.fprintf fmt "Type_inspector" + +let rec pp_interned_v8_js_script fmt (v:interned_v8_js_script) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (interned_v8_js_script_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "script_id" Pbrt.Pp.pp_int32 fmt v.script_id; + if not (interned_v8_js_script_has_script_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" pp_interned_v8_js_script_type fmt v.type_; + if not (interned_v8_js_script_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" (Pbrt.Pp.pp_option pp_v8_string) fmt v.name; + Pbrt.Pp.pp_record_field ~first:false "source" (Pbrt.Pp.pp_option pp_v8_string) fmt v.source; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_v8_wasm_script fmt (v:interned_v8_wasm_script) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (interned_v8_wasm_script_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "script_id" Pbrt.Pp.pp_int32 fmt v.script_id; + if not (interned_v8_wasm_script_has_script_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "url" Pbrt.Pp.pp_string fmt v.url; + if not (interned_v8_wasm_script_has_url v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "wire_bytes" Pbrt.Pp.pp_bytes fmt v.wire_bytes; + if not (interned_v8_wasm_script_has_wire_bytes v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_v8_js_function_kind fmt (v:interned_v8_js_function_kind) = + match v with + | Kind_unknown -> Format.fprintf fmt "Kind_unknown" + | Kind_normal_function -> Format.fprintf fmt "Kind_normal_function" + | Kind_module -> Format.fprintf fmt "Kind_module" + | Kind_async_module -> Format.fprintf fmt "Kind_async_module" + | Kind_base_constructor -> Format.fprintf fmt "Kind_base_constructor" + | Kind_default_base_constructor -> Format.fprintf fmt "Kind_default_base_constructor" + | Kind_default_derived_constructor -> Format.fprintf fmt "Kind_default_derived_constructor" + | Kind_derived_constructor -> Format.fprintf fmt "Kind_derived_constructor" + | Kind_getter_function -> Format.fprintf fmt "Kind_getter_function" + | Kind_static_getter_function -> Format.fprintf fmt "Kind_static_getter_function" + | Kind_setter_function -> Format.fprintf fmt "Kind_setter_function" + | Kind_static_setter_function -> Format.fprintf fmt "Kind_static_setter_function" + | Kind_arrow_function -> Format.fprintf fmt "Kind_arrow_function" + | Kind_async_arrow_function -> Format.fprintf fmt "Kind_async_arrow_function" + | Kind_async_function -> Format.fprintf fmt "Kind_async_function" + | Kind_async_concise_method -> Format.fprintf fmt "Kind_async_concise_method" + | Kind_static_async_concise_method -> Format.fprintf fmt "Kind_static_async_concise_method" + | Kind_async_concise_generator_method -> Format.fprintf fmt "Kind_async_concise_generator_method" + | Kind_static_async_concise_generator_method -> Format.fprintf fmt "Kind_static_async_concise_generator_method" + | Kind_async_generator_function -> Format.fprintf fmt "Kind_async_generator_function" + | Kind_generator_function -> Format.fprintf fmt "Kind_generator_function" + | Kind_concise_generator_method -> Format.fprintf fmt "Kind_concise_generator_method" + | Kind_static_concise_generator_method -> Format.fprintf fmt "Kind_static_concise_generator_method" + | Kind_concise_method -> Format.fprintf fmt "Kind_concise_method" + | Kind_static_concise_method -> Format.fprintf fmt "Kind_static_concise_method" + | Kind_class_members_initializer_function -> Format.fprintf fmt "Kind_class_members_initializer_function" + | Kind_class_static_initializer_function -> Format.fprintf fmt "Kind_class_static_initializer_function" + | Kind_invalid -> Format.fprintf fmt "Kind_invalid" + +let rec pp_interned_v8_js_function fmt (v:interned_v8_js_function) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (interned_v8_js_function_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "v8_js_function_name_iid" Pbrt.Pp.pp_int64 fmt v.v8_js_function_name_iid; + if not (interned_v8_js_function_has_v8_js_function_name_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "v8_js_script_iid" Pbrt.Pp.pp_int64 fmt v.v8_js_script_iid; + if not (interned_v8_js_function_has_v8_js_script_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_toplevel" Pbrt.Pp.pp_bool fmt v.is_toplevel; + if not (interned_v8_js_function_has_is_toplevel v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "kind" pp_interned_v8_js_function_kind fmt v.kind; + if not (interned_v8_js_function_has_kind v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "byte_offset" Pbrt.Pp.pp_int32 fmt v.byte_offset; + if not (interned_v8_js_function_has_byte_offset v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "line" Pbrt.Pp.pp_int32 fmt v.line; + if not (interned_v8_js_function_has_line v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "column" Pbrt.Pp.pp_int32 fmt v.column; + if not (interned_v8_js_function_has_column v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_v8_isolate_code_range fmt (v:interned_v8_isolate_code_range) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "base_address" Pbrt.Pp.pp_int64 fmt v.base_address; + if not (interned_v8_isolate_code_range_has_base_address v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "size" Pbrt.Pp.pp_int64 fmt v.size; + if not (interned_v8_isolate_code_range_has_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "embedded_blob_code_copy_start_address" Pbrt.Pp.pp_int64 fmt v.embedded_blob_code_copy_start_address; + if not (interned_v8_isolate_code_range_has_embedded_blob_code_copy_start_address v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_process_wide" Pbrt.Pp.pp_bool fmt v.is_process_wide; + if not (interned_v8_isolate_code_range_has_is_process_wide v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_v8_isolate fmt (v:interned_v8_isolate) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (interned_v8_isolate_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (interned_v8_isolate_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "isolate_id" Pbrt.Pp.pp_int32 fmt v.isolate_id; + if not (interned_v8_isolate_has_isolate_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "code_range" (Pbrt.Pp.pp_option pp_interned_v8_isolate_code_range) fmt v.code_range; + Pbrt.Pp.pp_record_field ~first:false "embedded_blob_code_start_address" Pbrt.Pp.pp_int64 fmt v.embedded_blob_code_start_address; + if not (interned_v8_isolate_has_embedded_blob_code_start_address v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "embedded_blob_code_size" Pbrt.Pp.pp_int64 fmt v.embedded_blob_code_size; + if not (interned_v8_isolate_has_embedded_blob_code_size v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_v8_js_code_tier fmt (v:v8_js_code_tier) = + match v with + | Tier_unknown -> Format.fprintf fmt "Tier_unknown" + | Tier_ignition -> Format.fprintf fmt "Tier_ignition" + | Tier_sparkplug -> Format.fprintf fmt "Tier_sparkplug" + | Tier_maglev -> Format.fprintf fmt "Tier_maglev" + | Tier_turboshaft -> Format.fprintf fmt "Tier_turboshaft" + | Tier_turbofan -> Format.fprintf fmt "Tier_turbofan" + +let rec pp_v8_js_code_instructions fmt (v:v8_js_code_instructions) = + match v with + | Machine_code x -> Format.fprintf fmt "@[Machine_code(@,%a)@]" Pbrt.Pp.pp_bytes x + | Bytecode x -> Format.fprintf fmt "@[Bytecode(@,%a)@]" Pbrt.Pp.pp_bytes x + +and pp_v8_js_code fmt (v:v8_js_code) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "v8_isolate_iid" Pbrt.Pp.pp_int64 fmt v.v8_isolate_iid; + if not (v8_js_code_has_v8_isolate_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (v8_js_code_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "v8_js_function_iid" Pbrt.Pp.pp_int64 fmt v.v8_js_function_iid; + if not (v8_js_code_has_v8_js_function_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tier" pp_v8_js_code_tier fmt v.tier; + if not (v8_js_code_has_tier v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instruction_start" Pbrt.Pp.pp_int64 fmt v.instruction_start; + if not (v8_js_code_has_instruction_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instruction_size_bytes" Pbrt.Pp.pp_int64 fmt v.instruction_size_bytes; + if not (v8_js_code_has_instruction_size_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instructions" (Pbrt.Pp.pp_option pp_v8_js_code_instructions) fmt v.instructions; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_v8_internal_code_type fmt (v:v8_internal_code_type) = + match v with + | Type_unknown -> Format.fprintf fmt "Type_unknown" + | Type_bytecode_handler -> Format.fprintf fmt "Type_bytecode_handler" + | Type_for_testing -> Format.fprintf fmt "Type_for_testing" + | Type_builtin -> Format.fprintf fmt "Type_builtin" + | Type_wasm_function -> Format.fprintf fmt "Type_wasm_function" + | Type_wasm_to_capi_function -> Format.fprintf fmt "Type_wasm_to_capi_function" + | Type_wasm_to_js_function -> Format.fprintf fmt "Type_wasm_to_js_function" + | Type_js_to_wasm_function -> Format.fprintf fmt "Type_js_to_wasm_function" + | Type_js_to_js_function -> Format.fprintf fmt "Type_js_to_js_function" + | Type_c_wasm_entry -> Format.fprintf fmt "Type_c_wasm_entry" + +let rec pp_v8_internal_code fmt (v:v8_internal_code) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "v8_isolate_iid" Pbrt.Pp.pp_int64 fmt v.v8_isolate_iid; + if not (v8_internal_code_has_v8_isolate_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (v8_internal_code_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (v8_internal_code_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" pp_v8_internal_code_type fmt v.type_; + if not (v8_internal_code_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "builtin_id" Pbrt.Pp.pp_int32 fmt v.builtin_id; + if not (v8_internal_code_has_builtin_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instruction_start" Pbrt.Pp.pp_int64 fmt v.instruction_start; + if not (v8_internal_code_has_instruction_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instruction_size_bytes" Pbrt.Pp.pp_int64 fmt v.instruction_size_bytes; + if not (v8_internal_code_has_instruction_size_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "machine_code" Pbrt.Pp.pp_bytes fmt v.machine_code; + if not (v8_internal_code_has_machine_code v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_v8_wasm_code_tier fmt (v:v8_wasm_code_tier) = + match v with + | Tier_unknown -> Format.fprintf fmt "Tier_unknown" + | Tier_liftoff -> Format.fprintf fmt "Tier_liftoff" + | Tier_turbofan -> Format.fprintf fmt "Tier_turbofan" + +let rec pp_v8_wasm_code fmt (v:v8_wasm_code) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "v8_isolate_iid" Pbrt.Pp.pp_int64 fmt v.v8_isolate_iid; + if not (v8_wasm_code_has_v8_isolate_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (v8_wasm_code_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "v8_wasm_script_iid" Pbrt.Pp.pp_int64 fmt v.v8_wasm_script_iid; + if not (v8_wasm_code_has_v8_wasm_script_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "function_name" Pbrt.Pp.pp_string fmt v.function_name; + if not (v8_wasm_code_has_function_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tier" pp_v8_wasm_code_tier fmt v.tier; + if not (v8_wasm_code_has_tier v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "code_offset_in_module" Pbrt.Pp.pp_int32 fmt v.code_offset_in_module; + if not (v8_wasm_code_has_code_offset_in_module v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instruction_start" Pbrt.Pp.pp_int64 fmt v.instruction_start; + if not (v8_wasm_code_has_instruction_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instruction_size_bytes" Pbrt.Pp.pp_int64 fmt v.instruction_size_bytes; + if not (v8_wasm_code_has_instruction_size_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "machine_code" Pbrt.Pp.pp_bytes fmt v.machine_code; + if not (v8_wasm_code_has_machine_code v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_v8_reg_exp_code fmt (v:v8_reg_exp_code) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "v8_isolate_iid" Pbrt.Pp.pp_int64 fmt v.v8_isolate_iid; + if not (v8_reg_exp_code_has_v8_isolate_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (v8_reg_exp_code_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pattern" (Pbrt.Pp.pp_option pp_v8_string) fmt v.pattern; + Pbrt.Pp.pp_record_field ~first:false "instruction_start" Pbrt.Pp.pp_int64 fmt v.instruction_start; + if not (v8_reg_exp_code_has_instruction_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instruction_size_bytes" Pbrt.Pp.pp_int64 fmt v.instruction_size_bytes; + if not (v8_reg_exp_code_has_instruction_size_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "machine_code" Pbrt.Pp.pp_bytes fmt v.machine_code; + if not (v8_reg_exp_code_has_machine_code v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_v8_code_move_to_instructions fmt (v:v8_code_move_to_instructions) = + match v with + | To_machine_code x -> Format.fprintf fmt "@[To_machine_code(@,%a)@]" Pbrt.Pp.pp_bytes x + | To_bytecode x -> Format.fprintf fmt "@[To_bytecode(@,%a)@]" Pbrt.Pp.pp_bytes x + +and pp_v8_code_move fmt (v:v8_code_move) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "isolate_iid" Pbrt.Pp.pp_int64 fmt v.isolate_iid; + if not (v8_code_move_has_isolate_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (v8_code_move_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "from_instruction_start_address" Pbrt.Pp.pp_int64 fmt v.from_instruction_start_address; + if not (v8_code_move_has_from_instruction_start_address v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "to_instruction_start_address" Pbrt.Pp.pp_int64 fmt v.to_instruction_start_address; + if not (v8_code_move_has_to_instruction_start_address v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instruction_size_bytes" Pbrt.Pp.pp_int64 fmt v.instruction_size_bytes; + if not (v8_code_move_has_instruction_size_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "to_instructions" (Pbrt.Pp.pp_option pp_v8_code_move_to_instructions) fmt v.to_instructions; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_v8_code_defaults fmt (v:v8_code_defaults) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (v8_code_defaults_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_clock_snapshot_clock_builtin_clocks fmt (v:clock_snapshot_clock_builtin_clocks) = + match v with + | Unknown -> Format.fprintf fmt "Unknown" + | Realtime -> Format.fprintf fmt "Realtime" + | Realtime_coarse -> Format.fprintf fmt "Realtime_coarse" + | Monotonic -> Format.fprintf fmt "Monotonic" + | Monotonic_coarse -> Format.fprintf fmt "Monotonic_coarse" + | Monotonic_raw -> Format.fprintf fmt "Monotonic_raw" + | Boottime -> Format.fprintf fmt "Boottime" + | Builtin_clock_max_id -> Format.fprintf fmt "Builtin_clock_max_id" + +let rec pp_clock_snapshot_clock fmt (v:clock_snapshot_clock) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "clock_id" Pbrt.Pp.pp_int32 fmt v.clock_id; + if not (clock_snapshot_clock_has_clock_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp" Pbrt.Pp.pp_int64 fmt v.timestamp; + if not (clock_snapshot_clock_has_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_incremental" Pbrt.Pp.pp_bool fmt v.is_incremental; + if not (clock_snapshot_clock_has_is_incremental v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "unit_multiplier_ns" Pbrt.Pp.pp_int64 fmt v.unit_multiplier_ns; + if not (clock_snapshot_clock_has_unit_multiplier_ns v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_clock_snapshot fmt (v:clock_snapshot) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "clocks" (Pbrt.Pp.pp_list pp_clock_snapshot_clock) fmt v.clocks; + Pbrt.Pp.pp_record_field ~first:false "primary_trace_clock" pp_builtin_clock fmt v.primary_trace_clock; + if not (clock_snapshot_has_primary_trace_clock v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_cswitch_etw_event_old_thread_wait_reason fmt (v:cswitch_etw_event_old_thread_wait_reason) = + match v with + | Executive -> Format.fprintf fmt "Executive" + | Free_page -> Format.fprintf fmt "Free_page" + | Page_in -> Format.fprintf fmt "Page_in" + | Pool_allocation -> Format.fprintf fmt "Pool_allocation" + | Delay_execution -> Format.fprintf fmt "Delay_execution" + | Suspend -> Format.fprintf fmt "Suspend" + | User_request -> Format.fprintf fmt "User_request" + | Wr_executive -> Format.fprintf fmt "Wr_executive" + | Wr_free_page -> Format.fprintf fmt "Wr_free_page" + | Wr_page_in -> Format.fprintf fmt "Wr_page_in" + | Wr_pool_allocation -> Format.fprintf fmt "Wr_pool_allocation" + | Wr_delay_execution -> Format.fprintf fmt "Wr_delay_execution" + | Wr_suspended -> Format.fprintf fmt "Wr_suspended" + | Wr_user_request -> Format.fprintf fmt "Wr_user_request" + | Wr_event_pair -> Format.fprintf fmt "Wr_event_pair" + | Wr_queue -> Format.fprintf fmt "Wr_queue" + | Wr_lpc_receiver -> Format.fprintf fmt "Wr_lpc_receiver" + | Wr_lpc_reply -> Format.fprintf fmt "Wr_lpc_reply" + | Wr_virtual_memory -> Format.fprintf fmt "Wr_virtual_memory" + | Wr_page_out -> Format.fprintf fmt "Wr_page_out" + | Wr_rendez_vous -> Format.fprintf fmt "Wr_rendez_vous" + | Wr_keyed_event -> Format.fprintf fmt "Wr_keyed_event" + | Wr_terminated -> Format.fprintf fmt "Wr_terminated" + | Wr_process_in_swap -> Format.fprintf fmt "Wr_process_in_swap" + | Wr_cpu_rate_control -> Format.fprintf fmt "Wr_cpu_rate_control" + | Wr_callout_stack -> Format.fprintf fmt "Wr_callout_stack" + | Wr_kernel -> Format.fprintf fmt "Wr_kernel" + | Wr_resource -> Format.fprintf fmt "Wr_resource" + | Wr_push_lock -> Format.fprintf fmt "Wr_push_lock" + | Wr_mutex -> Format.fprintf fmt "Wr_mutex" + | Wr_quantum_end -> Format.fprintf fmt "Wr_quantum_end" + | Wr_dispatch_int -> Format.fprintf fmt "Wr_dispatch_int" + | Wr_preempted -> Format.fprintf fmt "Wr_preempted" + | Wr_yield_execution -> Format.fprintf fmt "Wr_yield_execution" + | Wr_fast_mutex -> Format.fprintf fmt "Wr_fast_mutex" + | Wr_guard_mutex -> Format.fprintf fmt "Wr_guard_mutex" + | Wr_rundown -> Format.fprintf fmt "Wr_rundown" + | Maximum_wait_reason -> Format.fprintf fmt "Maximum_wait_reason" + +let rec pp_cswitch_etw_event_old_thread_wait_mode fmt (v:cswitch_etw_event_old_thread_wait_mode) = + match v with + | Kernel_mode -> Format.fprintf fmt "Kernel_mode" + | User_mode -> Format.fprintf fmt "User_mode" + +let rec pp_cswitch_etw_event_old_thread_state fmt (v:cswitch_etw_event_old_thread_state) = + match v with + | Initialized -> Format.fprintf fmt "Initialized" + | Ready -> Format.fprintf fmt "Ready" + | Running -> Format.fprintf fmt "Running" + | Standby -> Format.fprintf fmt "Standby" + | Terminated -> Format.fprintf fmt "Terminated" + | Waiting -> Format.fprintf fmt "Waiting" + | Transition -> Format.fprintf fmt "Transition" + | Deferred_ready -> Format.fprintf fmt "Deferred_ready" + +let rec pp_cswitch_etw_event_old_thread_wait_reason_enum_or_int fmt (v:cswitch_etw_event_old_thread_wait_reason_enum_or_int) = + match v with + | Old_thread_wait_reason x -> Format.fprintf fmt "@[Old_thread_wait_reason(@,%a)@]" pp_cswitch_etw_event_old_thread_wait_reason x + | Old_thread_wait_reason_int x -> Format.fprintf fmt "@[Old_thread_wait_reason_int(@,%a)@]" Pbrt.Pp.pp_int32 x + +and pp_cswitch_etw_event_old_thread_wait_mode_enum_or_int fmt (v:cswitch_etw_event_old_thread_wait_mode_enum_or_int) = + match v with + | Old_thread_wait_mode x -> Format.fprintf fmt "@[Old_thread_wait_mode(@,%a)@]" pp_cswitch_etw_event_old_thread_wait_mode x + | Old_thread_wait_mode_int x -> Format.fprintf fmt "@[Old_thread_wait_mode_int(@,%a)@]" Pbrt.Pp.pp_int32 x + +and pp_cswitch_etw_event_old_thread_state_enum_or_int fmt (v:cswitch_etw_event_old_thread_state_enum_or_int) = + match v with + | Old_thread_state x -> Format.fprintf fmt "@[Old_thread_state(@,%a)@]" pp_cswitch_etw_event_old_thread_state x + | Old_thread_state_int x -> Format.fprintf fmt "@[Old_thread_state_int(@,%a)@]" Pbrt.Pp.pp_int32 x + +and pp_cswitch_etw_event fmt (v:cswitch_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "new_thread_id" Pbrt.Pp.pp_int32 fmt v.new_thread_id; + if not (cswitch_etw_event_has_new_thread_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "old_thread_id" Pbrt.Pp.pp_int32 fmt v.old_thread_id; + if not (cswitch_etw_event_has_old_thread_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "new_thread_priority" Pbrt.Pp.pp_int32 fmt v.new_thread_priority; + if not (cswitch_etw_event_has_new_thread_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "old_thread_priority" Pbrt.Pp.pp_int32 fmt v.old_thread_priority; + if not (cswitch_etw_event_has_old_thread_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "previous_c_state" Pbrt.Pp.pp_int32 fmt v.previous_c_state; + if not (cswitch_etw_event_has_previous_c_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "old_thread_wait_reason_enum_or_int" (Pbrt.Pp.pp_option pp_cswitch_etw_event_old_thread_wait_reason_enum_or_int) fmt v.old_thread_wait_reason_enum_or_int; + Pbrt.Pp.pp_record_field ~first:false "old_thread_wait_mode_enum_or_int" (Pbrt.Pp.pp_option pp_cswitch_etw_event_old_thread_wait_mode_enum_or_int) fmt v.old_thread_wait_mode_enum_or_int; + Pbrt.Pp.pp_record_field ~first:false "old_thread_state_enum_or_int" (Pbrt.Pp.pp_option pp_cswitch_etw_event_old_thread_state_enum_or_int) fmt v.old_thread_state_enum_or_int; + Pbrt.Pp.pp_record_field ~first:false "old_thread_wait_ideal_processor" Pbrt.Pp.pp_int32 fmt v.old_thread_wait_ideal_processor; + if not (cswitch_etw_event_has_old_thread_wait_ideal_processor v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "new_thread_wait_time" Pbrt.Pp.pp_int32 fmt v.new_thread_wait_time; + if not (cswitch_etw_event_has_new_thread_wait_time v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ready_thread_etw_event_adjust_reason fmt (v:ready_thread_etw_event_adjust_reason) = + match v with + | Ignore_the_increment -> Format.fprintf fmt "Ignore_the_increment" + | Apply_increment -> Format.fprintf fmt "Apply_increment" + | Apply_increment_boost -> Format.fprintf fmt "Apply_increment_boost" + +let rec pp_ready_thread_etw_event_trace_flag fmt (v:ready_thread_etw_event_trace_flag) = + match v with + | Trace_flag_unspecified -> Format.fprintf fmt "Trace_flag_unspecified" + | Thread_readied -> Format.fprintf fmt "Thread_readied" + | Kernel_stack_swapped_out -> Format.fprintf fmt "Kernel_stack_swapped_out" + | Process_address_swapped_out -> Format.fprintf fmt "Process_address_swapped_out" + +let rec pp_ready_thread_etw_event_adjust_reason_enum_or_int fmt (v:ready_thread_etw_event_adjust_reason_enum_or_int) = + match v with + | Adjust_reason x -> Format.fprintf fmt "@[Adjust_reason(@,%a)@]" pp_ready_thread_etw_event_adjust_reason x + | Adjust_reason_int x -> Format.fprintf fmt "@[Adjust_reason_int(@,%a)@]" Pbrt.Pp.pp_int32 x + +and pp_ready_thread_etw_event_flag_enum_or_int fmt (v:ready_thread_etw_event_flag_enum_or_int) = + match v with + | Flag x -> Format.fprintf fmt "@[Flag(@,%a)@]" pp_ready_thread_etw_event_trace_flag x + | Flag_int x -> Format.fprintf fmt "@[Flag_int(@,%a)@]" Pbrt.Pp.pp_int32 x + +and pp_ready_thread_etw_event fmt (v:ready_thread_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "t_thread_id" Pbrt.Pp.pp_int32 fmt v.t_thread_id; + if not (ready_thread_etw_event_has_t_thread_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "adjust_reason_enum_or_int" (Pbrt.Pp.pp_option pp_ready_thread_etw_event_adjust_reason_enum_or_int) fmt v.adjust_reason_enum_or_int; + Pbrt.Pp.pp_record_field ~first:false "adjust_increment" Pbrt.Pp.pp_int32 fmt v.adjust_increment; + if not (ready_thread_etw_event_has_adjust_increment v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flag_enum_or_int" (Pbrt.Pp.pp_option pp_ready_thread_etw_event_flag_enum_or_int) fmt v.flag_enum_or_int; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_mem_info_etw_event fmt (v:mem_info_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "priority_levels" Pbrt.Pp.pp_int32 fmt v.priority_levels; + if not (mem_info_etw_event_has_priority_levels v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "zero_page_count" Pbrt.Pp.pp_int64 fmt v.zero_page_count; + if not (mem_info_etw_event_has_zero_page_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "free_page_count" Pbrt.Pp.pp_int64 fmt v.free_page_count; + if not (mem_info_etw_event_has_free_page_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "modified_page_count" Pbrt.Pp.pp_int64 fmt v.modified_page_count; + if not (mem_info_etw_event_has_modified_page_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "modified_no_write_page_count" Pbrt.Pp.pp_int64 fmt v.modified_no_write_page_count; + if not (mem_info_etw_event_has_modified_no_write_page_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bad_page_count" Pbrt.Pp.pp_int64 fmt v.bad_page_count; + if not (mem_info_etw_event_has_bad_page_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "standby_page_counts" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.standby_page_counts; + Pbrt.Pp.pp_record_field ~first:false "repurposed_page_counts" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.repurposed_page_counts; + Pbrt.Pp.pp_record_field ~first:false "modified_page_count_page_file" Pbrt.Pp.pp_int64 fmt v.modified_page_count_page_file; + if not (mem_info_etw_event_has_modified_page_count_page_file v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "paged_pool_page_count" Pbrt.Pp.pp_int64 fmt v.paged_pool_page_count; + if not (mem_info_etw_event_has_paged_pool_page_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "non_paged_pool_page_count" Pbrt.Pp.pp_int64 fmt v.non_paged_pool_page_count; + if not (mem_info_etw_event_has_non_paged_pool_page_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "mdl_page_count" Pbrt.Pp.pp_int64 fmt v.mdl_page_count; + if not (mem_info_etw_event_has_mdl_page_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "commit_page_count" Pbrt.Pp.pp_int64 fmt v.commit_page_count; + if not (mem_info_etw_event_has_commit_page_count v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_file_io_create_etw_event fmt (v:file_io_create_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "irp_ptr" Pbrt.Pp.pp_int64 fmt v.irp_ptr; + if not (file_io_create_etw_event_has_irp_ptr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_object" Pbrt.Pp.pp_int64 fmt v.file_object; + if not (file_io_create_etw_event_has_file_object v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ttid" Pbrt.Pp.pp_int32 fmt v.ttid; + if not (file_io_create_etw_event_has_ttid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "create_options" Pbrt.Pp.pp_int32 fmt v.create_options; + if not (file_io_create_etw_event_has_create_options v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_attributes" Pbrt.Pp.pp_int32 fmt v.file_attributes; + if not (file_io_create_etw_event_has_file_attributes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "share_access" Pbrt.Pp.pp_int32 fmt v.share_access; + if not (file_io_create_etw_event_has_share_access v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "open_path" Pbrt.Pp.pp_string fmt v.open_path; + if not (file_io_create_etw_event_has_open_path v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_file_io_dir_enum_etw_event fmt (v:file_io_dir_enum_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "irp_ptr" Pbrt.Pp.pp_int64 fmt v.irp_ptr; + if not (file_io_dir_enum_etw_event_has_irp_ptr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_object" Pbrt.Pp.pp_int64 fmt v.file_object; + if not (file_io_dir_enum_etw_event_has_file_object v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_key" Pbrt.Pp.pp_int64 fmt v.file_key; + if not (file_io_dir_enum_etw_event_has_file_key v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ttid" Pbrt.Pp.pp_int32 fmt v.ttid; + if not (file_io_dir_enum_etw_event_has_ttid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "length" Pbrt.Pp.pp_int32 fmt v.length; + if not (file_io_dir_enum_etw_event_has_length v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "info_class" Pbrt.Pp.pp_int32 fmt v.info_class; + if not (file_io_dir_enum_etw_event_has_info_class v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_index" Pbrt.Pp.pp_int32 fmt v.file_index; + if not (file_io_dir_enum_etw_event_has_file_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_name" Pbrt.Pp.pp_string fmt v.file_name; + if not (file_io_dir_enum_etw_event_has_file_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_file_io_info_etw_event fmt (v:file_io_info_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "irp_ptr" Pbrt.Pp.pp_int64 fmt v.irp_ptr; + if not (file_io_info_etw_event_has_irp_ptr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_object" Pbrt.Pp.pp_int64 fmt v.file_object; + if not (file_io_info_etw_event_has_file_object v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_key" Pbrt.Pp.pp_int64 fmt v.file_key; + if not (file_io_info_etw_event_has_file_key v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "extra_info" Pbrt.Pp.pp_int64 fmt v.extra_info; + if not (file_io_info_etw_event_has_extra_info v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ttid" Pbrt.Pp.pp_int32 fmt v.ttid; + if not (file_io_info_etw_event_has_ttid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "info_class" Pbrt.Pp.pp_int32 fmt v.info_class; + if not (file_io_info_etw_event_has_info_class v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_file_io_read_write_etw_event fmt (v:file_io_read_write_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "offset" Pbrt.Pp.pp_int64 fmt v.offset; + if not (file_io_read_write_etw_event_has_offset v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "irp_ptr" Pbrt.Pp.pp_int64 fmt v.irp_ptr; + if not (file_io_read_write_etw_event_has_irp_ptr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_object" Pbrt.Pp.pp_int64 fmt v.file_object; + if not (file_io_read_write_etw_event_has_file_object v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_key" Pbrt.Pp.pp_int64 fmt v.file_key; + if not (file_io_read_write_etw_event_has_file_key v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ttid" Pbrt.Pp.pp_int32 fmt v.ttid; + if not (file_io_read_write_etw_event_has_ttid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "io_size" Pbrt.Pp.pp_int32 fmt v.io_size; + if not (file_io_read_write_etw_event_has_io_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "io_flags" Pbrt.Pp.pp_int32 fmt v.io_flags; + if not (file_io_read_write_etw_event_has_io_flags v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_file_io_simple_op_etw_event fmt (v:file_io_simple_op_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "irp_ptr" Pbrt.Pp.pp_int64 fmt v.irp_ptr; + if not (file_io_simple_op_etw_event_has_irp_ptr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_object" Pbrt.Pp.pp_int64 fmt v.file_object; + if not (file_io_simple_op_etw_event_has_file_object v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_key" Pbrt.Pp.pp_int64 fmt v.file_key; + if not (file_io_simple_op_etw_event_has_file_key v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ttid" Pbrt.Pp.pp_int32 fmt v.ttid; + if not (file_io_simple_op_etw_event_has_ttid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_file_io_op_end_etw_event fmt (v:file_io_op_end_etw_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "irp_ptr" Pbrt.Pp.pp_int64 fmt v.irp_ptr; + if not (file_io_op_end_etw_event_has_irp_ptr v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "extra_info" Pbrt.Pp.pp_int64 fmt v.extra_info; + if not (file_io_op_end_etw_event_has_extra_info v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "nt_status" Pbrt.Pp.pp_int32 fmt v.nt_status; + if not (file_io_op_end_etw_event_has_nt_status v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_etw_trace_event_event fmt (v:etw_trace_event_event) = + match v with + | C_switch x -> Format.fprintf fmt "@[C_switch(@,%a)@]" pp_cswitch_etw_event x + | Ready_thread x -> Format.fprintf fmt "@[Ready_thread(@,%a)@]" pp_ready_thread_etw_event x + | Mem_info x -> Format.fprintf fmt "@[Mem_info(@,%a)@]" pp_mem_info_etw_event x + | File_io_create x -> Format.fprintf fmt "@[File_io_create(@,%a)@]" pp_file_io_create_etw_event x + | File_io_dir_enum x -> Format.fprintf fmt "@[File_io_dir_enum(@,%a)@]" pp_file_io_dir_enum_etw_event x + | File_io_info x -> Format.fprintf fmt "@[File_io_info(@,%a)@]" pp_file_io_info_etw_event x + | File_io_read_write x -> Format.fprintf fmt "@[File_io_read_write(@,%a)@]" pp_file_io_read_write_etw_event x + | File_io_simple_op x -> Format.fprintf fmt "@[File_io_simple_op(@,%a)@]" pp_file_io_simple_op_etw_event x + | File_io_op_end x -> Format.fprintf fmt "@[File_io_op_end(@,%a)@]" pp_file_io_op_end_etw_event x + +and pp_etw_trace_event fmt (v:etw_trace_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "timestamp" Pbrt.Pp.pp_int64 fmt v.timestamp; + if not (etw_trace_event_has_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cpu" Pbrt.Pp.pp_int32 fmt v.cpu; + if not (etw_trace_event_has_cpu v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_id" Pbrt.Pp.pp_int32 fmt v.thread_id; + if not (etw_trace_event_has_thread_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "event" (Pbrt.Pp.pp_option pp_etw_trace_event_event) fmt v.event; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_etw_trace_event_bundle fmt (v:etw_trace_event_bundle) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cpu" Pbrt.Pp.pp_int32 fmt v.cpu; + if not (etw_trace_event_bundle_has_cpu v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "event" (Pbrt.Pp.pp_list pp_etw_trace_event) fmt v.event; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_evdev_event_input_event fmt (v:evdev_event_input_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "kernel_timestamp" Pbrt.Pp.pp_int64 fmt v.kernel_timestamp; + if not (evdev_event_input_event_has_kernel_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" Pbrt.Pp.pp_int32 fmt v.type_; + if not (evdev_event_input_event_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "code" Pbrt.Pp.pp_int32 fmt v.code; + if not (evdev_event_input_event_has_code v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_int32 fmt v.value; + if not (evdev_event_input_event_has_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_evdev_event_event fmt (v:evdev_event_event) = + match v with + | Input_event x -> Format.fprintf fmt "@[Input_event(@,%a)@]" pp_evdev_event_input_event x + +and pp_evdev_event fmt (v:evdev_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "device_id" Pbrt.Pp.pp_int32 fmt v.device_id; + if not (evdev_event_has_device_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "event" (Pbrt.Pp.pp_option pp_evdev_event_event) fmt v.event; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_field_descriptor_proto_label fmt (v:field_descriptor_proto_label) = + match v with + | Label_optional -> Format.fprintf fmt "Label_optional" + | Label_required -> Format.fprintf fmt "Label_required" + | Label_repeated -> Format.fprintf fmt "Label_repeated" + +let rec pp_field_descriptor_proto_type fmt (v:field_descriptor_proto_type) = + match v with + | Type_double -> Format.fprintf fmt "Type_double" + | Type_float -> Format.fprintf fmt "Type_float" + | Type_int64 -> Format.fprintf fmt "Type_int64" + | Type_uint64 -> Format.fprintf fmt "Type_uint64" + | Type_int32 -> Format.fprintf fmt "Type_int32" + | Type_fixed64 -> Format.fprintf fmt "Type_fixed64" + | Type_fixed32 -> Format.fprintf fmt "Type_fixed32" + | Type_bool -> Format.fprintf fmt "Type_bool" + | Type_string -> Format.fprintf fmt "Type_string" + | Type_group -> Format.fprintf fmt "Type_group" + | Type_message -> Format.fprintf fmt "Type_message" + | Type_bytes -> Format.fprintf fmt "Type_bytes" + | Type_uint32 -> Format.fprintf fmt "Type_uint32" + | Type_enum -> Format.fprintf fmt "Type_enum" + | Type_sfixed32 -> Format.fprintf fmt "Type_sfixed32" + | Type_sfixed64 -> Format.fprintf fmt "Type_sfixed64" + | Type_sint32 -> Format.fprintf fmt "Type_sint32" + | Type_sint64 -> Format.fprintf fmt "Type_sint64" + +let rec pp_uninterpreted_option_name_part fmt (v:uninterpreted_option_name_part) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name_part" Pbrt.Pp.pp_string fmt v.name_part; + if not (uninterpreted_option_name_part_has_name_part v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_extension" Pbrt.Pp.pp_bool fmt v.is_extension; + if not (uninterpreted_option_name_part_has_is_extension v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_uninterpreted_option fmt (v:uninterpreted_option) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" (Pbrt.Pp.pp_list pp_uninterpreted_option_name_part) fmt v.name; + Pbrt.Pp.pp_record_field ~first:false "identifier_value" Pbrt.Pp.pp_string fmt v.identifier_value; + if not (uninterpreted_option_has_identifier_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "positive_int_value" Pbrt.Pp.pp_int64 fmt v.positive_int_value; + if not (uninterpreted_option_has_positive_int_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "negative_int_value" Pbrt.Pp.pp_int64 fmt v.negative_int_value; + if not (uninterpreted_option_has_negative_int_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "double_value" Pbrt.Pp.pp_float fmt v.double_value; + if not (uninterpreted_option_has_double_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "string_value" Pbrt.Pp.pp_bytes fmt v.string_value; + if not (uninterpreted_option_has_string_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "aggregate_value" Pbrt.Pp.pp_string fmt v.aggregate_value; + if not (uninterpreted_option_has_aggregate_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_field_options fmt (v:field_options) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "packed" Pbrt.Pp.pp_bool fmt v.packed; + if not (field_options_has_packed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uninterpreted_option" (Pbrt.Pp.pp_list pp_uninterpreted_option) fmt v.uninterpreted_option; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_field_descriptor_proto fmt (v:field_descriptor_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (field_descriptor_proto_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "number" Pbrt.Pp.pp_int32 fmt v.number; + if not (field_descriptor_proto_has_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "label" pp_field_descriptor_proto_label fmt v.label; + if not (field_descriptor_proto_has_label v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" pp_field_descriptor_proto_type fmt v.type_; + if not (field_descriptor_proto_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_name" Pbrt.Pp.pp_string fmt v.type_name; + if not (field_descriptor_proto_has_type_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "extendee" Pbrt.Pp.pp_string fmt v.extendee; + if not (field_descriptor_proto_has_extendee v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "default_value" Pbrt.Pp.pp_string fmt v.default_value; + if not (field_descriptor_proto_has_default_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "options" (Pbrt.Pp.pp_option pp_field_options) fmt v.options; + Pbrt.Pp.pp_record_field ~first:false "oneof_index" Pbrt.Pp.pp_int32 fmt v.oneof_index; + if not (field_descriptor_proto_has_oneof_index v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_enum_value_descriptor_proto fmt (v:enum_value_descriptor_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (enum_value_descriptor_proto_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "number" Pbrt.Pp.pp_int32 fmt v.number; + if not (enum_value_descriptor_proto_has_number v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_enum_descriptor_proto fmt (v:enum_descriptor_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (enum_descriptor_proto_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" (Pbrt.Pp.pp_list pp_enum_value_descriptor_proto) fmt v.value; + Pbrt.Pp.pp_record_field ~first:false "reserved_name" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.reserved_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_oneof_options fmt (v:oneof_options) = + let pp_i fmt () = + Pbrt.Pp.pp_unit fmt () + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_oneof_descriptor_proto fmt (v:oneof_descriptor_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (oneof_descriptor_proto_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "options" Pbrt.Pp.pp_unit fmt v.options; + if not (oneof_descriptor_proto_has_options v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_descriptor_proto_reserved_range fmt (v:descriptor_proto_reserved_range) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "start" Pbrt.Pp.pp_int32 fmt v.start; + if not (descriptor_proto_reserved_range_has_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "end_" Pbrt.Pp.pp_int32 fmt v.end_; + if not (descriptor_proto_reserved_range_has_end_ v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_descriptor_proto fmt (v:descriptor_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (descriptor_proto_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "field" (Pbrt.Pp.pp_list pp_field_descriptor_proto) fmt v.field; + Pbrt.Pp.pp_record_field ~first:false "extension" (Pbrt.Pp.pp_list pp_field_descriptor_proto) fmt v.extension; + Pbrt.Pp.pp_record_field ~first:false "nested_type" (Pbrt.Pp.pp_list pp_descriptor_proto) fmt v.nested_type; + Pbrt.Pp.pp_record_field ~first:false "enum_type" (Pbrt.Pp.pp_list pp_enum_descriptor_proto) fmt v.enum_type; + Pbrt.Pp.pp_record_field ~first:false "oneof_decl" (Pbrt.Pp.pp_list pp_oneof_descriptor_proto) fmt v.oneof_decl; + Pbrt.Pp.pp_record_field ~first:false "reserved_range" (Pbrt.Pp.pp_list pp_descriptor_proto_reserved_range) fmt v.reserved_range; + Pbrt.Pp.pp_record_field ~first:false "reserved_name" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.reserved_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_file_descriptor_proto fmt (v:file_descriptor_proto) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (file_descriptor_proto_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "package" Pbrt.Pp.pp_string fmt v.package; + if not (file_descriptor_proto_has_package v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dependency" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.dependency; + Pbrt.Pp.pp_record_field ~first:false "public_dependency" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.public_dependency; + Pbrt.Pp.pp_record_field ~first:false "weak_dependency" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.weak_dependency; + Pbrt.Pp.pp_record_field ~first:false "message_type" (Pbrt.Pp.pp_list pp_descriptor_proto) fmt v.message_type; + Pbrt.Pp.pp_record_field ~first:false "enum_type" (Pbrt.Pp.pp_list pp_enum_descriptor_proto) fmt v.enum_type; + Pbrt.Pp.pp_record_field ~first:false "extension" (Pbrt.Pp.pp_list pp_field_descriptor_proto) fmt v.extension; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_file_descriptor_set fmt (v:file_descriptor_set) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "file" (Pbrt.Pp.pp_list pp_file_descriptor_proto) fmt v.file; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_extension_descriptor fmt (v:extension_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "extension_set" (Pbrt.Pp.pp_option pp_file_descriptor_set) fmt v.extension_set; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_inode_file_map_entry_type fmt (v:inode_file_map_entry_type) = + match v with + | Unknown -> Format.fprintf fmt "Unknown" + | File -> Format.fprintf fmt "File" + | Directory -> Format.fprintf fmt "Directory" + +let rec pp_inode_file_map_entry fmt (v:inode_file_map_entry) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "inode_number" Pbrt.Pp.pp_int64 fmt v.inode_number; + if not (inode_file_map_entry_has_inode_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "paths" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.paths; + Pbrt.Pp.pp_record_field ~first:false "type_" pp_inode_file_map_entry_type fmt v.type_; + if not (inode_file_map_entry_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_inode_file_map fmt (v:inode_file_map) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "block_device_id" Pbrt.Pp.pp_int64 fmt v.block_device_id; + if not (inode_file_map_has_block_device_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "mount_points" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.mount_points; + Pbrt.Pp.pp_record_field ~first:false "entries" (Pbrt.Pp.pp_list pp_inode_file_map_entry) fmt v.entries; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_generic_kernel_cpu_frequency_event fmt (v:generic_kernel_cpu_frequency_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cpu" Pbrt.Pp.pp_int32 fmt v.cpu; + if not (generic_kernel_cpu_frequency_event_has_cpu v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "freq_hz" Pbrt.Pp.pp_int64 fmt v.freq_hz; + if not (generic_kernel_cpu_frequency_event_has_freq_hz v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_generic_kernel_task_state_event_task_state_enum fmt (v:generic_kernel_task_state_event_task_state_enum) = + match v with + | Task_state_unknown -> Format.fprintf fmt "Task_state_unknown" + | Task_state_created -> Format.fprintf fmt "Task_state_created" + | Task_state_runnable -> Format.fprintf fmt "Task_state_runnable" + | Task_state_running -> Format.fprintf fmt "Task_state_running" + | Task_state_interruptible_sleep -> Format.fprintf fmt "Task_state_interruptible_sleep" + | Task_state_uninterruptible_sleep -> Format.fprintf fmt "Task_state_uninterruptible_sleep" + | Task_state_stopped -> Format.fprintf fmt "Task_state_stopped" + | Task_state_dead -> Format.fprintf fmt "Task_state_dead" + | Task_state_destroyed -> Format.fprintf fmt "Task_state_destroyed" + +let rec pp_generic_kernel_task_state_event fmt (v:generic_kernel_task_state_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cpu" Pbrt.Pp.pp_int32 fmt v.cpu; + if not (generic_kernel_task_state_event_has_cpu v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "comm" Pbrt.Pp.pp_string fmt v.comm; + if not (generic_kernel_task_state_event_has_comm v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int64 fmt v.tid; + if not (generic_kernel_task_state_event_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "state" pp_generic_kernel_task_state_event_task_state_enum fmt v.state; + if not (generic_kernel_task_state_event_has_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prio" Pbrt.Pp.pp_int32 fmt v.prio; + if not (generic_kernel_task_state_event_has_prio v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_generic_kernel_task_rename_event fmt (v:generic_kernel_task_rename_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "tid" Pbrt.Pp.pp_int64 fmt v.tid; + if not (generic_kernel_task_rename_event_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "comm" Pbrt.Pp.pp_string fmt v.comm; + if not (generic_kernel_task_rename_event_has_comm v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_generic_kernel_process_tree_thread fmt (v:generic_kernel_process_tree_thread) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "tid" Pbrt.Pp.pp_int64 fmt v.tid; + if not (generic_kernel_process_tree_thread_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int64 fmt v.pid; + if not (generic_kernel_process_tree_thread_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "comm" Pbrt.Pp.pp_string fmt v.comm; + if not (generic_kernel_process_tree_thread_has_comm v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_main_thread" Pbrt.Pp.pp_bool fmt v.is_main_thread; + if not (generic_kernel_process_tree_thread_has_is_main_thread v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_generic_kernel_process_tree_process fmt (v:generic_kernel_process_tree_process) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int64 fmt v.pid; + if not (generic_kernel_process_tree_process_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ppid" Pbrt.Pp.pp_int64 fmt v.ppid; + if not (generic_kernel_process_tree_process_has_ppid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cmdline" Pbrt.Pp.pp_string fmt v.cmdline; + if not (generic_kernel_process_tree_process_has_cmdline v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_generic_kernel_process_tree fmt (v:generic_kernel_process_tree) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "processes" (Pbrt.Pp.pp_list pp_generic_kernel_process_tree_process) fmt v.processes; + Pbrt.Pp.pp_record_field ~first:false "threads" (Pbrt.Pp.pp_list pp_generic_kernel_process_tree_thread) fmt v.threads; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_counter_event_gpu_counter_value fmt (v:gpu_counter_event_gpu_counter_value) = + match v with + | Int_value x -> Format.fprintf fmt "@[Int_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Double_value x -> Format.fprintf fmt "@[Double_value(@,%a)@]" Pbrt.Pp.pp_float x + +and pp_gpu_counter_event_gpu_counter fmt (v:gpu_counter_event_gpu_counter) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "counter_id" Pbrt.Pp.pp_int32 fmt v.counter_id; + if not (gpu_counter_event_gpu_counter_has_counter_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" (Pbrt.Pp.pp_option pp_gpu_counter_event_gpu_counter_value) fmt v.value; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_counter_event fmt (v:gpu_counter_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "counter_descriptor" (Pbrt.Pp.pp_option pp_gpu_counter_descriptor) fmt v.counter_descriptor; + Pbrt.Pp.pp_record_field ~first:false "counters" (Pbrt.Pp.pp_list pp_gpu_counter_event_gpu_counter) fmt v.counters; + Pbrt.Pp.pp_record_field ~first:false "gpu_id" Pbrt.Pp.pp_int32 fmt v.gpu_id; + if not (gpu_counter_event_has_gpu_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_log_severity fmt (v:gpu_log_severity) = + match v with + | Log_severity_unspecified -> Format.fprintf fmt "Log_severity_unspecified" + | Log_severity_verbose -> Format.fprintf fmt "Log_severity_verbose" + | Log_severity_debug -> Format.fprintf fmt "Log_severity_debug" + | Log_severity_info -> Format.fprintf fmt "Log_severity_info" + | Log_severity_warning -> Format.fprintf fmt "Log_severity_warning" + | Log_severity_error -> Format.fprintf fmt "Log_severity_error" + +let rec pp_gpu_log fmt (v:gpu_log) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "severity" pp_gpu_log_severity fmt v.severity; + if not (gpu_log_has_severity v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tag" Pbrt.Pp.pp_string fmt v.tag; + if not (gpu_log_has_tag v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "log_message" Pbrt.Pp.pp_string fmt v.log_message; + if not (gpu_log_has_log_message v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_render_stage_event_extra_data fmt (v:gpu_render_stage_event_extra_data) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (gpu_render_stage_event_extra_data_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_string fmt v.value; + if not (gpu_render_stage_event_extra_data_has_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_render_stage_event_specifications_context_spec fmt (v:gpu_render_stage_event_specifications_context_spec) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "context" Pbrt.Pp.pp_int64 fmt v.context; + if not (gpu_render_stage_event_specifications_context_spec_has_context v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (gpu_render_stage_event_specifications_context_spec_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_render_stage_event_specifications_description fmt (v:gpu_render_stage_event_specifications_description) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (gpu_render_stage_event_specifications_description_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "description" Pbrt.Pp.pp_string fmt v.description; + if not (gpu_render_stage_event_specifications_description_has_description v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_render_stage_event_specifications fmt (v:gpu_render_stage_event_specifications) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "context_spec" (Pbrt.Pp.pp_option pp_gpu_render_stage_event_specifications_context_spec) fmt v.context_spec; + Pbrt.Pp.pp_record_field ~first:false "hw_queue" (Pbrt.Pp.pp_list pp_gpu_render_stage_event_specifications_description) fmt v.hw_queue; + Pbrt.Pp.pp_record_field ~first:false "stage" (Pbrt.Pp.pp_list pp_gpu_render_stage_event_specifications_description) fmt v.stage; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_gpu_render_stage_event fmt (v:gpu_render_stage_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "event_id" Pbrt.Pp.pp_int64 fmt v.event_id; + if not (gpu_render_stage_event_has_event_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "duration" Pbrt.Pp.pp_int64 fmt v.duration; + if not (gpu_render_stage_event_has_duration v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "hw_queue_iid" Pbrt.Pp.pp_int64 fmt v.hw_queue_iid; + if not (gpu_render_stage_event_has_hw_queue_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "stage_iid" Pbrt.Pp.pp_int64 fmt v.stage_iid; + if not (gpu_render_stage_event_has_stage_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "gpu_id" Pbrt.Pp.pp_int32 fmt v.gpu_id; + if not (gpu_render_stage_event_has_gpu_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "context" Pbrt.Pp.pp_int64 fmt v.context; + if not (gpu_render_stage_event_has_context v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "render_target_handle" Pbrt.Pp.pp_int64 fmt v.render_target_handle; + if not (gpu_render_stage_event_has_render_target_handle v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "submission_id" Pbrt.Pp.pp_int32 fmt v.submission_id; + if not (gpu_render_stage_event_has_submission_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "extra_data" (Pbrt.Pp.pp_list pp_gpu_render_stage_event_extra_data) fmt v.extra_data; + Pbrt.Pp.pp_record_field ~first:false "render_pass_handle" Pbrt.Pp.pp_int64 fmt v.render_pass_handle; + if not (gpu_render_stage_event_has_render_pass_handle v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "render_pass_instance_id" Pbrt.Pp.pp_int64 fmt v.render_pass_instance_id; + if not (gpu_render_stage_event_has_render_pass_instance_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "render_subpass_index_mask" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.render_subpass_index_mask; + Pbrt.Pp.pp_record_field ~first:false "command_buffer_handle" Pbrt.Pp.pp_int64 fmt v.command_buffer_handle; + if not (gpu_render_stage_event_has_command_buffer_handle v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "specifications" (Pbrt.Pp.pp_option pp_gpu_render_stage_event_specifications) fmt v.specifications; + Pbrt.Pp.pp_record_field ~first:false "hw_queue_id" Pbrt.Pp.pp_int32 fmt v.hw_queue_id; + if not (gpu_render_stage_event_has_hw_queue_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "stage_id" Pbrt.Pp.pp_int32 fmt v.stage_id; + if not (gpu_render_stage_event_has_stage_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_graphics_context_api fmt (v:interned_graphics_context_api) = + match v with + | Undefined -> Format.fprintf fmt "Undefined" + | Open_gl -> Format.fprintf fmt "Open_gl" + | Vulkan -> Format.fprintf fmt "Vulkan" + | Open_cl -> Format.fprintf fmt "Open_cl" + +let rec pp_interned_graphics_context fmt (v:interned_graphics_context) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (interned_graphics_context_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (interned_graphics_context_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "api" pp_interned_graphics_context_api fmt v.api; + if not (interned_graphics_context_has_api v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_gpu_render_stage_specification_render_stage_category fmt (v:interned_gpu_render_stage_specification_render_stage_category) = + match v with + | Other -> Format.fprintf fmt "Other" + | Graphics -> Format.fprintf fmt "Graphics" + | Compute -> Format.fprintf fmt "Compute" + +let rec pp_interned_gpu_render_stage_specification fmt (v:interned_gpu_render_stage_specification) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (interned_gpu_render_stage_specification_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (interned_gpu_render_stage_specification_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "description" Pbrt.Pp.pp_string fmt v.description; + if not (interned_gpu_render_stage_specification_has_description v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "category" pp_interned_gpu_render_stage_specification_render_stage_category fmt v.category; + if not (interned_gpu_render_stage_specification_has_category v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_vulkan_api_event_vk_debug_utils_object_name fmt (v:vulkan_api_event_vk_debug_utils_object_name) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (vulkan_api_event_vk_debug_utils_object_name_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vk_device" Pbrt.Pp.pp_int64 fmt v.vk_device; + if not (vulkan_api_event_vk_debug_utils_object_name_has_vk_device v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "object_type" Pbrt.Pp.pp_int32 fmt v.object_type; + if not (vulkan_api_event_vk_debug_utils_object_name_has_object_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "object_" Pbrt.Pp.pp_int64 fmt v.object_; + if not (vulkan_api_event_vk_debug_utils_object_name_has_object_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "object_name" Pbrt.Pp.pp_string fmt v.object_name; + if not (vulkan_api_event_vk_debug_utils_object_name_has_object_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_vulkan_api_event_vk_queue_submit fmt (v:vulkan_api_event_vk_queue_submit) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "duration_ns" Pbrt.Pp.pp_int64 fmt v.duration_ns; + if not (vulkan_api_event_vk_queue_submit_has_duration_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (vulkan_api_event_vk_queue_submit_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (vulkan_api_event_vk_queue_submit_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vk_queue" Pbrt.Pp.pp_int64 fmt v.vk_queue; + if not (vulkan_api_event_vk_queue_submit_has_vk_queue v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vk_command_buffers" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.vk_command_buffers; + Pbrt.Pp.pp_record_field ~first:false "submission_id" Pbrt.Pp.pp_int32 fmt v.submission_id; + if not (vulkan_api_event_vk_queue_submit_has_submission_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_vulkan_api_event fmt (v:vulkan_api_event) = + match v with + | Vk_debug_utils_object_name x -> Format.fprintf fmt "@[Vk_debug_utils_object_name(@,%a)@]" pp_vulkan_api_event_vk_debug_utils_object_name x + | Vk_queue_submit x -> Format.fprintf fmt "@[Vk_queue_submit(@,%a)@]" pp_vulkan_api_event_vk_queue_submit x + +let rec pp_vulkan_memory_event_annotation_value fmt (v:vulkan_memory_event_annotation_value) = + match v with + | Int_value x -> Format.fprintf fmt "@[Int_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Double_value x -> Format.fprintf fmt "@[Double_value(@,%a)@]" Pbrt.Pp.pp_float x + | String_iid x -> Format.fprintf fmt "@[String_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_vulkan_memory_event_annotation fmt (v:vulkan_memory_event_annotation) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "key_iid" Pbrt.Pp.pp_int64 fmt v.key_iid; + if not (vulkan_memory_event_annotation_has_key_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" (Pbrt.Pp.pp_option pp_vulkan_memory_event_annotation_value) fmt v.value; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_vulkan_memory_event_source fmt (v:vulkan_memory_event_source) = + match v with + | Source_unspecified -> Format.fprintf fmt "Source_unspecified" + | Source_driver -> Format.fprintf fmt "Source_driver" + | Source_device -> Format.fprintf fmt "Source_device" + | Source_device_memory -> Format.fprintf fmt "Source_device_memory" + | Source_buffer -> Format.fprintf fmt "Source_buffer" + | Source_image -> Format.fprintf fmt "Source_image" + +let rec pp_vulkan_memory_event_operation fmt (v:vulkan_memory_event_operation) = + match v with + | Op_unspecified -> Format.fprintf fmt "Op_unspecified" + | Op_create -> Format.fprintf fmt "Op_create" + | Op_destroy -> Format.fprintf fmt "Op_destroy" + | Op_bind -> Format.fprintf fmt "Op_bind" + | Op_destroy_bound -> Format.fprintf fmt "Op_destroy_bound" + | Op_annotations -> Format.fprintf fmt "Op_annotations" + +let rec pp_vulkan_memory_event_allocation_scope fmt (v:vulkan_memory_event_allocation_scope) = + match v with + | Scope_unspecified -> Format.fprintf fmt "Scope_unspecified" + | Scope_command -> Format.fprintf fmt "Scope_command" + | Scope_object -> Format.fprintf fmt "Scope_object" + | Scope_cache -> Format.fprintf fmt "Scope_cache" + | Scope_device -> Format.fprintf fmt "Scope_device" + | Scope_instance -> Format.fprintf fmt "Scope_instance" + +let rec pp_vulkan_memory_event fmt (v:vulkan_memory_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "source" pp_vulkan_memory_event_source fmt v.source; + if not (vulkan_memory_event_has_source v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "operation" pp_vulkan_memory_event_operation fmt v.operation; + if not (vulkan_memory_event_has_operation v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp" Pbrt.Pp.pp_int64 fmt v.timestamp; + if not (vulkan_memory_event_has_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (vulkan_memory_event_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "memory_address" Pbrt.Pp.pp_int64 fmt v.memory_address; + if not (vulkan_memory_event_has_memory_address v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "memory_size" Pbrt.Pp.pp_int64 fmt v.memory_size; + if not (vulkan_memory_event_has_memory_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "caller_iid" Pbrt.Pp.pp_int64 fmt v.caller_iid; + if not (vulkan_memory_event_has_caller_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "allocation_scope" pp_vulkan_memory_event_allocation_scope fmt v.allocation_scope; + if not (vulkan_memory_event_has_allocation_scope v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "annotations" (Pbrt.Pp.pp_list pp_vulkan_memory_event_annotation) fmt v.annotations; + Pbrt.Pp.pp_record_field ~first:false "device" Pbrt.Pp.pp_int64 fmt v.device; + if not (vulkan_memory_event_has_device v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "device_memory" Pbrt.Pp.pp_int64 fmt v.device_memory; + if not (vulkan_memory_event_has_device_memory v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "memory_type" Pbrt.Pp.pp_int32 fmt v.memory_type; + if not (vulkan_memory_event_has_memory_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "heap" Pbrt.Pp.pp_int32 fmt v.heap; + if not (vulkan_memory_event_has_heap v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "object_handle" Pbrt.Pp.pp_int64 fmt v.object_handle; + if not (vulkan_memory_event_has_object_handle v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_string fmt (v:interned_string) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (interned_string_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "str" Pbrt.Pp.pp_bytes fmt v.str; + if not (interned_string_has_str v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_line fmt (v:line) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "function_name" Pbrt.Pp.pp_string fmt v.function_name; + if not (line_has_function_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "source_file_name" Pbrt.Pp.pp_string fmt v.source_file_name; + if not (line_has_source_file_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "line_number" Pbrt.Pp.pp_int32 fmt v.line_number; + if not (line_has_line_number v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_address_symbols fmt (v:address_symbols) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "address" Pbrt.Pp.pp_int64 fmt v.address; + if not (address_symbols_has_address v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "lines" (Pbrt.Pp.pp_list pp_line) fmt v.lines; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_module_symbols fmt (v:module_symbols) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "path" Pbrt.Pp.pp_string fmt v.path; + if not (module_symbols_has_path v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "build_id" Pbrt.Pp.pp_string fmt v.build_id; + if not (module_symbols_has_build_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "address_symbols" (Pbrt.Pp.pp_list pp_address_symbols) fmt v.address_symbols; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_mapping fmt (v:mapping) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (mapping_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "build_id" Pbrt.Pp.pp_int64 fmt v.build_id; + if not (mapping_has_build_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "exact_offset" Pbrt.Pp.pp_int64 fmt v.exact_offset; + if not (mapping_has_exact_offset v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start_offset" Pbrt.Pp.pp_int64 fmt v.start_offset; + if not (mapping_has_start_offset v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start" Pbrt.Pp.pp_int64 fmt v.start; + if not (mapping_has_start v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "end_" Pbrt.Pp.pp_int64 fmt v.end_; + if not (mapping_has_end_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "load_bias" Pbrt.Pp.pp_int64 fmt v.load_bias; + if not (mapping_has_load_bias v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "path_string_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.path_string_ids; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_frame fmt (v:frame) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (frame_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "function_name_id" Pbrt.Pp.pp_int64 fmt v.function_name_id; + if not (frame_has_function_name_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "mapping_id" Pbrt.Pp.pp_int64 fmt v.mapping_id; + if not (frame_has_mapping_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rel_pc" Pbrt.Pp.pp_int64 fmt v.rel_pc; + if not (frame_has_rel_pc v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "source_path_iid" Pbrt.Pp.pp_int64 fmt v.source_path_iid; + if not (frame_has_source_path_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "line_number" Pbrt.Pp.pp_int32 fmt v.line_number; + if not (frame_has_line_number v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_callstack fmt (v:callstack) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (callstack_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.frame_ids; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_histogram_name fmt (v:histogram_name) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (histogram_name_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (histogram_name_has_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_histogram_sample fmt (v:chrome_histogram_sample) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name_hash" Pbrt.Pp.pp_int64 fmt v.name_hash; + if not (chrome_histogram_sample_has_name_hash v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (chrome_histogram_sample_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "sample" Pbrt.Pp.pp_int64 fmt v.sample; + if not (chrome_histogram_sample_has_sample v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name_iid" Pbrt.Pp.pp_int64 fmt v.name_iid; + if not (chrome_histogram_sample_has_name_iid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_debug_annotation_nested_value_nested_type fmt (v:debug_annotation_nested_value_nested_type) = + match v with + | Unspecified -> Format.fprintf fmt "Unspecified" + | Dict -> Format.fprintf fmt "Dict" + | Array -> Format.fprintf fmt "Array" + +let rec pp_debug_annotation_nested_value fmt (v:debug_annotation_nested_value) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "nested_type" pp_debug_annotation_nested_value_nested_type fmt v.nested_type; + if not (debug_annotation_nested_value_has_nested_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dict_keys" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.dict_keys; + Pbrt.Pp.pp_record_field ~first:false "dict_values" (Pbrt.Pp.pp_list pp_debug_annotation_nested_value) fmt v.dict_values; + Pbrt.Pp.pp_record_field ~first:false "array_values" (Pbrt.Pp.pp_list pp_debug_annotation_nested_value) fmt v.array_values; + Pbrt.Pp.pp_record_field ~first:false "int_value" Pbrt.Pp.pp_int64 fmt v.int_value; + if not (debug_annotation_nested_value_has_int_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "double_value" Pbrt.Pp.pp_float fmt v.double_value; + if not (debug_annotation_nested_value_has_double_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bool_value" Pbrt.Pp.pp_bool fmt v.bool_value; + if not (debug_annotation_nested_value_has_bool_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "string_value" Pbrt.Pp.pp_string fmt v.string_value; + if not (debug_annotation_nested_value_has_string_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_debug_annotation_name_field fmt (v:debug_annotation_name_field) = + match v with + | Name_iid x -> Format.fprintf fmt "@[Name_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + | Name x -> Format.fprintf fmt "@[Name(@,%a)@]" Pbrt.Pp.pp_string x + +and pp_debug_annotation_value fmt (v:debug_annotation_value) = + match v with + | Bool_value x -> Format.fprintf fmt "@[Bool_value(@,%a)@]" Pbrt.Pp.pp_bool x + | Uint_value x -> Format.fprintf fmt "@[Uint_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Int_value x -> Format.fprintf fmt "@[Int_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Double_value x -> Format.fprintf fmt "@[Double_value(@,%a)@]" Pbrt.Pp.pp_float x + | Pointer_value x -> Format.fprintf fmt "@[Pointer_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Nested_value x -> Format.fprintf fmt "@[Nested_value(@,%a)@]" pp_debug_annotation_nested_value x + | Legacy_json_value x -> Format.fprintf fmt "@[Legacy_json_value(@,%a)@]" Pbrt.Pp.pp_string x + | String_value x -> Format.fprintf fmt "@[String_value(@,%a)@]" Pbrt.Pp.pp_string x + | String_value_iid x -> Format.fprintf fmt "@[String_value_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_debug_annotation_proto_type_descriptor fmt (v:debug_annotation_proto_type_descriptor) = + match v with + | Proto_type_name x -> Format.fprintf fmt "@[Proto_type_name(@,%a)@]" Pbrt.Pp.pp_string x + | Proto_type_name_iid x -> Format.fprintf fmt "@[Proto_type_name_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_debug_annotation fmt (v:debug_annotation) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name_field" (Pbrt.Pp.pp_option pp_debug_annotation_name_field) fmt v.name_field; + Pbrt.Pp.pp_record_field ~first:false "value" (Pbrt.Pp.pp_option pp_debug_annotation_value) fmt v.value; + Pbrt.Pp.pp_record_field ~first:false "proto_type_descriptor" (Pbrt.Pp.pp_option pp_debug_annotation_proto_type_descriptor) fmt v.proto_type_descriptor; + Pbrt.Pp.pp_record_field ~first:false "proto_value" Pbrt.Pp.pp_bytes fmt v.proto_value; + if not (debug_annotation_has_proto_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dict_entries" (Pbrt.Pp.pp_list pp_debug_annotation) fmt v.dict_entries; + Pbrt.Pp.pp_record_field ~first:false "array_values" (Pbrt.Pp.pp_list pp_debug_annotation) fmt v.array_values; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_debug_annotation_name fmt (v:debug_annotation_name) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (debug_annotation_name_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (debug_annotation_name_has_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_debug_annotation_value_type_name fmt (v:debug_annotation_value_type_name) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (debug_annotation_value_type_name_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (debug_annotation_value_type_name_has_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_log_message_priority fmt (v:log_message_priority) = + match v with + | Prio_unspecified -> Format.fprintf fmt "Prio_unspecified" + | Prio_unused -> Format.fprintf fmt "Prio_unused" + | Prio_verbose -> Format.fprintf fmt "Prio_verbose" + | Prio_debug -> Format.fprintf fmt "Prio_debug" + | Prio_info -> Format.fprintf fmt "Prio_info" + | Prio_warn -> Format.fprintf fmt "Prio_warn" + | Prio_error -> Format.fprintf fmt "Prio_error" + | Prio_fatal -> Format.fprintf fmt "Prio_fatal" + +let rec pp_log_message fmt (v:log_message) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "source_location_iid" Pbrt.Pp.pp_int64 fmt v.source_location_iid; + if not (log_message_has_source_location_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "body_iid" Pbrt.Pp.pp_int64 fmt v.body_iid; + if not (log_message_has_body_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prio" pp_log_message_priority fmt v.prio; + if not (log_message_has_prio v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_log_message_body fmt (v:log_message_body) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (log_message_body_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "body" Pbrt.Pp.pp_string fmt v.body; + if not (log_message_body_has_body v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_unsymbolized_source_location fmt (v:unsymbolized_source_location) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (unsymbolized_source_location_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "mapping_id" Pbrt.Pp.pp_int64 fmt v.mapping_id; + if not (unsymbolized_source_location_has_mapping_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rel_pc" Pbrt.Pp.pp_int64 fmt v.rel_pc; + if not (unsymbolized_source_location_has_rel_pc v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_source_location fmt (v:source_location) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (source_location_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_name" Pbrt.Pp.pp_string fmt v.file_name; + if not (source_location_has_file_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "function_name" Pbrt.Pp.pp_string fmt v.function_name; + if not (source_location_has_function_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "line_number" Pbrt.Pp.pp_int32 fmt v.line_number; + if not (source_location_has_line_number v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_active_processes fmt (v:chrome_active_processes) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.pid; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_application_state_info_chrome_application_state fmt (v:chrome_application_state_info_chrome_application_state) = + match v with + | Application_state_unknown -> Format.fprintf fmt "Application_state_unknown" + | Application_state_has_running_activities -> Format.fprintf fmt "Application_state_has_running_activities" + | Application_state_has_paused_activities -> Format.fprintf fmt "Application_state_has_paused_activities" + | Application_state_has_stopped_activities -> Format.fprintf fmt "Application_state_has_stopped_activities" + | Application_state_has_destroyed_activities -> Format.fprintf fmt "Application_state_has_destroyed_activities" + +let rec pp_chrome_application_state_info fmt (v:chrome_application_state_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "application_state" pp_chrome_application_state_info_chrome_application_state fmt v.application_state; + if not (chrome_application_state_info_has_application_state v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_compositor_scheduler_action fmt (v:chrome_compositor_scheduler_action) = + match v with + | Cc_scheduler_action_unspecified -> Format.fprintf fmt "Cc_scheduler_action_unspecified" + | Cc_scheduler_action_none -> Format.fprintf fmt "Cc_scheduler_action_none" + | Cc_scheduler_action_send_begin_main_frame -> Format.fprintf fmt "Cc_scheduler_action_send_begin_main_frame" + | Cc_scheduler_action_commit -> Format.fprintf fmt "Cc_scheduler_action_commit" + | Cc_scheduler_action_activate_sync_tree -> Format.fprintf fmt "Cc_scheduler_action_activate_sync_tree" + | Cc_scheduler_action_draw_if_possible -> Format.fprintf fmt "Cc_scheduler_action_draw_if_possible" + | Cc_scheduler_action_draw_forced -> Format.fprintf fmt "Cc_scheduler_action_draw_forced" + | Cc_scheduler_action_draw_abort -> Format.fprintf fmt "Cc_scheduler_action_draw_abort" + | Cc_scheduler_action_begin_layer_tree_frame_sink_creation -> Format.fprintf fmt "Cc_scheduler_action_begin_layer_tree_frame_sink_creation" + | Cc_scheduler_action_prepare_tiles -> Format.fprintf fmt "Cc_scheduler_action_prepare_tiles" + | Cc_scheduler_action_invalidate_layer_tree_frame_sink -> Format.fprintf fmt "Cc_scheduler_action_invalidate_layer_tree_frame_sink" + | Cc_scheduler_action_perform_impl_side_invalidation -> Format.fprintf fmt "Cc_scheduler_action_perform_impl_side_invalidation" + | Cc_scheduler_action_notify_begin_main_frame_not_expected_until -> Format.fprintf fmt "Cc_scheduler_action_notify_begin_main_frame_not_expected_until" + | Cc_scheduler_action_notify_begin_main_frame_not_expected_soon -> Format.fprintf fmt "Cc_scheduler_action_notify_begin_main_frame_not_expected_soon" + +let rec pp_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode fmt (v:chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode) = + match v with + | Deadline_mode_unspecified -> Format.fprintf fmt "Deadline_mode_unspecified" + | Deadline_mode_none -> Format.fprintf fmt "Deadline_mode_none" + | Deadline_mode_immediate -> Format.fprintf fmt "Deadline_mode_immediate" + | Deadline_mode_regular -> Format.fprintf fmt "Deadline_mode_regular" + | Deadline_mode_late -> Format.fprintf fmt "Deadline_mode_late" + | Deadline_mode_blocked -> Format.fprintf fmt "Deadline_mode_blocked" + +let rec pp_chrome_compositor_state_machine_major_state_begin_impl_frame_state fmt (v:chrome_compositor_state_machine_major_state_begin_impl_frame_state) = + match v with + | Begin_impl_frame_unspecified -> Format.fprintf fmt "Begin_impl_frame_unspecified" + | Begin_impl_frame_idle -> Format.fprintf fmt "Begin_impl_frame_idle" + | Begin_impl_frame_inside_begin_frame -> Format.fprintf fmt "Begin_impl_frame_inside_begin_frame" + | Begin_impl_frame_inside_deadline -> Format.fprintf fmt "Begin_impl_frame_inside_deadline" + +let rec pp_chrome_compositor_state_machine_major_state_begin_main_frame_state fmt (v:chrome_compositor_state_machine_major_state_begin_main_frame_state) = + match v with + | Begin_main_frame_unspecified -> Format.fprintf fmt "Begin_main_frame_unspecified" + | Begin_main_frame_idle -> Format.fprintf fmt "Begin_main_frame_idle" + | Begin_main_frame_sent -> Format.fprintf fmt "Begin_main_frame_sent" + | Begin_main_frame_ready_to_commit -> Format.fprintf fmt "Begin_main_frame_ready_to_commit" + +let rec pp_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state fmt (v:chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state) = + match v with + | Layer_tree_frame_unspecified -> Format.fprintf fmt "Layer_tree_frame_unspecified" + | Layer_tree_frame_none -> Format.fprintf fmt "Layer_tree_frame_none" + | Layer_tree_frame_active -> Format.fprintf fmt "Layer_tree_frame_active" + | Layer_tree_frame_creating -> Format.fprintf fmt "Layer_tree_frame_creating" + | Layer_tree_frame_waiting_for_first_commit -> Format.fprintf fmt "Layer_tree_frame_waiting_for_first_commit" + | Layer_tree_frame_waiting_for_first_activation -> Format.fprintf fmt "Layer_tree_frame_waiting_for_first_activation" + +let rec pp_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state fmt (v:chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state) = + match v with + | Forced_redraw_unspecified -> Format.fprintf fmt "Forced_redraw_unspecified" + | Forced_redraw_idle -> Format.fprintf fmt "Forced_redraw_idle" + | Forced_redraw_waiting_for_commit -> Format.fprintf fmt "Forced_redraw_waiting_for_commit" + | Forced_redraw_waiting_for_activation -> Format.fprintf fmt "Forced_redraw_waiting_for_activation" + | Forced_redraw_waiting_for_draw -> Format.fprintf fmt "Forced_redraw_waiting_for_draw" + +let rec pp_chrome_compositor_state_machine_major_state fmt (v:chrome_compositor_state_machine_major_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "next_action" pp_chrome_compositor_scheduler_action fmt v.next_action; + if not (chrome_compositor_state_machine_major_state_has_next_action v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "begin_impl_frame_state" pp_chrome_compositor_state_machine_major_state_begin_impl_frame_state fmt v.begin_impl_frame_state; + if not (chrome_compositor_state_machine_major_state_has_begin_impl_frame_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "begin_main_frame_state" pp_chrome_compositor_state_machine_major_state_begin_main_frame_state fmt v.begin_main_frame_state; + if not (chrome_compositor_state_machine_major_state_has_begin_main_frame_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_tree_frame_sink_state" pp_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state fmt v.layer_tree_frame_sink_state; + if not (chrome_compositor_state_machine_major_state_has_layer_tree_frame_sink_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "forced_redraw_state" pp_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state fmt v.forced_redraw_state; + if not (chrome_compositor_state_machine_major_state_has_forced_redraw_state v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_compositor_state_machine_minor_state_tree_priority fmt (v:chrome_compositor_state_machine_minor_state_tree_priority) = + match v with + | Tree_priority_unspecified -> Format.fprintf fmt "Tree_priority_unspecified" + | Tree_priority_same_priority_for_both_trees -> Format.fprintf fmt "Tree_priority_same_priority_for_both_trees" + | Tree_priority_smoothness_takes_priority -> Format.fprintf fmt "Tree_priority_smoothness_takes_priority" + | Tree_priority_new_content_takes_priority -> Format.fprintf fmt "Tree_priority_new_content_takes_priority" + +let rec pp_chrome_compositor_state_machine_minor_state_scroll_handler_state fmt (v:chrome_compositor_state_machine_minor_state_scroll_handler_state) = + match v with + | Scroll_handler_unspecified -> Format.fprintf fmt "Scroll_handler_unspecified" + | Scroll_affects_scroll_handler -> Format.fprintf fmt "Scroll_affects_scroll_handler" + | Scroll_does_not_affect_scroll_handler -> Format.fprintf fmt "Scroll_does_not_affect_scroll_handler" + +let rec pp_chrome_compositor_state_machine_minor_state fmt (v:chrome_compositor_state_machine_minor_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "commit_count" Pbrt.Pp.pp_int32 fmt v.commit_count; + if not (chrome_compositor_state_machine_minor_state_has_commit_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "current_frame_number" Pbrt.Pp.pp_int32 fmt v.current_frame_number; + if not (chrome_compositor_state_machine_minor_state_has_current_frame_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "last_frame_number_submit_performed" Pbrt.Pp.pp_int32 fmt v.last_frame_number_submit_performed; + if not (chrome_compositor_state_machine_minor_state_has_last_frame_number_submit_performed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "last_frame_number_draw_performed" Pbrt.Pp.pp_int32 fmt v.last_frame_number_draw_performed; + if not (chrome_compositor_state_machine_minor_state_has_last_frame_number_draw_performed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "last_frame_number_begin_main_frame_sent" Pbrt.Pp.pp_int32 fmt v.last_frame_number_begin_main_frame_sent; + if not (chrome_compositor_state_machine_minor_state_has_last_frame_number_begin_main_frame_sent v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_draw" Pbrt.Pp.pp_bool fmt v.did_draw; + if not (chrome_compositor_state_machine_minor_state_has_did_draw v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_send_begin_main_frame_for_current_frame" Pbrt.Pp.pp_bool fmt v.did_send_begin_main_frame_for_current_frame; + if not (chrome_compositor_state_machine_minor_state_has_did_send_begin_main_frame_for_current_frame v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_notify_begin_main_frame_not_expected_until" Pbrt.Pp.pp_bool fmt v.did_notify_begin_main_frame_not_expected_until; + if not (chrome_compositor_state_machine_minor_state_has_did_notify_begin_main_frame_not_expected_until v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_notify_begin_main_frame_not_expected_soon" Pbrt.Pp.pp_bool fmt v.did_notify_begin_main_frame_not_expected_soon; + if not (chrome_compositor_state_machine_minor_state_has_did_notify_begin_main_frame_not_expected_soon v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "wants_begin_main_frame_not_expected" Pbrt.Pp.pp_bool fmt v.wants_begin_main_frame_not_expected; + if not (chrome_compositor_state_machine_minor_state_has_wants_begin_main_frame_not_expected v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_commit_during_frame" Pbrt.Pp.pp_bool fmt v.did_commit_during_frame; + if not (chrome_compositor_state_machine_minor_state_has_did_commit_during_frame v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_invalidate_layer_tree_frame_sink" Pbrt.Pp.pp_bool fmt v.did_invalidate_layer_tree_frame_sink; + if not (chrome_compositor_state_machine_minor_state_has_did_invalidate_layer_tree_frame_sink v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_perform_impl_side_invalidaion" Pbrt.Pp.pp_bool fmt v.did_perform_impl_side_invalidaion; + if not (chrome_compositor_state_machine_minor_state_has_did_perform_impl_side_invalidaion v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_prepare_tiles" Pbrt.Pp.pp_bool fmt v.did_prepare_tiles; + if not (chrome_compositor_state_machine_minor_state_has_did_prepare_tiles v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "consecutive_checkerboard_animations" Pbrt.Pp.pp_int32 fmt v.consecutive_checkerboard_animations; + if not (chrome_compositor_state_machine_minor_state_has_consecutive_checkerboard_animations v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pending_submit_frames" Pbrt.Pp.pp_int32 fmt v.pending_submit_frames; + if not (chrome_compositor_state_machine_minor_state_has_pending_submit_frames v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "submit_frames_with_current_layer_tree_frame_sink" Pbrt.Pp.pp_int32 fmt v.submit_frames_with_current_layer_tree_frame_sink; + if not (chrome_compositor_state_machine_minor_state_has_submit_frames_with_current_layer_tree_frame_sink v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "needs_redraw" Pbrt.Pp.pp_bool fmt v.needs_redraw; + if not (chrome_compositor_state_machine_minor_state_has_needs_redraw v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "needs_prepare_tiles" Pbrt.Pp.pp_bool fmt v.needs_prepare_tiles; + if not (chrome_compositor_state_machine_minor_state_has_needs_prepare_tiles v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "needs_begin_main_frame" Pbrt.Pp.pp_bool fmt v.needs_begin_main_frame; + if not (chrome_compositor_state_machine_minor_state_has_needs_begin_main_frame v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "needs_one_begin_impl_frame" Pbrt.Pp.pp_bool fmt v.needs_one_begin_impl_frame; + if not (chrome_compositor_state_machine_minor_state_has_needs_one_begin_impl_frame v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "visible" Pbrt.Pp.pp_bool fmt v.visible; + if not (chrome_compositor_state_machine_minor_state_has_visible v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "begin_frame_source_paused" Pbrt.Pp.pp_bool fmt v.begin_frame_source_paused; + if not (chrome_compositor_state_machine_minor_state_has_begin_frame_source_paused v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "can_draw" Pbrt.Pp.pp_bool fmt v.can_draw; + if not (chrome_compositor_state_machine_minor_state_has_can_draw v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "resourceless_draw" Pbrt.Pp.pp_bool fmt v.resourceless_draw; + if not (chrome_compositor_state_machine_minor_state_has_resourceless_draw v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_pending_tree" Pbrt.Pp.pp_bool fmt v.has_pending_tree; + if not (chrome_compositor_state_machine_minor_state_has_has_pending_tree v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pending_tree_is_ready_for_activation" Pbrt.Pp.pp_bool fmt v.pending_tree_is_ready_for_activation; + if not (chrome_compositor_state_machine_minor_state_has_pending_tree_is_ready_for_activation v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "active_tree_needs_first_draw" Pbrt.Pp.pp_bool fmt v.active_tree_needs_first_draw; + if not (chrome_compositor_state_machine_minor_state_has_active_tree_needs_first_draw v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "active_tree_is_ready_to_draw" Pbrt.Pp.pp_bool fmt v.active_tree_is_ready_to_draw; + if not (chrome_compositor_state_machine_minor_state_has_active_tree_is_ready_to_draw v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_create_and_initialize_first_layer_tree_frame_sink" Pbrt.Pp.pp_bool fmt v.did_create_and_initialize_first_layer_tree_frame_sink; + if not (chrome_compositor_state_machine_minor_state_has_did_create_and_initialize_first_layer_tree_frame_sink v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tree_priority" pp_chrome_compositor_state_machine_minor_state_tree_priority fmt v.tree_priority; + if not (chrome_compositor_state_machine_minor_state_has_tree_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scroll_handler_state" pp_chrome_compositor_state_machine_minor_state_scroll_handler_state fmt v.scroll_handler_state; + if not (chrome_compositor_state_machine_minor_state_has_scroll_handler_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "critical_begin_main_frame_to_activate_is_fast" Pbrt.Pp.pp_bool fmt v.critical_begin_main_frame_to_activate_is_fast; + if not (chrome_compositor_state_machine_minor_state_has_critical_begin_main_frame_to_activate_is_fast v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "main_thread_missed_last_deadline" Pbrt.Pp.pp_bool fmt v.main_thread_missed_last_deadline; + if not (chrome_compositor_state_machine_minor_state_has_main_thread_missed_last_deadline v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "video_needs_begin_frames" Pbrt.Pp.pp_bool fmt v.video_needs_begin_frames; + if not (chrome_compositor_state_machine_minor_state_has_video_needs_begin_frames v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "defer_begin_main_frame" Pbrt.Pp.pp_bool fmt v.defer_begin_main_frame; + if not (chrome_compositor_state_machine_minor_state_has_defer_begin_main_frame v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "last_commit_had_no_updates" Pbrt.Pp.pp_bool fmt v.last_commit_had_no_updates; + if not (chrome_compositor_state_machine_minor_state_has_last_commit_had_no_updates v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_draw_in_last_frame" Pbrt.Pp.pp_bool fmt v.did_draw_in_last_frame; + if not (chrome_compositor_state_machine_minor_state_has_did_draw_in_last_frame v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "did_submit_in_last_frame" Pbrt.Pp.pp_bool fmt v.did_submit_in_last_frame; + if not (chrome_compositor_state_machine_minor_state_has_did_submit_in_last_frame v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "needs_impl_side_invalidation" Pbrt.Pp.pp_bool fmt v.needs_impl_side_invalidation; + if not (chrome_compositor_state_machine_minor_state_has_needs_impl_side_invalidation v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "current_pending_tree_is_impl_side" Pbrt.Pp.pp_bool fmt v.current_pending_tree_is_impl_side; + if not (chrome_compositor_state_machine_minor_state_has_current_pending_tree_is_impl_side v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "previous_pending_tree_was_impl_side" Pbrt.Pp.pp_bool fmt v.previous_pending_tree_was_impl_side; + if not (chrome_compositor_state_machine_minor_state_has_previous_pending_tree_was_impl_side v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "processing_animation_worklets_for_active_tree" Pbrt.Pp.pp_bool fmt v.processing_animation_worklets_for_active_tree; + if not (chrome_compositor_state_machine_minor_state_has_processing_animation_worklets_for_active_tree v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "processing_animation_worklets_for_pending_tree" Pbrt.Pp.pp_bool fmt v.processing_animation_worklets_for_pending_tree; + if not (chrome_compositor_state_machine_minor_state_has_processing_animation_worklets_for_pending_tree v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "processing_paint_worklets_for_pending_tree" Pbrt.Pp.pp_bool fmt v.processing_paint_worklets_for_pending_tree; + if not (chrome_compositor_state_machine_minor_state_has_processing_paint_worklets_for_pending_tree v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_compositor_state_machine fmt (v:chrome_compositor_state_machine) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "major_state" (Pbrt.Pp.pp_option pp_chrome_compositor_state_machine_major_state) fmt v.major_state; + Pbrt.Pp.pp_record_field ~first:false "minor_state" (Pbrt.Pp.pp_option pp_chrome_compositor_state_machine_minor_state) fmt v.minor_state; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_begin_impl_frame_args_state fmt (v:begin_impl_frame_args_state) = + match v with + | Begin_frame_finished -> Format.fprintf fmt "Begin_frame_finished" + | Begin_frame_using -> Format.fprintf fmt "Begin_frame_using" + +let rec pp_begin_frame_args_begin_frame_args_type fmt (v:begin_frame_args_begin_frame_args_type) = + match v with + | Begin_frame_args_type_unspecified -> Format.fprintf fmt "Begin_frame_args_type_unspecified" + | Begin_frame_args_type_invalid -> Format.fprintf fmt "Begin_frame_args_type_invalid" + | Begin_frame_args_type_normal -> Format.fprintf fmt "Begin_frame_args_type_normal" + | Begin_frame_args_type_missed -> Format.fprintf fmt "Begin_frame_args_type_missed" + +let rec pp_begin_frame_args_created_from fmt (v:begin_frame_args_created_from) = + match v with + | Source_location_iid x -> Format.fprintf fmt "@[Source_location_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + | Source_location x -> Format.fprintf fmt "@[Source_location(@,%a)@]" pp_source_location x + +and pp_begin_frame_args fmt (v:begin_frame_args) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "type_" pp_begin_frame_args_begin_frame_args_type fmt v.type_; + if not (begin_frame_args_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "source_id" Pbrt.Pp.pp_int64 fmt v.source_id; + if not (begin_frame_args_has_source_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "sequence_number" Pbrt.Pp.pp_int64 fmt v.sequence_number; + if not (begin_frame_args_has_sequence_number v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_time_us" Pbrt.Pp.pp_int64 fmt v.frame_time_us; + if not (begin_frame_args_has_frame_time_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "deadline_us" Pbrt.Pp.pp_int64 fmt v.deadline_us; + if not (begin_frame_args_has_deadline_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "interval_delta_us" Pbrt.Pp.pp_int64 fmt v.interval_delta_us; + if not (begin_frame_args_has_interval_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "on_critical_path" Pbrt.Pp.pp_bool fmt v.on_critical_path; + if not (begin_frame_args_has_on_critical_path v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "animate_only" Pbrt.Pp.pp_bool fmt v.animate_only; + if not (begin_frame_args_has_animate_only v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "created_from" (Pbrt.Pp.pp_option pp_begin_frame_args_created_from) fmt v.created_from; + Pbrt.Pp.pp_record_field ~first:false "frames_throttled_since_last" Pbrt.Pp.pp_int64 fmt v.frames_throttled_since_last; + if not (begin_frame_args_has_frames_throttled_since_last v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_begin_impl_frame_args_timestamps_in_us fmt (v:begin_impl_frame_args_timestamps_in_us) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "interval_delta" Pbrt.Pp.pp_int64 fmt v.interval_delta; + if not (begin_impl_frame_args_timestamps_in_us_has_interval_delta v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "now_to_deadline_delta" Pbrt.Pp.pp_int64 fmt v.now_to_deadline_delta; + if not (begin_impl_frame_args_timestamps_in_us_has_now_to_deadline_delta v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_time_to_now_delta" Pbrt.Pp.pp_int64 fmt v.frame_time_to_now_delta; + if not (begin_impl_frame_args_timestamps_in_us_has_frame_time_to_now_delta v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_time_to_deadline_delta" Pbrt.Pp.pp_int64 fmt v.frame_time_to_deadline_delta; + if not (begin_impl_frame_args_timestamps_in_us_has_frame_time_to_deadline_delta v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "now" Pbrt.Pp.pp_int64 fmt v.now; + if not (begin_impl_frame_args_timestamps_in_us_has_now v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_time" Pbrt.Pp.pp_int64 fmt v.frame_time; + if not (begin_impl_frame_args_timestamps_in_us_has_frame_time v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "deadline" Pbrt.Pp.pp_int64 fmt v.deadline; + if not (begin_impl_frame_args_timestamps_in_us_has_deadline v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_begin_impl_frame_args_args fmt (v:begin_impl_frame_args_args) = + match v with + | Current_args x -> Format.fprintf fmt "@[Current_args(@,%a)@]" pp_begin_frame_args x + | Last_args x -> Format.fprintf fmt "@[Last_args(@,%a)@]" pp_begin_frame_args x + +and pp_begin_impl_frame_args fmt (v:begin_impl_frame_args) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "updated_at_us" Pbrt.Pp.pp_int64 fmt v.updated_at_us; + if not (begin_impl_frame_args_has_updated_at_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "finished_at_us" Pbrt.Pp.pp_int64 fmt v.finished_at_us; + if not (begin_impl_frame_args_has_finished_at_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "state" pp_begin_impl_frame_args_state fmt v.state; + if not (begin_impl_frame_args_has_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "args" (Pbrt.Pp.pp_option pp_begin_impl_frame_args_args) fmt v.args; + Pbrt.Pp.pp_record_field ~first:false "timestamps_in_us" (Pbrt.Pp.pp_option pp_begin_impl_frame_args_timestamps_in_us) fmt v.timestamps_in_us; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_begin_frame_observer_state fmt (v:begin_frame_observer_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "dropped_begin_frame_args" Pbrt.Pp.pp_int64 fmt v.dropped_begin_frame_args; + if not (begin_frame_observer_state_has_dropped_begin_frame_args v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "last_begin_frame_args" (Pbrt.Pp.pp_option pp_begin_frame_args) fmt v.last_begin_frame_args; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_begin_frame_source_state fmt (v:begin_frame_source_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "source_id" Pbrt.Pp.pp_int32 fmt v.source_id; + if not (begin_frame_source_state_has_source_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "paused" Pbrt.Pp.pp_bool fmt v.paused; + if not (begin_frame_source_state_has_paused v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_observers" Pbrt.Pp.pp_int32 fmt v.num_observers; + if not (begin_frame_source_state_has_num_observers v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "last_begin_frame_args" (Pbrt.Pp.pp_option pp_begin_frame_args) fmt v.last_begin_frame_args; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_compositor_timing_history fmt (v:compositor_timing_history) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "begin_main_frame_queue_critical_estimate_delta_us" Pbrt.Pp.pp_int64 fmt v.begin_main_frame_queue_critical_estimate_delta_us; + if not (compositor_timing_history_has_begin_main_frame_queue_critical_estimate_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "begin_main_frame_queue_not_critical_estimate_delta_us" Pbrt.Pp.pp_int64 fmt v.begin_main_frame_queue_not_critical_estimate_delta_us; + if not (compositor_timing_history_has_begin_main_frame_queue_not_critical_estimate_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "begin_main_frame_start_to_ready_to_commit_estimate_delta_us" Pbrt.Pp.pp_int64 fmt v.begin_main_frame_start_to_ready_to_commit_estimate_delta_us; + if not (compositor_timing_history_has_begin_main_frame_start_to_ready_to_commit_estimate_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "commit_to_ready_to_activate_estimate_delta_us" Pbrt.Pp.pp_int64 fmt v.commit_to_ready_to_activate_estimate_delta_us; + if not (compositor_timing_history_has_commit_to_ready_to_activate_estimate_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "prepare_tiles_estimate_delta_us" Pbrt.Pp.pp_int64 fmt v.prepare_tiles_estimate_delta_us; + if not (compositor_timing_history_has_prepare_tiles_estimate_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "activate_estimate_delta_us" Pbrt.Pp.pp_int64 fmt v.activate_estimate_delta_us; + if not (compositor_timing_history_has_activate_estimate_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "draw_estimate_delta_us" Pbrt.Pp.pp_int64 fmt v.draw_estimate_delta_us; + if not (compositor_timing_history_has_draw_estimate_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_compositor_scheduler_state fmt (v:chrome_compositor_scheduler_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "state_machine" (Pbrt.Pp.pp_option pp_chrome_compositor_state_machine) fmt v.state_machine; + Pbrt.Pp.pp_record_field ~first:false "observing_begin_frame_source" Pbrt.Pp.pp_bool fmt v.observing_begin_frame_source; + if not (chrome_compositor_scheduler_state_has_observing_begin_frame_source v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "begin_impl_frame_deadline_task" Pbrt.Pp.pp_bool fmt v.begin_impl_frame_deadline_task; + if not (chrome_compositor_scheduler_state_has_begin_impl_frame_deadline_task v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pending_begin_frame_task" Pbrt.Pp.pp_bool fmt v.pending_begin_frame_task; + if not (chrome_compositor_scheduler_state_has_pending_begin_frame_task v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "skipped_last_frame_missed_exceeded_deadline" Pbrt.Pp.pp_bool fmt v.skipped_last_frame_missed_exceeded_deadline; + if not (chrome_compositor_scheduler_state_has_skipped_last_frame_missed_exceeded_deadline v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "inside_action" pp_chrome_compositor_scheduler_action fmt v.inside_action; + if not (chrome_compositor_scheduler_state_has_inside_action v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "deadline_mode" pp_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode fmt v.deadline_mode; + if not (chrome_compositor_scheduler_state_has_deadline_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "deadline_us" Pbrt.Pp.pp_int64 fmt v.deadline_us; + if not (chrome_compositor_scheduler_state_has_deadline_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "deadline_scheduled_at_us" Pbrt.Pp.pp_int64 fmt v.deadline_scheduled_at_us; + if not (chrome_compositor_scheduler_state_has_deadline_scheduled_at_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "now_us" Pbrt.Pp.pp_int64 fmt v.now_us; + if not (chrome_compositor_scheduler_state_has_now_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "now_to_deadline_delta_us" Pbrt.Pp.pp_int64 fmt v.now_to_deadline_delta_us; + if not (chrome_compositor_scheduler_state_has_now_to_deadline_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "now_to_deadline_scheduled_at_delta_us" Pbrt.Pp.pp_int64 fmt v.now_to_deadline_scheduled_at_delta_us; + if not (chrome_compositor_scheduler_state_has_now_to_deadline_scheduled_at_delta_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "begin_impl_frame_args" (Pbrt.Pp.pp_option pp_begin_impl_frame_args) fmt v.begin_impl_frame_args; + Pbrt.Pp.pp_record_field ~first:false "begin_frame_observer_state" (Pbrt.Pp.pp_option pp_begin_frame_observer_state) fmt v.begin_frame_observer_state; + Pbrt.Pp.pp_record_field ~first:false "begin_frame_source_state" (Pbrt.Pp.pp_option pp_begin_frame_source_state) fmt v.begin_frame_source_state; + Pbrt.Pp.pp_record_field ~first:false "compositor_timing_history" (Pbrt.Pp.pp_option pp_compositor_timing_history) fmt v.compositor_timing_history; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_content_settings_event_info fmt (v:chrome_content_settings_event_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "number_of_exceptions" Pbrt.Pp.pp_int32 fmt v.number_of_exceptions; + if not (chrome_content_settings_event_info_has_number_of_exceptions v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_frame_reporter_state fmt (v:chrome_frame_reporter_state) = + match v with + | State_no_update_desired -> Format.fprintf fmt "State_no_update_desired" + | State_presented_all -> Format.fprintf fmt "State_presented_all" + | State_presented_partial -> Format.fprintf fmt "State_presented_partial" + | State_dropped -> Format.fprintf fmt "State_dropped" + +let rec pp_chrome_frame_reporter_frame_drop_reason fmt (v:chrome_frame_reporter_frame_drop_reason) = + match v with + | Reason_unspecified -> Format.fprintf fmt "Reason_unspecified" + | Reason_display_compositor -> Format.fprintf fmt "Reason_display_compositor" + | Reason_main_thread -> Format.fprintf fmt "Reason_main_thread" + | Reason_client_compositor -> Format.fprintf fmt "Reason_client_compositor" + +let rec pp_chrome_frame_reporter_scroll_state fmt (v:chrome_frame_reporter_scroll_state) = + match v with + | Scroll_none -> Format.fprintf fmt "Scroll_none" + | Scroll_main_thread -> Format.fprintf fmt "Scroll_main_thread" + | Scroll_compositor_thread -> Format.fprintf fmt "Scroll_compositor_thread" + | Scroll_raster -> Format.fprintf fmt "Scroll_raster" + | Scroll_unknown -> Format.fprintf fmt "Scroll_unknown" + +let rec pp_chrome_frame_reporter_frame_type fmt (v:chrome_frame_reporter_frame_type) = + match v with + | Forked -> Format.fprintf fmt "Forked" + | Backfill -> Format.fprintf fmt "Backfill" + +let rec pp_chrome_frame_reporter fmt (v:chrome_frame_reporter) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "state" pp_chrome_frame_reporter_state fmt v.state; + if not (chrome_frame_reporter_has_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "reason" pp_chrome_frame_reporter_frame_drop_reason fmt v.reason; + if not (chrome_frame_reporter_has_reason v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_source" Pbrt.Pp.pp_int64 fmt v.frame_source; + if not (chrome_frame_reporter_has_frame_source v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_sequence" Pbrt.Pp.pp_int64 fmt v.frame_sequence; + if not (chrome_frame_reporter_has_frame_sequence v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "affects_smoothness" Pbrt.Pp.pp_bool fmt v.affects_smoothness; + if not (chrome_frame_reporter_has_affects_smoothness v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "scroll_state" pp_chrome_frame_reporter_scroll_state fmt v.scroll_state; + if not (chrome_frame_reporter_has_scroll_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_main_animation" Pbrt.Pp.pp_bool fmt v.has_main_animation; + if not (chrome_frame_reporter_has_has_main_animation v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_compositor_animation" Pbrt.Pp.pp_bool fmt v.has_compositor_animation; + if not (chrome_frame_reporter_has_has_compositor_animation v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_smooth_input_main" Pbrt.Pp.pp_bool fmt v.has_smooth_input_main; + if not (chrome_frame_reporter_has_has_smooth_input_main v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_missing_content" Pbrt.Pp.pp_bool fmt v.has_missing_content; + if not (chrome_frame_reporter_has_has_missing_content v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "layer_tree_host_id" Pbrt.Pp.pp_int64 fmt v.layer_tree_host_id; + if not (chrome_frame_reporter_has_layer_tree_host_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_high_latency" Pbrt.Pp.pp_bool fmt v.has_high_latency; + if not (chrome_frame_reporter_has_has_high_latency v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_type" pp_chrome_frame_reporter_frame_type fmt v.frame_type; + if not (chrome_frame_reporter_has_frame_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "high_latency_contribution_stage" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.high_latency_contribution_stage; + Pbrt.Pp.pp_record_field ~first:false "checkerboarded_needs_raster" Pbrt.Pp.pp_bool fmt v.checkerboarded_needs_raster; + if not (chrome_frame_reporter_has_checkerboarded_needs_raster v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "checkerboarded_needs_record" Pbrt.Pp.pp_bool fmt v.checkerboarded_needs_record; + if not (chrome_frame_reporter_has_checkerboarded_needs_record v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "surface_frame_trace_id" Pbrt.Pp.pp_int64 fmt v.surface_frame_trace_id; + if not (chrome_frame_reporter_has_surface_frame_trace_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "display_trace_id" Pbrt.Pp.pp_int64 fmt v.display_trace_id; + if not (chrome_frame_reporter_has_display_trace_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_keyed_service fmt (v:chrome_keyed_service) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (chrome_keyed_service_has_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_latency_info_step fmt (v:chrome_latency_info_step) = + match v with + | Step_unspecified -> Format.fprintf fmt "Step_unspecified" + | Step_send_input_event_ui -> Format.fprintf fmt "Step_send_input_event_ui" + | Step_handle_input_event_impl -> Format.fprintf fmt "Step_handle_input_event_impl" + | Step_did_handle_input_and_overscroll -> Format.fprintf fmt "Step_did_handle_input_and_overscroll" + | Step_handle_input_event_main -> Format.fprintf fmt "Step_handle_input_event_main" + | Step_main_thread_scroll_update -> Format.fprintf fmt "Step_main_thread_scroll_update" + | Step_handle_input_event_main_commit -> Format.fprintf fmt "Step_handle_input_event_main_commit" + | Step_handled_input_event_main_or_impl -> Format.fprintf fmt "Step_handled_input_event_main_or_impl" + | Step_handled_input_event_impl -> Format.fprintf fmt "Step_handled_input_event_impl" + | Step_swap_buffers -> Format.fprintf fmt "Step_swap_buffers" + | Step_draw_and_swap -> Format.fprintf fmt "Step_draw_and_swap" + | Step_finished_swap_buffers -> Format.fprintf fmt "Step_finished_swap_buffers" + +let rec pp_chrome_latency_info_latency_component_type fmt (v:chrome_latency_info_latency_component_type) = + match v with + | Component_unspecified -> Format.fprintf fmt "Component_unspecified" + | Component_input_event_latency_begin_rwh -> Format.fprintf fmt "Component_input_event_latency_begin_rwh" + | Component_input_event_latency_scroll_update_original -> Format.fprintf fmt "Component_input_event_latency_scroll_update_original" + | Component_input_event_latency_first_scroll_update_original -> Format.fprintf fmt "Component_input_event_latency_first_scroll_update_original" + | Component_input_event_latency_original -> Format.fprintf fmt "Component_input_event_latency_original" + | Component_input_event_latency_ui -> Format.fprintf fmt "Component_input_event_latency_ui" + | Component_input_event_latency_renderer_main -> Format.fprintf fmt "Component_input_event_latency_renderer_main" + | Component_input_event_latency_rendering_scheduled_main -> Format.fprintf fmt "Component_input_event_latency_rendering_scheduled_main" + | Component_input_event_latency_rendering_scheduled_impl -> Format.fprintf fmt "Component_input_event_latency_rendering_scheduled_impl" + | Component_input_event_latency_scroll_update_last_event -> Format.fprintf fmt "Component_input_event_latency_scroll_update_last_event" + | Component_input_event_latency_ack_rwh -> Format.fprintf fmt "Component_input_event_latency_ack_rwh" + | Component_input_event_latency_renderer_swap -> Format.fprintf fmt "Component_input_event_latency_renderer_swap" + | Component_display_compositor_received_frame -> Format.fprintf fmt "Component_display_compositor_received_frame" + | Component_input_event_gpu_swap_buffer -> Format.fprintf fmt "Component_input_event_gpu_swap_buffer" + | Component_input_event_latency_frame_swap -> Format.fprintf fmt "Component_input_event_latency_frame_swap" + +let rec pp_chrome_latency_info_component_info fmt (v:chrome_latency_info_component_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "component_type" pp_chrome_latency_info_latency_component_type fmt v.component_type; + if not (chrome_latency_info_component_info_has_component_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "time_us" Pbrt.Pp.pp_int64 fmt v.time_us; + if not (chrome_latency_info_component_info_has_time_us v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_latency_info_input_type fmt (v:chrome_latency_info_input_type) = + match v with + | Unspecified_or_other -> Format.fprintf fmt "Unspecified_or_other" + | Touch_moved -> Format.fprintf fmt "Touch_moved" + | Gesture_scroll_begin -> Format.fprintf fmt "Gesture_scroll_begin" + | Gesture_scroll_update -> Format.fprintf fmt "Gesture_scroll_update" + | Gesture_scroll_end -> Format.fprintf fmt "Gesture_scroll_end" + | Gesture_tap -> Format.fprintf fmt "Gesture_tap" + | Gesture_tap_cancel -> Format.fprintf fmt "Gesture_tap_cancel" + +let rec pp_chrome_latency_info fmt (v:chrome_latency_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "trace_id" Pbrt.Pp.pp_int64 fmt v.trace_id; + if not (chrome_latency_info_has_trace_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "step" pp_chrome_latency_info_step fmt v.step; + if not (chrome_latency_info_has_step v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frame_tree_node_id" Pbrt.Pp.pp_int32 fmt v.frame_tree_node_id; + if not (chrome_latency_info_has_frame_tree_node_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "component_info" (Pbrt.Pp.pp_list pp_chrome_latency_info_component_info) fmt v.component_info; + Pbrt.Pp.pp_record_field ~first:false "is_coalesced" Pbrt.Pp.pp_bool fmt v.is_coalesced; + if not (chrome_latency_info_has_is_coalesced v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "gesture_scroll_id" Pbrt.Pp.pp_int64 fmt v.gesture_scroll_id; + if not (chrome_latency_info_has_gesture_scroll_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "touch_id" Pbrt.Pp.pp_int64 fmt v.touch_id; + if not (chrome_latency_info_has_touch_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "input_type" pp_chrome_latency_info_input_type fmt v.input_type; + if not (chrome_latency_info_has_input_type v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_legacy_ipc_message_class fmt (v:chrome_legacy_ipc_message_class) = + match v with + | Class_unspecified -> Format.fprintf fmt "Class_unspecified" + | Class_automation -> Format.fprintf fmt "Class_automation" + | Class_frame -> Format.fprintf fmt "Class_frame" + | Class_page -> Format.fprintf fmt "Class_page" + | Class_view -> Format.fprintf fmt "Class_view" + | Class_widget -> Format.fprintf fmt "Class_widget" + | Class_input -> Format.fprintf fmt "Class_input" + | Class_test -> Format.fprintf fmt "Class_test" + | Class_worker -> Format.fprintf fmt "Class_worker" + | Class_nacl -> Format.fprintf fmt "Class_nacl" + | Class_gpu_channel -> Format.fprintf fmt "Class_gpu_channel" + | Class_media -> Format.fprintf fmt "Class_media" + | Class_ppapi -> Format.fprintf fmt "Class_ppapi" + | Class_chrome -> Format.fprintf fmt "Class_chrome" + | Class_drag -> Format.fprintf fmt "Class_drag" + | Class_print -> Format.fprintf fmt "Class_print" + | Class_extension -> Format.fprintf fmt "Class_extension" + | Class_text_input_client -> Format.fprintf fmt "Class_text_input_client" + | Class_blink_test -> Format.fprintf fmt "Class_blink_test" + | Class_accessibility -> Format.fprintf fmt "Class_accessibility" + | Class_prerender -> Format.fprintf fmt "Class_prerender" + | Class_chromoting -> Format.fprintf fmt "Class_chromoting" + | Class_browser_plugin -> Format.fprintf fmt "Class_browser_plugin" + | Class_android_web_view -> Format.fprintf fmt "Class_android_web_view" + | Class_nacl_host -> Format.fprintf fmt "Class_nacl_host" + | Class_encrypted_media -> Format.fprintf fmt "Class_encrypted_media" + | Class_cast -> Format.fprintf fmt "Class_cast" + | Class_gin_java_bridge -> Format.fprintf fmt "Class_gin_java_bridge" + | Class_chrome_utility_printing -> Format.fprintf fmt "Class_chrome_utility_printing" + | Class_ozone_gpu -> Format.fprintf fmt "Class_ozone_gpu" + | Class_web_test -> Format.fprintf fmt "Class_web_test" + | Class_network_hints -> Format.fprintf fmt "Class_network_hints" + | Class_extensions_guest_view -> Format.fprintf fmt "Class_extensions_guest_view" + | Class_guest_view -> Format.fprintf fmt "Class_guest_view" + | Class_media_player_delegate -> Format.fprintf fmt "Class_media_player_delegate" + | Class_extension_worker -> Format.fprintf fmt "Class_extension_worker" + | Class_subresource_filter -> Format.fprintf fmt "Class_subresource_filter" + | Class_unfreezable_frame -> Format.fprintf fmt "Class_unfreezable_frame" + +let rec pp_chrome_legacy_ipc fmt (v:chrome_legacy_ipc) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "message_class" pp_chrome_legacy_ipc_message_class fmt v.message_class; + if not (chrome_legacy_ipc_has_message_class v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "message_line" Pbrt.Pp.pp_int32 fmt v.message_line; + if not (chrome_legacy_ipc_has_message_line v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_message_pump fmt (v:chrome_message_pump) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "sent_messages_in_queue" Pbrt.Pp.pp_bool fmt v.sent_messages_in_queue; + if not (chrome_message_pump_has_sent_messages_in_queue v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "io_handler_location_iid" Pbrt.Pp.pp_int64 fmt v.io_handler_location_iid; + if not (chrome_message_pump_has_io_handler_location_iid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_mojo_event_info fmt (v:chrome_mojo_event_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "watcher_notify_interface_tag" Pbrt.Pp.pp_string fmt v.watcher_notify_interface_tag; + if not (chrome_mojo_event_info_has_watcher_notify_interface_tag v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ipc_hash" Pbrt.Pp.pp_int32 fmt v.ipc_hash; + if not (chrome_mojo_event_info_has_ipc_hash v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "mojo_interface_tag" Pbrt.Pp.pp_string fmt v.mojo_interface_tag; + if not (chrome_mojo_event_info_has_mojo_interface_tag v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "mojo_interface_method_iid" Pbrt.Pp.pp_int64 fmt v.mojo_interface_method_iid; + if not (chrome_mojo_event_info_has_mojo_interface_method_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_reply" Pbrt.Pp.pp_bool fmt v.is_reply; + if not (chrome_mojo_event_info_has_is_reply v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "payload_size" Pbrt.Pp.pp_int64 fmt v.payload_size; + if not (chrome_mojo_event_info_has_payload_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "data_num_bytes" Pbrt.Pp.pp_int64 fmt v.data_num_bytes; + if not (chrome_mojo_event_info_has_data_num_bytes v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_railmode fmt (v:chrome_railmode) = + match v with + | Rail_mode_none -> Format.fprintf fmt "Rail_mode_none" + | Rail_mode_response -> Format.fprintf fmt "Rail_mode_response" + | Rail_mode_animation -> Format.fprintf fmt "Rail_mode_animation" + | Rail_mode_idle -> Format.fprintf fmt "Rail_mode_idle" + | Rail_mode_load -> Format.fprintf fmt "Rail_mode_load" + +let rec pp_chrome_renderer_scheduler_state fmt (v:chrome_renderer_scheduler_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "rail_mode" pp_chrome_railmode fmt v.rail_mode; + if not (chrome_renderer_scheduler_state_has_rail_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_backgrounded" Pbrt.Pp.pp_bool fmt v.is_backgrounded; + if not (chrome_renderer_scheduler_state_has_is_backgrounded v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_hidden" Pbrt.Pp.pp_bool fmt v.is_hidden; + if not (chrome_renderer_scheduler_state_has_is_hidden v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_user_event fmt (v:chrome_user_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "action" Pbrt.Pp.pp_string fmt v.action; + if not (chrome_user_event_has_action v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "action_hash" Pbrt.Pp.pp_int64 fmt v.action_hash; + if not (chrome_user_event_has_action_hash v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_window_handle_event_info fmt (v:chrome_window_handle_event_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "dpi" Pbrt.Pp.pp_int32 fmt v.dpi; + if not (chrome_window_handle_event_info_has_dpi v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "message_id" Pbrt.Pp.pp_int32 fmt v.message_id; + if not (chrome_window_handle_event_info_has_message_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "hwnd_ptr" Pbrt.Pp.pp_int64 fmt v.hwnd_ptr; + if not (chrome_window_handle_event_info_has_hwnd_ptr v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_screenshot fmt (v:screenshot) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "jpg_image" Pbrt.Pp.pp_bytes fmt v.jpg_image; + if not (screenshot_has_jpg_image v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_task_execution fmt (v:task_execution) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "posted_from_iid" Pbrt.Pp.pp_int64 fmt v.posted_from_iid; + if not (task_execution_has_posted_from_iid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_type fmt (v:track_event_type) = + match v with + | Type_unspecified -> Format.fprintf fmt "Type_unspecified" + | Type_slice_begin -> Format.fprintf fmt "Type_slice_begin" + | Type_slice_end -> Format.fprintf fmt "Type_slice_end" + | Type_instant -> Format.fprintf fmt "Type_instant" + | Type_counter -> Format.fprintf fmt "Type_counter" + +let rec pp_track_event_callstack_frame fmt (v:track_event_callstack_frame) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "function_name" Pbrt.Pp.pp_string fmt v.function_name; + if not (track_event_callstack_frame_has_function_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "source_file" Pbrt.Pp.pp_string fmt v.source_file; + if not (track_event_callstack_frame_has_source_file v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "line_number" Pbrt.Pp.pp_int32 fmt v.line_number; + if not (track_event_callstack_frame_has_line_number v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_callstack fmt (v:track_event_callstack) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "frames" (Pbrt.Pp.pp_list pp_track_event_callstack_frame) fmt v.frames; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_legacy_event_flow_direction fmt (v:track_event_legacy_event_flow_direction) = + match v with + | Flow_unspecified -> Format.fprintf fmt "Flow_unspecified" + | Flow_in -> Format.fprintf fmt "Flow_in" + | Flow_out -> Format.fprintf fmt "Flow_out" + | Flow_inout -> Format.fprintf fmt "Flow_inout" + +let rec pp_track_event_legacy_event_instant_event_scope fmt (v:track_event_legacy_event_instant_event_scope) = + match v with + | Scope_unspecified -> Format.fprintf fmt "Scope_unspecified" + | Scope_global -> Format.fprintf fmt "Scope_global" + | Scope_process -> Format.fprintf fmt "Scope_process" + | Scope_thread -> Format.fprintf fmt "Scope_thread" + +let rec pp_track_event_legacy_event_id fmt (v:track_event_legacy_event_id) = + match v with + | Unscoped_id x -> Format.fprintf fmt "@[Unscoped_id(@,%a)@]" Pbrt.Pp.pp_int64 x + | Local_id x -> Format.fprintf fmt "@[Local_id(@,%a)@]" Pbrt.Pp.pp_int64 x + | Global_id x -> Format.fprintf fmt "@[Global_id(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_track_event_legacy_event fmt (v:track_event_legacy_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name_iid" Pbrt.Pp.pp_int64 fmt v.name_iid; + if not (track_event_legacy_event_has_name_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "phase" Pbrt.Pp.pp_int32 fmt v.phase; + if not (track_event_legacy_event_has_phase v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "duration_us" Pbrt.Pp.pp_int64 fmt v.duration_us; + if not (track_event_legacy_event_has_duration_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_duration_us" Pbrt.Pp.pp_int64 fmt v.thread_duration_us; + if not (track_event_legacy_event_has_thread_duration_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_instruction_delta" Pbrt.Pp.pp_int64 fmt v.thread_instruction_delta; + if not (track_event_legacy_event_has_thread_instruction_delta v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "id" (Pbrt.Pp.pp_option pp_track_event_legacy_event_id) fmt v.id; + Pbrt.Pp.pp_record_field ~first:false "id_scope" Pbrt.Pp.pp_string fmt v.id_scope; + if not (track_event_legacy_event_has_id_scope v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "use_async_tts" Pbrt.Pp.pp_bool fmt v.use_async_tts; + if not (track_event_legacy_event_has_use_async_tts v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bind_id" Pbrt.Pp.pp_int64 fmt v.bind_id; + if not (track_event_legacy_event_has_bind_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "bind_to_enclosing" Pbrt.Pp.pp_bool fmt v.bind_to_enclosing; + if not (track_event_legacy_event_has_bind_to_enclosing v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flow_direction" pp_track_event_legacy_event_flow_direction fmt v.flow_direction; + if not (track_event_legacy_event_has_flow_direction v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "instant_event_scope" pp_track_event_legacy_event_instant_event_scope fmt v.instant_event_scope; + if not (track_event_legacy_event_has_instant_event_scope v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid_override" Pbrt.Pp.pp_int32 fmt v.pid_override; + if not (track_event_legacy_event_has_pid_override v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid_override" Pbrt.Pp.pp_int32 fmt v.tid_override; + if not (track_event_legacy_event_has_tid_override v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_name_field fmt (v:track_event_name_field) = + match v with + | Name_iid x -> Format.fprintf fmt "@[Name_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + | Name x -> Format.fprintf fmt "@[Name(@,%a)@]" Pbrt.Pp.pp_string x + +and pp_track_event_counter_value_field fmt (v:track_event_counter_value_field) = + match v with + | Counter_value x -> Format.fprintf fmt "@[Counter_value(@,%a)@]" Pbrt.Pp.pp_int64 x + | Double_counter_value x -> Format.fprintf fmt "@[Double_counter_value(@,%a)@]" Pbrt.Pp.pp_float x + +and pp_track_event_correlation_id_field fmt (v:track_event_correlation_id_field) = + match v with + | Correlation_id x -> Format.fprintf fmt "@[Correlation_id(@,%a)@]" Pbrt.Pp.pp_int64 x + | Correlation_id_str x -> Format.fprintf fmt "@[Correlation_id_str(@,%a)@]" Pbrt.Pp.pp_string x + | Correlation_id_str_iid x -> Format.fprintf fmt "@[Correlation_id_str_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_track_event_callstack_field fmt (v:track_event_callstack_field) = + match v with + | Callstack x -> Format.fprintf fmt "@[Callstack(@,%a)@]" pp_track_event_callstack x + | Callstack_iid x -> Format.fprintf fmt "@[Callstack_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_track_event_source_location_field fmt (v:track_event_source_location_field) = + match v with + | Source_location x -> Format.fprintf fmt "@[Source_location(@,%a)@]" pp_source_location x + | Source_location_iid x -> Format.fprintf fmt "@[Source_location_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_track_event_timestamp fmt (v:track_event_timestamp) = + match v with + | Timestamp_delta_us x -> Format.fprintf fmt "@[Timestamp_delta_us(@,%a)@]" Pbrt.Pp.pp_int64 x + | Timestamp_absolute_us x -> Format.fprintf fmt "@[Timestamp_absolute_us(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_track_event_thread_time fmt (v:track_event_thread_time) = + match v with + | Thread_time_delta_us x -> Format.fprintf fmt "@[Thread_time_delta_us(@,%a)@]" Pbrt.Pp.pp_int64 x + | Thread_time_absolute_us x -> Format.fprintf fmt "@[Thread_time_absolute_us(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_track_event_thread_instruction_count fmt (v:track_event_thread_instruction_count) = + match v with + | Thread_instruction_count_delta x -> Format.fprintf fmt "@[Thread_instruction_count_delta(@,%a)@]" Pbrt.Pp.pp_int64 x + | Thread_instruction_count_absolute x -> Format.fprintf fmt "@[Thread_instruction_count_absolute(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_track_event fmt (v:track_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "category_iids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.category_iids; + Pbrt.Pp.pp_record_field ~first:false "categories" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.categories; + Pbrt.Pp.pp_record_field ~first:false "name_field" (Pbrt.Pp.pp_option pp_track_event_name_field) fmt v.name_field; + Pbrt.Pp.pp_record_field ~first:false "type_" pp_track_event_type fmt v.type_; + if not (track_event_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "track_uuid" Pbrt.Pp.pp_int64 fmt v.track_uuid; + if not (track_event_has_track_uuid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "counter_value_field" (Pbrt.Pp.pp_option pp_track_event_counter_value_field) fmt v.counter_value_field; + Pbrt.Pp.pp_record_field ~first:false "extra_counter_track_uuids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.extra_counter_track_uuids; + Pbrt.Pp.pp_record_field ~first:false "extra_counter_values" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.extra_counter_values; + Pbrt.Pp.pp_record_field ~first:false "extra_double_counter_track_uuids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.extra_double_counter_track_uuids; + Pbrt.Pp.pp_record_field ~first:false "extra_double_counter_values" (Pbrt.Pp.pp_list Pbrt.Pp.pp_float) fmt v.extra_double_counter_values; + Pbrt.Pp.pp_record_field ~first:false "flow_ids_old" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.flow_ids_old; + Pbrt.Pp.pp_record_field ~first:false "flow_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.flow_ids; + Pbrt.Pp.pp_record_field ~first:false "terminating_flow_ids_old" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.terminating_flow_ids_old; + Pbrt.Pp.pp_record_field ~first:false "terminating_flow_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.terminating_flow_ids; + Pbrt.Pp.pp_record_field ~first:false "correlation_id_field" (Pbrt.Pp.pp_option pp_track_event_correlation_id_field) fmt v.correlation_id_field; + Pbrt.Pp.pp_record_field ~first:false "callstack_field" (Pbrt.Pp.pp_option pp_track_event_callstack_field) fmt v.callstack_field; + Pbrt.Pp.pp_record_field ~first:false "debug_annotations" (Pbrt.Pp.pp_list pp_debug_annotation) fmt v.debug_annotations; + Pbrt.Pp.pp_record_field ~first:false "task_execution" (Pbrt.Pp.pp_option pp_task_execution) fmt v.task_execution; + Pbrt.Pp.pp_record_field ~first:false "log_message" (Pbrt.Pp.pp_option pp_log_message) fmt v.log_message; + Pbrt.Pp.pp_record_field ~first:false "cc_scheduler_state" (Pbrt.Pp.pp_option pp_chrome_compositor_scheduler_state) fmt v.cc_scheduler_state; + Pbrt.Pp.pp_record_field ~first:false "chrome_user_event" (Pbrt.Pp.pp_option pp_chrome_user_event) fmt v.chrome_user_event; + Pbrt.Pp.pp_record_field ~first:false "chrome_keyed_service" (Pbrt.Pp.pp_option pp_chrome_keyed_service) fmt v.chrome_keyed_service; + Pbrt.Pp.pp_record_field ~first:false "chrome_legacy_ipc" (Pbrt.Pp.pp_option pp_chrome_legacy_ipc) fmt v.chrome_legacy_ipc; + Pbrt.Pp.pp_record_field ~first:false "chrome_histogram_sample" (Pbrt.Pp.pp_option pp_chrome_histogram_sample) fmt v.chrome_histogram_sample; + Pbrt.Pp.pp_record_field ~first:false "chrome_latency_info" (Pbrt.Pp.pp_option pp_chrome_latency_info) fmt v.chrome_latency_info; + Pbrt.Pp.pp_record_field ~first:false "chrome_frame_reporter" (Pbrt.Pp.pp_option pp_chrome_frame_reporter) fmt v.chrome_frame_reporter; + Pbrt.Pp.pp_record_field ~first:false "chrome_application_state_info" (Pbrt.Pp.pp_option pp_chrome_application_state_info) fmt v.chrome_application_state_info; + Pbrt.Pp.pp_record_field ~first:false "chrome_renderer_scheduler_state" (Pbrt.Pp.pp_option pp_chrome_renderer_scheduler_state) fmt v.chrome_renderer_scheduler_state; + Pbrt.Pp.pp_record_field ~first:false "chrome_window_handle_event_info" (Pbrt.Pp.pp_option pp_chrome_window_handle_event_info) fmt v.chrome_window_handle_event_info; + Pbrt.Pp.pp_record_field ~first:false "chrome_content_settings_event_info" (Pbrt.Pp.pp_option pp_chrome_content_settings_event_info) fmt v.chrome_content_settings_event_info; + Pbrt.Pp.pp_record_field ~first:false "chrome_active_processes" (Pbrt.Pp.pp_option pp_chrome_active_processes) fmt v.chrome_active_processes; + Pbrt.Pp.pp_record_field ~first:false "screenshot" (Pbrt.Pp.pp_option pp_screenshot) fmt v.screenshot; + Pbrt.Pp.pp_record_field ~first:false "source_location_field" (Pbrt.Pp.pp_option pp_track_event_source_location_field) fmt v.source_location_field; + Pbrt.Pp.pp_record_field ~first:false "chrome_message_pump" (Pbrt.Pp.pp_option pp_chrome_message_pump) fmt v.chrome_message_pump; + Pbrt.Pp.pp_record_field ~first:false "chrome_mojo_event_info" (Pbrt.Pp.pp_option pp_chrome_mojo_event_info) fmt v.chrome_mojo_event_info; + Pbrt.Pp.pp_record_field ~first:false "timestamp" (Pbrt.Pp.pp_option pp_track_event_timestamp) fmt v.timestamp; + Pbrt.Pp.pp_record_field ~first:false "thread_time" (Pbrt.Pp.pp_option pp_track_event_thread_time) fmt v.thread_time; + Pbrt.Pp.pp_record_field ~first:false "thread_instruction_count" (Pbrt.Pp.pp_option pp_track_event_thread_instruction_count) fmt v.thread_instruction_count; + Pbrt.Pp.pp_record_field ~first:false "legacy_event" (Pbrt.Pp.pp_option pp_track_event_legacy_event) fmt v.legacy_event; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_defaults fmt (v:track_event_defaults) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "track_uuid" Pbrt.Pp.pp_int64 fmt v.track_uuid; + if not (track_event_defaults_has_track_uuid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "extra_counter_track_uuids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.extra_counter_track_uuids; + Pbrt.Pp.pp_record_field ~first:false "extra_double_counter_track_uuids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.extra_double_counter_track_uuids; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_event_category fmt (v:event_category) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (event_category_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (event_category_has_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_event_name fmt (v:event_name) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (event_name_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (event_name_has_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_interned_data fmt (v:interned_data) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "event_categories" (Pbrt.Pp.pp_list pp_event_category) fmt v.event_categories; + Pbrt.Pp.pp_record_field ~first:false "event_names" (Pbrt.Pp.pp_list pp_event_name) fmt v.event_names; + Pbrt.Pp.pp_record_field ~first:false "debug_annotation_names" (Pbrt.Pp.pp_list pp_debug_annotation_name) fmt v.debug_annotation_names; + Pbrt.Pp.pp_record_field ~first:false "debug_annotation_value_type_names" (Pbrt.Pp.pp_list pp_debug_annotation_value_type_name) fmt v.debug_annotation_value_type_names; + Pbrt.Pp.pp_record_field ~first:false "source_locations" (Pbrt.Pp.pp_list pp_source_location) fmt v.source_locations; + Pbrt.Pp.pp_record_field ~first:false "unsymbolized_source_locations" (Pbrt.Pp.pp_list pp_unsymbolized_source_location) fmt v.unsymbolized_source_locations; + Pbrt.Pp.pp_record_field ~first:false "log_message_body" (Pbrt.Pp.pp_list pp_log_message_body) fmt v.log_message_body; + Pbrt.Pp.pp_record_field ~first:false "histogram_names" (Pbrt.Pp.pp_list pp_histogram_name) fmt v.histogram_names; + Pbrt.Pp.pp_record_field ~first:false "build_ids" (Pbrt.Pp.pp_list pp_interned_string) fmt v.build_ids; + Pbrt.Pp.pp_record_field ~first:false "mapping_paths" (Pbrt.Pp.pp_list pp_interned_string) fmt v.mapping_paths; + Pbrt.Pp.pp_record_field ~first:false "source_paths" (Pbrt.Pp.pp_list pp_interned_string) fmt v.source_paths; + Pbrt.Pp.pp_record_field ~first:false "function_names" (Pbrt.Pp.pp_list pp_interned_string) fmt v.function_names; + Pbrt.Pp.pp_record_field ~first:false "mappings" (Pbrt.Pp.pp_list pp_mapping) fmt v.mappings; + Pbrt.Pp.pp_record_field ~first:false "frames" (Pbrt.Pp.pp_list pp_frame) fmt v.frames; + Pbrt.Pp.pp_record_field ~first:false "callstacks" (Pbrt.Pp.pp_list pp_callstack) fmt v.callstacks; + Pbrt.Pp.pp_record_field ~first:false "vulkan_memory_keys" (Pbrt.Pp.pp_list pp_interned_string) fmt v.vulkan_memory_keys; + Pbrt.Pp.pp_record_field ~first:false "graphics_contexts" (Pbrt.Pp.pp_list pp_interned_graphics_context) fmt v.graphics_contexts; + Pbrt.Pp.pp_record_field ~first:false "gpu_specifications" (Pbrt.Pp.pp_list pp_interned_gpu_render_stage_specification) fmt v.gpu_specifications; + Pbrt.Pp.pp_record_field ~first:false "kernel_symbols" (Pbrt.Pp.pp_list pp_interned_string) fmt v.kernel_symbols; + Pbrt.Pp.pp_record_field ~first:false "debug_annotation_string_values" (Pbrt.Pp.pp_list pp_interned_string) fmt v.debug_annotation_string_values; + Pbrt.Pp.pp_record_field ~first:false "packet_context" (Pbrt.Pp.pp_list pp_network_packet_context) fmt v.packet_context; + Pbrt.Pp.pp_record_field ~first:false "v8_js_function_name" (Pbrt.Pp.pp_list pp_interned_v8_string) fmt v.v8_js_function_name; + Pbrt.Pp.pp_record_field ~first:false "v8_js_function" (Pbrt.Pp.pp_list pp_interned_v8_js_function) fmt v.v8_js_function; + Pbrt.Pp.pp_record_field ~first:false "v8_js_script" (Pbrt.Pp.pp_list pp_interned_v8_js_script) fmt v.v8_js_script; + Pbrt.Pp.pp_record_field ~first:false "v8_wasm_script" (Pbrt.Pp.pp_list pp_interned_v8_wasm_script) fmt v.v8_wasm_script; + Pbrt.Pp.pp_record_field ~first:false "v8_isolate" (Pbrt.Pp.pp_list pp_interned_v8_isolate) fmt v.v8_isolate; + Pbrt.Pp.pp_record_field ~first:false "protolog_string_args" (Pbrt.Pp.pp_list pp_interned_string) fmt v.protolog_string_args; + Pbrt.Pp.pp_record_field ~first:false "protolog_stacktrace" (Pbrt.Pp.pp_list pp_interned_string) fmt v.protolog_stacktrace; + Pbrt.Pp.pp_record_field ~first:false "viewcapture_package_name" (Pbrt.Pp.pp_list pp_interned_string) fmt v.viewcapture_package_name; + Pbrt.Pp.pp_record_field ~first:false "viewcapture_window_name" (Pbrt.Pp.pp_list pp_interned_string) fmt v.viewcapture_window_name; + Pbrt.Pp.pp_record_field ~first:false "viewcapture_view_id" (Pbrt.Pp.pp_list pp_interned_string) fmt v.viewcapture_view_id; + Pbrt.Pp.pp_record_field ~first:false "viewcapture_class_name" (Pbrt.Pp.pp_list pp_interned_string) fmt v.viewcapture_class_name; + Pbrt.Pp.pp_record_field ~first:false "app_wakelock_info" (Pbrt.Pp.pp_list pp_app_wakelock_info) fmt v.app_wakelock_info; + Pbrt.Pp.pp_record_field ~first:false "correlation_id_str" (Pbrt.Pp.pp_list pp_interned_string) fmt v.correlation_id_str; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units fmt (v:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units) = + match v with + | Unspecified -> Format.fprintf fmt "Unspecified" + | Bytes -> Format.fprintf fmt "Bytes" + | Count -> Format.fprintf fmt "Count" + +let rec pp_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry fmt (v:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "units" pp_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units fmt v.units; + if not (memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_units v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value_uint64" Pbrt.Pp.pp_int64 fmt v.value_uint64; + if not (memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_value_uint64 v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value_string" Pbrt.Pp.pp_string fmt v.value_string; + if not (memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_value_string v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_memory_tracker_snapshot_process_snapshot_memory_node fmt (v:memory_tracker_snapshot_process_snapshot_memory_node) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int64 fmt v.id; + if not (memory_tracker_snapshot_process_snapshot_memory_node_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "absolute_name" Pbrt.Pp.pp_string fmt v.absolute_name; + if not (memory_tracker_snapshot_process_snapshot_memory_node_has_absolute_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "weak" Pbrt.Pp.pp_bool fmt v.weak; + if not (memory_tracker_snapshot_process_snapshot_memory_node_has_weak v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "size_bytes" Pbrt.Pp.pp_int64 fmt v.size_bytes; + if not (memory_tracker_snapshot_process_snapshot_memory_node_has_size_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "entries" (Pbrt.Pp.pp_list pp_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) fmt v.entries; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_memory_tracker_snapshot_process_snapshot_memory_edge fmt (v:memory_tracker_snapshot_process_snapshot_memory_edge) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "source_id" Pbrt.Pp.pp_int64 fmt v.source_id; + if not (memory_tracker_snapshot_process_snapshot_memory_edge_has_source_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "target_id" Pbrt.Pp.pp_int64 fmt v.target_id; + if not (memory_tracker_snapshot_process_snapshot_memory_edge_has_target_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "importance" Pbrt.Pp.pp_int32 fmt v.importance; + if not (memory_tracker_snapshot_process_snapshot_memory_edge_has_importance v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "overridable" Pbrt.Pp.pp_bool fmt v.overridable; + if not (memory_tracker_snapshot_process_snapshot_memory_edge_has_overridable v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_memory_tracker_snapshot_process_snapshot fmt (v:memory_tracker_snapshot_process_snapshot) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (memory_tracker_snapshot_process_snapshot_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "allocator_dumps" (Pbrt.Pp.pp_list pp_memory_tracker_snapshot_process_snapshot_memory_node) fmt v.allocator_dumps; + Pbrt.Pp.pp_record_field ~first:false "memory_edges" (Pbrt.Pp.pp_list pp_memory_tracker_snapshot_process_snapshot_memory_edge) fmt v.memory_edges; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_memory_tracker_snapshot_level_of_detail fmt (v:memory_tracker_snapshot_level_of_detail) = + match v with + | Detail_full -> Format.fprintf fmt "Detail_full" + | Detail_light -> Format.fprintf fmt "Detail_light" + | Detail_background -> Format.fprintf fmt "Detail_background" + +let rec pp_memory_tracker_snapshot fmt (v:memory_tracker_snapshot) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "global_dump_id" Pbrt.Pp.pp_int64 fmt v.global_dump_id; + if not (memory_tracker_snapshot_has_global_dump_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "level_of_detail" pp_memory_tracker_snapshot_level_of_detail fmt v.level_of_detail; + if not (memory_tracker_snapshot_has_level_of_detail v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "process_memory_dumps" (Pbrt.Pp.pp_list pp_memory_tracker_snapshot_process_snapshot) fmt v.process_memory_dumps; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_perfetto_metatrace_arg_key_or_interned_key fmt (v:perfetto_metatrace_arg_key_or_interned_key) = + match v with + | Key x -> Format.fprintf fmt "@[Key(@,%a)@]" Pbrt.Pp.pp_string x + | Key_iid x -> Format.fprintf fmt "@[Key_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_perfetto_metatrace_arg_value_or_interned_value fmt (v:perfetto_metatrace_arg_value_or_interned_value) = + match v with + | Value x -> Format.fprintf fmt "@[Value(@,%a)@]" Pbrt.Pp.pp_string x + | Value_iid x -> Format.fprintf fmt "@[Value_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_perfetto_metatrace_arg fmt (v:perfetto_metatrace_arg) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "key_or_interned_key" (Pbrt.Pp.pp_option pp_perfetto_metatrace_arg_key_or_interned_key) fmt v.key_or_interned_key; + Pbrt.Pp.pp_record_field ~first:false "value_or_interned_value" (Pbrt.Pp.pp_option pp_perfetto_metatrace_arg_value_or_interned_value) fmt v.value_or_interned_value; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_perfetto_metatrace_interned_string fmt (v:perfetto_metatrace_interned_string) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "iid" Pbrt.Pp.pp_int64 fmt v.iid; + if not (perfetto_metatrace_interned_string_has_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_string fmt v.value; + if not (perfetto_metatrace_interned_string_has_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_perfetto_metatrace_record_type fmt (v:perfetto_metatrace_record_type) = + match v with + | Event_id x -> Format.fprintf fmt "@[Event_id(@,%a)@]" Pbrt.Pp.pp_int32 x + | Counter_id x -> Format.fprintf fmt "@[Counter_id(@,%a)@]" Pbrt.Pp.pp_int32 x + | Event_name x -> Format.fprintf fmt "@[Event_name(@,%a)@]" Pbrt.Pp.pp_string x + | Event_name_iid x -> Format.fprintf fmt "@[Event_name_iid(@,%a)@]" Pbrt.Pp.pp_int64 x + | Counter_name x -> Format.fprintf fmt "@[Counter_name(@,%a)@]" Pbrt.Pp.pp_string x + +and pp_perfetto_metatrace fmt (v:perfetto_metatrace) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "record_type" (Pbrt.Pp.pp_option pp_perfetto_metatrace_record_type) fmt v.record_type; + Pbrt.Pp.pp_record_field ~first:false "event_duration_ns" Pbrt.Pp.pp_int64 fmt v.event_duration_ns; + if not (perfetto_metatrace_has_event_duration_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "counter_value" Pbrt.Pp.pp_int32 fmt v.counter_value; + if not (perfetto_metatrace_has_counter_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_id" Pbrt.Pp.pp_int32 fmt v.thread_id; + if not (perfetto_metatrace_has_thread_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "has_overruns" Pbrt.Pp.pp_bool fmt v.has_overruns; + if not (perfetto_metatrace_has_has_overruns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "args" (Pbrt.Pp.pp_list pp_perfetto_metatrace_arg) fmt v.args; + Pbrt.Pp.pp_record_field ~first:false "interned_strings" (Pbrt.Pp.pp_list pp_perfetto_metatrace_interned_string) fmt v.interned_strings; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_tracing_service_event_data_sources_data_source fmt (v:tracing_service_event_data_sources_data_source) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "producer_name" Pbrt.Pp.pp_string fmt v.producer_name; + if not (tracing_service_event_data_sources_data_source_has_producer_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "data_source_name" Pbrt.Pp.pp_string fmt v.data_source_name; + if not (tracing_service_event_data_sources_data_source_has_data_source_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_tracing_service_event_data_sources fmt (v:tracing_service_event_data_sources) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "data_source" (Pbrt.Pp.pp_list pp_tracing_service_event_data_sources_data_source) fmt v.data_source; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_tracing_service_event fmt (v:tracing_service_event) = + match v with + | Tracing_started x -> Format.fprintf fmt "@[Tracing_started(@,%a)@]" Pbrt.Pp.pp_bool x + | All_data_sources_started x -> Format.fprintf fmt "@[All_data_sources_started(@,%a)@]" Pbrt.Pp.pp_bool x + | Flush_started x -> Format.fprintf fmt "@[Flush_started(@,%a)@]" Pbrt.Pp.pp_bool x + | All_data_sources_flushed x -> Format.fprintf fmt "@[All_data_sources_flushed(@,%a)@]" Pbrt.Pp.pp_bool x + | Read_tracing_buffers_completed x -> Format.fprintf fmt "@[Read_tracing_buffers_completed(@,%a)@]" Pbrt.Pp.pp_bool x + | Tracing_disabled x -> Format.fprintf fmt "@[Tracing_disabled(@,%a)@]" Pbrt.Pp.pp_bool x + | Seized_for_bugreport x -> Format.fprintf fmt "@[Seized_for_bugreport(@,%a)@]" Pbrt.Pp.pp_bool x + | Slow_starting_data_sources x -> Format.fprintf fmt "@[Slow_starting_data_sources(@,%a)@]" pp_tracing_service_event_data_sources x + | Last_flush_slow_data_sources x -> Format.fprintf fmt "@[Last_flush_slow_data_sources(@,%a)@]" pp_tracing_service_event_data_sources x + | Clone_started x -> Format.fprintf fmt "@[Clone_started(@,%a)@]" Pbrt.Pp.pp_bool x + | Buffer_cloned x -> Format.fprintf fmt "@[Buffer_cloned(@,%a)@]" Pbrt.Pp.pp_int32 x + +let rec pp_android_energy_consumer fmt (v:android_energy_consumer) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "energy_consumer_id" Pbrt.Pp.pp_int32 fmt v.energy_consumer_id; + if not (android_energy_consumer_has_energy_consumer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ordinal" Pbrt.Pp.pp_int32 fmt v.ordinal; + if not (android_energy_consumer_has_ordinal v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" Pbrt.Pp.pp_string fmt v.type_; + if not (android_energy_consumer_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (android_energy_consumer_has_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_energy_consumer_descriptor fmt (v:android_energy_consumer_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "energy_consumers" (Pbrt.Pp.pp_list pp_android_energy_consumer) fmt v.energy_consumers; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_energy_estimation_breakdown_energy_uid_breakdown fmt (v:android_energy_estimation_breakdown_energy_uid_breakdown) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "uid" Pbrt.Pp.pp_int32 fmt v.uid; + if not (android_energy_estimation_breakdown_energy_uid_breakdown_has_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "energy_uws" Pbrt.Pp.pp_int64 fmt v.energy_uws; + if not (android_energy_estimation_breakdown_energy_uid_breakdown_has_energy_uws v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_android_energy_estimation_breakdown fmt (v:android_energy_estimation_breakdown) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "energy_consumer_descriptor" (Pbrt.Pp.pp_option pp_android_energy_consumer_descriptor) fmt v.energy_consumer_descriptor; + Pbrt.Pp.pp_record_field ~first:false "energy_consumer_id" Pbrt.Pp.pp_int32 fmt v.energy_consumer_id; + if not (android_energy_estimation_breakdown_has_energy_consumer_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "energy_uws" Pbrt.Pp.pp_int64 fmt v.energy_uws; + if not (android_energy_estimation_breakdown_has_energy_uws v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "per_uid_breakdown" (Pbrt.Pp.pp_list pp_android_energy_estimation_breakdown_energy_uid_breakdown) fmt v.per_uid_breakdown; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_entity_state_residency_power_entity_state fmt (v:entity_state_residency_power_entity_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "entity_index" Pbrt.Pp.pp_int32 fmt v.entity_index; + if not (entity_state_residency_power_entity_state_has_entity_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "state_index" Pbrt.Pp.pp_int32 fmt v.state_index; + if not (entity_state_residency_power_entity_state_has_state_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "entity_name" Pbrt.Pp.pp_string fmt v.entity_name; + if not (entity_state_residency_power_entity_state_has_entity_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "state_name" Pbrt.Pp.pp_string fmt v.state_name; + if not (entity_state_residency_power_entity_state_has_state_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_entity_state_residency_state_residency fmt (v:entity_state_residency_state_residency) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "entity_index" Pbrt.Pp.pp_int32 fmt v.entity_index; + if not (entity_state_residency_state_residency_has_entity_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "state_index" Pbrt.Pp.pp_int32 fmt v.state_index; + if not (entity_state_residency_state_residency_has_state_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "total_time_in_state_ms" Pbrt.Pp.pp_int64 fmt v.total_time_in_state_ms; + if not (entity_state_residency_state_residency_has_total_time_in_state_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "total_state_entry_count" Pbrt.Pp.pp_int64 fmt v.total_state_entry_count; + if not (entity_state_residency_state_residency_has_total_state_entry_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "last_entry_timestamp_ms" Pbrt.Pp.pp_int64 fmt v.last_entry_timestamp_ms; + if not (entity_state_residency_state_residency_has_last_entry_timestamp_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_entity_state_residency fmt (v:entity_state_residency) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "power_entity_state" (Pbrt.Pp.pp_list pp_entity_state_residency_power_entity_state) fmt v.power_entity_state; + Pbrt.Pp.pp_record_field ~first:false "residency" (Pbrt.Pp.pp_list pp_entity_state_residency_state_residency) fmt v.residency; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_battery_counters fmt (v:battery_counters) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "charge_counter_uah" Pbrt.Pp.pp_int64 fmt v.charge_counter_uah; + if not (battery_counters_has_charge_counter_uah v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "capacity_percent" Pbrt.Pp.pp_float fmt v.capacity_percent; + if not (battery_counters_has_capacity_percent v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "current_ua" Pbrt.Pp.pp_int64 fmt v.current_ua; + if not (battery_counters_has_current_ua v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "current_avg_ua" Pbrt.Pp.pp_int64 fmt v.current_avg_ua; + if not (battery_counters_has_current_avg_ua v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (battery_counters_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "energy_counter_uwh" Pbrt.Pp.pp_int64 fmt v.energy_counter_uwh; + if not (battery_counters_has_energy_counter_uwh v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "voltage_uv" Pbrt.Pp.pp_int64 fmt v.voltage_uv; + if not (battery_counters_has_voltage_uv v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_power_rails_rail_descriptor fmt (v:power_rails_rail_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "index" Pbrt.Pp.pp_int32 fmt v.index; + if not (power_rails_rail_descriptor_has_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rail_name" Pbrt.Pp.pp_string fmt v.rail_name; + if not (power_rails_rail_descriptor_has_rail_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "subsys_name" Pbrt.Pp.pp_string fmt v.subsys_name; + if not (power_rails_rail_descriptor_has_subsys_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "sampling_rate" Pbrt.Pp.pp_int32 fmt v.sampling_rate; + if not (power_rails_rail_descriptor_has_sampling_rate v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_power_rails_energy_data fmt (v:power_rails_energy_data) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "index" Pbrt.Pp.pp_int32 fmt v.index; + if not (power_rails_energy_data_has_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp_ms" Pbrt.Pp.pp_int64 fmt v.timestamp_ms; + if not (power_rails_energy_data_has_timestamp_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "energy" Pbrt.Pp.pp_int64 fmt v.energy; + if not (power_rails_energy_data_has_energy v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_power_rails fmt (v:power_rails) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "rail_descriptor" (Pbrt.Pp.pp_list pp_power_rails_rail_descriptor) fmt v.rail_descriptor; + Pbrt.Pp.pp_record_field ~first:false "energy_data" (Pbrt.Pp.pp_list pp_power_rails_energy_data) fmt v.energy_data; + Pbrt.Pp.pp_record_field ~first:false "session_uuid" Pbrt.Pp.pp_int64 fmt v.session_uuid; + if not (power_rails_has_session_uuid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_obfuscated_member fmt (v:obfuscated_member) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "obfuscated_name" Pbrt.Pp.pp_string fmt v.obfuscated_name; + if not (obfuscated_member_has_obfuscated_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "deobfuscated_name" Pbrt.Pp.pp_string fmt v.deobfuscated_name; + if not (obfuscated_member_has_deobfuscated_name v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_obfuscated_class fmt (v:obfuscated_class) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "obfuscated_name" Pbrt.Pp.pp_string fmt v.obfuscated_name; + if not (obfuscated_class_has_obfuscated_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "deobfuscated_name" Pbrt.Pp.pp_string fmt v.deobfuscated_name; + if not (obfuscated_class_has_deobfuscated_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "obfuscated_members" (Pbrt.Pp.pp_list pp_obfuscated_member) fmt v.obfuscated_members; + Pbrt.Pp.pp_record_field ~first:false "obfuscated_methods" (Pbrt.Pp.pp_list pp_obfuscated_member) fmt v.obfuscated_methods; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_deobfuscation_mapping fmt (v:deobfuscation_mapping) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "package_name" Pbrt.Pp.pp_string fmt v.package_name; + if not (deobfuscation_mapping_has_package_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "version_code" Pbrt.Pp.pp_int64 fmt v.version_code; + if not (deobfuscation_mapping_has_version_code v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "obfuscated_classes" (Pbrt.Pp.pp_list pp_obfuscated_class) fmt v.obfuscated_classes; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_heap_graph_root_type fmt (v:heap_graph_root_type) = + match v with + | Root_unknown -> Format.fprintf fmt "Root_unknown" + | Root_jni_global -> Format.fprintf fmt "Root_jni_global" + | Root_jni_local -> Format.fprintf fmt "Root_jni_local" + | Root_java_frame -> Format.fprintf fmt "Root_java_frame" + | Root_native_stack -> Format.fprintf fmt "Root_native_stack" + | Root_sticky_class -> Format.fprintf fmt "Root_sticky_class" + | Root_thread_block -> Format.fprintf fmt "Root_thread_block" + | Root_monitor_used -> Format.fprintf fmt "Root_monitor_used" + | Root_thread_object -> Format.fprintf fmt "Root_thread_object" + | Root_interned_string -> Format.fprintf fmt "Root_interned_string" + | Root_finalizing -> Format.fprintf fmt "Root_finalizing" + | Root_debugger -> Format.fprintf fmt "Root_debugger" + | Root_reference_cleanup -> Format.fprintf fmt "Root_reference_cleanup" + | Root_vm_internal -> Format.fprintf fmt "Root_vm_internal" + | Root_jni_monitor -> Format.fprintf fmt "Root_jni_monitor" + +let rec pp_heap_graph_root fmt (v:heap_graph_root) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "object_ids" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.object_ids; + Pbrt.Pp.pp_record_field ~first:false "root_type" pp_heap_graph_root_type fmt v.root_type; + if not (heap_graph_root_has_root_type v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_heap_graph_type_kind fmt (v:heap_graph_type_kind) = + match v with + | Kind_unknown -> Format.fprintf fmt "Kind_unknown" + | Kind_normal -> Format.fprintf fmt "Kind_normal" + | Kind_noreferences -> Format.fprintf fmt "Kind_noreferences" + | Kind_string -> Format.fprintf fmt "Kind_string" + | Kind_array -> Format.fprintf fmt "Kind_array" + | Kind_class -> Format.fprintf fmt "Kind_class" + | Kind_classloader -> Format.fprintf fmt "Kind_classloader" + | Kind_dexcache -> Format.fprintf fmt "Kind_dexcache" + | Kind_soft_reference -> Format.fprintf fmt "Kind_soft_reference" + | Kind_weak_reference -> Format.fprintf fmt "Kind_weak_reference" + | Kind_finalizer_reference -> Format.fprintf fmt "Kind_finalizer_reference" + | Kind_phantom_reference -> Format.fprintf fmt "Kind_phantom_reference" + +let rec pp_heap_graph_type fmt (v:heap_graph_type) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "id" Pbrt.Pp.pp_int64 fmt v.id; + if not (heap_graph_type_has_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "location_id" Pbrt.Pp.pp_int64 fmt v.location_id; + if not (heap_graph_type_has_location_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "class_name" Pbrt.Pp.pp_string fmt v.class_name; + if not (heap_graph_type_has_class_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "object_size" Pbrt.Pp.pp_int64 fmt v.object_size; + if not (heap_graph_type_has_object_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "superclass_id" Pbrt.Pp.pp_int64 fmt v.superclass_id; + if not (heap_graph_type_has_superclass_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "reference_field_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.reference_field_id; + Pbrt.Pp.pp_record_field ~first:false "kind" pp_heap_graph_type_kind fmt v.kind; + if not (heap_graph_type_has_kind v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "classloader_id" Pbrt.Pp.pp_int64 fmt v.classloader_id; + if not (heap_graph_type_has_classloader_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_heap_graph_object_heap_type fmt (v:heap_graph_object_heap_type) = + match v with + | Heap_type_unknown -> Format.fprintf fmt "Heap_type_unknown" + | Heap_type_app -> Format.fprintf fmt "Heap_type_app" + | Heap_type_zygote -> Format.fprintf fmt "Heap_type_zygote" + | Heap_type_boot_image -> Format.fprintf fmt "Heap_type_boot_image" + +let rec pp_heap_graph_object_identifier fmt (v:heap_graph_object_identifier) = + match v with + | Id x -> Format.fprintf fmt "@[Id(@,%a)@]" Pbrt.Pp.pp_int64 x + | Id_delta x -> Format.fprintf fmt "@[Id_delta(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_heap_graph_object fmt (v:heap_graph_object) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "identifier" (Pbrt.Pp.pp_option pp_heap_graph_object_identifier) fmt v.identifier; + Pbrt.Pp.pp_record_field ~first:false "type_id" Pbrt.Pp.pp_int64 fmt v.type_id; + if not (heap_graph_object_has_type_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "self_size" Pbrt.Pp.pp_int64 fmt v.self_size; + if not (heap_graph_object_has_self_size v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "reference_field_id_base" Pbrt.Pp.pp_int64 fmt v.reference_field_id_base; + if not (heap_graph_object_has_reference_field_id_base v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "reference_field_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.reference_field_id; + Pbrt.Pp.pp_record_field ~first:false "reference_object_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.reference_object_id; + Pbrt.Pp.pp_record_field ~first:false "native_allocation_registry_size_field" Pbrt.Pp.pp_int64 fmt v.native_allocation_registry_size_field; + if not (heap_graph_object_has_native_allocation_registry_size_field v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "heap_type_delta" pp_heap_graph_object_heap_type fmt v.heap_type_delta; + if not (heap_graph_object_has_heap_type_delta v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "runtime_internal_object_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.runtime_internal_object_id; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_heap_graph fmt (v:heap_graph) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (heap_graph_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "objects" (Pbrt.Pp.pp_list pp_heap_graph_object) fmt v.objects; + Pbrt.Pp.pp_record_field ~first:false "roots" (Pbrt.Pp.pp_list pp_heap_graph_root) fmt v.roots; + Pbrt.Pp.pp_record_field ~first:false "types" (Pbrt.Pp.pp_list pp_heap_graph_type) fmt v.types; + Pbrt.Pp.pp_record_field ~first:false "field_names" (Pbrt.Pp.pp_list pp_interned_string) fmt v.field_names; + Pbrt.Pp.pp_record_field ~first:false "location_names" (Pbrt.Pp.pp_list pp_interned_string) fmt v.location_names; + Pbrt.Pp.pp_record_field ~first:false "continued" Pbrt.Pp.pp_bool fmt v.continued; + if not (heap_graph_has_continued v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "index" Pbrt.Pp.pp_int64 fmt v.index; + if not (heap_graph_has_index v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_profile_packet_heap_sample fmt (v:profile_packet_heap_sample) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "callstack_id" Pbrt.Pp.pp_int64 fmt v.callstack_id; + if not (profile_packet_heap_sample_has_callstack_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "self_allocated" Pbrt.Pp.pp_int64 fmt v.self_allocated; + if not (profile_packet_heap_sample_has_self_allocated v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "self_freed" Pbrt.Pp.pp_int64 fmt v.self_freed; + if not (profile_packet_heap_sample_has_self_freed v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "self_max" Pbrt.Pp.pp_int64 fmt v.self_max; + if not (profile_packet_heap_sample_has_self_max v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "self_max_count" Pbrt.Pp.pp_int64 fmt v.self_max_count; + if not (profile_packet_heap_sample_has_self_max_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp" Pbrt.Pp.pp_int64 fmt v.timestamp; + if not (profile_packet_heap_sample_has_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "alloc_count" Pbrt.Pp.pp_int64 fmt v.alloc_count; + if not (profile_packet_heap_sample_has_alloc_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "free_count" Pbrt.Pp.pp_int64 fmt v.free_count; + if not (profile_packet_heap_sample_has_free_count v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_profile_packet_histogram_bucket fmt (v:profile_packet_histogram_bucket) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "upper_limit" Pbrt.Pp.pp_int64 fmt v.upper_limit; + if not (profile_packet_histogram_bucket_has_upper_limit v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "max_bucket" Pbrt.Pp.pp_bool fmt v.max_bucket; + if not (profile_packet_histogram_bucket_has_max_bucket v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "count" Pbrt.Pp.pp_int64 fmt v.count; + if not (profile_packet_histogram_bucket_has_count v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_profile_packet_histogram fmt (v:profile_packet_histogram) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "buckets" (Pbrt.Pp.pp_list pp_profile_packet_histogram_bucket) fmt v.buckets; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_profile_packet_process_stats fmt (v:profile_packet_process_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "unwinding_errors" Pbrt.Pp.pp_int64 fmt v.unwinding_errors; + if not (profile_packet_process_stats_has_unwinding_errors v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "heap_samples" Pbrt.Pp.pp_int64 fmt v.heap_samples; + if not (profile_packet_process_stats_has_heap_samples v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "map_reparses" Pbrt.Pp.pp_int64 fmt v.map_reparses; + if not (profile_packet_process_stats_has_map_reparses v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "unwinding_time_us" (Pbrt.Pp.pp_option pp_profile_packet_histogram) fmt v.unwinding_time_us; + Pbrt.Pp.pp_record_field ~first:false "total_unwinding_time_us" Pbrt.Pp.pp_int64 fmt v.total_unwinding_time_us; + if not (profile_packet_process_stats_has_total_unwinding_time_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "client_spinlock_blocked_us" Pbrt.Pp.pp_int64 fmt v.client_spinlock_blocked_us; + if not (profile_packet_process_stats_has_client_spinlock_blocked_us v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_profile_packet_process_heap_samples_client_error fmt (v:profile_packet_process_heap_samples_client_error) = + match v with + | Client_error_none -> Format.fprintf fmt "Client_error_none" + | Client_error_hit_timeout -> Format.fprintf fmt "Client_error_hit_timeout" + | Client_error_invalid_stack_bounds -> Format.fprintf fmt "Client_error_invalid_stack_bounds" + +let rec pp_profile_packet_process_heap_samples fmt (v:profile_packet_process_heap_samples) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int64 fmt v.pid; + if not (profile_packet_process_heap_samples_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "from_startup" Pbrt.Pp.pp_bool fmt v.from_startup; + if not (profile_packet_process_heap_samples_has_from_startup v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rejected_concurrent" Pbrt.Pp.pp_bool fmt v.rejected_concurrent; + if not (profile_packet_process_heap_samples_has_rejected_concurrent v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "disconnected" Pbrt.Pp.pp_bool fmt v.disconnected; + if not (profile_packet_process_heap_samples_has_disconnected v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer_overran" Pbrt.Pp.pp_bool fmt v.buffer_overran; + if not (profile_packet_process_heap_samples_has_buffer_overran v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "client_error" pp_profile_packet_process_heap_samples_client_error fmt v.client_error; + if not (profile_packet_process_heap_samples_has_client_error v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "buffer_corrupted" Pbrt.Pp.pp_bool fmt v.buffer_corrupted; + if not (profile_packet_process_heap_samples_has_buffer_corrupted v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "hit_guardrail" Pbrt.Pp.pp_bool fmt v.hit_guardrail; + if not (profile_packet_process_heap_samples_has_hit_guardrail v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "heap_name" Pbrt.Pp.pp_string fmt v.heap_name; + if not (profile_packet_process_heap_samples_has_heap_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "sampling_interval_bytes" Pbrt.Pp.pp_int64 fmt v.sampling_interval_bytes; + if not (profile_packet_process_heap_samples_has_sampling_interval_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "orig_sampling_interval_bytes" Pbrt.Pp.pp_int64 fmt v.orig_sampling_interval_bytes; + if not (profile_packet_process_heap_samples_has_orig_sampling_interval_bytes v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp" Pbrt.Pp.pp_int64 fmt v.timestamp; + if not (profile_packet_process_heap_samples_has_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "stats" (Pbrt.Pp.pp_option pp_profile_packet_process_stats) fmt v.stats; + Pbrt.Pp.pp_record_field ~first:false "samples" (Pbrt.Pp.pp_list pp_profile_packet_heap_sample) fmt v.samples; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_profile_packet fmt (v:profile_packet) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "strings" (Pbrt.Pp.pp_list pp_interned_string) fmt v.strings; + Pbrt.Pp.pp_record_field ~first:false "mappings" (Pbrt.Pp.pp_list pp_mapping) fmt v.mappings; + Pbrt.Pp.pp_record_field ~first:false "frames" (Pbrt.Pp.pp_list pp_frame) fmt v.frames; + Pbrt.Pp.pp_record_field ~first:false "callstacks" (Pbrt.Pp.pp_list pp_callstack) fmt v.callstacks; + Pbrt.Pp.pp_record_field ~first:false "process_dumps" (Pbrt.Pp.pp_list pp_profile_packet_process_heap_samples) fmt v.process_dumps; + Pbrt.Pp.pp_record_field ~first:false "continued" Pbrt.Pp.pp_bool fmt v.continued; + if not (profile_packet_has_continued v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "index" Pbrt.Pp.pp_int64 fmt v.index; + if not (profile_packet_has_index v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_streaming_allocation fmt (v:streaming_allocation) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "address" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.address; + Pbrt.Pp.pp_record_field ~first:false "size" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.size; + Pbrt.Pp.pp_record_field ~first:false "sample_size" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.sample_size; + Pbrt.Pp.pp_record_field ~first:false "clock_monotonic_coarse_timestamp" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.clock_monotonic_coarse_timestamp; + Pbrt.Pp.pp_record_field ~first:false "heap_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.heap_id; + Pbrt.Pp.pp_record_field ~first:false "sequence_number" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.sequence_number; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_streaming_free fmt (v:streaming_free) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "address" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.address; + Pbrt.Pp.pp_record_field ~first:false "heap_id" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.heap_id; + Pbrt.Pp.pp_record_field ~first:false "sequence_number" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.sequence_number; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_streaming_profile_packet fmt (v:streaming_profile_packet) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "callstack_iid" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.callstack_iid; + Pbrt.Pp.pp_record_field ~first:false "timestamp_delta_us" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.timestamp_delta_us; + Pbrt.Pp.pp_record_field ~first:false "process_priority" Pbrt.Pp.pp_int32 fmt v.process_priority; + if not (streaming_profile_packet_has_process_priority v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_profiling_cpu_mode fmt (v:profiling_cpu_mode) = + match v with + | Mode_unknown -> Format.fprintf fmt "Mode_unknown" + | Mode_kernel -> Format.fprintf fmt "Mode_kernel" + | Mode_user -> Format.fprintf fmt "Mode_user" + | Mode_hypervisor -> Format.fprintf fmt "Mode_hypervisor" + | Mode_guest_kernel -> Format.fprintf fmt "Mode_guest_kernel" + | Mode_guest_user -> Format.fprintf fmt "Mode_guest_user" + +let rec pp_profiling_stack_unwind_error fmt (v:profiling_stack_unwind_error) = + match v with + | Unwind_error_unknown -> Format.fprintf fmt "Unwind_error_unknown" + | Unwind_error_none -> Format.fprintf fmt "Unwind_error_none" + | Unwind_error_memory_invalid -> Format.fprintf fmt "Unwind_error_memory_invalid" + | Unwind_error_unwind_info -> Format.fprintf fmt "Unwind_error_unwind_info" + | Unwind_error_unsupported -> Format.fprintf fmt "Unwind_error_unsupported" + | Unwind_error_invalid_map -> Format.fprintf fmt "Unwind_error_invalid_map" + | Unwind_error_max_frames_exceeded -> Format.fprintf fmt "Unwind_error_max_frames_exceeded" + | Unwind_error_repeated_frame -> Format.fprintf fmt "Unwind_error_repeated_frame" + | Unwind_error_invalid_elf -> Format.fprintf fmt "Unwind_error_invalid_elf" + | Unwind_error_system_call -> Format.fprintf fmt "Unwind_error_system_call" + | Unwind_error_thread_timeout -> Format.fprintf fmt "Unwind_error_thread_timeout" + | Unwind_error_thread_does_not_exist -> Format.fprintf fmt "Unwind_error_thread_does_not_exist" + | Unwind_error_bad_arch -> Format.fprintf fmt "Unwind_error_bad_arch" + | Unwind_error_maps_parse -> Format.fprintf fmt "Unwind_error_maps_parse" + | Unwind_error_invalid_parameter -> Format.fprintf fmt "Unwind_error_invalid_parameter" + | Unwind_error_ptrace_call -> Format.fprintf fmt "Unwind_error_ptrace_call" + +let rec pp_profiling fmt (v:profiling) = + let pp_i fmt () = + Pbrt.Pp.pp_unit fmt () + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_perf_sample_sample_skip_reason fmt (v:perf_sample_sample_skip_reason) = + match v with + | Profiler_skip_unknown -> Format.fprintf fmt "Profiler_skip_unknown" + | Profiler_skip_read_stage -> Format.fprintf fmt "Profiler_skip_read_stage" + | Profiler_skip_unwind_stage -> Format.fprintf fmt "Profiler_skip_unwind_stage" + | Profiler_skip_unwind_enqueue -> Format.fprintf fmt "Profiler_skip_unwind_enqueue" + | Profiler_skip_not_in_scope -> Format.fprintf fmt "Profiler_skip_not_in_scope" + +let rec pp_perf_sample_producer_event_data_source_stop_reason fmt (v:perf_sample_producer_event_data_source_stop_reason) = + match v with + | Profiler_stop_unknown -> Format.fprintf fmt "Profiler_stop_unknown" + | Profiler_stop_guardrail -> Format.fprintf fmt "Profiler_stop_guardrail" + +let rec pp_perf_sample_producer_event fmt (v:perf_sample_producer_event) = + match v with + | Source_stop_reason x -> Format.fprintf fmt "@[Source_stop_reason(@,%a)@]" pp_perf_sample_producer_event_data_source_stop_reason x + +let rec pp_perf_sample_optional_unwind_error fmt (v:perf_sample_optional_unwind_error) = + match v with + | Unwind_error x -> Format.fprintf fmt "@[Unwind_error(@,%a)@]" pp_profiling_stack_unwind_error x + +and pp_perf_sample_optional_sample_skipped_reason fmt (v:perf_sample_optional_sample_skipped_reason) = + match v with + | Sample_skipped_reason x -> Format.fprintf fmt "@[Sample_skipped_reason(@,%a)@]" pp_perf_sample_sample_skip_reason x + +and pp_perf_sample fmt (v:perf_sample) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cpu" Pbrt.Pp.pp_int32 fmt v.cpu; + if not (perf_sample_has_cpu v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (perf_sample_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (perf_sample_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cpu_mode" pp_profiling_cpu_mode fmt v.cpu_mode; + if not (perf_sample_has_cpu_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timebase_count" Pbrt.Pp.pp_int64 fmt v.timebase_count; + if not (perf_sample_has_timebase_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "follower_counts" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.follower_counts; + Pbrt.Pp.pp_record_field ~first:false "callstack_iid" Pbrt.Pp.pp_int64 fmt v.callstack_iid; + if not (perf_sample_has_callstack_iid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "optional_unwind_error" (Pbrt.Pp.pp_option pp_perf_sample_optional_unwind_error) fmt v.optional_unwind_error; + Pbrt.Pp.pp_record_field ~first:false "kernel_records_lost" Pbrt.Pp.pp_int64 fmt v.kernel_records_lost; + if not (perf_sample_has_kernel_records_lost v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "optional_sample_skipped_reason" (Pbrt.Pp.pp_option pp_perf_sample_optional_sample_skipped_reason) fmt v.optional_sample_skipped_reason; + Pbrt.Pp.pp_record_field ~first:false "producer_event" (Pbrt.Pp.pp_option pp_perf_sample_producer_event) fmt v.producer_event; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_smaps_entry fmt (v:smaps_entry) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "path" Pbrt.Pp.pp_string fmt v.path; + if not (smaps_entry_has_path v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "size_kb" Pbrt.Pp.pp_int64 fmt v.size_kb; + if not (smaps_entry_has_size_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "private_dirty_kb" Pbrt.Pp.pp_int64 fmt v.private_dirty_kb; + if not (smaps_entry_has_private_dirty_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "swap_kb" Pbrt.Pp.pp_int64 fmt v.swap_kb; + if not (smaps_entry_has_swap_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "file_name" Pbrt.Pp.pp_string fmt v.file_name; + if not (smaps_entry_has_file_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start_address" Pbrt.Pp.pp_int64 fmt v.start_address; + if not (smaps_entry_has_start_address v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "module_timestamp" Pbrt.Pp.pp_int64 fmt v.module_timestamp; + if not (smaps_entry_has_module_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "module_debugid" Pbrt.Pp.pp_string fmt v.module_debugid; + if not (smaps_entry_has_module_debugid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "module_debug_path" Pbrt.Pp.pp_string fmt v.module_debug_path; + if not (smaps_entry_has_module_debug_path v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "protection_flags" Pbrt.Pp.pp_int32 fmt v.protection_flags; + if not (smaps_entry_has_protection_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "private_clean_resident_kb" Pbrt.Pp.pp_int64 fmt v.private_clean_resident_kb; + if not (smaps_entry_has_private_clean_resident_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "shared_dirty_resident_kb" Pbrt.Pp.pp_int64 fmt v.shared_dirty_resident_kb; + if not (smaps_entry_has_shared_dirty_resident_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "shared_clean_resident_kb" Pbrt.Pp.pp_int64 fmt v.shared_clean_resident_kb; + if not (smaps_entry_has_shared_clean_resident_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "locked_kb" Pbrt.Pp.pp_int64 fmt v.locked_kb; + if not (smaps_entry_has_locked_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "proportional_resident_kb" Pbrt.Pp.pp_int64 fmt v.proportional_resident_kb; + if not (smaps_entry_has_proportional_resident_kb v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_smaps_packet fmt (v:smaps_packet) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (smaps_packet_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "entries" (Pbrt.Pp.pp_list pp_smaps_entry) fmt v.entries; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_stats_thread fmt (v:process_stats_thread) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (process_stats_thread_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_stats_fdinfo fmt (v:process_stats_fdinfo) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "fd" Pbrt.Pp.pp_int64 fmt v.fd; + if not (process_stats_fdinfo_has_fd v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "path" Pbrt.Pp.pp_string fmt v.path; + if not (process_stats_fdinfo_has_path v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_stats_process fmt (v:process_stats_process) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (process_stats_process_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "threads" (Pbrt.Pp.pp_list pp_process_stats_thread) fmt v.threads; + Pbrt.Pp.pp_record_field ~first:false "vm_size_kb" Pbrt.Pp.pp_int64 fmt v.vm_size_kb; + if not (process_stats_process_has_vm_size_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vm_rss_kb" Pbrt.Pp.pp_int64 fmt v.vm_rss_kb; + if not (process_stats_process_has_vm_rss_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rss_anon_kb" Pbrt.Pp.pp_int64 fmt v.rss_anon_kb; + if not (process_stats_process_has_rss_anon_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rss_file_kb" Pbrt.Pp.pp_int64 fmt v.rss_file_kb; + if not (process_stats_process_has_rss_file_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "rss_shmem_kb" Pbrt.Pp.pp_int64 fmt v.rss_shmem_kb; + if not (process_stats_process_has_rss_shmem_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vm_swap_kb" Pbrt.Pp.pp_int64 fmt v.vm_swap_kb; + if not (process_stats_process_has_vm_swap_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vm_locked_kb" Pbrt.Pp.pp_int64 fmt v.vm_locked_kb; + if not (process_stats_process_has_vm_locked_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "vm_hwm_kb" Pbrt.Pp.pp_int64 fmt v.vm_hwm_kb; + if not (process_stats_process_has_vm_hwm_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "oom_score_adj" Pbrt.Pp.pp_int64 fmt v.oom_score_adj; + if not (process_stats_process_has_oom_score_adj v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_peak_rss_resettable" Pbrt.Pp.pp_bool fmt v.is_peak_rss_resettable; + if not (process_stats_process_has_is_peak_rss_resettable v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chrome_private_footprint_kb" Pbrt.Pp.pp_int32 fmt v.chrome_private_footprint_kb; + if not (process_stats_process_has_chrome_private_footprint_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chrome_peak_resident_set_kb" Pbrt.Pp.pp_int32 fmt v.chrome_peak_resident_set_kb; + if not (process_stats_process_has_chrome_peak_resident_set_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "fds" (Pbrt.Pp.pp_list pp_process_stats_fdinfo) fmt v.fds; + Pbrt.Pp.pp_record_field ~first:false "smr_rss_kb" Pbrt.Pp.pp_int64 fmt v.smr_rss_kb; + if not (process_stats_process_has_smr_rss_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "smr_pss_kb" Pbrt.Pp.pp_int64 fmt v.smr_pss_kb; + if not (process_stats_process_has_smr_pss_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "smr_pss_anon_kb" Pbrt.Pp.pp_int64 fmt v.smr_pss_anon_kb; + if not (process_stats_process_has_smr_pss_anon_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "smr_pss_file_kb" Pbrt.Pp.pp_int64 fmt v.smr_pss_file_kb; + if not (process_stats_process_has_smr_pss_file_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "smr_pss_shmem_kb" Pbrt.Pp.pp_int64 fmt v.smr_pss_shmem_kb; + if not (process_stats_process_has_smr_pss_shmem_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "smr_swap_pss_kb" Pbrt.Pp.pp_int64 fmt v.smr_swap_pss_kb; + if not (process_stats_process_has_smr_swap_pss_kb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "runtime_user_mode" Pbrt.Pp.pp_int64 fmt v.runtime_user_mode; + if not (process_stats_process_has_runtime_user_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "runtime_kernel_mode" Pbrt.Pp.pp_int64 fmt v.runtime_kernel_mode; + if not (process_stats_process_has_runtime_kernel_mode v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "dmabuf_rss_kb" Pbrt.Pp.pp_int64 fmt v.dmabuf_rss_kb; + if not (process_stats_process_has_dmabuf_rss_kb v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_stats fmt (v:process_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "processes" (Pbrt.Pp.pp_list pp_process_stats_process) fmt v.processes; + Pbrt.Pp.pp_record_field ~first:false "collection_end_timestamp" Pbrt.Pp.pp_int64 fmt v.collection_end_timestamp; + if not (process_stats_has_collection_end_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_tree_thread fmt (v:process_tree_thread) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (process_tree_thread_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tgid" Pbrt.Pp.pp_int32 fmt v.tgid; + if not (process_tree_thread_has_tgid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "name" Pbrt.Pp.pp_string fmt v.name; + if not (process_tree_thread_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "nstid" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.nstid; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_tree_process fmt (v:process_tree_process) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (process_tree_process_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "ppid" Pbrt.Pp.pp_int32 fmt v.ppid; + if not (process_tree_process_has_ppid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cmdline" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.cmdline; + Pbrt.Pp.pp_record_field ~first:false "cmdline_is_comm" Pbrt.Pp.pp_bool fmt v.cmdline_is_comm; + if not (process_tree_process_has_cmdline_is_comm v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "uid" Pbrt.Pp.pp_int32 fmt v.uid; + if not (process_tree_process_has_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "nspid" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.nspid; + Pbrt.Pp.pp_record_field ~first:false "process_start_from_boot" Pbrt.Pp.pp_int64 fmt v.process_start_from_boot; + if not (process_tree_process_has_process_start_from_boot v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_kthread" Pbrt.Pp.pp_bool fmt v.is_kthread; + if not (process_tree_process_has_is_kthread v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_tree fmt (v:process_tree) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "processes" (Pbrt.Pp.pp_list pp_process_tree_process) fmt v.processes; + Pbrt.Pp.pp_record_field ~first:false "threads" (Pbrt.Pp.pp_list pp_process_tree_thread) fmt v.threads; + Pbrt.Pp.pp_record_field ~first:false "collection_end_timestamp" Pbrt.Pp.pp_int64 fmt v.collection_end_timestamp; + if not (process_tree_has_collection_end_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_remote_clock_sync_synced_clocks fmt (v:remote_clock_sync_synced_clocks) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "client_clocks" (Pbrt.Pp.pp_option pp_clock_snapshot) fmt v.client_clocks; + Pbrt.Pp.pp_record_field ~first:false "host_clocks" (Pbrt.Pp.pp_option pp_clock_snapshot) fmt v.host_clocks; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_remote_clock_sync fmt (v:remote_clock_sync) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "synced_clocks" (Pbrt.Pp.pp_list pp_remote_clock_sync_synced_clocks) fmt v.synced_clocks; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_atom fmt (v:atom) = + let pp_i fmt () = + Pbrt.Pp.pp_unit fmt () + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_statsd_atom fmt (v:statsd_atom) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "atom" (Pbrt.Pp.pp_list Pbrt.Pp.pp_unit) fmt v.atom; + Pbrt.Pp.pp_record_field ~first:false "timestamp_nanos" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.timestamp_nanos; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_meminfo_value fmt (v:sys_stats_meminfo_value) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "key" pp_meminfo_counters fmt v.key; + if not (sys_stats_meminfo_value_has_key v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_int64 fmt v.value; + if not (sys_stats_meminfo_value_has_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_vmstat_value fmt (v:sys_stats_vmstat_value) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "key" pp_vmstat_counters fmt v.key; + if not (sys_stats_vmstat_value_has_key v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_int64 fmt v.value; + if not (sys_stats_vmstat_value_has_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_cpu_times fmt (v:sys_stats_cpu_times) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cpu_id" Pbrt.Pp.pp_int32 fmt v.cpu_id; + if not (sys_stats_cpu_times_has_cpu_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "user_ns" Pbrt.Pp.pp_int64 fmt v.user_ns; + if not (sys_stats_cpu_times_has_user_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "user_nice_ns" Pbrt.Pp.pp_int64 fmt v.user_nice_ns; + if not (sys_stats_cpu_times_has_user_nice_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "system_mode_ns" Pbrt.Pp.pp_int64 fmt v.system_mode_ns; + if not (sys_stats_cpu_times_has_system_mode_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "idle_ns" Pbrt.Pp.pp_int64 fmt v.idle_ns; + if not (sys_stats_cpu_times_has_idle_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "io_wait_ns" Pbrt.Pp.pp_int64 fmt v.io_wait_ns; + if not (sys_stats_cpu_times_has_io_wait_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "irq_ns" Pbrt.Pp.pp_int64 fmt v.irq_ns; + if not (sys_stats_cpu_times_has_irq_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "softirq_ns" Pbrt.Pp.pp_int64 fmt v.softirq_ns; + if not (sys_stats_cpu_times_has_softirq_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "steal_ns" Pbrt.Pp.pp_int64 fmt v.steal_ns; + if not (sys_stats_cpu_times_has_steal_ns v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_interrupt_count fmt (v:sys_stats_interrupt_count) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "irq" Pbrt.Pp.pp_int32 fmt v.irq; + if not (sys_stats_interrupt_count_has_irq v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "count" Pbrt.Pp.pp_int64 fmt v.count; + if not (sys_stats_interrupt_count_has_count v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_devfreq_value fmt (v:sys_stats_devfreq_value) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "key" Pbrt.Pp.pp_string fmt v.key; + if not (sys_stats_devfreq_value_has_key v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "value" Pbrt.Pp.pp_int64 fmt v.value; + if not (sys_stats_devfreq_value_has_value v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_buddy_info fmt (v:sys_stats_buddy_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "node" Pbrt.Pp.pp_string fmt v.node; + if not (sys_stats_buddy_info_has_node v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "zone" Pbrt.Pp.pp_string fmt v.zone; + if not (sys_stats_buddy_info_has_zone v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "order_pages" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.order_pages; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_disk_stat fmt (v:sys_stats_disk_stat) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "device_name" Pbrt.Pp.pp_string fmt v.device_name; + if not (sys_stats_disk_stat_has_device_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "read_sectors" Pbrt.Pp.pp_int64 fmt v.read_sectors; + if not (sys_stats_disk_stat_has_read_sectors v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "read_time_ms" Pbrt.Pp.pp_int64 fmt v.read_time_ms; + if not (sys_stats_disk_stat_has_read_time_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "write_sectors" Pbrt.Pp.pp_int64 fmt v.write_sectors; + if not (sys_stats_disk_stat_has_write_sectors v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "write_time_ms" Pbrt.Pp.pp_int64 fmt v.write_time_ms; + if not (sys_stats_disk_stat_has_write_time_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "discard_sectors" Pbrt.Pp.pp_int64 fmt v.discard_sectors; + if not (sys_stats_disk_stat_has_discard_sectors v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "discard_time_ms" Pbrt.Pp.pp_int64 fmt v.discard_time_ms; + if not (sys_stats_disk_stat_has_discard_time_ms v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flush_count" Pbrt.Pp.pp_int64 fmt v.flush_count; + if not (sys_stats_disk_stat_has_flush_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "flush_time_ms" Pbrt.Pp.pp_int64 fmt v.flush_time_ms; + if not (sys_stats_disk_stat_has_flush_time_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_psi_sample_psi_resource fmt (v:sys_stats_psi_sample_psi_resource) = + match v with + | Psi_resource_unspecified -> Format.fprintf fmt "Psi_resource_unspecified" + | Psi_resource_cpu_some -> Format.fprintf fmt "Psi_resource_cpu_some" + | Psi_resource_cpu_full -> Format.fprintf fmt "Psi_resource_cpu_full" + | Psi_resource_io_some -> Format.fprintf fmt "Psi_resource_io_some" + | Psi_resource_io_full -> Format.fprintf fmt "Psi_resource_io_full" + | Psi_resource_memory_some -> Format.fprintf fmt "Psi_resource_memory_some" + | Psi_resource_memory_full -> Format.fprintf fmt "Psi_resource_memory_full" + +let rec pp_sys_stats_psi_sample fmt (v:sys_stats_psi_sample) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "resource" pp_sys_stats_psi_sample_psi_resource fmt v.resource; + if not (sys_stats_psi_sample_has_resource v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "total_ns" Pbrt.Pp.pp_int64 fmt v.total_ns; + if not (sys_stats_psi_sample_has_total_ns v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_thermal_zone fmt (v:sys_stats_thermal_zone) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "name" Pbrt.Pp.pp_string fmt v.name; + if not (sys_stats_thermal_zone_has_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "temp" Pbrt.Pp.pp_int64 fmt v.temp; + if not (sys_stats_thermal_zone_has_temp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "type_" Pbrt.Pp.pp_string fmt v.type_; + if not (sys_stats_thermal_zone_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_cpu_idle_state_entry fmt (v:sys_stats_cpu_idle_state_entry) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "state" Pbrt.Pp.pp_string fmt v.state; + if not (sys_stats_cpu_idle_state_entry_has_state v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "duration_us" Pbrt.Pp.pp_int64 fmt v.duration_us; + if not (sys_stats_cpu_idle_state_entry_has_duration_us v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats_cpu_idle_state fmt (v:sys_stats_cpu_idle_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cpu_id" Pbrt.Pp.pp_int32 fmt v.cpu_id; + if not (sys_stats_cpu_idle_state_has_cpu_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cpuidle_state_entry" (Pbrt.Pp.pp_list pp_sys_stats_cpu_idle_state_entry) fmt v.cpuidle_state_entry; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_sys_stats fmt (v:sys_stats) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "meminfo" (Pbrt.Pp.pp_list pp_sys_stats_meminfo_value) fmt v.meminfo; + Pbrt.Pp.pp_record_field ~first:false "vmstat" (Pbrt.Pp.pp_list pp_sys_stats_vmstat_value) fmt v.vmstat; + Pbrt.Pp.pp_record_field ~first:false "cpu_stat" (Pbrt.Pp.pp_list pp_sys_stats_cpu_times) fmt v.cpu_stat; + Pbrt.Pp.pp_record_field ~first:false "num_forks" Pbrt.Pp.pp_int64 fmt v.num_forks; + if not (sys_stats_has_num_forks v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_irq_total" Pbrt.Pp.pp_int64 fmt v.num_irq_total; + if not (sys_stats_has_num_irq_total v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_irq" (Pbrt.Pp.pp_list pp_sys_stats_interrupt_count) fmt v.num_irq; + Pbrt.Pp.pp_record_field ~first:false "num_softirq_total" Pbrt.Pp.pp_int64 fmt v.num_softirq_total; + if not (sys_stats_has_num_softirq_total v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "num_softirq" (Pbrt.Pp.pp_list pp_sys_stats_interrupt_count) fmt v.num_softirq; + Pbrt.Pp.pp_record_field ~first:false "collection_end_timestamp" Pbrt.Pp.pp_int64 fmt v.collection_end_timestamp; + if not (sys_stats_has_collection_end_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "devfreq" (Pbrt.Pp.pp_list pp_sys_stats_devfreq_value) fmt v.devfreq; + Pbrt.Pp.pp_record_field ~first:false "cpufreq_khz" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.cpufreq_khz; + Pbrt.Pp.pp_record_field ~first:false "buddy_info" (Pbrt.Pp.pp_list pp_sys_stats_buddy_info) fmt v.buddy_info; + Pbrt.Pp.pp_record_field ~first:false "disk_stat" (Pbrt.Pp.pp_list pp_sys_stats_disk_stat) fmt v.disk_stat; + Pbrt.Pp.pp_record_field ~first:false "psi" (Pbrt.Pp.pp_list pp_sys_stats_psi_sample) fmt v.psi; + Pbrt.Pp.pp_record_field ~first:false "thermal_zone" (Pbrt.Pp.pp_list pp_sys_stats_thermal_zone) fmt v.thermal_zone; + Pbrt.Pp.pp_record_field ~first:false "cpuidle_state" (Pbrt.Pp.pp_list pp_sys_stats_cpu_idle_state) fmt v.cpuidle_state; + Pbrt.Pp.pp_record_field ~first:false "gpufreq_mhz" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int64) fmt v.gpufreq_mhz; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_cpu_info_arm_cpu_identifier fmt (v:cpu_info_arm_cpu_identifier) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "implementer" Pbrt.Pp.pp_int32 fmt v.implementer; + if not (cpu_info_arm_cpu_identifier_has_implementer v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "architecture" Pbrt.Pp.pp_int32 fmt v.architecture; + if not (cpu_info_arm_cpu_identifier_has_architecture v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "variant" Pbrt.Pp.pp_int32 fmt v.variant; + if not (cpu_info_arm_cpu_identifier_has_variant v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "part" Pbrt.Pp.pp_int32 fmt v.part; + if not (cpu_info_arm_cpu_identifier_has_part v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "revision" Pbrt.Pp.pp_int32 fmt v.revision; + if not (cpu_info_arm_cpu_identifier_has_revision v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_cpu_info_cpu_identifier fmt (v:cpu_info_cpu_identifier) = + match v with + | Arm_identifier x -> Format.fprintf fmt "@[Arm_identifier(@,%a)@]" pp_cpu_info_arm_cpu_identifier x + +and pp_cpu_info_cpu fmt (v:cpu_info_cpu) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "processor" Pbrt.Pp.pp_string fmt v.processor; + if not (cpu_info_cpu_has_processor v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "frequencies" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.frequencies; + Pbrt.Pp.pp_record_field ~first:false "capacity" Pbrt.Pp.pp_int32 fmt v.capacity; + if not (cpu_info_cpu_has_capacity v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "identifier" (Pbrt.Pp.pp_option pp_cpu_info_cpu_identifier) fmt v.identifier; + Pbrt.Pp.pp_record_field ~first:false "features" Pbrt.Pp.pp_int64 fmt v.features; + if not (cpu_info_cpu_has_features v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_cpu_info fmt (v:cpu_info) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "cpus" (Pbrt.Pp.pp_list pp_cpu_info_cpu) fmt v.cpus; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_test_event_test_payload fmt (v:test_event_test_payload) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "str" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.str; + Pbrt.Pp.pp_record_field ~first:false "nested" (Pbrt.Pp.pp_list pp_test_event_test_payload) fmt v.nested; + Pbrt.Pp.pp_record_field ~first:false "single_string" Pbrt.Pp.pp_string fmt v.single_string; + if not (test_event_test_payload_has_single_string v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "single_int" Pbrt.Pp.pp_int32 fmt v.single_int; + if not (test_event_test_payload_has_single_int v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "repeated_ints" (Pbrt.Pp.pp_list Pbrt.Pp.pp_int32) fmt v.repeated_ints; + Pbrt.Pp.pp_record_field ~first:false "remaining_nesting_depth" Pbrt.Pp.pp_int32 fmt v.remaining_nesting_depth; + if not (test_event_test_payload_has_remaining_nesting_depth v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "debug_annotations" (Pbrt.Pp.pp_list pp_debug_annotation) fmt v.debug_annotations; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_test_event fmt (v:test_event) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "str" Pbrt.Pp.pp_string fmt v.str; + if not (test_event_has_str v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "seq_value" Pbrt.Pp.pp_int32 fmt v.seq_value; + if not (test_event_has_seq_value v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "counter" Pbrt.Pp.pp_int64 fmt v.counter; + if not (test_event_has_counter v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_last" Pbrt.Pp.pp_bool fmt v.is_last; + if not (test_event_has_is_last v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "payload" (Pbrt.Pp.pp_option pp_test_event_test_payload) fmt v.payload; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_packet_defaults fmt (v:trace_packet_defaults) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "timestamp_clock_id" Pbrt.Pp.pp_int32 fmt v.timestamp_clock_id; + if not (trace_packet_defaults_has_timestamp_clock_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "track_event_defaults" (Pbrt.Pp.pp_option pp_track_event_defaults) fmt v.track_event_defaults; + Pbrt.Pp.pp_record_field ~first:false "v8_code_defaults" (Pbrt.Pp.pp_option pp_v8_code_defaults) fmt v.v8_code_defaults; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_uuid fmt (v:trace_uuid) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "msb" Pbrt.Pp.pp_int64 fmt v.msb; + if not (trace_uuid_has_msb v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "lsb" Pbrt.Pp.pp_int64 fmt v.lsb; + if not (trace_uuid_has_lsb v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_descriptor_chrome_process_type fmt (v:process_descriptor_chrome_process_type) = + match v with + | Process_unspecified -> Format.fprintf fmt "Process_unspecified" + | Process_browser -> Format.fprintf fmt "Process_browser" + | Process_renderer -> Format.fprintf fmt "Process_renderer" + | Process_utility -> Format.fprintf fmt "Process_utility" + | Process_zygote -> Format.fprintf fmt "Process_zygote" + | Process_sandbox_helper -> Format.fprintf fmt "Process_sandbox_helper" + | Process_gpu -> Format.fprintf fmt "Process_gpu" + | Process_ppapi_plugin -> Format.fprintf fmt "Process_ppapi_plugin" + | Process_ppapi_broker -> Format.fprintf fmt "Process_ppapi_broker" + +let rec pp_process_descriptor fmt (v:process_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (process_descriptor_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "cmdline" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.cmdline; + Pbrt.Pp.pp_record_field ~first:false "process_name" Pbrt.Pp.pp_string fmt v.process_name; + if not (process_descriptor_has_process_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "process_priority" Pbrt.Pp.pp_int32 fmt v.process_priority; + if not (process_descriptor_has_process_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "start_timestamp_ns" Pbrt.Pp.pp_int64 fmt v.start_timestamp_ns; + if not (process_descriptor_has_start_timestamp_ns v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chrome_process_type" pp_process_descriptor_chrome_process_type fmt v.chrome_process_type; + if not (process_descriptor_has_chrome_process_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "legacy_sort_index" Pbrt.Pp.pp_int32 fmt v.legacy_sort_index; + if not (process_descriptor_has_legacy_sort_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "process_labels" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.process_labels; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_event_range_of_interest fmt (v:track_event_range_of_interest) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "start_us" Pbrt.Pp.pp_int64 fmt v.start_us; + if not (track_event_range_of_interest_has_start_us v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_thread_descriptor_chrome_thread_type fmt (v:thread_descriptor_chrome_thread_type) = + match v with + | Chrome_thread_unspecified -> Format.fprintf fmt "Chrome_thread_unspecified" + | Chrome_thread_main -> Format.fprintf fmt "Chrome_thread_main" + | Chrome_thread_io -> Format.fprintf fmt "Chrome_thread_io" + | Chrome_thread_pool_bg_worker -> Format.fprintf fmt "Chrome_thread_pool_bg_worker" + | Chrome_thread_pool_fg_worker -> Format.fprintf fmt "Chrome_thread_pool_fg_worker" + | Chrome_thread_pool_fb_blocking -> Format.fprintf fmt "Chrome_thread_pool_fb_blocking" + | Chrome_thread_pool_bg_blocking -> Format.fprintf fmt "Chrome_thread_pool_bg_blocking" + | Chrome_thread_pool_service -> Format.fprintf fmt "Chrome_thread_pool_service" + | Chrome_thread_compositor -> Format.fprintf fmt "Chrome_thread_compositor" + | Chrome_thread_viz_compositor -> Format.fprintf fmt "Chrome_thread_viz_compositor" + | Chrome_thread_compositor_worker -> Format.fprintf fmt "Chrome_thread_compositor_worker" + | Chrome_thread_service_worker -> Format.fprintf fmt "Chrome_thread_service_worker" + | Chrome_thread_memory_infra -> Format.fprintf fmt "Chrome_thread_memory_infra" + | Chrome_thread_sampling_profiler -> Format.fprintf fmt "Chrome_thread_sampling_profiler" + +let rec pp_thread_descriptor fmt (v:thread_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "pid" Pbrt.Pp.pp_int32 fmt v.pid; + if not (thread_descriptor_has_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "tid" Pbrt.Pp.pp_int32 fmt v.tid; + if not (thread_descriptor_has_tid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "thread_name" Pbrt.Pp.pp_string fmt v.thread_name; + if not (thread_descriptor_has_thread_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "chrome_thread_type" pp_thread_descriptor_chrome_thread_type fmt v.chrome_thread_type; + if not (thread_descriptor_has_chrome_thread_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "reference_timestamp_us" Pbrt.Pp.pp_int64 fmt v.reference_timestamp_us; + if not (thread_descriptor_has_reference_timestamp_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "reference_thread_time_us" Pbrt.Pp.pp_int64 fmt v.reference_thread_time_us; + if not (thread_descriptor_has_reference_thread_time_us v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "reference_thread_instruction_count" Pbrt.Pp.pp_int64 fmt v.reference_thread_instruction_count; + if not (thread_descriptor_has_reference_thread_instruction_count v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "legacy_sort_index" Pbrt.Pp.pp_int32 fmt v.legacy_sort_index; + if not (thread_descriptor_has_legacy_sort_index v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_process_descriptor fmt (v:chrome_process_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "process_type" Pbrt.Pp.pp_int32 fmt v.process_type; + if not (chrome_process_descriptor_has_process_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "process_priority" Pbrt.Pp.pp_int32 fmt v.process_priority; + if not (chrome_process_descriptor_has_process_priority v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "legacy_sort_index" Pbrt.Pp.pp_int32 fmt v.legacy_sort_index; + if not (chrome_process_descriptor_has_legacy_sort_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "host_app_package_name" Pbrt.Pp.pp_string fmt v.host_app_package_name; + if not (chrome_process_descriptor_has_host_app_package_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "crash_trace_id" Pbrt.Pp.pp_int64 fmt v.crash_trace_id; + if not (chrome_process_descriptor_has_crash_trace_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_thread_descriptor fmt (v:chrome_thread_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "thread_type" Pbrt.Pp.pp_int32 fmt v.thread_type; + if not (chrome_thread_descriptor_has_thread_type v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "legacy_sort_index" Pbrt.Pp.pp_int32 fmt v.legacy_sort_index; + if not (chrome_thread_descriptor_has_legacy_sort_index v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_sandboxed_tid" Pbrt.Pp.pp_bool fmt v.is_sandboxed_tid; + if not (chrome_thread_descriptor_has_is_sandboxed_tid v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_counter_descriptor_builtin_counter_type fmt (v:counter_descriptor_builtin_counter_type) = + match v with + | Counter_unspecified -> Format.fprintf fmt "Counter_unspecified" + | Counter_thread_time_ns -> Format.fprintf fmt "Counter_thread_time_ns" + | Counter_thread_instruction_count -> Format.fprintf fmt "Counter_thread_instruction_count" + +let rec pp_counter_descriptor_unit fmt (v:counter_descriptor_unit) = + match v with + | Unit_unspecified -> Format.fprintf fmt "Unit_unspecified" + | Unit_time_ns -> Format.fprintf fmt "Unit_time_ns" + | Unit_count -> Format.fprintf fmt "Unit_count" + | Unit_size_bytes -> Format.fprintf fmt "Unit_size_bytes" + +let rec pp_counter_descriptor fmt (v:counter_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "type_" pp_counter_descriptor_builtin_counter_type fmt v.type_; + if not (counter_descriptor_has_type_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "categories" (Pbrt.Pp.pp_list Pbrt.Pp.pp_string) fmt v.categories; + Pbrt.Pp.pp_record_field ~first:false "unit_" pp_counter_descriptor_unit fmt v.unit_; + if not (counter_descriptor_has_unit_ v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "unit_name" Pbrt.Pp.pp_string fmt v.unit_name; + if not (counter_descriptor_has_unit_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "unit_multiplier" Pbrt.Pp.pp_int64 fmt v.unit_multiplier; + if not (counter_descriptor_has_unit_multiplier v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "is_incremental" Pbrt.Pp.pp_bool fmt v.is_incremental; + if not (counter_descriptor_has_is_incremental v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "y_axis_share_key" Pbrt.Pp.pp_string fmt v.y_axis_share_key; + if not (counter_descriptor_has_y_axis_share_key v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_track_descriptor_child_tracks_ordering fmt (v:track_descriptor_child_tracks_ordering) = + match v with + | Unknown -> Format.fprintf fmt "Unknown" + | Lexicographic -> Format.fprintf fmt "Lexicographic" + | Chronological -> Format.fprintf fmt "Chronological" + | Explicit -> Format.fprintf fmt "Explicit" + +let rec pp_track_descriptor_sibling_merge_behavior fmt (v:track_descriptor_sibling_merge_behavior) = + match v with + | Sibling_merge_behavior_unspecified -> Format.fprintf fmt "Sibling_merge_behavior_unspecified" + | Sibling_merge_behavior_by_track_name -> Format.fprintf fmt "Sibling_merge_behavior_by_track_name" + | Sibling_merge_behavior_none -> Format.fprintf fmt "Sibling_merge_behavior_none" + | Sibling_merge_behavior_by_sibling_merge_key -> Format.fprintf fmt "Sibling_merge_behavior_by_sibling_merge_key" + +let rec pp_track_descriptor_static_or_dynamic_name fmt (v:track_descriptor_static_or_dynamic_name) = + match v with + | Name x -> Format.fprintf fmt "@[Name(@,%a)@]" Pbrt.Pp.pp_string x + | Static_name x -> Format.fprintf fmt "@[Static_name(@,%a)@]" Pbrt.Pp.pp_string x + | Atrace_name x -> Format.fprintf fmt "@[Atrace_name(@,%a)@]" Pbrt.Pp.pp_string x + +and pp_track_descriptor_sibling_merge_key_field fmt (v:track_descriptor_sibling_merge_key_field) = + match v with + | Sibling_merge_key x -> Format.fprintf fmt "@[Sibling_merge_key(@,%a)@]" Pbrt.Pp.pp_string x + | Sibling_merge_key_int x -> Format.fprintf fmt "@[Sibling_merge_key_int(@,%a)@]" Pbrt.Pp.pp_int64 x + +and pp_track_descriptor fmt (v:track_descriptor) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "uuid" Pbrt.Pp.pp_int64 fmt v.uuid; + if not (track_descriptor_has_uuid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "parent_uuid" Pbrt.Pp.pp_int64 fmt v.parent_uuid; + if not (track_descriptor_has_parent_uuid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "static_or_dynamic_name" (Pbrt.Pp.pp_option pp_track_descriptor_static_or_dynamic_name) fmt v.static_or_dynamic_name; + Pbrt.Pp.pp_record_field ~first:false "description" Pbrt.Pp.pp_string fmt v.description; + if not (track_descriptor_has_description v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "process" (Pbrt.Pp.pp_option pp_process_descriptor) fmt v.process; + Pbrt.Pp.pp_record_field ~first:false "chrome_process" (Pbrt.Pp.pp_option pp_chrome_process_descriptor) fmt v.chrome_process; + Pbrt.Pp.pp_record_field ~first:false "thread" (Pbrt.Pp.pp_option pp_thread_descriptor) fmt v.thread; + Pbrt.Pp.pp_record_field ~first:false "chrome_thread" (Pbrt.Pp.pp_option pp_chrome_thread_descriptor) fmt v.chrome_thread; + Pbrt.Pp.pp_record_field ~first:false "counter" (Pbrt.Pp.pp_option pp_counter_descriptor) fmt v.counter; + Pbrt.Pp.pp_record_field ~first:false "disallow_merging_with_system_tracks" Pbrt.Pp.pp_bool fmt v.disallow_merging_with_system_tracks; + if not (track_descriptor_has_disallow_merging_with_system_tracks v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "child_ordering" pp_track_descriptor_child_tracks_ordering fmt v.child_ordering; + if not (track_descriptor_has_child_ordering v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "sibling_order_rank" Pbrt.Pp.pp_int32 fmt v.sibling_order_rank; + if not (track_descriptor_has_sibling_order_rank v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "sibling_merge_behavior" pp_track_descriptor_sibling_merge_behavior fmt v.sibling_merge_behavior; + if not (track_descriptor_has_sibling_merge_behavior v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "sibling_merge_key_field" (Pbrt.Pp.pp_option pp_track_descriptor_sibling_merge_key_field) fmt v.sibling_merge_key_field; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_historgram_translation_table fmt (v:chrome_historgram_translation_table) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "hash_to_name" (Pbrt.Pp.pp_associative_list Pbrt.Pp.pp_int64 Pbrt.Pp.pp_string) fmt v.hash_to_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_user_event_translation_table fmt (v:chrome_user_event_translation_table) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "action_hash_to_name" (Pbrt.Pp.pp_associative_list Pbrt.Pp.pp_int64 Pbrt.Pp.pp_string) fmt v.action_hash_to_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_performance_mark_translation_table fmt (v:chrome_performance_mark_translation_table) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "site_hash_to_name" (Pbrt.Pp.pp_associative_list Pbrt.Pp.pp_int32 Pbrt.Pp.pp_string) fmt v.site_hash_to_name; + Pbrt.Pp.pp_record_field ~first:false "mark_hash_to_name" (Pbrt.Pp.pp_associative_list Pbrt.Pp.pp_int32 Pbrt.Pp.pp_string) fmt v.mark_hash_to_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_slice_name_translation_table fmt (v:slice_name_translation_table) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "raw_to_deobfuscated_name" (Pbrt.Pp.pp_associative_list Pbrt.Pp.pp_string Pbrt.Pp.pp_string) fmt v.raw_to_deobfuscated_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_process_track_name_translation_table fmt (v:process_track_name_translation_table) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "raw_to_deobfuscated_name" (Pbrt.Pp.pp_associative_list Pbrt.Pp.pp_string Pbrt.Pp.pp_string) fmt v.raw_to_deobfuscated_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_chrome_study_translation_table fmt (v:chrome_study_translation_table) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "hash_to_name" (Pbrt.Pp.pp_associative_list Pbrt.Pp.pp_int64 Pbrt.Pp.pp_string) fmt v.hash_to_name; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_translation_table fmt (v:translation_table) = + match v with + | Chrome_histogram x -> Format.fprintf fmt "@[Chrome_histogram(@,%a)@]" pp_chrome_historgram_translation_table x + | Chrome_user_event x -> Format.fprintf fmt "@[Chrome_user_event(@,%a)@]" pp_chrome_user_event_translation_table x + | Chrome_performance_mark x -> Format.fprintf fmt "@[Chrome_performance_mark(@,%a)@]" pp_chrome_performance_mark_translation_table x + | Slice_name x -> Format.fprintf fmt "@[Slice_name(@,%a)@]" pp_slice_name_translation_table x + | Process_track_name x -> Format.fprintf fmt "@[Process_track_name(@,%a)@]" pp_process_track_name_translation_table x + | Chrome_study x -> Format.fprintf fmt "@[Chrome_study(@,%a)@]" pp_chrome_study_translation_table x + +let rec pp_trigger fmt (v:trigger) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "trigger_name" Pbrt.Pp.pp_string fmt v.trigger_name; + if not (trigger_has_trigger_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "producer_name" Pbrt.Pp.pp_string fmt v.producer_name; + if not (trigger_has_producer_name v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trusted_producer_uid" Pbrt.Pp.pp_int32 fmt v.trusted_producer_uid; + if not (trigger_has_trusted_producer_uid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "stop_delay_ms" Pbrt.Pp.pp_int64 fmt v.stop_delay_ms; + if not (trigger_has_stop_delay_ms v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_ui_state_highlight_process fmt (v:ui_state_highlight_process) = + match v with + | Pid x -> Format.fprintf fmt "@[Pid(@,%a)@]" Pbrt.Pp.pp_int32 x + | Cmdline x -> Format.fprintf fmt "@[Cmdline(@,%a)@]" Pbrt.Pp.pp_string x + +let rec pp_ui_state fmt (v:ui_state) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "timeline_start_ts" Pbrt.Pp.pp_int64 fmt v.timeline_start_ts; + if not (ui_state_has_timeline_start_ts v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timeline_end_ts" Pbrt.Pp.pp_int64 fmt v.timeline_end_ts; + if not (ui_state_has_timeline_end_ts v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "highlight_process" (Pbrt.Pp.pp_option pp_ui_state_highlight_process) fmt v.highlight_process; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace_packet_sequence_flags fmt (v:trace_packet_sequence_flags) = + match v with + | Seq_unspecified -> Format.fprintf fmt "Seq_unspecified" + | Seq_incremental_state_cleared -> Format.fprintf fmt "Seq_incremental_state_cleared" + | Seq_needs_incremental_state -> Format.fprintf fmt "Seq_needs_incremental_state" + +let rec pp_trace_packet_data fmt (v:trace_packet_data) = + match v with + | Process_tree x -> Format.fprintf fmt "@[Process_tree(@,%a)@]" pp_process_tree x + | Process_stats x -> Format.fprintf fmt "@[Process_stats(@,%a)@]" pp_process_stats x + | Inode_file_map x -> Format.fprintf fmt "@[Inode_file_map(@,%a)@]" pp_inode_file_map x + | Chrome_events x -> Format.fprintf fmt "@[Chrome_events(@,%a)@]" pp_chrome_event_bundle x + | Clock_snapshot x -> Format.fprintf fmt "@[Clock_snapshot(@,%a)@]" pp_clock_snapshot x + | Sys_stats x -> Format.fprintf fmt "@[Sys_stats(@,%a)@]" pp_sys_stats x + | Track_event x -> Format.fprintf fmt "@[Track_event(@,%a)@]" pp_track_event x + | Trace_uuid x -> Format.fprintf fmt "@[Trace_uuid(@,%a)@]" pp_trace_uuid x + | Trace_config x -> Format.fprintf fmt "@[Trace_config(@,%a)@]" pp_trace_config x + | Trace_stats x -> Format.fprintf fmt "@[Trace_stats(@,%a)@]" pp_trace_stats x + | Profile_packet x -> Format.fprintf fmt "@[Profile_packet(@,%a)@]" pp_profile_packet x + | Streaming_allocation x -> Format.fprintf fmt "@[Streaming_allocation(@,%a)@]" pp_streaming_allocation x + | Streaming_free x -> Format.fprintf fmt "@[Streaming_free(@,%a)@]" pp_streaming_free x + | Battery x -> Format.fprintf fmt "@[Battery(@,%a)@]" pp_battery_counters x + | Power_rails x -> Format.fprintf fmt "@[Power_rails(@,%a)@]" pp_power_rails x + | Android_log x -> Format.fprintf fmt "@[Android_log(@,%a)@]" pp_android_log_packet x + | System_info x -> Format.fprintf fmt "@[System_info(@,%a)@]" pp_system_info x + | Trigger x -> Format.fprintf fmt "@[Trigger(@,%a)@]" pp_trigger x + | Chrome_trigger x -> Format.fprintf fmt "@[Chrome_trigger(@,%a)@]" pp_chrome_trigger x + | Packages_list x -> Format.fprintf fmt "@[Packages_list(@,%a)@]" pp_packages_list x + | Chrome_benchmark_metadata x -> Format.fprintf fmt "@[Chrome_benchmark_metadata(@,%a)@]" pp_chrome_benchmark_metadata x + | Perfetto_metatrace x -> Format.fprintf fmt "@[Perfetto_metatrace(@,%a)@]" pp_perfetto_metatrace x + | Chrome_metadata x -> Format.fprintf fmt "@[Chrome_metadata(@,%a)@]" pp_chrome_metadata_packet x + | Gpu_counter_event x -> Format.fprintf fmt "@[Gpu_counter_event(@,%a)@]" pp_gpu_counter_event x + | Gpu_render_stage_event x -> Format.fprintf fmt "@[Gpu_render_stage_event(@,%a)@]" pp_gpu_render_stage_event x + | Streaming_profile_packet x -> Format.fprintf fmt "@[Streaming_profile_packet(@,%a)@]" pp_streaming_profile_packet x + | Heap_graph x -> Format.fprintf fmt "@[Heap_graph(@,%a)@]" pp_heap_graph x + | Graphics_frame_event x -> Format.fprintf fmt "@[Graphics_frame_event(@,%a)@]" pp_graphics_frame_event x + | Vulkan_memory_event x -> Format.fprintf fmt "@[Vulkan_memory_event(@,%a)@]" pp_vulkan_memory_event x + | Gpu_log x -> Format.fprintf fmt "@[Gpu_log(@,%a)@]" pp_gpu_log x + | Vulkan_api_event x -> Format.fprintf fmt "@[Vulkan_api_event(@,%a)@]" pp_vulkan_api_event x + | Perf_sample x -> Format.fprintf fmt "@[Perf_sample(@,%a)@]" pp_perf_sample x + | Cpu_info x -> Format.fprintf fmt "@[Cpu_info(@,%a)@]" pp_cpu_info x + | Smaps_packet x -> Format.fprintf fmt "@[Smaps_packet(@,%a)@]" pp_smaps_packet x + | Service_event x -> Format.fprintf fmt "@[Service_event(@,%a)@]" pp_tracing_service_event x + | Initial_display_state x -> Format.fprintf fmt "@[Initial_display_state(@,%a)@]" pp_initial_display_state x + | Gpu_mem_total_event x -> Format.fprintf fmt "@[Gpu_mem_total_event(@,%a)@]" pp_gpu_mem_total_event x + | Memory_tracker_snapshot x -> Format.fprintf fmt "@[Memory_tracker_snapshot(@,%a)@]" pp_memory_tracker_snapshot x + | Frame_timeline_event x -> Format.fprintf fmt "@[Frame_timeline_event(@,%a)@]" pp_frame_timeline_event x + | Android_energy_estimation_breakdown x -> Format.fprintf fmt "@[Android_energy_estimation_breakdown(@,%a)@]" pp_android_energy_estimation_breakdown x + | Ui_state x -> Format.fprintf fmt "@[Ui_state(@,%a)@]" pp_ui_state x + | Android_camera_frame_event x -> Format.fprintf fmt "@[Android_camera_frame_event(@,%a)@]" pp_android_camera_frame_event x + | Android_camera_session_stats x -> Format.fprintf fmt "@[Android_camera_session_stats(@,%a)@]" pp_android_camera_session_stats x + | Translation_table x -> Format.fprintf fmt "@[Translation_table(@,%a)@]" pp_translation_table x + | Android_game_intervention_list x -> Format.fprintf fmt "@[Android_game_intervention_list(@,%a)@]" pp_android_game_intervention_list x + | Statsd_atom x -> Format.fprintf fmt "@[Statsd_atom(@,%a)@]" pp_statsd_atom x + | Android_system_property x -> Format.fprintf fmt "@[Android_system_property(@,%a)@]" pp_android_system_property x + | Entity_state_residency x -> Format.fprintf fmt "@[Entity_state_residency(@,%a)@]" pp_entity_state_residency x + | Module_symbols x -> Format.fprintf fmt "@[Module_symbols(@,%a)@]" pp_module_symbols x + | Deobfuscation_mapping x -> Format.fprintf fmt "@[Deobfuscation_mapping(@,%a)@]" pp_deobfuscation_mapping x + | Track_descriptor x -> Format.fprintf fmt "@[Track_descriptor(@,%a)@]" pp_track_descriptor x + | Process_descriptor x -> Format.fprintf fmt "@[Process_descriptor(@,%a)@]" pp_process_descriptor x + | Thread_descriptor x -> Format.fprintf fmt "@[Thread_descriptor(@,%a)@]" pp_thread_descriptor x + | Synchronization_marker x -> Format.fprintf fmt "@[Synchronization_marker(@,%a)@]" Pbrt.Pp.pp_bytes x + | Compressed_packets x -> Format.fprintf fmt "@[Compressed_packets(@,%a)@]" Pbrt.Pp.pp_bytes x + | Extension_descriptor x -> Format.fprintf fmt "@[Extension_descriptor(@,%a)@]" pp_extension_descriptor x + | Network_packet x -> Format.fprintf fmt "@[Network_packet(@,%a)@]" pp_network_packet_event x + | Network_packet_bundle x -> Format.fprintf fmt "@[Network_packet_bundle(@,%a)@]" pp_network_packet_bundle x + | Track_event_range_of_interest x -> Format.fprintf fmt "@[Track_event_range_of_interest(@,%a)@]" pp_track_event_range_of_interest x + | Surfaceflinger_layers_snapshot x -> Format.fprintf fmt "@[Surfaceflinger_layers_snapshot(@,%a)@]" pp_layers_snapshot_proto x + | Surfaceflinger_transactions x -> Format.fprintf fmt "@[Surfaceflinger_transactions(@,%a)@]" pp_transaction_trace_entry x + | Shell_transition x -> Format.fprintf fmt "@[Shell_transition(@,%a)@]" pp_shell_transition x + | Shell_handler_mappings x -> Format.fprintf fmt "@[Shell_handler_mappings(@,%a)@]" pp_shell_handler_mappings x + | Protolog_message x -> Format.fprintf fmt "@[Protolog_message(@,%a)@]" pp_proto_log_message x + | Protolog_viewer_config x -> Format.fprintf fmt "@[Protolog_viewer_config(@,%a)@]" pp_proto_log_viewer_config x + | Winscope_extensions -> Format.fprintf fmt "Winscope_extensions" + | Etw_events x -> Format.fprintf fmt "@[Etw_events(@,%a)@]" pp_etw_trace_event_bundle x + | V8_js_code x -> Format.fprintf fmt "@[V8_js_code(@,%a)@]" pp_v8_js_code x + | V8_internal_code x -> Format.fprintf fmt "@[V8_internal_code(@,%a)@]" pp_v8_internal_code x + | V8_wasm_code x -> Format.fprintf fmt "@[V8_wasm_code(@,%a)@]" pp_v8_wasm_code x + | V8_reg_exp_code x -> Format.fprintf fmt "@[V8_reg_exp_code(@,%a)@]" pp_v8_reg_exp_code x + | V8_code_move x -> Format.fprintf fmt "@[V8_code_move(@,%a)@]" pp_v8_code_move x + | Remote_clock_sync x -> Format.fprintf fmt "@[Remote_clock_sync(@,%a)@]" pp_remote_clock_sync x + | Pixel_modem_events x -> Format.fprintf fmt "@[Pixel_modem_events(@,%a)@]" pp_pixel_modem_events x + | Pixel_modem_token_database x -> Format.fprintf fmt "@[Pixel_modem_token_database(@,%a)@]" pp_pixel_modem_token_database x + | Clone_snapshot_trigger x -> Format.fprintf fmt "@[Clone_snapshot_trigger(@,%a)@]" pp_trigger x + | Bluetooth_trace_event x -> Format.fprintf fmt "@[Bluetooth_trace_event(@,%a)@]" pp_bluetooth_trace_event x + | Kernel_wakelock_data x -> Format.fprintf fmt "@[Kernel_wakelock_data(@,%a)@]" pp_kernel_wakelock_data x + | App_wakelock_bundle x -> Format.fprintf fmt "@[App_wakelock_bundle(@,%a)@]" pp_app_wakelock_bundle x + | Generic_kernel_task_state_event x -> Format.fprintf fmt "@[Generic_kernel_task_state_event(@,%a)@]" pp_generic_kernel_task_state_event x + | Generic_kernel_cpu_freq_event x -> Format.fprintf fmt "@[Generic_kernel_cpu_freq_event(@,%a)@]" pp_generic_kernel_cpu_frequency_event x + | Generic_kernel_task_rename_event x -> Format.fprintf fmt "@[Generic_kernel_task_rename_event(@,%a)@]" pp_generic_kernel_task_rename_event x + | Generic_kernel_process_tree x -> Format.fprintf fmt "@[Generic_kernel_process_tree(@,%a)@]" pp_generic_kernel_process_tree x + | Cpu_per_uid_data x -> Format.fprintf fmt "@[Cpu_per_uid_data(@,%a)@]" pp_cpu_per_uid_data x + | Evdev_event x -> Format.fprintf fmt "@[Evdev_event(@,%a)@]" pp_evdev_event x + | For_testing x -> Format.fprintf fmt "@[For_testing(@,%a)@]" pp_test_event x + +and pp_trace_packet_optional_trusted_uid fmt (v:trace_packet_optional_trusted_uid) = + match v with + | Trusted_uid x -> Format.fprintf fmt "@[Trusted_uid(@,%a)@]" Pbrt.Pp.pp_int32 x + +and pp_trace_packet_optional_trusted_packet_sequence_id fmt (v:trace_packet_optional_trusted_packet_sequence_id) = + match v with + | Trusted_packet_sequence_id x -> Format.fprintf fmt "@[Trusted_packet_sequence_id(@,%a)@]" Pbrt.Pp.pp_int32 x + +and pp_trace_packet fmt (v:trace_packet) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "timestamp" Pbrt.Pp.pp_int64 fmt v.timestamp; + if not (trace_packet_has_timestamp v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "timestamp_clock_id" Pbrt.Pp.pp_int32 fmt v.timestamp_clock_id; + if not (trace_packet_has_timestamp_clock_id v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "data" (Pbrt.Pp.pp_option pp_trace_packet_data) fmt v.data; + Pbrt.Pp.pp_record_field ~first:false "optional_trusted_uid" (Pbrt.Pp.pp_option pp_trace_packet_optional_trusted_uid) fmt v.optional_trusted_uid; + Pbrt.Pp.pp_record_field ~first:false "optional_trusted_packet_sequence_id" (Pbrt.Pp.pp_option pp_trace_packet_optional_trusted_packet_sequence_id) fmt v.optional_trusted_packet_sequence_id; + Pbrt.Pp.pp_record_field ~first:false "trusted_pid" Pbrt.Pp.pp_int32 fmt v.trusted_pid; + if not (trace_packet_has_trusted_pid v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "interned_data" (Pbrt.Pp.pp_option pp_interned_data) fmt v.interned_data; + Pbrt.Pp.pp_record_field ~first:false "sequence_flags" Pbrt.Pp.pp_int32 fmt v.sequence_flags; + if not (trace_packet_has_sequence_flags v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "incremental_state_cleared" Pbrt.Pp.pp_bool fmt v.incremental_state_cleared; + if not (trace_packet_has_incremental_state_cleared v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "trace_packet_defaults" (Pbrt.Pp.pp_option pp_trace_packet_defaults) fmt v.trace_packet_defaults; + Pbrt.Pp.pp_record_field ~first:false "previous_packet_dropped" Pbrt.Pp.pp_bool fmt v.previous_packet_dropped; + if not (trace_packet_has_previous_packet_dropped v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "first_packet_on_sequence" Pbrt.Pp.pp_bool fmt v.first_packet_on_sequence; + if not (trace_packet_has_first_packet_on_sequence v) then Format.pp_print_string fmt "(* absent *)"; + Pbrt.Pp.pp_record_field ~first:false "machine_id" Pbrt.Pp.pp_int32 fmt v.machine_id; + if not (trace_packet_has_machine_id v) then Format.pp_print_string fmt "(* absent *)"; + in + Pbrt.Pp.pp_brk pp_i fmt () + +let rec pp_trace fmt (v:trace) = + let pp_i fmt () = + Pbrt.Pp.pp_record_field ~first:true "packet" (Pbrt.Pp.pp_list pp_trace_packet) fmt v.packet; + in + Pbrt.Pp.pp_brk pp_i fmt () + +[@@@ocaml.warning "-23-27-30-39"] + +(** {2 Protobuf Encoding} *) + +let rec encode_pb_ftrace_descriptor_atrace_category (v:ftrace_descriptor_atrace_category) encoder = + if ftrace_descriptor_atrace_category_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if ftrace_descriptor_atrace_category_has_description v then ( + Pbrt.Encoder.string v.description encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_ftrace_descriptor (v:ftrace_descriptor) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_ftrace_descriptor_atrace_category x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.atrace_categories encoder; + () + +let rec encode_pb_gpu_counter_descriptor_gpu_counter_group (v:gpu_counter_descriptor_gpu_counter_group) encoder = + match v with + | Unclassified -> Pbrt.Encoder.int_as_varint (0) encoder + | System -> Pbrt.Encoder.int_as_varint 1 encoder + | Vertices -> Pbrt.Encoder.int_as_varint 2 encoder + | Fragments -> Pbrt.Encoder.int_as_varint 3 encoder + | Primitives -> Pbrt.Encoder.int_as_varint 4 encoder + | Memory -> Pbrt.Encoder.int_as_varint 5 encoder + | Compute -> Pbrt.Encoder.int_as_varint 6 encoder + | Ray_tracing -> Pbrt.Encoder.int_as_varint 7 encoder + +let rec encode_pb_gpu_counter_descriptor_measure_unit (v:gpu_counter_descriptor_measure_unit) encoder = + match v with + | None -> Pbrt.Encoder.int_as_varint (0) encoder + | Bit -> Pbrt.Encoder.int_as_varint 1 encoder + | Kilobit -> Pbrt.Encoder.int_as_varint 2 encoder + | Megabit -> Pbrt.Encoder.int_as_varint 3 encoder + | Gigabit -> Pbrt.Encoder.int_as_varint 4 encoder + | Terabit -> Pbrt.Encoder.int_as_varint 5 encoder + | Petabit -> Pbrt.Encoder.int_as_varint 6 encoder + | Byte -> Pbrt.Encoder.int_as_varint 7 encoder + | Kilobyte -> Pbrt.Encoder.int_as_varint 8 encoder + | Megabyte -> Pbrt.Encoder.int_as_varint 9 encoder + | Gigabyte -> Pbrt.Encoder.int_as_varint 10 encoder + | Terabyte -> Pbrt.Encoder.int_as_varint 11 encoder + | Petabyte -> Pbrt.Encoder.int_as_varint 12 encoder + | Hertz -> Pbrt.Encoder.int_as_varint 13 encoder + | Kilohertz -> Pbrt.Encoder.int_as_varint 14 encoder + | Megahertz -> Pbrt.Encoder.int_as_varint 15 encoder + | Gigahertz -> Pbrt.Encoder.int_as_varint 16 encoder + | Terahertz -> Pbrt.Encoder.int_as_varint 17 encoder + | Petahertz -> Pbrt.Encoder.int_as_varint 18 encoder + | Nanosecond -> Pbrt.Encoder.int_as_varint 19 encoder + | Microsecond -> Pbrt.Encoder.int_as_varint 20 encoder + | Millisecond -> Pbrt.Encoder.int_as_varint 21 encoder + | Second -> Pbrt.Encoder.int_as_varint 22 encoder + | Minute -> Pbrt.Encoder.int_as_varint 23 encoder + | Hour -> Pbrt.Encoder.int_as_varint 24 encoder + | Vertex -> Pbrt.Encoder.int_as_varint 25 encoder + | Pixel -> Pbrt.Encoder.int_as_varint 26 encoder + | Triangle -> Pbrt.Encoder.int_as_varint 27 encoder + | Primitive -> Pbrt.Encoder.int_as_varint 38 encoder + | Fragment -> Pbrt.Encoder.int_as_varint 39 encoder + | Milliwatt -> Pbrt.Encoder.int_as_varint 28 encoder + | Watt -> Pbrt.Encoder.int_as_varint 29 encoder + | Kilowatt -> Pbrt.Encoder.int_as_varint 30 encoder + | Joule -> Pbrt.Encoder.int_as_varint 31 encoder + | Volt -> Pbrt.Encoder.int_as_varint 32 encoder + | Ampere -> Pbrt.Encoder.int_as_varint 33 encoder + | Celsius -> Pbrt.Encoder.int_as_varint 34 encoder + | Fahrenheit -> Pbrt.Encoder.int_as_varint 35 encoder + | Kelvin -> Pbrt.Encoder.int_as_varint 36 encoder + | Percent -> Pbrt.Encoder.int_as_varint 37 encoder + | Instruction -> Pbrt.Encoder.int_as_varint 40 encoder + +let rec encode_pb_gpu_counter_descriptor_gpu_counter_spec_peak_value (v:gpu_counter_descriptor_gpu_counter_spec_peak_value) encoder = + begin match v with + | Int_peak_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + | Double_peak_value x -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 6 Pbrt.Bits64 encoder; + end + +and encode_pb_gpu_counter_descriptor_gpu_counter_spec (v:gpu_counter_descriptor_gpu_counter_spec) encoder = + if gpu_counter_descriptor_gpu_counter_spec_has_counter_id v then ( + Pbrt.Encoder.int32_as_varint v.counter_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if gpu_counter_descriptor_gpu_counter_spec_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if gpu_counter_descriptor_gpu_counter_spec_has_description v then ( + Pbrt.Encoder.string v.description encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + begin match v.peak_value with + | None -> () + | Some (Int_peak_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + | Some (Double_peak_value x) -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 6 Pbrt.Bits64 encoder; + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_gpu_counter_descriptor_measure_unit x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ) v.numerator_units encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_gpu_counter_descriptor_measure_unit x encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ) v.denominator_units encoder; + if gpu_counter_descriptor_gpu_counter_spec_has_select_by_default v then ( + Pbrt.Encoder.bool v.select_by_default encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_gpu_counter_descriptor_gpu_counter_group x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ) v.groups encoder; + () + +let rec encode_pb_gpu_counter_descriptor_gpu_counter_block (v:gpu_counter_descriptor_gpu_counter_block) encoder = + if gpu_counter_descriptor_gpu_counter_block_has_block_id v then ( + Pbrt.Encoder.int32_as_varint v.block_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if gpu_counter_descriptor_gpu_counter_block_has_block_capacity v then ( + Pbrt.Encoder.int32_as_varint v.block_capacity encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if gpu_counter_descriptor_gpu_counter_block_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if gpu_counter_descriptor_gpu_counter_block_has_description v then ( + Pbrt.Encoder.string v.description encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ) v.counter_ids encoder; + () + +let rec encode_pb_gpu_counter_descriptor (v:gpu_counter_descriptor) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_gpu_counter_descriptor_gpu_counter_spec x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.specs encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_gpu_counter_descriptor_gpu_counter_block x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.blocks encoder; + if gpu_counter_descriptor_has_min_sampling_period_ns v then ( + Pbrt.Encoder.int64_as_varint v.min_sampling_period_ns encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if gpu_counter_descriptor_has_max_sampling_period_ns v then ( + Pbrt.Encoder.int64_as_varint v.max_sampling_period_ns encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if gpu_counter_descriptor_has_supports_instrumented_sampling v then ( + Pbrt.Encoder.bool v.supports_instrumented_sampling encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_track_event_category (v:track_event_category) encoder = + if track_event_category_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if track_event_category_has_description v then ( + Pbrt.Encoder.string v.description encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.tags encoder; + () + +let rec encode_pb_track_event_descriptor (v:track_event_descriptor) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_track_event_category x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.available_categories encoder; + () + +let rec encode_pb_data_source_descriptor (v:data_source_descriptor) encoder = + if data_source_descriptor_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if data_source_descriptor_has_id v then ( + Pbrt.Encoder.int64_as_varint v.id encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if data_source_descriptor_has_will_notify_on_stop v then ( + Pbrt.Encoder.bool v.will_notify_on_stop encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if data_source_descriptor_has_will_notify_on_start v then ( + Pbrt.Encoder.bool v.will_notify_on_start encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if data_source_descriptor_has_handles_incremental_state_clear v then ( + Pbrt.Encoder.bool v.handles_incremental_state_clear encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if data_source_descriptor_has_no_flush v then ( + Pbrt.Encoder.bool v.no_flush encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + begin match v.gpu_counter_descriptor with + | Some x -> + Pbrt.Encoder.nested encode_pb_gpu_counter_descriptor x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.track_event_descriptor with + | Some x -> + Pbrt.Encoder.nested encode_pb_track_event_descriptor x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.ftrace_descriptor with + | Some x -> + Pbrt.Encoder.nested encode_pb_ftrace_descriptor x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_tracing_service_state_producer (v:tracing_service_state_producer) encoder = + if tracing_service_state_producer_has_id v then ( + Pbrt.Encoder.int32_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if tracing_service_state_producer_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if tracing_service_state_producer_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if tracing_service_state_producer_has_uid v then ( + Pbrt.Encoder.int32_as_varint v.uid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if tracing_service_state_producer_has_sdk_version v then ( + Pbrt.Encoder.string v.sdk_version encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + if tracing_service_state_producer_has_frozen v then ( + Pbrt.Encoder.bool v.frozen encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_tracing_service_state_data_source (v:tracing_service_state_data_source) encoder = + begin match v.ds_descriptor with + | Some x -> + Pbrt.Encoder.nested encode_pb_data_source_descriptor x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + if tracing_service_state_data_source_has_producer_id v then ( + Pbrt.Encoder.int32_as_varint v.producer_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_tracing_service_state_tracing_session (v:tracing_service_state_tracing_session) encoder = + if tracing_service_state_tracing_session_has_id v then ( + Pbrt.Encoder.int64_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if tracing_service_state_tracing_session_has_consumer_uid v then ( + Pbrt.Encoder.int32_as_varint v.consumer_uid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if tracing_service_state_tracing_session_has_state v then ( + Pbrt.Encoder.string v.state encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if tracing_service_state_tracing_session_has_unique_session_name v then ( + Pbrt.Encoder.string v.unique_session_name encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ) v.buffer_size_kb encoder; + if tracing_service_state_tracing_session_has_duration_ms v then ( + Pbrt.Encoder.int32_as_varint v.duration_ms encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if tracing_service_state_tracing_session_has_num_data_sources v then ( + Pbrt.Encoder.int32_as_varint v.num_data_sources encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if tracing_service_state_tracing_session_has_start_realtime_ns v then ( + Pbrt.Encoder.int64_as_varint v.start_realtime_ns encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if tracing_service_state_tracing_session_has_bugreport_score v then ( + Pbrt.Encoder.int32_as_varint v.bugreport_score encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if tracing_service_state_tracing_session_has_bugreport_filename v then ( + Pbrt.Encoder.string v.bugreport_filename encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + ); + if tracing_service_state_tracing_session_has_is_started v then ( + Pbrt.Encoder.bool v.is_started encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_tracing_service_state (v:tracing_service_state) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_tracing_service_state_producer x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.producers encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_tracing_service_state_data_source x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.data_sources encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_tracing_service_state_tracing_session x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ) v.tracing_sessions encoder; + if tracing_service_state_has_supports_tracing_sessions v then ( + Pbrt.Encoder.bool v.supports_tracing_sessions encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if tracing_service_state_has_num_sessions v then ( + Pbrt.Encoder.int32_as_varint v.num_sessions encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if tracing_service_state_has_num_sessions_started v then ( + Pbrt.Encoder.int32_as_varint v.num_sessions_started encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if tracing_service_state_has_tracing_service_version v then ( + Pbrt.Encoder.string v.tracing_service_version encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_builtin_clock (v:builtin_clock) encoder = + match v with + | Builtin_clock_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Builtin_clock_realtime -> Pbrt.Encoder.int_as_varint 1 encoder + | Builtin_clock_realtime_coarse -> Pbrt.Encoder.int_as_varint 2 encoder + | Builtin_clock_monotonic -> Pbrt.Encoder.int_as_varint 3 encoder + | Builtin_clock_monotonic_coarse -> Pbrt.Encoder.int_as_varint 4 encoder + | Builtin_clock_monotonic_raw -> Pbrt.Encoder.int_as_varint 5 encoder + | Builtin_clock_boottime -> Pbrt.Encoder.int_as_varint 6 encoder + | Builtin_clock_tsc -> Pbrt.Encoder.int_as_varint 9 encoder + | Builtin_clock_perf -> Pbrt.Encoder.int_as_varint 10 encoder + | Builtin_clock_max_id -> Pbrt.Encoder.int_as_varint 63 encoder + +let rec encode_pb_android_game_intervention_list_config (v:android_game_intervention_list_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.package_name_filter encoder; + () + +let rec encode_pb_android_input_event_config_trace_mode (v:android_input_event_config_trace_mode) encoder = + match v with + | Trace_mode_trace_all -> Pbrt.Encoder.int_as_varint (0) encoder + | Trace_mode_use_rules -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_android_input_event_config_trace_level (v:android_input_event_config_trace_level) encoder = + match v with + | Trace_level_none -> Pbrt.Encoder.int_as_varint (0) encoder + | Trace_level_redacted -> Pbrt.Encoder.int_as_varint 1 encoder + | Trace_level_complete -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_android_input_event_config_trace_rule (v:android_input_event_config_trace_rule) encoder = + if android_input_event_config_trace_rule_has_trace_level v then ( + encode_pb_android_input_event_config_trace_level v.trace_level encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.match_all_packages encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.match_any_packages encoder; + if android_input_event_config_trace_rule_has_match_secure v then ( + Pbrt.Encoder.bool v.match_secure encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if android_input_event_config_trace_rule_has_match_ime_connection_active v then ( + Pbrt.Encoder.bool v.match_ime_connection_active encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_input_event_config (v:android_input_event_config) encoder = + if android_input_event_config_has_mode v then ( + encode_pb_android_input_event_config_trace_mode v.mode encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_input_event_config_trace_rule x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.rules encoder; + if android_input_event_config_has_trace_dispatcher_input_events v then ( + Pbrt.Encoder.bool v.trace_dispatcher_input_events encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if android_input_event_config_has_trace_dispatcher_window_dispatch v then ( + Pbrt.Encoder.bool v.trace_dispatcher_window_dispatch encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_log_id (v:android_log_id) encoder = + match v with + | Lid_default -> Pbrt.Encoder.int_as_varint (0) encoder + | Lid_radio -> Pbrt.Encoder.int_as_varint 1 encoder + | Lid_events -> Pbrt.Encoder.int_as_varint 2 encoder + | Lid_system -> Pbrt.Encoder.int_as_varint 3 encoder + | Lid_crash -> Pbrt.Encoder.int_as_varint 4 encoder + | Lid_stats -> Pbrt.Encoder.int_as_varint 5 encoder + | Lid_security -> Pbrt.Encoder.int_as_varint 6 encoder + | Lid_kernel -> Pbrt.Encoder.int_as_varint 7 encoder + +let rec encode_pb_android_log_priority (v:android_log_priority) encoder = + match v with + | Prio_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Prio_unused -> Pbrt.Encoder.int_as_varint 1 encoder + | Prio_verbose -> Pbrt.Encoder.int_as_varint 2 encoder + | Prio_debug -> Pbrt.Encoder.int_as_varint 3 encoder + | Prio_info -> Pbrt.Encoder.int_as_varint 4 encoder + | Prio_warn -> Pbrt.Encoder.int_as_varint 5 encoder + | Prio_error -> Pbrt.Encoder.int_as_varint 6 encoder + | Prio_fatal -> Pbrt.Encoder.int_as_varint 7 encoder + +let rec encode_pb_android_log_config (v:android_log_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_android_log_id x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.log_ids encoder; + if android_log_config_has_min_prio v then ( + encode_pb_android_log_priority v.min_prio encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.filter_tags encoder; + () + +let rec encode_pb_android_polled_state_config (v:android_polled_state_config) encoder = + if android_polled_state_config_has_poll_ms v then ( + Pbrt.Encoder.int32_as_varint v.poll_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_sdk_sysprop_guard_config (v:android_sdk_sysprop_guard_config) encoder = + if android_sdk_sysprop_guard_config_has_surfaceflinger_skia_track_events v then ( + Pbrt.Encoder.bool v.surfaceflinger_skia_track_events encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_sdk_sysprop_guard_config_has_hwui_skia_track_events v then ( + Pbrt.Encoder.bool v.hwui_skia_track_events encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.hwui_package_name_filter encoder; + () + +let rec encode_pb_android_system_property_config (v:android_system_property_config) encoder = + if android_system_property_config_has_poll_ms v then ( + Pbrt.Encoder.int32_as_varint v.poll_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.property_name encoder; + () + +let rec encode_pb_app_wakelocks_config (v:app_wakelocks_config) encoder = + if app_wakelocks_config_has_write_delay_ms v then ( + Pbrt.Encoder.int32_as_varint v.write_delay_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if app_wakelocks_config_has_filter_duration_below_ms v then ( + Pbrt.Encoder.int32_as_varint v.filter_duration_below_ms encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if app_wakelocks_config_has_drop_owner_pid v then ( + Pbrt.Encoder.bool v.drop_owner_pid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_cpu_per_uid_config (v:cpu_per_uid_config) encoder = + if cpu_per_uid_config_has_poll_ms v then ( + Pbrt.Encoder.int32_as_varint v.poll_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_kernel_wakelocks_config (v:kernel_wakelocks_config) encoder = + if kernel_wakelocks_config_has_poll_ms v then ( + Pbrt.Encoder.int32_as_varint v.poll_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_network_packet_trace_config (v:network_packet_trace_config) encoder = + if network_packet_trace_config_has_poll_ms v then ( + Pbrt.Encoder.int32_as_varint v.poll_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if network_packet_trace_config_has_aggregation_threshold v then ( + Pbrt.Encoder.int32_as_varint v.aggregation_threshold encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if network_packet_trace_config_has_intern_limit v then ( + Pbrt.Encoder.int32_as_varint v.intern_limit encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if network_packet_trace_config_has_drop_local_port v then ( + Pbrt.Encoder.bool v.drop_local_port encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if network_packet_trace_config_has_drop_remote_port v then ( + Pbrt.Encoder.bool v.drop_remote_port encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if network_packet_trace_config_has_drop_tcp_flags v then ( + Pbrt.Encoder.bool v.drop_tcp_flags encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_packages_list_config (v:packages_list_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.package_name_filter encoder; + if packages_list_config_has_only_write_on_cpu_use_every_ms v then ( + Pbrt.Encoder.int32_as_varint v.only_write_on_cpu_use_every_ms encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_pixel_modem_config_event_group (v:pixel_modem_config_event_group) encoder = + match v with + | Event_group_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Event_group_low_bandwidth -> Pbrt.Encoder.int_as_varint 1 encoder + | Event_group_high_and_low_bandwidth -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_pixel_modem_config (v:pixel_modem_config) encoder = + if pixel_modem_config_has_event_group v then ( + encode_pb_pixel_modem_config_event_group v.event_group encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.pigweed_hash_allow_list encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ) v.pigweed_hash_deny_list encoder; + () + +let rec encode_pb_proto_log_level (v:proto_log_level) encoder = + match v with + | Protolog_level_undefined -> Pbrt.Encoder.int_as_varint (0) encoder + | Protolog_level_debug -> Pbrt.Encoder.int_as_varint 1 encoder + | Protolog_level_verbose -> Pbrt.Encoder.int_as_varint 2 encoder + | Protolog_level_info -> Pbrt.Encoder.int_as_varint 3 encoder + | Protolog_level_warn -> Pbrt.Encoder.int_as_varint 4 encoder + | Protolog_level_error -> Pbrt.Encoder.int_as_varint 5 encoder + | Protolog_level_wtf -> Pbrt.Encoder.int_as_varint 6 encoder + +let rec encode_pb_proto_log_config_tracing_mode (v:proto_log_config_tracing_mode) encoder = + match v with + | Default -> Pbrt.Encoder.int_as_varint (0) encoder + | Enable_all -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_proto_log_group (v:proto_log_group) encoder = + if proto_log_group_has_group_name v then ( + Pbrt.Encoder.string v.group_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if proto_log_group_has_log_from v then ( + encode_pb_proto_log_level v.log_from encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if proto_log_group_has_collect_stacktrace v then ( + Pbrt.Encoder.bool v.collect_stacktrace encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_proto_log_config (v:proto_log_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_proto_log_group x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.group_overrides encoder; + if proto_log_config_has_tracing_mode v then ( + encode_pb_proto_log_config_tracing_mode v.tracing_mode encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if proto_log_config_has_default_log_from_level v then ( + encode_pb_proto_log_level v.default_log_from_level encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_surface_flinger_layers_config_mode (v:surface_flinger_layers_config_mode) encoder = + match v with + | Mode_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Mode_active -> Pbrt.Encoder.int_as_varint 1 encoder + | Mode_generated -> Pbrt.Encoder.int_as_varint 2 encoder + | Mode_dump -> Pbrt.Encoder.int_as_varint 3 encoder + | Mode_generated_bugreport_only -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_surface_flinger_layers_config_trace_flag (v:surface_flinger_layers_config_trace_flag) encoder = + match v with + | Trace_flag_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Trace_flag_input -> Pbrt.Encoder.int_as_varint 2 encoder + | Trace_flag_composition -> Pbrt.Encoder.int_as_varint 4 encoder + | Trace_flag_extra -> Pbrt.Encoder.int_as_varint 8 encoder + | Trace_flag_hwc -> Pbrt.Encoder.int_as_varint 16 encoder + | Trace_flag_buffers -> Pbrt.Encoder.int_as_varint 32 encoder + | Trace_flag_virtual_displays -> Pbrt.Encoder.int_as_varint 64 encoder + | Trace_flag_all -> Pbrt.Encoder.int_as_varint 14 encoder + +let rec encode_pb_surface_flinger_layers_config (v:surface_flinger_layers_config) encoder = + if surface_flinger_layers_config_has_mode v then ( + encode_pb_surface_flinger_layers_config_mode v.mode encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_surface_flinger_layers_config_trace_flag x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.trace_flags encoder; + () + +let rec encode_pb_surface_flinger_transactions_config_mode (v:surface_flinger_transactions_config_mode) encoder = + match v with + | Mode_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Mode_continuous -> Pbrt.Encoder.int_as_varint 1 encoder + | Mode_active -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_surface_flinger_transactions_config (v:surface_flinger_transactions_config) encoder = + if surface_flinger_transactions_config_has_mode v then ( + encode_pb_surface_flinger_transactions_config_mode v.mode encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_window_manager_config_log_frequency (v:window_manager_config_log_frequency) encoder = + match v with + | Log_frequency_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Log_frequency_frame -> Pbrt.Encoder.int_as_varint 1 encoder + | Log_frequency_transaction -> Pbrt.Encoder.int_as_varint 2 encoder + | Log_frequency_single_dump -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_window_manager_config_log_level (v:window_manager_config_log_level) encoder = + match v with + | Log_level_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Log_level_verbose -> Pbrt.Encoder.int_as_varint 1 encoder + | Log_level_debug -> Pbrt.Encoder.int_as_varint 2 encoder + | Log_level_critical -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_window_manager_config (v:window_manager_config) encoder = + if window_manager_config_has_log_frequency v then ( + encode_pb_window_manager_config_log_frequency v.log_frequency encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if window_manager_config_has_log_level v then ( + encode_pb_window_manager_config_log_level v.log_level encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_config_client_priority (v:chrome_config_client_priority) encoder = + match v with + | Unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Background -> Pbrt.Encoder.int_as_varint 1 encoder + | User_initiated -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_chrome_config (v:chrome_config) encoder = + if chrome_config_has_trace_config v then ( + Pbrt.Encoder.string v.trace_config encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if chrome_config_has_privacy_filtering_enabled v then ( + Pbrt.Encoder.bool v.privacy_filtering_enabled encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_config_has_convert_to_legacy_json v then ( + Pbrt.Encoder.bool v.convert_to_legacy_json encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if chrome_config_has_client_priority v then ( + encode_pb_chrome_config_client_priority v.client_priority encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if chrome_config_has_json_agent_label_filter v then ( + Pbrt.Encoder.string v.json_agent_label_filter encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + if chrome_config_has_event_package_name_filter_enabled v then ( + Pbrt.Encoder.bool v.event_package_name_filter_enabled encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chromium_histogram_samples_config_histogram_sample (v:chromium_histogram_samples_config_histogram_sample) encoder = + if chromium_histogram_samples_config_histogram_sample_has_histogram_name v then ( + Pbrt.Encoder.string v.histogram_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if chromium_histogram_samples_config_histogram_sample_has_min_value v then ( + Pbrt.Encoder.int64_as_varint v.min_value encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chromium_histogram_samples_config_histogram_sample_has_max_value v then ( + Pbrt.Encoder.int64_as_varint v.max_value encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chromium_histogram_samples_config (v:chromium_histogram_samples_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chromium_histogram_samples_config_histogram_sample x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.histograms encoder; + if chromium_histogram_samples_config_has_filter_histogram_names v then ( + Pbrt.Encoder.bool v.filter_histogram_names encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chromium_system_metrics_config (v:chromium_system_metrics_config) encoder = + if chromium_system_metrics_config_has_sampling_interval_ms v then ( + Pbrt.Encoder.int32_as_varint v.sampling_interval_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_v8_config (v:v8_config) encoder = + if v8_config_has_log_script_sources v then ( + Pbrt.Encoder.bool v.log_script_sources encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if v8_config_has_log_instructions v then ( + Pbrt.Encoder.bool v.log_instructions encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_etw_config_kernel_flag (v:etw_config_kernel_flag) encoder = + match v with + | Cswitch -> Pbrt.Encoder.int_as_varint (0) encoder + | Dispatcher -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_etw_config (v:etw_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_etw_config_kernel_flag x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.kernel_flags encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.scheduler_provider_events encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.memory_provider_events encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.file_provider_events encoder; + () + +let rec encode_pb_frozen_ftrace_config (v:frozen_ftrace_config) encoder = + if frozen_ftrace_config_has_instance_name v then ( + Pbrt.Encoder.string v.instance_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_ftrace_config_compact_sched_config (v:ftrace_config_compact_sched_config) encoder = + if ftrace_config_compact_sched_config_has_enabled v then ( + Pbrt.Encoder.bool v.enabled encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_ftrace_config_print_filter_rule_atrace_message (v:ftrace_config_print_filter_rule_atrace_message) encoder = + if ftrace_config_print_filter_rule_atrace_message_has_type_ v then ( + Pbrt.Encoder.string v.type_ encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if ftrace_config_print_filter_rule_atrace_message_has_prefix v then ( + Pbrt.Encoder.string v.prefix encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_ftrace_config_print_filter_rule_match (v:ftrace_config_print_filter_rule_match) encoder = + begin match v with + | Prefix x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | Atrace_msg x -> + Pbrt.Encoder.nested encode_pb_ftrace_config_print_filter_rule_atrace_message x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + end + +and encode_pb_ftrace_config_print_filter_rule (v:ftrace_config_print_filter_rule) encoder = + begin match v.match_ with + | None -> () + | Some (Prefix x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | Some (Atrace_msg x) -> + Pbrt.Encoder.nested encode_pb_ftrace_config_print_filter_rule_atrace_message x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + end; + if ftrace_config_print_filter_rule_has_allow v then ( + Pbrt.Encoder.bool v.allow encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_ftrace_config_print_filter (v:ftrace_config_print_filter) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_ftrace_config_print_filter_rule x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.rules encoder; + () + +let rec encode_pb_ftrace_config_ksyms_mem_policy (v:ftrace_config_ksyms_mem_policy) encoder = + match v with + | Ksyms_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Ksyms_cleanup_on_stop -> Pbrt.Encoder.int_as_varint 1 encoder + | Ksyms_retain -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_ftrace_config_kprobe_event_kprobe_type (v:ftrace_config_kprobe_event_kprobe_type) encoder = + match v with + | Kprobe_type_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Kprobe_type_kprobe -> Pbrt.Encoder.int_as_varint 1 encoder + | Kprobe_type_kretprobe -> Pbrt.Encoder.int_as_varint 2 encoder + | Kprobe_type_both -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_ftrace_config_kprobe_event (v:ftrace_config_kprobe_event) encoder = + if ftrace_config_kprobe_event_has_probe v then ( + Pbrt.Encoder.string v.probe encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if ftrace_config_kprobe_event_has_type_ v then ( + encode_pb_ftrace_config_kprobe_event_kprobe_type v.type_ encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_ftrace_config_tracefs_option_state (v:ftrace_config_tracefs_option_state) encoder = + match v with + | State_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | State_enabled -> Pbrt.Encoder.int_as_varint 1 encoder + | State_disabled -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_ftrace_config_tracefs_option (v:ftrace_config_tracefs_option) encoder = + if ftrace_config_tracefs_option_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if ftrace_config_tracefs_option_has_state v then ( + encode_pb_ftrace_config_tracefs_option_state v.state encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_ftrace_config (v:ftrace_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.ftrace_events encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.atrace_categories encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.atrace_apps encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 28 Pbrt.Bytes encoder; + ) v.atrace_categories_prefer_sdk encoder; + if ftrace_config_has_atrace_userspace_only v then ( + Pbrt.Encoder.bool v.atrace_userspace_only encoder; + Pbrt.Encoder.key 34 Pbrt.Varint encoder; + ); + if ftrace_config_has_buffer_size_kb v then ( + Pbrt.Encoder.int32_as_varint v.buffer_size_kb encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if ftrace_config_has_buffer_size_lower_bound v then ( + Pbrt.Encoder.bool v.buffer_size_lower_bound encoder; + Pbrt.Encoder.key 27 Pbrt.Varint encoder; + ); + if ftrace_config_has_drain_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.drain_period_ms encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if ftrace_config_has_drain_buffer_percent v then ( + Pbrt.Encoder.int32_as_varint v.drain_buffer_percent encoder; + Pbrt.Encoder.key 29 Pbrt.Varint encoder; + ); + begin match v.compact_sched with + | Some x -> + Pbrt.Encoder.nested encode_pb_ftrace_config_compact_sched_config x encoder; + Pbrt.Encoder.key 12 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.print_filter with + | Some x -> + Pbrt.Encoder.nested encode_pb_ftrace_config_print_filter x encoder; + Pbrt.Encoder.key 22 Pbrt.Bytes encoder; + | None -> (); + end; + if ftrace_config_has_symbolize_ksyms v then ( + Pbrt.Encoder.bool v.symbolize_ksyms encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if ftrace_config_has_ksyms_mem_policy v then ( + encode_pb_ftrace_config_ksyms_mem_policy v.ksyms_mem_policy encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + if ftrace_config_has_throttle_rss_stat v then ( + Pbrt.Encoder.bool v.throttle_rss_stat encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if ftrace_config_has_denser_generic_event_encoding v then ( + Pbrt.Encoder.bool v.denser_generic_event_encoding encoder; + Pbrt.Encoder.key 32 Pbrt.Varint encoder; + ); + if ftrace_config_has_disable_generic_events v then ( + Pbrt.Encoder.bool v.disable_generic_events encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 18 Pbrt.Bytes encoder; + ) v.syscall_events encoder; + if ftrace_config_has_enable_function_graph v then ( + Pbrt.Encoder.bool v.enable_function_graph encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 20 Pbrt.Bytes encoder; + ) v.function_filters encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 21 Pbrt.Bytes encoder; + ) v.function_graph_roots encoder; + if ftrace_config_has_function_graph_max_depth v then ( + Pbrt.Encoder.int32_as_varint v.function_graph_max_depth encoder; + Pbrt.Encoder.key 33 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_ftrace_config_kprobe_event x encoder; + Pbrt.Encoder.key 30 Pbrt.Bytes encoder; + ) v.kprobe_events encoder; + if ftrace_config_has_preserve_ftrace_buffer v then ( + Pbrt.Encoder.bool v.preserve_ftrace_buffer encoder; + Pbrt.Encoder.key 23 Pbrt.Varint encoder; + ); + if ftrace_config_has_use_monotonic_raw_clock v then ( + Pbrt.Encoder.bool v.use_monotonic_raw_clock encoder; + Pbrt.Encoder.key 24 Pbrt.Varint encoder; + ); + if ftrace_config_has_instance_name v then ( + Pbrt.Encoder.string v.instance_name encoder; + Pbrt.Encoder.key 25 Pbrt.Bytes encoder; + ); + if ftrace_config_has_debug_ftrace_abi v then ( + Pbrt.Encoder.bool v.debug_ftrace_abi encoder; + Pbrt.Encoder.key 31 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 35 Pbrt.Varint encoder; + ) v.tids_to_trace encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_ftrace_config_tracefs_option x encoder; + Pbrt.Encoder.key 36 Pbrt.Bytes encoder; + ) v.tracefs_options encoder; + if ftrace_config_has_tracing_cpumask v then ( + Pbrt.Encoder.string v.tracing_cpumask encoder; + Pbrt.Encoder.key 37 Pbrt.Bytes encoder; + ); + if ftrace_config_has_initialize_ksyms_synchronously_for_testing v then ( + Pbrt.Encoder.bool v.initialize_ksyms_synchronously_for_testing encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_gpu_counter_config (v:gpu_counter_config) encoder = + if gpu_counter_config_has_counter_period_ns v then ( + Pbrt.Encoder.int64_as_varint v.counter_period_ns encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.counter_ids encoder; + if gpu_counter_config_has_instrumented_sampling v then ( + Pbrt.Encoder.bool v.instrumented_sampling encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if gpu_counter_config_has_fix_gpu_clock v then ( + Pbrt.Encoder.bool v.fix_gpu_clock encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_gpu_render_stages_config (v:gpu_render_stages_config) encoder = + if gpu_render_stages_config_has_full_loadstore v then ( + Pbrt.Encoder.bool v.full_loadstore encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if gpu_render_stages_config_has_low_overhead v then ( + Pbrt.Encoder.bool v.low_overhead encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.trace_metrics encoder; + () + +let rec encode_pb_vulkan_memory_config (v:vulkan_memory_config) encoder = + if vulkan_memory_config_has_track_driver_memory_usage v then ( + Pbrt.Encoder.bool v.track_driver_memory_usage encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if vulkan_memory_config_has_track_device_memory_usage v then ( + Pbrt.Encoder.bool v.track_device_memory_usage encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_inode_file_config_mount_point_mapping_entry (v:inode_file_config_mount_point_mapping_entry) encoder = + if inode_file_config_mount_point_mapping_entry_has_mountpoint v then ( + Pbrt.Encoder.string v.mountpoint encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.scan_roots encoder; + () + +let rec encode_pb_inode_file_config (v:inode_file_config) encoder = + if inode_file_config_has_scan_interval_ms v then ( + Pbrt.Encoder.int32_as_varint v.scan_interval_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if inode_file_config_has_scan_delay_ms v then ( + Pbrt.Encoder.int32_as_varint v.scan_delay_ms encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if inode_file_config_has_scan_batch_size v then ( + Pbrt.Encoder.int32_as_varint v.scan_batch_size encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if inode_file_config_has_do_not_scan v then ( + Pbrt.Encoder.bool v.do_not_scan encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ) v.scan_mount_points encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_inode_file_config_mount_point_mapping_entry x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ) v.mount_point_mapping encoder; + () + +let rec encode_pb_console_config_output (v:console_config_output) encoder = + match v with + | Output_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Output_stdout -> Pbrt.Encoder.int_as_varint 1 encoder + | Output_stderr -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_console_config (v:console_config) encoder = + if console_config_has_output v then ( + encode_pb_console_config_output v.output encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if console_config_has_enable_colors v then ( + Pbrt.Encoder.bool v.enable_colors encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_interceptor_config (v:interceptor_config) encoder = + if interceptor_config_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + begin match v.console_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_console_config x encoder; + Pbrt.Encoder.key 100 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_android_power_config_battery_counters (v:android_power_config_battery_counters) encoder = + match v with + | Battery_counter_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Battery_counter_charge -> Pbrt.Encoder.int_as_varint 1 encoder + | Battery_counter_capacity_percent -> Pbrt.Encoder.int_as_varint 2 encoder + | Battery_counter_current -> Pbrt.Encoder.int_as_varint 3 encoder + | Battery_counter_current_avg -> Pbrt.Encoder.int_as_varint 4 encoder + | Battery_counter_voltage -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_android_power_config (v:android_power_config) encoder = + if android_power_config_has_battery_poll_ms v then ( + Pbrt.Encoder.int32_as_varint v.battery_poll_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_android_power_config_battery_counters x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.battery_counters encoder; + if android_power_config_has_collect_power_rails v then ( + Pbrt.Encoder.bool v.collect_power_rails encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if android_power_config_has_collect_energy_estimation_breakdown v then ( + Pbrt.Encoder.bool v.collect_energy_estimation_breakdown encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if android_power_config_has_collect_entity_state_residency v then ( + Pbrt.Encoder.bool v.collect_entity_state_residency encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_priority_boost_config_boost_policy (v:priority_boost_config_boost_policy) encoder = + match v with + | Policy_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Policy_sched_other -> Pbrt.Encoder.int_as_varint 1 encoder + | Policy_sched_fifo -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_priority_boost_config (v:priority_boost_config) encoder = + if priority_boost_config_has_policy v then ( + encode_pb_priority_boost_config_boost_policy v.policy encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if priority_boost_config_has_priority v then ( + Pbrt.Encoder.int32_as_varint v.priority encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_process_stats_config_quirks (v:process_stats_config_quirks) encoder = + match v with + | Quirks_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Disable_initial_dump -> Pbrt.Encoder.int_as_varint 1 encoder + | Disable_on_demand -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_process_stats_config (v:process_stats_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_process_stats_config_quirks x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.quirks encoder; + if process_stats_config_has_scan_all_processes_on_start v then ( + Pbrt.Encoder.bool v.scan_all_processes_on_start encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if process_stats_config_has_record_thread_names v then ( + Pbrt.Encoder.bool v.record_thread_names encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if process_stats_config_has_proc_stats_poll_ms v then ( + Pbrt.Encoder.int32_as_varint v.proc_stats_poll_ms encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if process_stats_config_has_proc_stats_cache_ttl_ms v then ( + Pbrt.Encoder.int32_as_varint v.proc_stats_cache_ttl_ms encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if process_stats_config_has_scan_smaps_rollup v then ( + Pbrt.Encoder.bool v.scan_smaps_rollup encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if process_stats_config_has_record_process_age v then ( + Pbrt.Encoder.bool v.record_process_age encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if process_stats_config_has_record_process_runtime v then ( + Pbrt.Encoder.bool v.record_process_runtime encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if process_stats_config_has_record_process_dmabuf_rss v then ( + Pbrt.Encoder.bool v.record_process_dmabuf_rss encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if process_stats_config_has_resolve_process_fds v then ( + Pbrt.Encoder.bool v.resolve_process_fds encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_heapprofd_config_continuous_dump_config (v:heapprofd_config_continuous_dump_config) encoder = + if heapprofd_config_continuous_dump_config_has_dump_phase_ms v then ( + Pbrt.Encoder.int32_as_varint v.dump_phase_ms encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if heapprofd_config_continuous_dump_config_has_dump_interval_ms v then ( + Pbrt.Encoder.int32_as_varint v.dump_interval_ms encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_heapprofd_config (v:heapprofd_config) encoder = + if heapprofd_config_has_sampling_interval_bytes v then ( + Pbrt.Encoder.int64_as_varint v.sampling_interval_bytes encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if heapprofd_config_has_adaptive_sampling_shmem_threshold v then ( + Pbrt.Encoder.int64_as_varint v.adaptive_sampling_shmem_threshold encoder; + Pbrt.Encoder.key 24 Pbrt.Varint encoder; + ); + if heapprofd_config_has_adaptive_sampling_max_sampling_interval_bytes v then ( + Pbrt.Encoder.int64_as_varint v.adaptive_sampling_max_sampling_interval_bytes encoder; + Pbrt.Encoder.key 25 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.process_cmdline encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ) v.pid encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 26 Pbrt.Bytes encoder; + ) v.target_installed_by encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 20 Pbrt.Bytes encoder; + ) v.heaps encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 27 Pbrt.Bytes encoder; + ) v.exclude_heaps encoder; + if heapprofd_config_has_stream_allocations v then ( + Pbrt.Encoder.bool v.stream_allocations encoder; + Pbrt.Encoder.key 23 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 22 Pbrt.Varint encoder; + ) v.heap_sampling_intervals encoder; + if heapprofd_config_has_all_heaps v then ( + Pbrt.Encoder.bool v.all_heaps encoder; + Pbrt.Encoder.key 21 Pbrt.Varint encoder; + ); + if heapprofd_config_has_all v then ( + Pbrt.Encoder.bool v.all encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if heapprofd_config_has_min_anonymous_memory_kb v then ( + Pbrt.Encoder.int32_as_varint v.min_anonymous_memory_kb encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if heapprofd_config_has_max_heapprofd_memory_kb v then ( + Pbrt.Encoder.int32_as_varint v.max_heapprofd_memory_kb encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if heapprofd_config_has_max_heapprofd_cpu_secs v then ( + Pbrt.Encoder.int64_as_varint v.max_heapprofd_cpu_secs encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.skip_symbol_prefix encoder; + begin match v.continuous_dump_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_heapprofd_config_continuous_dump_config x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + if heapprofd_config_has_shmem_size_bytes v then ( + Pbrt.Encoder.int64_as_varint v.shmem_size_bytes encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if heapprofd_config_has_block_client v then ( + Pbrt.Encoder.bool v.block_client encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if heapprofd_config_has_block_client_timeout_us v then ( + Pbrt.Encoder.int32_as_varint v.block_client_timeout_us encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if heapprofd_config_has_no_startup v then ( + Pbrt.Encoder.bool v.no_startup encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if heapprofd_config_has_no_running v then ( + Pbrt.Encoder.bool v.no_running encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if heapprofd_config_has_dump_at_max v then ( + Pbrt.Encoder.bool v.dump_at_max encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if heapprofd_config_has_disable_fork_teardown v then ( + Pbrt.Encoder.bool v.disable_fork_teardown encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + ); + if heapprofd_config_has_disable_vfork_detection v then ( + Pbrt.Encoder.bool v.disable_vfork_detection encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_atom_id (v:atom_id) encoder = + match v with + | Atom_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Atom_ble_scan_state_changed -> Pbrt.Encoder.int_as_varint 2 encoder + | Atom_process_state_changed -> Pbrt.Encoder.int_as_varint 3 encoder + | Atom_ble_scan_result_received -> Pbrt.Encoder.int_as_varint 4 encoder + | Atom_sensor_state_changed -> Pbrt.Encoder.int_as_varint 5 encoder + | Atom_gps_scan_state_changed -> Pbrt.Encoder.int_as_varint 6 encoder + | Atom_sync_state_changed -> Pbrt.Encoder.int_as_varint 7 encoder + | Atom_scheduled_job_state_changed -> Pbrt.Encoder.int_as_varint 8 encoder + | Atom_screen_brightness_changed -> Pbrt.Encoder.int_as_varint 9 encoder + | Atom_wakelock_state_changed -> Pbrt.Encoder.int_as_varint 10 encoder + | Atom_long_partial_wakelock_state_changed -> Pbrt.Encoder.int_as_varint 11 encoder + | Atom_mobile_radio_power_state_changed -> Pbrt.Encoder.int_as_varint 12 encoder + | Atom_wifi_radio_power_state_changed -> Pbrt.Encoder.int_as_varint 13 encoder + | Atom_activity_manager_sleep_state_changed -> Pbrt.Encoder.int_as_varint 14 encoder + | Atom_memory_factor_state_changed -> Pbrt.Encoder.int_as_varint 15 encoder + | Atom_excessive_cpu_usage_reported -> Pbrt.Encoder.int_as_varint 16 encoder + | Atom_cached_kill_reported -> Pbrt.Encoder.int_as_varint 17 encoder + | Atom_process_memory_stat_reported -> Pbrt.Encoder.int_as_varint 18 encoder + | Atom_launcher_event -> Pbrt.Encoder.int_as_varint 19 encoder + | Atom_battery_saver_mode_state_changed -> Pbrt.Encoder.int_as_varint 20 encoder + | Atom_device_idle_mode_state_changed -> Pbrt.Encoder.int_as_varint 21 encoder + | Atom_device_idling_mode_state_changed -> Pbrt.Encoder.int_as_varint 22 encoder + | Atom_audio_state_changed -> Pbrt.Encoder.int_as_varint 23 encoder + | Atom_media_codec_state_changed -> Pbrt.Encoder.int_as_varint 24 encoder + | Atom_camera_state_changed -> Pbrt.Encoder.int_as_varint 25 encoder + | Atom_flashlight_state_changed -> Pbrt.Encoder.int_as_varint 26 encoder + | Atom_uid_process_state_changed -> Pbrt.Encoder.int_as_varint 27 encoder + | Atom_process_life_cycle_state_changed -> Pbrt.Encoder.int_as_varint 28 encoder + | Atom_screen_state_changed -> Pbrt.Encoder.int_as_varint 29 encoder + | Atom_battery_level_changed -> Pbrt.Encoder.int_as_varint 30 encoder + | Atom_charging_state_changed -> Pbrt.Encoder.int_as_varint 31 encoder + | Atom_plugged_state_changed -> Pbrt.Encoder.int_as_varint 32 encoder + | Atom_interactive_state_changed -> Pbrt.Encoder.int_as_varint 33 encoder + | Atom_touch_event_reported -> Pbrt.Encoder.int_as_varint 34 encoder + | Atom_wakeup_alarm_occurred -> Pbrt.Encoder.int_as_varint 35 encoder + | Atom_kernel_wakeup_reported -> Pbrt.Encoder.int_as_varint 36 encoder + | Atom_wifi_lock_state_changed -> Pbrt.Encoder.int_as_varint 37 encoder + | Atom_wifi_signal_strength_changed -> Pbrt.Encoder.int_as_varint 38 encoder + | Atom_wifi_scan_state_changed -> Pbrt.Encoder.int_as_varint 39 encoder + | Atom_phone_signal_strength_changed -> Pbrt.Encoder.int_as_varint 40 encoder + | Atom_setting_changed -> Pbrt.Encoder.int_as_varint 41 encoder + | Atom_activity_foreground_state_changed -> Pbrt.Encoder.int_as_varint 42 encoder + | Atom_isolated_uid_changed -> Pbrt.Encoder.int_as_varint 43 encoder + | Atom_packet_wakeup_occurred -> Pbrt.Encoder.int_as_varint 44 encoder + | Atom_wall_clock_time_shifted -> Pbrt.Encoder.int_as_varint 45 encoder + | Atom_anomaly_detected -> Pbrt.Encoder.int_as_varint 46 encoder + | Atom_app_breadcrumb_reported -> Pbrt.Encoder.int_as_varint 47 encoder + | Atom_app_start_occurred -> Pbrt.Encoder.int_as_varint 48 encoder + | Atom_app_start_canceled -> Pbrt.Encoder.int_as_varint 49 encoder + | Atom_app_start_fully_drawn -> Pbrt.Encoder.int_as_varint 50 encoder + | Atom_lmk_kill_occurred -> Pbrt.Encoder.int_as_varint 51 encoder + | Atom_picture_in_picture_state_changed -> Pbrt.Encoder.int_as_varint 52 encoder + | Atom_wifi_multicast_lock_state_changed -> Pbrt.Encoder.int_as_varint 53 encoder + | Atom_app_start_memory_state_captured -> Pbrt.Encoder.int_as_varint 55 encoder + | Atom_shutdown_sequence_reported -> Pbrt.Encoder.int_as_varint 56 encoder + | Atom_boot_sequence_reported -> Pbrt.Encoder.int_as_varint 57 encoder + | Atom_overlay_state_changed -> Pbrt.Encoder.int_as_varint 59 encoder + | Atom_foreground_service_state_changed -> Pbrt.Encoder.int_as_varint 60 encoder + | Atom_call_state_changed -> Pbrt.Encoder.int_as_varint 61 encoder + | Atom_keyguard_state_changed -> Pbrt.Encoder.int_as_varint 62 encoder + | Atom_keyguard_bouncer_state_changed -> Pbrt.Encoder.int_as_varint 63 encoder + | Atom_keyguard_bouncer_password_entered -> Pbrt.Encoder.int_as_varint 64 encoder + | Atom_app_died -> Pbrt.Encoder.int_as_varint 65 encoder + | Atom_resource_configuration_changed -> Pbrt.Encoder.int_as_varint 66 encoder + | Atom_bluetooth_enabled_state_changed -> Pbrt.Encoder.int_as_varint 67 encoder + | Atom_bluetooth_connection_state_changed -> Pbrt.Encoder.int_as_varint 68 encoder + | Atom_gps_signal_quality_changed -> Pbrt.Encoder.int_as_varint 69 encoder + | Atom_usb_connector_state_changed -> Pbrt.Encoder.int_as_varint 70 encoder + | Atom_speaker_impedance_reported -> Pbrt.Encoder.int_as_varint 71 encoder + | Atom_hardware_failed -> Pbrt.Encoder.int_as_varint 72 encoder + | Atom_physical_drop_detected -> Pbrt.Encoder.int_as_varint 73 encoder + | Atom_charge_cycles_reported -> Pbrt.Encoder.int_as_varint 74 encoder + | Atom_mobile_connection_state_changed -> Pbrt.Encoder.int_as_varint 75 encoder + | Atom_mobile_radio_technology_changed -> Pbrt.Encoder.int_as_varint 76 encoder + | Atom_usb_device_attached -> Pbrt.Encoder.int_as_varint 77 encoder + | Atom_app_crash_occurred -> Pbrt.Encoder.int_as_varint 78 encoder + | Atom_anr_occurred -> Pbrt.Encoder.int_as_varint 79 encoder + | Atom_wtf_occurred -> Pbrt.Encoder.int_as_varint 80 encoder + | Atom_low_mem_reported -> Pbrt.Encoder.int_as_varint 81 encoder + | Atom_generic_atom -> Pbrt.Encoder.int_as_varint 82 encoder + | Atom_vibrator_state_changed -> Pbrt.Encoder.int_as_varint 84 encoder + | Atom_deferred_job_stats_reported -> Pbrt.Encoder.int_as_varint 85 encoder + | Atom_thermal_throttling -> Pbrt.Encoder.int_as_varint 86 encoder + | Atom_biometric_acquired -> Pbrt.Encoder.int_as_varint 87 encoder + | Atom_biometric_authenticated -> Pbrt.Encoder.int_as_varint 88 encoder + | Atom_biometric_error_occurred -> Pbrt.Encoder.int_as_varint 89 encoder + | Atom_ui_event_reported -> Pbrt.Encoder.int_as_varint 90 encoder + | Atom_battery_health_snapshot -> Pbrt.Encoder.int_as_varint 91 encoder + | Atom_slow_io -> Pbrt.Encoder.int_as_varint 92 encoder + | Atom_battery_caused_shutdown -> Pbrt.Encoder.int_as_varint 93 encoder + | Atom_phone_service_state_changed -> Pbrt.Encoder.int_as_varint 94 encoder + | Atom_phone_state_changed -> Pbrt.Encoder.int_as_varint 95 encoder + | Atom_user_restriction_changed -> Pbrt.Encoder.int_as_varint 96 encoder + | Atom_settings_ui_changed -> Pbrt.Encoder.int_as_varint 97 encoder + | Atom_connectivity_state_changed -> Pbrt.Encoder.int_as_varint 98 encoder + | Atom_service_state_changed -> Pbrt.Encoder.int_as_varint 99 encoder + | Atom_service_launch_reported -> Pbrt.Encoder.int_as_varint 100 encoder + | Atom_flag_flip_update_occurred -> Pbrt.Encoder.int_as_varint 101 encoder + | Atom_binary_push_state_changed -> Pbrt.Encoder.int_as_varint 102 encoder + | Atom_device_policy_event -> Pbrt.Encoder.int_as_varint 103 encoder + | Atom_docs_ui_file_op_canceled -> Pbrt.Encoder.int_as_varint 104 encoder + | Atom_docs_ui_file_op_copy_move_mode_reported -> Pbrt.Encoder.int_as_varint 105 encoder + | Atom_docs_ui_file_op_failure -> Pbrt.Encoder.int_as_varint 106 encoder + | Atom_docs_ui_provider_file_op -> Pbrt.Encoder.int_as_varint 107 encoder + | Atom_docs_ui_invalid_scoped_access_request -> Pbrt.Encoder.int_as_varint 108 encoder + | Atom_docs_ui_launch_reported -> Pbrt.Encoder.int_as_varint 109 encoder + | Atom_docs_ui_root_visited -> Pbrt.Encoder.int_as_varint 110 encoder + | Atom_docs_ui_startup_ms -> Pbrt.Encoder.int_as_varint 111 encoder + | Atom_docs_ui_user_action_reported -> Pbrt.Encoder.int_as_varint 112 encoder + | Atom_wifi_enabled_state_changed -> Pbrt.Encoder.int_as_varint 113 encoder + | Atom_wifi_running_state_changed -> Pbrt.Encoder.int_as_varint 114 encoder + | Atom_app_compacted -> Pbrt.Encoder.int_as_varint 115 encoder + | Atom_network_dns_event_reported -> Pbrt.Encoder.int_as_varint 116 encoder + | Atom_docs_ui_picker_launched_from_reported -> Pbrt.Encoder.int_as_varint 117 encoder + | Atom_docs_ui_pick_result_reported -> Pbrt.Encoder.int_as_varint 118 encoder + | Atom_docs_ui_search_mode_reported -> Pbrt.Encoder.int_as_varint 119 encoder + | Atom_docs_ui_search_type_reported -> Pbrt.Encoder.int_as_varint 120 encoder + | Atom_data_stall_event -> Pbrt.Encoder.int_as_varint 121 encoder + | Atom_rescue_party_reset_reported -> Pbrt.Encoder.int_as_varint 122 encoder + | Atom_signed_config_reported -> Pbrt.Encoder.int_as_varint 123 encoder + | Atom_gnss_ni_event_reported -> Pbrt.Encoder.int_as_varint 124 encoder + | Atom_bluetooth_link_layer_connection_event -> Pbrt.Encoder.int_as_varint 125 encoder + | Atom_bluetooth_acl_connection_state_changed -> Pbrt.Encoder.int_as_varint 126 encoder + | Atom_bluetooth_sco_connection_state_changed -> Pbrt.Encoder.int_as_varint 127 encoder + | Atom_app_downgraded -> Pbrt.Encoder.int_as_varint 128 encoder + | Atom_app_optimized_after_downgraded -> Pbrt.Encoder.int_as_varint 129 encoder + | Atom_low_storage_state_changed -> Pbrt.Encoder.int_as_varint 130 encoder + | Atom_gnss_nfw_notification_reported -> Pbrt.Encoder.int_as_varint 131 encoder + | Atom_gnss_configuration_reported -> Pbrt.Encoder.int_as_varint 132 encoder + | Atom_usb_port_overheat_event_reported -> Pbrt.Encoder.int_as_varint 133 encoder + | Atom_nfc_error_occurred -> Pbrt.Encoder.int_as_varint 134 encoder + | Atom_nfc_state_changed -> Pbrt.Encoder.int_as_varint 135 encoder + | Atom_nfc_beam_occurred -> Pbrt.Encoder.int_as_varint 136 encoder + | Atom_nfc_cardemulation_occurred -> Pbrt.Encoder.int_as_varint 137 encoder + | Atom_nfc_tag_occurred -> Pbrt.Encoder.int_as_varint 138 encoder + | Atom_nfc_hce_transaction_occurred -> Pbrt.Encoder.int_as_varint 139 encoder + | Atom_se_state_changed -> Pbrt.Encoder.int_as_varint 140 encoder + | Atom_se_omapi_reported -> Pbrt.Encoder.int_as_varint 141 encoder + | Atom_broadcast_dispatch_latency_reported -> Pbrt.Encoder.int_as_varint 142 encoder + | Atom_attention_manager_service_result_reported -> Pbrt.Encoder.int_as_varint 143 encoder + | Atom_adb_connection_changed -> Pbrt.Encoder.int_as_varint 144 encoder + | Atom_speech_dsp_stat_reported -> Pbrt.Encoder.int_as_varint 145 encoder + | Atom_usb_contaminant_reported -> Pbrt.Encoder.int_as_varint 146 encoder + | Atom_watchdog_rollback_occurred -> Pbrt.Encoder.int_as_varint 147 encoder + | Atom_biometric_system_health_issue_detected -> Pbrt.Encoder.int_as_varint 148 encoder + | Atom_bubble_ui_changed -> Pbrt.Encoder.int_as_varint 149 encoder + | Atom_scheduled_job_constraint_changed -> Pbrt.Encoder.int_as_varint 150 encoder + | Atom_bluetooth_active_device_changed -> Pbrt.Encoder.int_as_varint 151 encoder + | Atom_bluetooth_a2_dp_playback_state_changed -> Pbrt.Encoder.int_as_varint 152 encoder + | Atom_bluetooth_a2_dp_codec_config_changed -> Pbrt.Encoder.int_as_varint 153 encoder + | Atom_bluetooth_a2_dp_codec_capability_changed -> Pbrt.Encoder.int_as_varint 154 encoder + | Atom_bluetooth_a2_dp_audio_underrun_reported -> Pbrt.Encoder.int_as_varint 155 encoder + | Atom_bluetooth_a2_dp_audio_overrun_reported -> Pbrt.Encoder.int_as_varint 156 encoder + | Atom_bluetooth_device_rssi_reported -> Pbrt.Encoder.int_as_varint 157 encoder + | Atom_bluetooth_device_failed_contact_counter_reported -> Pbrt.Encoder.int_as_varint 158 encoder + | Atom_bluetooth_device_tx_power_level_reported -> Pbrt.Encoder.int_as_varint 159 encoder + | Atom_bluetooth_hci_timeout_reported -> Pbrt.Encoder.int_as_varint 160 encoder + | Atom_bluetooth_quality_report_reported -> Pbrt.Encoder.int_as_varint 161 encoder + | Atom_bluetooth_device_info_reported -> Pbrt.Encoder.int_as_varint 162 encoder + | Atom_bluetooth_remote_version_info_reported -> Pbrt.Encoder.int_as_varint 163 encoder + | Atom_bluetooth_sdp_attribute_reported -> Pbrt.Encoder.int_as_varint 164 encoder + | Atom_bluetooth_bond_state_changed -> Pbrt.Encoder.int_as_varint 165 encoder + | Atom_bluetooth_classic_pairing_event_reported -> Pbrt.Encoder.int_as_varint 166 encoder + | Atom_bluetooth_smp_pairing_event_reported -> Pbrt.Encoder.int_as_varint 167 encoder + | Atom_screen_timeout_extension_reported -> Pbrt.Encoder.int_as_varint 168 encoder + | Atom_process_start_time -> Pbrt.Encoder.int_as_varint 169 encoder + | Atom_permission_grant_request_result_reported -> Pbrt.Encoder.int_as_varint 170 encoder + | Atom_bluetooth_socket_connection_state_changed -> Pbrt.Encoder.int_as_varint 171 encoder + | Atom_device_identifier_access_denied -> Pbrt.Encoder.int_as_varint 172 encoder + | Atom_bubble_developer_error_reported -> Pbrt.Encoder.int_as_varint 173 encoder + | Atom_assist_gesture_stage_reported -> Pbrt.Encoder.int_as_varint 174 encoder + | Atom_assist_gesture_feedback_reported -> Pbrt.Encoder.int_as_varint 175 encoder + | Atom_assist_gesture_progress_reported -> Pbrt.Encoder.int_as_varint 176 encoder + | Atom_touch_gesture_classified -> Pbrt.Encoder.int_as_varint 177 encoder + | Atom_hidden_api_used -> Pbrt.Encoder.int_as_varint 178 encoder + | Atom_style_ui_changed -> Pbrt.Encoder.int_as_varint 179 encoder + | Atom_privacy_indicators_interacted -> Pbrt.Encoder.int_as_varint 180 encoder + | Atom_app_install_on_external_storage_reported -> Pbrt.Encoder.int_as_varint 181 encoder + | Atom_network_stack_reported -> Pbrt.Encoder.int_as_varint 182 encoder + | Atom_app_moved_storage_reported -> Pbrt.Encoder.int_as_varint 183 encoder + | Atom_biometric_enrolled -> Pbrt.Encoder.int_as_varint 184 encoder + | Atom_system_server_watchdog_occurred -> Pbrt.Encoder.int_as_varint 185 encoder + | Atom_tomb_stone_occurred -> Pbrt.Encoder.int_as_varint 186 encoder + | Atom_bluetooth_class_of_device_reported -> Pbrt.Encoder.int_as_varint 187 encoder + | Atom_intelligence_event_reported -> Pbrt.Encoder.int_as_varint 188 encoder + | Atom_thermal_throttling_severity_state_changed -> Pbrt.Encoder.int_as_varint 189 encoder + | Atom_role_request_result_reported -> Pbrt.Encoder.int_as_varint 190 encoder + | Atom_mediametrics_audiopolicy_reported -> Pbrt.Encoder.int_as_varint 191 encoder + | Atom_mediametrics_audiorecord_reported -> Pbrt.Encoder.int_as_varint 192 encoder + | Atom_mediametrics_audiothread_reported -> Pbrt.Encoder.int_as_varint 193 encoder + | Atom_mediametrics_audiotrack_reported -> Pbrt.Encoder.int_as_varint 194 encoder + | Atom_mediametrics_codec_reported -> Pbrt.Encoder.int_as_varint 195 encoder + | Atom_mediametrics_drm_widevine_reported -> Pbrt.Encoder.int_as_varint 196 encoder + | Atom_mediametrics_extractor_reported -> Pbrt.Encoder.int_as_varint 197 encoder + | Atom_mediametrics_mediadrm_reported -> Pbrt.Encoder.int_as_varint 198 encoder + | Atom_mediametrics_nuplayer_reported -> Pbrt.Encoder.int_as_varint 199 encoder + | Atom_mediametrics_recorder_reported -> Pbrt.Encoder.int_as_varint 200 encoder + | Atom_mediametrics_drmmanager_reported -> Pbrt.Encoder.int_as_varint 201 encoder + | Atom_car_power_state_changed -> Pbrt.Encoder.int_as_varint 203 encoder + | Atom_garage_mode_info -> Pbrt.Encoder.int_as_varint 204 encoder + | Atom_test_atom_reported -> Pbrt.Encoder.int_as_varint 205 encoder + | Atom_content_capture_caller_mismatch_reported -> Pbrt.Encoder.int_as_varint 206 encoder + | Atom_content_capture_service_events -> Pbrt.Encoder.int_as_varint 207 encoder + | Atom_content_capture_session_events -> Pbrt.Encoder.int_as_varint 208 encoder + | Atom_content_capture_flushed -> Pbrt.Encoder.int_as_varint 209 encoder + | Atom_location_manager_api_usage_reported -> Pbrt.Encoder.int_as_varint 210 encoder + | Atom_review_permissions_fragment_result_reported -> Pbrt.Encoder.int_as_varint 211 encoder + | Atom_runtime_permissions_upgrade_result -> Pbrt.Encoder.int_as_varint 212 encoder + | Atom_grant_permissions_activity_button_actions -> Pbrt.Encoder.int_as_varint 213 encoder + | Atom_location_access_check_notification_action -> Pbrt.Encoder.int_as_varint 214 encoder + | Atom_app_permission_fragment_action_reported -> Pbrt.Encoder.int_as_varint 215 encoder + | Atom_app_permission_fragment_viewed -> Pbrt.Encoder.int_as_varint 216 encoder + | Atom_app_permissions_fragment_viewed -> Pbrt.Encoder.int_as_varint 217 encoder + | Atom_permission_apps_fragment_viewed -> Pbrt.Encoder.int_as_varint 218 encoder + | Atom_text_selection_event -> Pbrt.Encoder.int_as_varint 219 encoder + | Atom_text_linkify_event -> Pbrt.Encoder.int_as_varint 220 encoder + | Atom_conversation_actions_event -> Pbrt.Encoder.int_as_varint 221 encoder + | Atom_language_detection_event -> Pbrt.Encoder.int_as_varint 222 encoder + | Atom_exclusion_rect_state_changed -> Pbrt.Encoder.int_as_varint 223 encoder + | Atom_back_gesture_reported_reported -> Pbrt.Encoder.int_as_varint 224 encoder + | Atom_update_engine_update_attempt_reported -> Pbrt.Encoder.int_as_varint 225 encoder + | Atom_update_engine_successful_update_reported -> Pbrt.Encoder.int_as_varint 226 encoder + | Atom_camera_action_event -> Pbrt.Encoder.int_as_varint 227 encoder + | Atom_app_compatibility_change_reported -> Pbrt.Encoder.int_as_varint 228 encoder + | Atom_perfetto_uploaded -> Pbrt.Encoder.int_as_varint 229 encoder + | Atom_vms_client_connection_state_changed -> Pbrt.Encoder.int_as_varint 230 encoder + | Atom_media_provider_scan_occurred -> Pbrt.Encoder.int_as_varint 233 encoder + | Atom_media_content_deleted -> Pbrt.Encoder.int_as_varint 234 encoder + | Atom_media_provider_permission_requested -> Pbrt.Encoder.int_as_varint 235 encoder + | Atom_media_provider_schema_changed -> Pbrt.Encoder.int_as_varint 236 encoder + | Atom_media_provider_idle_maintenance_finished -> Pbrt.Encoder.int_as_varint 237 encoder + | Atom_reboot_escrow_recovery_reported -> Pbrt.Encoder.int_as_varint 238 encoder + | Atom_boot_time_event_duration_reported -> Pbrt.Encoder.int_as_varint 239 encoder + | Atom_boot_time_event_elapsed_time_reported -> Pbrt.Encoder.int_as_varint 240 encoder + | Atom_boot_time_event_utc_time_reported -> Pbrt.Encoder.int_as_varint 241 encoder + | Atom_boot_time_event_error_code_reported -> Pbrt.Encoder.int_as_varint 242 encoder + | Atom_userspace_reboot_reported -> Pbrt.Encoder.int_as_varint 243 encoder + | Atom_notification_reported -> Pbrt.Encoder.int_as_varint 244 encoder + | Atom_notification_panel_reported -> Pbrt.Encoder.int_as_varint 245 encoder + | Atom_notification_channel_modified -> Pbrt.Encoder.int_as_varint 246 encoder + | Atom_integrity_check_result_reported -> Pbrt.Encoder.int_as_varint 247 encoder + | Atom_integrity_rules_pushed -> Pbrt.Encoder.int_as_varint 248 encoder + | Atom_cb_message_reported -> Pbrt.Encoder.int_as_varint 249 encoder + | Atom_cb_message_error -> Pbrt.Encoder.int_as_varint 250 encoder + | Atom_wifi_health_stat_reported -> Pbrt.Encoder.int_as_varint 251 encoder + | Atom_wifi_failure_stat_reported -> Pbrt.Encoder.int_as_varint 252 encoder + | Atom_wifi_connection_result_reported -> Pbrt.Encoder.int_as_varint 253 encoder + | Atom_app_freeze_changed -> Pbrt.Encoder.int_as_varint 254 encoder + | Atom_snapshot_merge_reported -> Pbrt.Encoder.int_as_varint 255 encoder + | Atom_foreground_service_app_op_session_ended -> Pbrt.Encoder.int_as_varint 256 encoder + | Atom_display_jank_reported -> Pbrt.Encoder.int_as_varint 257 encoder + | Atom_app_standby_bucket_changed -> Pbrt.Encoder.int_as_varint 258 encoder + | Atom_sharesheet_started -> Pbrt.Encoder.int_as_varint 259 encoder + | Atom_ranking_selected -> Pbrt.Encoder.int_as_varint 260 encoder + | Atom_tvsettings_ui_interacted -> Pbrt.Encoder.int_as_varint 261 encoder + | Atom_launcher_snapshot -> Pbrt.Encoder.int_as_varint 262 encoder + | Atom_package_installer_v2_reported -> Pbrt.Encoder.int_as_varint 263 encoder + | Atom_user_lifecycle_journey_reported -> Pbrt.Encoder.int_as_varint 264 encoder + | Atom_user_lifecycle_event_occurred -> Pbrt.Encoder.int_as_varint 265 encoder + | Atom_accessibility_shortcut_reported -> Pbrt.Encoder.int_as_varint 266 encoder + | Atom_accessibility_service_reported -> Pbrt.Encoder.int_as_varint 267 encoder + | Atom_docs_ui_drag_and_drop_reported -> Pbrt.Encoder.int_as_varint 268 encoder + | Atom_app_usage_event_occurred -> Pbrt.Encoder.int_as_varint 269 encoder + | Atom_auto_revoke_notification_clicked -> Pbrt.Encoder.int_as_varint 270 encoder + | Atom_auto_revoke_fragment_app_viewed -> Pbrt.Encoder.int_as_varint 271 encoder + | Atom_auto_revoked_app_interaction -> Pbrt.Encoder.int_as_varint 272 encoder + | Atom_app_permission_groups_fragment_auto_revoke_action -> Pbrt.Encoder.int_as_varint 273 encoder + | Atom_evs_usage_stats_reported -> Pbrt.Encoder.int_as_varint 274 encoder + | Atom_audio_power_usage_data_reported -> Pbrt.Encoder.int_as_varint 275 encoder + | Atom_tv_tuner_state_changed -> Pbrt.Encoder.int_as_varint 276 encoder + | Atom_mediaoutput_op_switch_reported -> Pbrt.Encoder.int_as_varint 277 encoder + | Atom_cb_message_filtered -> Pbrt.Encoder.int_as_varint 278 encoder + | Atom_tv_tuner_dvr_status -> Pbrt.Encoder.int_as_varint 279 encoder + | Atom_tv_cas_session_open_status -> Pbrt.Encoder.int_as_varint 280 encoder + | Atom_assistant_invocation_reported -> Pbrt.Encoder.int_as_varint 281 encoder + | Atom_display_wake_reported -> Pbrt.Encoder.int_as_varint 282 encoder + | Atom_car_user_hal_modify_user_request_reported -> Pbrt.Encoder.int_as_varint 283 encoder + | Atom_car_user_hal_modify_user_response_reported -> Pbrt.Encoder.int_as_varint 284 encoder + | Atom_car_user_hal_post_switch_response_reported -> Pbrt.Encoder.int_as_varint 285 encoder + | Atom_car_user_hal_initial_user_info_request_reported -> Pbrt.Encoder.int_as_varint 286 encoder + | Atom_car_user_hal_initial_user_info_response_reported -> Pbrt.Encoder.int_as_varint 287 encoder + | Atom_car_user_hal_user_association_request_reported -> Pbrt.Encoder.int_as_varint 288 encoder + | Atom_car_user_hal_set_user_association_response_reported -> Pbrt.Encoder.int_as_varint 289 encoder + | Atom_network_ip_provisioning_reported -> Pbrt.Encoder.int_as_varint 290 encoder + | Atom_network_dhcp_renew_reported -> Pbrt.Encoder.int_as_varint 291 encoder + | Atom_network_validation_reported -> Pbrt.Encoder.int_as_varint 292 encoder + | Atom_network_stack_quirk_reported -> Pbrt.Encoder.int_as_varint 293 encoder + | Atom_mediametrics_audiorecorddeviceusage_reported -> Pbrt.Encoder.int_as_varint 294 encoder + | Atom_mediametrics_audiothreaddeviceusage_reported -> Pbrt.Encoder.int_as_varint 295 encoder + | Atom_mediametrics_audiotrackdeviceusage_reported -> Pbrt.Encoder.int_as_varint 296 encoder + | Atom_mediametrics_audiodeviceconnection_reported -> Pbrt.Encoder.int_as_varint 297 encoder + | Atom_blob_committed -> Pbrt.Encoder.int_as_varint 298 encoder + | Atom_blob_leased -> Pbrt.Encoder.int_as_varint 299 encoder + | Atom_blob_opened -> Pbrt.Encoder.int_as_varint 300 encoder + | Atom_contacts_provider_status_reported -> Pbrt.Encoder.int_as_varint 301 encoder + | Atom_keystore_key_event_reported -> Pbrt.Encoder.int_as_varint 302 encoder + | Atom_network_tethering_reported -> Pbrt.Encoder.int_as_varint 303 encoder + | Atom_ime_touch_reported -> Pbrt.Encoder.int_as_varint 304 encoder + | Atom_ui_interaction_frame_info_reported -> Pbrt.Encoder.int_as_varint 305 encoder + | Atom_ui_action_latency_reported -> Pbrt.Encoder.int_as_varint 306 encoder + | Atom_wifi_disconnect_reported -> Pbrt.Encoder.int_as_varint 307 encoder + | Atom_wifi_connection_state_changed -> Pbrt.Encoder.int_as_varint 308 encoder + | Atom_hdmi_cec_active_source_changed -> Pbrt.Encoder.int_as_varint 309 encoder + | Atom_hdmi_cec_message_reported -> Pbrt.Encoder.int_as_varint 310 encoder + | Atom_airplane_mode -> Pbrt.Encoder.int_as_varint 311 encoder + | Atom_modem_restart -> Pbrt.Encoder.int_as_varint 312 encoder + | Atom_carrier_id_mismatch_reported -> Pbrt.Encoder.int_as_varint 313 encoder + | Atom_carrier_id_table_updated -> Pbrt.Encoder.int_as_varint 314 encoder + | Atom_data_stall_recovery_reported -> Pbrt.Encoder.int_as_varint 315 encoder + | Atom_mediametrics_mediaparser_reported -> Pbrt.Encoder.int_as_varint 316 encoder + | Atom_tls_handshake_reported -> Pbrt.Encoder.int_as_varint 317 encoder + | Atom_text_classifier_api_usage_reported -> Pbrt.Encoder.int_as_varint 318 encoder + | Atom_car_watchdog_kill_stats_reported -> Pbrt.Encoder.int_as_varint 319 encoder + | Atom_mediametrics_playback_reported -> Pbrt.Encoder.int_as_varint 320 encoder + | Atom_media_network_info_changed -> Pbrt.Encoder.int_as_varint 321 encoder + | Atom_media_playback_state_changed -> Pbrt.Encoder.int_as_varint 322 encoder + | Atom_media_playback_error_reported -> Pbrt.Encoder.int_as_varint 323 encoder + | Atom_media_playback_track_changed -> Pbrt.Encoder.int_as_varint 324 encoder + | Atom_wifi_scan_reported -> Pbrt.Encoder.int_as_varint 325 encoder + | Atom_wifi_pno_scan_reported -> Pbrt.Encoder.int_as_varint 326 encoder + | Atom_tif_tune_changed -> Pbrt.Encoder.int_as_varint 327 encoder + | Atom_auto_rotate_reported -> Pbrt.Encoder.int_as_varint 328 encoder + | Atom_perfetto_trigger -> Pbrt.Encoder.int_as_varint 329 encoder + | Atom_transcoding_data -> Pbrt.Encoder.int_as_varint 330 encoder + | Atom_ims_service_entitlement_updated -> Pbrt.Encoder.int_as_varint 331 encoder + | Atom_device_rotated -> Pbrt.Encoder.int_as_varint 333 encoder + | Atom_sim_specific_settings_restored -> Pbrt.Encoder.int_as_varint 334 encoder + | Atom_text_classifier_download_reported -> Pbrt.Encoder.int_as_varint 335 encoder + | Atom_pin_storage_event -> Pbrt.Encoder.int_as_varint 336 encoder + | Atom_face_down_reported -> Pbrt.Encoder.int_as_varint 337 encoder + | Atom_bluetooth_hal_crash_reason_reported -> Pbrt.Encoder.int_as_varint 338 encoder + | Atom_reboot_escrow_preparation_reported -> Pbrt.Encoder.int_as_varint 339 encoder + | Atom_reboot_escrow_lskf_capture_reported -> Pbrt.Encoder.int_as_varint 340 encoder + | Atom_reboot_escrow_reboot_reported -> Pbrt.Encoder.int_as_varint 341 encoder + | Atom_binder_latency_reported -> Pbrt.Encoder.int_as_varint 342 encoder + | Atom_mediametrics_aaudiostream_reported -> Pbrt.Encoder.int_as_varint 343 encoder + | Atom_media_transcoding_session_ended -> Pbrt.Encoder.int_as_varint 344 encoder + | Atom_magnification_usage_reported -> Pbrt.Encoder.int_as_varint 345 encoder + | Atom_magnification_mode_with_ime_on_reported -> Pbrt.Encoder.int_as_varint 346 encoder + | Atom_app_search_call_stats_reported -> Pbrt.Encoder.int_as_varint 347 encoder + | Atom_app_search_put_document_stats_reported -> Pbrt.Encoder.int_as_varint 348 encoder + | Atom_device_control_changed -> Pbrt.Encoder.int_as_varint 349 encoder + | Atom_device_state_changed -> Pbrt.Encoder.int_as_varint 350 encoder + | Atom_inputdevice_registered -> Pbrt.Encoder.int_as_varint 351 encoder + | Atom_smartspace_card_reported -> Pbrt.Encoder.int_as_varint 352 encoder + | Atom_auth_prompt_authenticate_invoked -> Pbrt.Encoder.int_as_varint 353 encoder + | Atom_auth_manager_can_authenticate_invoked -> Pbrt.Encoder.int_as_varint 354 encoder + | Atom_auth_enroll_action_invoked -> Pbrt.Encoder.int_as_varint 355 encoder + | Atom_auth_deprecated_api_used -> Pbrt.Encoder.int_as_varint 356 encoder + | Atom_unattended_reboot_occurred -> Pbrt.Encoder.int_as_varint 357 encoder + | Atom_long_reboot_blocking_reported -> Pbrt.Encoder.int_as_varint 358 encoder + | Atom_location_time_zone_provider_state_changed -> Pbrt.Encoder.int_as_varint 359 encoder + | Atom_fdtrack_event_occurred -> Pbrt.Encoder.int_as_varint 364 encoder + | Atom_timeout_auto_extended_reported -> Pbrt.Encoder.int_as_varint 365 encoder + | Atom_alarm_batch_delivered -> Pbrt.Encoder.int_as_varint 367 encoder + | Atom_alarm_scheduled -> Pbrt.Encoder.int_as_varint 368 encoder + | Atom_car_watchdog_io_overuse_stats_reported -> Pbrt.Encoder.int_as_varint 369 encoder + | Atom_user_level_hibernation_state_changed -> Pbrt.Encoder.int_as_varint 370 encoder + | Atom_app_search_initialize_stats_reported -> Pbrt.Encoder.int_as_varint 371 encoder + | Atom_app_search_query_stats_reported -> Pbrt.Encoder.int_as_varint 372 encoder + | Atom_app_process_died -> Pbrt.Encoder.int_as_varint 373 encoder + | Atom_network_ip_reachability_monitor_reported -> Pbrt.Encoder.int_as_varint 374 encoder + | Atom_slow_input_event_reported -> Pbrt.Encoder.int_as_varint 375 encoder + | Atom_anr_occurred_processing_started -> Pbrt.Encoder.int_as_varint 376 encoder + | Atom_app_search_remove_stats_reported -> Pbrt.Encoder.int_as_varint 377 encoder + | Atom_media_codec_reported -> Pbrt.Encoder.int_as_varint 378 encoder + | Atom_permission_usage_fragment_interaction -> Pbrt.Encoder.int_as_varint 379 encoder + | Atom_permission_details_interaction -> Pbrt.Encoder.int_as_varint 380 encoder + | Atom_privacy_sensor_toggle_interaction -> Pbrt.Encoder.int_as_varint 381 encoder + | Atom_privacy_toggle_dialog_interaction -> Pbrt.Encoder.int_as_varint 382 encoder + | Atom_app_search_optimize_stats_reported -> Pbrt.Encoder.int_as_varint 383 encoder + | Atom_non_a11_y_tool_service_warning_report -> Pbrt.Encoder.int_as_varint 384 encoder + | Atom_app_compat_state_changed -> Pbrt.Encoder.int_as_varint 386 encoder + | Atom_size_compat_restart_button_event_reported -> Pbrt.Encoder.int_as_varint 387 encoder + | Atom_splitscreen_ui_changed -> Pbrt.Encoder.int_as_varint 388 encoder + | Atom_network_dns_handshake_reported -> Pbrt.Encoder.int_as_varint 389 encoder + | Atom_bluetooth_code_path_counter -> Pbrt.Encoder.int_as_varint 390 encoder + | Atom_bluetooth_le_batch_scan_report_delay -> Pbrt.Encoder.int_as_varint 392 encoder + | Atom_accessibility_floating_menu_ui_changed -> Pbrt.Encoder.int_as_varint 393 encoder + | Atom_neuralnetworks_compilation_completed -> Pbrt.Encoder.int_as_varint 394 encoder + | Atom_neuralnetworks_execution_completed -> Pbrt.Encoder.int_as_varint 395 encoder + | Atom_neuralnetworks_compilation_failed -> Pbrt.Encoder.int_as_varint 396 encoder + | Atom_neuralnetworks_execution_failed -> Pbrt.Encoder.int_as_varint 397 encoder + | Atom_context_hub_booted -> Pbrt.Encoder.int_as_varint 398 encoder + | Atom_context_hub_restarted -> Pbrt.Encoder.int_as_varint 399 encoder + | Atom_context_hub_loaded_nanoapp_snapshot_reported -> Pbrt.Encoder.int_as_varint 400 encoder + | Atom_chre_code_download_transacted -> Pbrt.Encoder.int_as_varint 401 encoder + | Atom_uwb_session_inited -> Pbrt.Encoder.int_as_varint 402 encoder + | Atom_uwb_session_closed -> Pbrt.Encoder.int_as_varint 403 encoder + | Atom_uwb_first_ranging_received -> Pbrt.Encoder.int_as_varint 404 encoder + | Atom_uwb_ranging_measurement_received -> Pbrt.Encoder.int_as_varint 405 encoder + | Atom_text_classifier_download_work_scheduled -> Pbrt.Encoder.int_as_varint 406 encoder + | Atom_text_classifier_download_work_completed -> Pbrt.Encoder.int_as_varint 407 encoder + | Atom_clipboard_cleared -> Pbrt.Encoder.int_as_varint 408 encoder + | Atom_vm_creation_requested -> Pbrt.Encoder.int_as_varint 409 encoder + | Atom_nearby_device_scan_state_changed -> Pbrt.Encoder.int_as_varint 410 encoder + | Atom_application_locales_changed -> Pbrt.Encoder.int_as_varint 412 encoder + | Atom_mediametrics_audiotrackstatus_reported -> Pbrt.Encoder.int_as_varint 413 encoder + | Atom_fold_state_duration_reported -> Pbrt.Encoder.int_as_varint 414 encoder + | Atom_location_time_zone_provider_controller_state_changed -> Pbrt.Encoder.int_as_varint 415 encoder + | Atom_display_hbm_state_changed -> Pbrt.Encoder.int_as_varint 416 encoder + | Atom_display_hbm_brightness_changed -> Pbrt.Encoder.int_as_varint 417 encoder + | Atom_persistent_uri_permissions_flushed -> Pbrt.Encoder.int_as_varint 418 encoder + | Atom_early_boot_comp_os_artifacts_check_reported -> Pbrt.Encoder.int_as_varint 419 encoder + | Atom_vbmeta_digest_reported -> Pbrt.Encoder.int_as_varint 420 encoder + | Atom_apex_info_gathered -> Pbrt.Encoder.int_as_varint 421 encoder + | Atom_pvm_info_gathered -> Pbrt.Encoder.int_as_varint 422 encoder + | Atom_wear_settings_ui_interacted -> Pbrt.Encoder.int_as_varint 423 encoder + | Atom_tracing_service_report_event -> Pbrt.Encoder.int_as_varint 424 encoder + | Atom_mediametrics_audiorecordstatus_reported -> Pbrt.Encoder.int_as_varint 425 encoder + | Atom_launcher_latency -> Pbrt.Encoder.int_as_varint 426 encoder + | Atom_dropbox_entry_dropped -> Pbrt.Encoder.int_as_varint 427 encoder + | Atom_wifi_p2_p_connection_reported -> Pbrt.Encoder.int_as_varint 428 encoder + | Atom_game_state_changed -> Pbrt.Encoder.int_as_varint 429 encoder + | Atom_hotword_detector_create_requested -> Pbrt.Encoder.int_as_varint 430 encoder + | Atom_hotword_detection_service_init_result_reported -> Pbrt.Encoder.int_as_varint 431 encoder + | Atom_hotword_detection_service_restarted -> Pbrt.Encoder.int_as_varint 432 encoder + | Atom_hotword_detector_keyphrase_triggered -> Pbrt.Encoder.int_as_varint 433 encoder + | Atom_hotword_detector_events -> Pbrt.Encoder.int_as_varint 434 encoder + | Atom_boot_completed_broadcast_completion_latency_reported -> Pbrt.Encoder.int_as_varint 437 encoder + | Atom_contacts_indexer_update_stats_reported -> Pbrt.Encoder.int_as_varint 440 encoder + | Atom_app_background_restrictions_info -> Pbrt.Encoder.int_as_varint 441 encoder + | Atom_mms_sms_provider_get_thread_id_failed -> Pbrt.Encoder.int_as_varint 442 encoder + | Atom_mms_sms_database_helper_on_upgrade_failed -> Pbrt.Encoder.int_as_varint 443 encoder + | Atom_permission_reminder_notification_interacted -> Pbrt.Encoder.int_as_varint 444 encoder + | Atom_recent_permission_decisions_interacted -> Pbrt.Encoder.int_as_varint 445 encoder + | Atom_gnss_psds_download_reported -> Pbrt.Encoder.int_as_varint 446 encoder + | Atom_le_audio_connection_session_reported -> Pbrt.Encoder.int_as_varint 447 encoder + | Atom_le_audio_broadcast_session_reported -> Pbrt.Encoder.int_as_varint 448 encoder + | Atom_dream_ui_event_reported -> Pbrt.Encoder.int_as_varint 449 encoder + | Atom_task_manager_event_reported -> Pbrt.Encoder.int_as_varint 450 encoder + | Atom_cdm_association_action -> Pbrt.Encoder.int_as_varint 451 encoder + | Atom_magnification_triple_tap_and_hold_activated_session_reported -> Pbrt.Encoder.int_as_varint 452 encoder + | Atom_magnification_follow_typing_focus_activated_session_reported -> Pbrt.Encoder.int_as_varint 453 encoder + | Atom_accessibility_text_reading_options_changed -> Pbrt.Encoder.int_as_varint 454 encoder + | Atom_wifi_setup_failure_crash_reported -> Pbrt.Encoder.int_as_varint 455 encoder + | Atom_uwb_device_error_reported -> Pbrt.Encoder.int_as_varint 456 encoder + | Atom_isolated_compilation_scheduled -> Pbrt.Encoder.int_as_varint 457 encoder + | Atom_isolated_compilation_ended -> Pbrt.Encoder.int_as_varint 458 encoder + | Atom_ons_opportunistic_esim_provisioning_complete -> Pbrt.Encoder.int_as_varint 459 encoder + | Atom_system_server_pre_watchdog_occurred -> Pbrt.Encoder.int_as_varint 460 encoder + | Atom_telephony_anomaly_detected -> Pbrt.Encoder.int_as_varint 461 encoder + | Atom_letterbox_position_changed -> Pbrt.Encoder.int_as_varint 462 encoder + | Atom_remote_key_provisioning_attempt -> Pbrt.Encoder.int_as_varint 463 encoder + | Atom_remote_key_provisioning_network_info -> Pbrt.Encoder.int_as_varint 464 encoder + | Atom_remote_key_provisioning_timing -> Pbrt.Encoder.int_as_varint 465 encoder + | Atom_mediaoutput_op_interaction_report -> Pbrt.Encoder.int_as_varint 466 encoder + | Atom_sync_exemption_occurred -> Pbrt.Encoder.int_as_varint 468 encoder + | Atom_autofill_presentation_event_reported -> Pbrt.Encoder.int_as_varint 469 encoder + | Atom_dock_state_changed -> Pbrt.Encoder.int_as_varint 470 encoder + | Atom_safety_source_state_collected -> Pbrt.Encoder.int_as_varint 471 encoder + | Atom_safety_center_system_event_reported -> Pbrt.Encoder.int_as_varint 472 encoder + | Atom_safety_center_interaction_reported -> Pbrt.Encoder.int_as_varint 473 encoder + | Atom_settings_provider_setting_changed -> Pbrt.Encoder.int_as_varint 474 encoder + | Atom_broadcast_delivery_event_reported -> Pbrt.Encoder.int_as_varint 475 encoder + | Atom_service_request_event_reported -> Pbrt.Encoder.int_as_varint 476 encoder + | Atom_provider_acquisition_event_reported -> Pbrt.Encoder.int_as_varint 477 encoder + | Atom_bluetooth_device_name_reported -> Pbrt.Encoder.int_as_varint 478 encoder + | Atom_cb_config_updated -> Pbrt.Encoder.int_as_varint 479 encoder + | Atom_cb_module_error_reported -> Pbrt.Encoder.int_as_varint 480 encoder + | Atom_cb_service_feature_changed -> Pbrt.Encoder.int_as_varint 481 encoder + | Atom_cb_receiver_feature_changed -> Pbrt.Encoder.int_as_varint 482 encoder + | Atom_privacy_signal_notification_interaction -> Pbrt.Encoder.int_as_varint 484 encoder + | Atom_privacy_signal_issue_card_interaction -> Pbrt.Encoder.int_as_varint 485 encoder + | Atom_privacy_signals_job_failure -> Pbrt.Encoder.int_as_varint 486 encoder + | Atom_vibration_reported -> Pbrt.Encoder.int_as_varint 487 encoder + | Atom_uwb_ranging_start -> Pbrt.Encoder.int_as_varint 489 encoder + | Atom_app_compacted_v2 -> Pbrt.Encoder.int_as_varint 491 encoder + | Atom_display_brightness_changed -> Pbrt.Encoder.int_as_varint 494 encoder + | Atom_activity_action_blocked -> Pbrt.Encoder.int_as_varint 495 encoder + | Atom_network_dns_server_support_reported -> Pbrt.Encoder.int_as_varint 504 encoder + | Atom_vm_booted -> Pbrt.Encoder.int_as_varint 505 encoder + | Atom_vm_exited -> Pbrt.Encoder.int_as_varint 506 encoder + | Atom_ambient_brightness_stats_reported -> Pbrt.Encoder.int_as_varint 507 encoder + | Atom_mediametrics_spatializercapabilities_reported -> Pbrt.Encoder.int_as_varint 508 encoder + | Atom_mediametrics_spatializerdeviceenabled_reported -> Pbrt.Encoder.int_as_varint 509 encoder + | Atom_mediametrics_headtrackerdeviceenabled_reported -> Pbrt.Encoder.int_as_varint 510 encoder + | Atom_mediametrics_headtrackerdevicesupported_reported -> Pbrt.Encoder.int_as_varint 511 encoder + | Atom_hearing_aid_info_reported -> Pbrt.Encoder.int_as_varint 513 encoder + | Atom_device_wide_job_constraint_changed -> Pbrt.Encoder.int_as_varint 514 encoder + | Atom_ambient_mode_changed -> Pbrt.Encoder.int_as_varint 515 encoder + | Atom_anr_latency_reported -> Pbrt.Encoder.int_as_varint 516 encoder + | Atom_resource_api_info -> Pbrt.Encoder.int_as_varint 517 encoder + | Atom_system_default_network_changed -> Pbrt.Encoder.int_as_varint 518 encoder + | Atom_iwlan_setup_data_call_result_reported -> Pbrt.Encoder.int_as_varint 519 encoder + | Atom_iwlan_pdn_disconnected_reason_reported -> Pbrt.Encoder.int_as_varint 520 encoder + | Atom_airplane_mode_session_reported -> Pbrt.Encoder.int_as_varint 521 encoder + | Atom_vm_cpu_status_reported -> Pbrt.Encoder.int_as_varint 522 encoder + | Atom_vm_mem_status_reported -> Pbrt.Encoder.int_as_varint 523 encoder + | Atom_package_installation_session_reported -> Pbrt.Encoder.int_as_varint 524 encoder + | Atom_default_network_rematch_info -> Pbrt.Encoder.int_as_varint 525 encoder + | Atom_network_selection_performance -> Pbrt.Encoder.int_as_varint 526 encoder + | Atom_network_nsd_reported -> Pbrt.Encoder.int_as_varint 527 encoder + | Atom_bluetooth_disconnection_reason_reported -> Pbrt.Encoder.int_as_varint 529 encoder + | Atom_bluetooth_local_versions_reported -> Pbrt.Encoder.int_as_varint 530 encoder + | Atom_bluetooth_remote_supported_features_reported -> Pbrt.Encoder.int_as_varint 531 encoder + | Atom_bluetooth_local_supported_features_reported -> Pbrt.Encoder.int_as_varint 532 encoder + | Atom_bluetooth_gatt_app_info -> Pbrt.Encoder.int_as_varint 533 encoder + | Atom_brightness_configuration_updated -> Pbrt.Encoder.int_as_varint 534 encoder + | Atom_wear_media_output_switcher_launched -> Pbrt.Encoder.int_as_varint 538 encoder + | Atom_wear_media_output_switcher_finished -> Pbrt.Encoder.int_as_varint 539 encoder + | Atom_wear_media_output_switcher_connection_reported -> Pbrt.Encoder.int_as_varint 540 encoder + | Atom_wear_media_output_switcher_device_scan_triggered -> Pbrt.Encoder.int_as_varint 541 encoder + | Atom_wear_media_output_switcher_first_device_scan_latency -> Pbrt.Encoder.int_as_varint 542 encoder + | Atom_wear_media_output_switcher_connect_device_latency -> Pbrt.Encoder.int_as_varint 543 encoder + | Atom_package_manager_snapshot_reported -> Pbrt.Encoder.int_as_varint 544 encoder + | Atom_package_manager_apps_filter_cache_build_reported -> Pbrt.Encoder.int_as_varint 545 encoder + | Atom_package_manager_apps_filter_cache_update_reported -> Pbrt.Encoder.int_as_varint 546 encoder + | Atom_launcher_impression_event -> Pbrt.Encoder.int_as_varint 547 encoder + | Atom_wear_media_output_switcher_all_devices_scan_latency -> Pbrt.Encoder.int_as_varint 549 encoder + | Atom_ws_watch_face_edited -> Pbrt.Encoder.int_as_varint 551 encoder + | Atom_ws_watch_face_favorite_action_reported -> Pbrt.Encoder.int_as_varint 552 encoder + | Atom_ws_watch_face_set_action_reported -> Pbrt.Encoder.int_as_varint 553 encoder + | Atom_package_uninstallation_reported -> Pbrt.Encoder.int_as_varint 554 encoder + | Atom_game_mode_changed -> Pbrt.Encoder.int_as_varint 555 encoder + | Atom_game_mode_configuration_changed -> Pbrt.Encoder.int_as_varint 556 encoder + | Atom_bedtime_mode_state_changed -> Pbrt.Encoder.int_as_varint 557 encoder + | Atom_network_slice_session_ended -> Pbrt.Encoder.int_as_varint 558 encoder + | Atom_network_slice_daily_data_usage_reported -> Pbrt.Encoder.int_as_varint 559 encoder + | Atom_nfc_tag_type_occurred -> Pbrt.Encoder.int_as_varint 560 encoder + | Atom_nfc_aid_conflict_occurred -> Pbrt.Encoder.int_as_varint 561 encoder + | Atom_nfc_reader_conflict_occurred -> Pbrt.Encoder.int_as_varint 562 encoder + | Atom_ws_tile_list_changed -> Pbrt.Encoder.int_as_varint 563 encoder + | Atom_get_type_accessed_without_permission -> Pbrt.Encoder.int_as_varint 564 encoder + | Atom_mobile_bundled_app_info_gathered -> Pbrt.Encoder.int_as_varint 566 encoder + | Atom_ws_watch_face_complication_set_changed -> Pbrt.Encoder.int_as_varint 567 encoder + | Atom_media_drm_created -> Pbrt.Encoder.int_as_varint 568 encoder + | Atom_media_drm_errored -> Pbrt.Encoder.int_as_varint 569 encoder + | Atom_media_drm_session_opened -> Pbrt.Encoder.int_as_varint 570 encoder + | Atom_media_drm_session_closed -> Pbrt.Encoder.int_as_varint 571 encoder + | Atom_user_selected_resolution -> Pbrt.Encoder.int_as_varint 572 encoder + | Atom_unsafe_intent_event_reported -> Pbrt.Encoder.int_as_varint 573 encoder + | Atom_performance_hint_session_reported -> Pbrt.Encoder.int_as_varint 574 encoder + | Atom_mediametrics_midi_device_close_reported -> Pbrt.Encoder.int_as_varint 576 encoder + | Atom_biometric_touch_reported -> Pbrt.Encoder.int_as_varint 577 encoder + | Atom_hotword_audio_egress_event_reported -> Pbrt.Encoder.int_as_varint 578 encoder + | Atom_location_enabled_state_changed -> Pbrt.Encoder.int_as_varint 580 encoder + | Atom_ime_request_finished -> Pbrt.Encoder.int_as_varint 581 encoder + | Atom_usb_compliance_warnings_reported -> Pbrt.Encoder.int_as_varint 582 encoder + | Atom_app_supported_locales_changed -> Pbrt.Encoder.int_as_varint 583 encoder + | Atom_media_provider_volume_recovery_reported -> Pbrt.Encoder.int_as_varint 586 encoder + | Atom_biometric_properties_collected -> Pbrt.Encoder.int_as_varint 587 encoder + | Atom_kernel_wakeup_attributed -> Pbrt.Encoder.int_as_varint 588 encoder + | Atom_screen_state_changed_v2 -> Pbrt.Encoder.int_as_varint 589 encoder + | Atom_ws_backup_action_reported -> Pbrt.Encoder.int_as_varint 590 encoder + | Atom_ws_restore_action_reported -> Pbrt.Encoder.int_as_varint 591 encoder + | Atom_device_log_access_event_reported -> Pbrt.Encoder.int_as_varint 592 encoder + | Atom_media_session_updated -> Pbrt.Encoder.int_as_varint 594 encoder + | Atom_wear_oobe_state_changed -> Pbrt.Encoder.int_as_varint 595 encoder + | Atom_ws_notification_updated -> Pbrt.Encoder.int_as_varint 596 encoder + | Atom_network_validation_failure_stats_daily_reported -> Pbrt.Encoder.int_as_varint 601 encoder + | Atom_ws_complication_tapped -> Pbrt.Encoder.int_as_varint 602 encoder + | Atom_ws_notification_blocking -> Pbrt.Encoder.int_as_varint 780 encoder + | Atom_ws_notification_bridgemode_updated -> Pbrt.Encoder.int_as_varint 822 encoder + | Atom_ws_notification_dismissal_actioned -> Pbrt.Encoder.int_as_varint 823 encoder + | Atom_ws_notification_actioned -> Pbrt.Encoder.int_as_varint 824 encoder + | Atom_ws_notification_latency -> Pbrt.Encoder.int_as_varint 880 encoder + | Atom_wifi_bytes_transfer -> Pbrt.Encoder.int_as_varint 10000 encoder + | Atom_wifi_bytes_transfer_by_fg_bg -> Pbrt.Encoder.int_as_varint 10001 encoder + | Atom_mobile_bytes_transfer -> Pbrt.Encoder.int_as_varint 10002 encoder + | Atom_mobile_bytes_transfer_by_fg_bg -> Pbrt.Encoder.int_as_varint 10003 encoder + | Atom_bluetooth_bytes_transfer -> Pbrt.Encoder.int_as_varint 10006 encoder + | Atom_kernel_wakelock -> Pbrt.Encoder.int_as_varint 10004 encoder + | Atom_subsystem_sleep_state -> Pbrt.Encoder.int_as_varint 10005 encoder + | Atom_cpu_time_per_uid -> Pbrt.Encoder.int_as_varint 10009 encoder + | Atom_cpu_time_per_uid_freq -> Pbrt.Encoder.int_as_varint 10010 encoder + | Atom_wifi_activity_info -> Pbrt.Encoder.int_as_varint 10011 encoder + | Atom_modem_activity_info -> Pbrt.Encoder.int_as_varint 10012 encoder + | Atom_bluetooth_activity_info -> Pbrt.Encoder.int_as_varint 10007 encoder + | Atom_process_memory_state -> Pbrt.Encoder.int_as_varint 10013 encoder + | Atom_system_elapsed_realtime -> Pbrt.Encoder.int_as_varint 10014 encoder + | Atom_system_uptime -> Pbrt.Encoder.int_as_varint 10015 encoder + | Atom_cpu_active_time -> Pbrt.Encoder.int_as_varint 10016 encoder + | Atom_cpu_cluster_time -> Pbrt.Encoder.int_as_varint 10017 encoder + | Atom_disk_space -> Pbrt.Encoder.int_as_varint 10018 encoder + | Atom_remaining_battery_capacity -> Pbrt.Encoder.int_as_varint 10019 encoder + | Atom_full_battery_capacity -> Pbrt.Encoder.int_as_varint 10020 encoder + | Atom_temperature -> Pbrt.Encoder.int_as_varint 10021 encoder + | Atom_binder_calls -> Pbrt.Encoder.int_as_varint 10022 encoder + | Atom_binder_calls_exceptions -> Pbrt.Encoder.int_as_varint 10023 encoder + | Atom_looper_stats -> Pbrt.Encoder.int_as_varint 10024 encoder + | Atom_disk_stats -> Pbrt.Encoder.int_as_varint 10025 encoder + | Atom_directory_usage -> Pbrt.Encoder.int_as_varint 10026 encoder + | Atom_app_size -> Pbrt.Encoder.int_as_varint 10027 encoder + | Atom_category_size -> Pbrt.Encoder.int_as_varint 10028 encoder + | Atom_proc_stats -> Pbrt.Encoder.int_as_varint 10029 encoder + | Atom_battery_voltage -> Pbrt.Encoder.int_as_varint 10030 encoder + | Atom_num_fingerprints_enrolled -> Pbrt.Encoder.int_as_varint 10031 encoder + | Atom_disk_io -> Pbrt.Encoder.int_as_varint 10032 encoder + | Atom_power_profile -> Pbrt.Encoder.int_as_varint 10033 encoder + | Atom_proc_stats_pkg_proc -> Pbrt.Encoder.int_as_varint 10034 encoder + | Atom_process_cpu_time -> Pbrt.Encoder.int_as_varint 10035 encoder + | Atom_cpu_time_per_thread_freq -> Pbrt.Encoder.int_as_varint 10037 encoder + | Atom_on_device_power_measurement -> Pbrt.Encoder.int_as_varint 10038 encoder + | Atom_device_calculated_power_use -> Pbrt.Encoder.int_as_varint 10039 encoder + | Atom_process_memory_high_water_mark -> Pbrt.Encoder.int_as_varint 10042 encoder + | Atom_battery_level -> Pbrt.Encoder.int_as_varint 10043 encoder + | Atom_build_information -> Pbrt.Encoder.int_as_varint 10044 encoder + | Atom_battery_cycle_count -> Pbrt.Encoder.int_as_varint 10045 encoder + | Atom_debug_elapsed_clock -> Pbrt.Encoder.int_as_varint 10046 encoder + | Atom_debug_failing_elapsed_clock -> Pbrt.Encoder.int_as_varint 10047 encoder + | Atom_num_faces_enrolled -> Pbrt.Encoder.int_as_varint 10048 encoder + | Atom_role_holder -> Pbrt.Encoder.int_as_varint 10049 encoder + | Atom_dangerous_permission_state -> Pbrt.Encoder.int_as_varint 10050 encoder + | Atom_train_info -> Pbrt.Encoder.int_as_varint 10051 encoder + | Atom_time_zone_data_info -> Pbrt.Encoder.int_as_varint 10052 encoder + | Atom_external_storage_info -> Pbrt.Encoder.int_as_varint 10053 encoder + | Atom_gpu_stats_global_info -> Pbrt.Encoder.int_as_varint 10054 encoder + | Atom_gpu_stats_app_info -> Pbrt.Encoder.int_as_varint 10055 encoder + | Atom_system_ion_heap_size -> Pbrt.Encoder.int_as_varint 10056 encoder + | Atom_apps_on_external_storage_info -> Pbrt.Encoder.int_as_varint 10057 encoder + | Atom_face_settings -> Pbrt.Encoder.int_as_varint 10058 encoder + | Atom_cooling_device -> Pbrt.Encoder.int_as_varint 10059 encoder + | Atom_app_ops -> Pbrt.Encoder.int_as_varint 10060 encoder + | Atom_process_system_ion_heap_size -> Pbrt.Encoder.int_as_varint 10061 encoder + | Atom_surfaceflinger_stats_global_info -> Pbrt.Encoder.int_as_varint 10062 encoder + | Atom_surfaceflinger_stats_layer_info -> Pbrt.Encoder.int_as_varint 10063 encoder + | Atom_process_memory_snapshot -> Pbrt.Encoder.int_as_varint 10064 encoder + | Atom_vms_client_stats -> Pbrt.Encoder.int_as_varint 10065 encoder + | Atom_notification_remote_views -> Pbrt.Encoder.int_as_varint 10066 encoder + | Atom_dangerous_permission_state_sampled -> Pbrt.Encoder.int_as_varint 10067 encoder + | Atom_graphics_stats -> Pbrt.Encoder.int_as_varint 10068 encoder + | Atom_runtime_app_op_access -> Pbrt.Encoder.int_as_varint 10069 encoder + | Atom_ion_heap_size -> Pbrt.Encoder.int_as_varint 10070 encoder + | Atom_package_notification_preferences -> Pbrt.Encoder.int_as_varint 10071 encoder + | Atom_package_notification_channel_preferences -> Pbrt.Encoder.int_as_varint 10072 encoder + | Atom_package_notification_channel_group_preferences -> Pbrt.Encoder.int_as_varint 10073 encoder + | Atom_gnss_stats -> Pbrt.Encoder.int_as_varint 10074 encoder + | Atom_attributed_app_ops -> Pbrt.Encoder.int_as_varint 10075 encoder + | Atom_voice_call_session -> Pbrt.Encoder.int_as_varint 10076 encoder + | Atom_voice_call_rat_usage -> Pbrt.Encoder.int_as_varint 10077 encoder + | Atom_sim_slot_state -> Pbrt.Encoder.int_as_varint 10078 encoder + | Atom_supported_radio_access_family -> Pbrt.Encoder.int_as_varint 10079 encoder + | Atom_setting_snapshot -> Pbrt.Encoder.int_as_varint 10080 encoder + | Atom_blob_info -> Pbrt.Encoder.int_as_varint 10081 encoder + | Atom_data_usage_bytes_transfer -> Pbrt.Encoder.int_as_varint 10082 encoder + | Atom_bytes_transfer_by_tag_and_metered -> Pbrt.Encoder.int_as_varint 10083 encoder + | Atom_dnd_mode_rule -> Pbrt.Encoder.int_as_varint 10084 encoder + | Atom_general_external_storage_access_stats -> Pbrt.Encoder.int_as_varint 10085 encoder + | Atom_incoming_sms -> Pbrt.Encoder.int_as_varint 10086 encoder + | Atom_outgoing_sms -> Pbrt.Encoder.int_as_varint 10087 encoder + | Atom_carrier_id_table_version -> Pbrt.Encoder.int_as_varint 10088 encoder + | Atom_data_call_session -> Pbrt.Encoder.int_as_varint 10089 encoder + | Atom_cellular_service_state -> Pbrt.Encoder.int_as_varint 10090 encoder + | Atom_cellular_data_service_switch -> Pbrt.Encoder.int_as_varint 10091 encoder + | Atom_system_memory -> Pbrt.Encoder.int_as_varint 10092 encoder + | Atom_ims_registration_termination -> Pbrt.Encoder.int_as_varint 10093 encoder + | Atom_ims_registration_stats -> Pbrt.Encoder.int_as_varint 10094 encoder + | Atom_cpu_time_per_cluster_freq -> Pbrt.Encoder.int_as_varint 10095 encoder + | Atom_cpu_cycles_per_uid_cluster -> Pbrt.Encoder.int_as_varint 10096 encoder + | Atom_device_rotated_data -> Pbrt.Encoder.int_as_varint 10097 encoder + | Atom_cpu_cycles_per_thread_group_cluster -> Pbrt.Encoder.int_as_varint 10098 encoder + | Atom_media_drm_activity_info -> Pbrt.Encoder.int_as_varint 10099 encoder + | Atom_oem_managed_bytes_transfer -> Pbrt.Encoder.int_as_varint 10100 encoder + | Atom_gnss_power_stats -> Pbrt.Encoder.int_as_varint 10101 encoder + | Atom_time_zone_detector_state -> Pbrt.Encoder.int_as_varint 10102 encoder + | Atom_keystore2_storage_stats -> Pbrt.Encoder.int_as_varint 10103 encoder + | Atom_rkp_pool_stats -> Pbrt.Encoder.int_as_varint 10104 encoder + | Atom_process_dmabuf_memory -> Pbrt.Encoder.int_as_varint 10105 encoder + | Atom_pending_alarm_info -> Pbrt.Encoder.int_as_varint 10106 encoder + | Atom_user_level_hibernated_apps -> Pbrt.Encoder.int_as_varint 10107 encoder + | Atom_launcher_layout_snapshot -> Pbrt.Encoder.int_as_varint 10108 encoder + | Atom_global_hibernated_apps -> Pbrt.Encoder.int_as_varint 10109 encoder + | Atom_input_event_latency_sketch -> Pbrt.Encoder.int_as_varint 10110 encoder + | Atom_battery_usage_stats_before_reset -> Pbrt.Encoder.int_as_varint 10111 encoder + | Atom_battery_usage_stats_since_reset -> Pbrt.Encoder.int_as_varint 10112 encoder + | Atom_battery_usage_stats_since_reset_using_power_profile_model -> Pbrt.Encoder.int_as_varint 10113 encoder + | Atom_installed_incremental_package -> Pbrt.Encoder.int_as_varint 10114 encoder + | Atom_telephony_network_requests -> Pbrt.Encoder.int_as_varint 10115 encoder + | Atom_app_search_storage_info -> Pbrt.Encoder.int_as_varint 10116 encoder + | Atom_vmstat -> Pbrt.Encoder.int_as_varint 10117 encoder + | Atom_keystore2_key_creation_with_general_info -> Pbrt.Encoder.int_as_varint 10118 encoder + | Atom_keystore2_key_creation_with_auth_info -> Pbrt.Encoder.int_as_varint 10119 encoder + | Atom_keystore2_key_creation_with_purpose_and_modes_info -> Pbrt.Encoder.int_as_varint 10120 encoder + | Atom_keystore2_atom_with_overflow -> Pbrt.Encoder.int_as_varint 10121 encoder + | Atom_keystore2_key_operation_with_purpose_and_modes_info -> Pbrt.Encoder.int_as_varint 10122 encoder + | Atom_keystore2_key_operation_with_general_info -> Pbrt.Encoder.int_as_varint 10123 encoder + | Atom_rkp_error_stats -> Pbrt.Encoder.int_as_varint 10124 encoder + | Atom_keystore2_crash_stats -> Pbrt.Encoder.int_as_varint 10125 encoder + | Atom_vendor_apex_info -> Pbrt.Encoder.int_as_varint 10126 encoder + | Atom_accessibility_shortcut_stats -> Pbrt.Encoder.int_as_varint 10127 encoder + | Atom_accessibility_floating_menu_stats -> Pbrt.Encoder.int_as_varint 10128 encoder + | Atom_data_usage_bytes_transfer_v2 -> Pbrt.Encoder.int_as_varint 10129 encoder + | Atom_media_capabilities -> Pbrt.Encoder.int_as_varint 10130 encoder + | Atom_car_watchdog_system_io_usage_summary -> Pbrt.Encoder.int_as_varint 10131 encoder + | Atom_car_watchdog_uid_io_usage_summary -> Pbrt.Encoder.int_as_varint 10132 encoder + | Atom_ims_registration_feature_tag_stats -> Pbrt.Encoder.int_as_varint 10133 encoder + | Atom_rcs_client_provisioning_stats -> Pbrt.Encoder.int_as_varint 10134 encoder + | Atom_rcs_acs_provisioning_stats -> Pbrt.Encoder.int_as_varint 10135 encoder + | Atom_sip_delegate_stats -> Pbrt.Encoder.int_as_varint 10136 encoder + | Atom_sip_transport_feature_tag_stats -> Pbrt.Encoder.int_as_varint 10137 encoder + | Atom_sip_message_response -> Pbrt.Encoder.int_as_varint 10138 encoder + | Atom_sip_transport_session -> Pbrt.Encoder.int_as_varint 10139 encoder + | Atom_ims_dedicated_bearer_listener_event -> Pbrt.Encoder.int_as_varint 10140 encoder + | Atom_ims_dedicated_bearer_event -> Pbrt.Encoder.int_as_varint 10141 encoder + | Atom_ims_registration_service_desc_stats -> Pbrt.Encoder.int_as_varint 10142 encoder + | Atom_uce_event_stats -> Pbrt.Encoder.int_as_varint 10143 encoder + | Atom_presence_notify_event -> Pbrt.Encoder.int_as_varint 10144 encoder + | Atom_gba_event -> Pbrt.Encoder.int_as_varint 10145 encoder + | Atom_per_sim_status -> Pbrt.Encoder.int_as_varint 10146 encoder + | Atom_gpu_work_per_uid -> Pbrt.Encoder.int_as_varint 10147 encoder + | Atom_persistent_uri_permissions_amount_per_package -> Pbrt.Encoder.int_as_varint 10148 encoder + | Atom_signed_partition_info -> Pbrt.Encoder.int_as_varint 10149 encoder + | Atom_pinned_file_sizes_per_package -> Pbrt.Encoder.int_as_varint 10150 encoder + | Atom_pending_intents_per_package -> Pbrt.Encoder.int_as_varint 10151 encoder + | Atom_user_info -> Pbrt.Encoder.int_as_varint 10152 encoder + | Atom_telephony_network_requests_v2 -> Pbrt.Encoder.int_as_varint 10153 encoder + | Atom_device_telephony_properties -> Pbrt.Encoder.int_as_varint 10154 encoder + | Atom_remote_key_provisioning_error_counts -> Pbrt.Encoder.int_as_varint 10155 encoder + | Atom_safety_state -> Pbrt.Encoder.int_as_varint 10156 encoder + | Atom_incoming_mms -> Pbrt.Encoder.int_as_varint 10157 encoder + | Atom_outgoing_mms -> Pbrt.Encoder.int_as_varint 10158 encoder + | Atom_multi_user_info -> Pbrt.Encoder.int_as_varint 10160 encoder + | Atom_network_bpf_map_info -> Pbrt.Encoder.int_as_varint 10161 encoder + | Atom_outgoing_short_code_sms -> Pbrt.Encoder.int_as_varint 10162 encoder + | Atom_connectivity_state_sample -> Pbrt.Encoder.int_as_varint 10163 encoder + | Atom_network_selection_rematch_reasons_info -> Pbrt.Encoder.int_as_varint 10164 encoder + | Atom_game_mode_info -> Pbrt.Encoder.int_as_varint 10165 encoder + | Atom_game_mode_configuration -> Pbrt.Encoder.int_as_varint 10166 encoder + | Atom_game_mode_listener -> Pbrt.Encoder.int_as_varint 10167 encoder + | Atom_network_slice_request_count -> Pbrt.Encoder.int_as_varint 10168 encoder + | Atom_ws_tile_snapshot -> Pbrt.Encoder.int_as_varint 10169 encoder + | Atom_ws_active_watch_face_complication_set_snapshot -> Pbrt.Encoder.int_as_varint 10170 encoder + | Atom_process_state -> Pbrt.Encoder.int_as_varint 10171 encoder + | Atom_process_association -> Pbrt.Encoder.int_as_varint 10172 encoder + | Atom_adpf_system_component_info -> Pbrt.Encoder.int_as_varint 10173 encoder + | Atom_notification_memory_use -> Pbrt.Encoder.int_as_varint 10174 encoder + | Atom_hdr_capabilities -> Pbrt.Encoder.int_as_varint 10175 encoder + | Atom_ws_favourite_watch_face_list_snapshot -> Pbrt.Encoder.int_as_varint 10176 encoder + | Atom_accessibility_check_result_reported -> Pbrt.Encoder.int_as_varint 910 encoder + | Atom_adaptive_auth_unlock_after_lock_reported -> Pbrt.Encoder.int_as_varint 820 encoder + | Atom_thermal_status_called -> Pbrt.Encoder.int_as_varint 772 encoder + | Atom_thermal_headroom_called -> Pbrt.Encoder.int_as_varint 773 encoder + | Atom_thermal_headroom_thresholds_called -> Pbrt.Encoder.int_as_varint 774 encoder + | Atom_adpf_hint_session_tid_cleanup -> Pbrt.Encoder.int_as_varint 839 encoder + | Atom_thermal_headroom_thresholds -> Pbrt.Encoder.int_as_varint 10201 encoder + | Atom_adpf_session_snapshot -> Pbrt.Encoder.int_as_varint 10218 encoder + | Atom_jsscriptengine_latency_reported -> Pbrt.Encoder.int_as_varint 483 encoder + | Atom_ad_services_api_called -> Pbrt.Encoder.int_as_varint 435 encoder + | Atom_ad_services_mesurement_reports_uploaded -> Pbrt.Encoder.int_as_varint 436 encoder + | Atom_mobile_data_download_file_group_status_reported -> Pbrt.Encoder.int_as_varint 490 encoder + | Atom_mobile_data_download_download_result_reported -> Pbrt.Encoder.int_as_varint 502 encoder + | Atom_ad_services_settings_usage_reported -> Pbrt.Encoder.int_as_varint 493 encoder + | Atom_background_fetch_process_reported -> Pbrt.Encoder.int_as_varint 496 encoder + | Atom_update_custom_audience_process_reported -> Pbrt.Encoder.int_as_varint 497 encoder + | Atom_run_ad_bidding_process_reported -> Pbrt.Encoder.int_as_varint 498 encoder + | Atom_run_ad_scoring_process_reported -> Pbrt.Encoder.int_as_varint 499 encoder + | Atom_run_ad_selection_process_reported -> Pbrt.Encoder.int_as_varint 500 encoder + | Atom_run_ad_bidding_per_ca_process_reported -> Pbrt.Encoder.int_as_varint 501 encoder + | Atom_mobile_data_download_file_group_storage_stats_reported -> Pbrt.Encoder.int_as_varint 503 encoder + | Atom_ad_services_measurement_registrations -> Pbrt.Encoder.int_as_varint 512 encoder + | Atom_ad_services_get_topics_reported -> Pbrt.Encoder.int_as_varint 535 encoder + | Atom_ad_services_epoch_computation_get_top_topics_reported -> Pbrt.Encoder.int_as_varint 536 encoder + | Atom_ad_services_epoch_computation_classifier_reported -> Pbrt.Encoder.int_as_varint 537 encoder + | Atom_ad_services_back_compat_get_topics_reported -> Pbrt.Encoder.int_as_varint 598 encoder + | Atom_ad_services_back_compat_epoch_computation_classifier_reported -> Pbrt.Encoder.int_as_varint 599 encoder + | Atom_ad_services_measurement_debug_keys -> Pbrt.Encoder.int_as_varint 640 encoder + | Atom_ad_services_error_reported -> Pbrt.Encoder.int_as_varint 662 encoder + | Atom_ad_services_background_jobs_execution_reported -> Pbrt.Encoder.int_as_varint 663 encoder + | Atom_ad_services_measurement_delayed_source_registration -> Pbrt.Encoder.int_as_varint 673 encoder + | Atom_ad_services_measurement_attribution -> Pbrt.Encoder.int_as_varint 674 encoder + | Atom_ad_services_measurement_jobs -> Pbrt.Encoder.int_as_varint 675 encoder + | Atom_ad_services_measurement_wipeout -> Pbrt.Encoder.int_as_varint 676 encoder + | Atom_ad_services_measurement_ad_id_match_for_debug_keys -> Pbrt.Encoder.int_as_varint 695 encoder + | Atom_ad_services_enrollment_data_stored -> Pbrt.Encoder.int_as_varint 697 encoder + | Atom_ad_services_enrollment_file_downloaded -> Pbrt.Encoder.int_as_varint 698 encoder + | Atom_ad_services_enrollment_matched -> Pbrt.Encoder.int_as_varint 699 encoder + | Atom_ad_services_consent_migrated -> Pbrt.Encoder.int_as_varint 702 encoder + | Atom_ad_services_enrollment_failed -> Pbrt.Encoder.int_as_varint 714 encoder + | Atom_ad_services_measurement_click_verification -> Pbrt.Encoder.int_as_varint 756 encoder + | Atom_ad_services_encryption_key_fetched -> Pbrt.Encoder.int_as_varint 765 encoder + | Atom_ad_services_encryption_key_db_transaction_ended -> Pbrt.Encoder.int_as_varint 766 encoder + | Atom_destination_registered_beacons -> Pbrt.Encoder.int_as_varint 767 encoder + | Atom_report_interaction_api_called -> Pbrt.Encoder.int_as_varint 768 encoder + | Atom_interaction_reporting_table_cleared -> Pbrt.Encoder.int_as_varint 769 encoder + | Atom_app_manifest_config_helper_called -> Pbrt.Encoder.int_as_varint 788 encoder + | Atom_ad_filtering_process_join_ca_reported -> Pbrt.Encoder.int_as_varint 793 encoder + | Atom_ad_filtering_process_ad_selection_reported -> Pbrt.Encoder.int_as_varint 794 encoder + | Atom_ad_counter_histogram_updater_reported -> Pbrt.Encoder.int_as_varint 795 encoder + | Atom_signature_verification -> Pbrt.Encoder.int_as_varint 807 encoder + | Atom_k_anon_immediate_sign_join_status_reported -> Pbrt.Encoder.int_as_varint 808 encoder + | Atom_k_anon_background_job_status_reported -> Pbrt.Encoder.int_as_varint 809 encoder + | Atom_k_anon_initialize_status_reported -> Pbrt.Encoder.int_as_varint 810 encoder + | Atom_k_anon_sign_status_reported -> Pbrt.Encoder.int_as_varint 811 encoder + | Atom_k_anon_join_status_reported -> Pbrt.Encoder.int_as_varint 812 encoder + | Atom_k_anon_key_attestation_status_reported -> Pbrt.Encoder.int_as_varint 813 encoder + | Atom_get_ad_selection_data_api_called -> Pbrt.Encoder.int_as_varint 814 encoder + | Atom_get_ad_selection_data_buyer_input_generated -> Pbrt.Encoder.int_as_varint 815 encoder + | Atom_background_job_scheduling_reported -> Pbrt.Encoder.int_as_varint 834 encoder + | Atom_topics_encryption_epoch_computation_reported -> Pbrt.Encoder.int_as_varint 840 encoder + | Atom_topics_encryption_get_topics_reported -> Pbrt.Encoder.int_as_varint 841 encoder + | Atom_adservices_shell_command_called -> Pbrt.Encoder.int_as_varint 842 encoder + | Atom_update_signals_api_called -> Pbrt.Encoder.int_as_varint 843 encoder + | Atom_encoding_job_run -> Pbrt.Encoder.int_as_varint 844 encoder + | Atom_encoding_js_fetch -> Pbrt.Encoder.int_as_varint 845 encoder + | Atom_encoding_js_execution -> Pbrt.Encoder.int_as_varint 846 encoder + | Atom_persist_ad_selection_result_called -> Pbrt.Encoder.int_as_varint 847 encoder + | Atom_server_auction_key_fetch_called -> Pbrt.Encoder.int_as_varint 848 encoder + | Atom_server_auction_background_key_fetch_enabled -> Pbrt.Encoder.int_as_varint 849 encoder + | Atom_ad_services_measurement_process_odp_registration -> Pbrt.Encoder.int_as_varint 864 encoder + | Atom_ad_services_measurement_notify_registration_to_odp -> Pbrt.Encoder.int_as_varint 865 encoder + | Atom_select_ads_from_outcomes_api_called -> Pbrt.Encoder.int_as_varint 876 encoder + | Atom_report_impression_api_called -> Pbrt.Encoder.int_as_varint 877 encoder + | Atom_ad_services_enrollment_transaction_stats -> Pbrt.Encoder.int_as_varint 885 encoder + | Atom_ad_services_cobalt_logger_event_reported -> Pbrt.Encoder.int_as_varint 902 encoder + | Atom_ad_services_cobalt_periodic_job_event_reported -> Pbrt.Encoder.int_as_varint 903 encoder + | Atom_update_signals_process_reported -> Pbrt.Encoder.int_as_varint 905 encoder + | Atom_topics_schedule_epoch_job_setting_reported -> Pbrt.Encoder.int_as_varint 930 encoder + | Atom_ai_wallpapers_button_pressed -> Pbrt.Encoder.int_as_varint 706 encoder + | Atom_ai_wallpapers_template_selected -> Pbrt.Encoder.int_as_varint 707 encoder + | Atom_ai_wallpapers_term_selected -> Pbrt.Encoder.int_as_varint 708 encoder + | Atom_ai_wallpapers_wallpaper_set -> Pbrt.Encoder.int_as_varint 709 encoder + | Atom_ai_wallpapers_session_summary -> Pbrt.Encoder.int_as_varint 710 encoder + | Atom_apex_installation_requested -> Pbrt.Encoder.int_as_varint 732 encoder + | Atom_apex_installation_staged -> Pbrt.Encoder.int_as_varint 733 encoder + | Atom_apex_installation_ended -> Pbrt.Encoder.int_as_varint 734 encoder + | Atom_app_search_set_schema_stats_reported -> Pbrt.Encoder.int_as_varint 385 encoder + | Atom_app_search_schema_migration_stats_reported -> Pbrt.Encoder.int_as_varint 579 encoder + | Atom_app_search_usage_search_intent_stats_reported -> Pbrt.Encoder.int_as_varint 825 encoder + | Atom_app_search_usage_search_intent_raw_query_stats_reported -> Pbrt.Encoder.int_as_varint 826 encoder + | Atom_app_search_apps_indexer_stats_reported -> Pbrt.Encoder.int_as_varint 909 encoder + | Atom_art_datum_reported -> Pbrt.Encoder.int_as_varint 332 encoder + | Atom_art_device_datum_reported -> Pbrt.Encoder.int_as_varint 550 encoder + | Atom_art_datum_delta_reported -> Pbrt.Encoder.int_as_varint 565 encoder + | Atom_art_dex2_oat_reported -> Pbrt.Encoder.int_as_varint 929 encoder + | Atom_art_device_status -> Pbrt.Encoder.int_as_varint 10205 encoder + | Atom_background_dexopt_job_ended -> Pbrt.Encoder.int_as_varint 467 encoder + | Atom_prereboot_dexopt_job_ended -> Pbrt.Encoder.int_as_varint 883 encoder + | Atom_odrefresh_reported -> Pbrt.Encoder.int_as_varint 366 encoder + | Atom_odsign_reported -> Pbrt.Encoder.int_as_varint 548 encoder + | Atom_autofill_ui_event_reported -> Pbrt.Encoder.int_as_varint 603 encoder + | Atom_autofill_fill_request_reported -> Pbrt.Encoder.int_as_varint 604 encoder + | Atom_autofill_fill_response_reported -> Pbrt.Encoder.int_as_varint 605 encoder + | Atom_autofill_save_event_reported -> Pbrt.Encoder.int_as_varint 606 encoder + | Atom_autofill_session_committed -> Pbrt.Encoder.int_as_varint 607 encoder + | Atom_autofill_field_classification_event_reported -> Pbrt.Encoder.int_as_varint 659 encoder + | Atom_car_recents_event_reported -> Pbrt.Encoder.int_as_varint 770 encoder + | Atom_car_calm_mode_event_reported -> Pbrt.Encoder.int_as_varint 797 encoder + | Atom_car_wakeup_from_suspend_reported -> Pbrt.Encoder.int_as_varint 852 encoder + | Atom_plugin_initialized -> Pbrt.Encoder.int_as_varint 655 encoder + | Atom_bluetooth_hashed_device_name_reported -> Pbrt.Encoder.int_as_varint 613 encoder + | Atom_bluetooth_l2_cap_coc_client_connection -> Pbrt.Encoder.int_as_varint 614 encoder + | Atom_bluetooth_l2_cap_coc_server_connection -> Pbrt.Encoder.int_as_varint 615 encoder + | Atom_bluetooth_le_session_connected -> Pbrt.Encoder.int_as_varint 656 encoder + | Atom_restricted_bluetooth_device_name_reported -> Pbrt.Encoder.int_as_varint 666 encoder + | Atom_bluetooth_profile_connection_attempted -> Pbrt.Encoder.int_as_varint 696 encoder + | Atom_bluetooth_content_profile_error_reported -> Pbrt.Encoder.int_as_varint 781 encoder + | Atom_bluetooth_rfcomm_connection_attempted -> Pbrt.Encoder.int_as_varint 782 encoder + | Atom_remote_device_information_with_metric_id -> Pbrt.Encoder.int_as_varint 862 encoder + | Atom_le_app_scan_state_changed -> Pbrt.Encoder.int_as_varint 870 encoder + | Atom_le_radio_scan_stopped -> Pbrt.Encoder.int_as_varint 871 encoder + | Atom_le_scan_result_received -> Pbrt.Encoder.int_as_varint 872 encoder + | Atom_le_scan_abused -> Pbrt.Encoder.int_as_varint 873 encoder + | Atom_le_adv_state_changed -> Pbrt.Encoder.int_as_varint 874 encoder + | Atom_le_adv_error_reported -> Pbrt.Encoder.int_as_varint 875 encoder + | Atom_a2_dp_session_reported -> Pbrt.Encoder.int_as_varint 904 encoder + | Atom_bluetooth_cross_layer_event_reported -> Pbrt.Encoder.int_as_varint 916 encoder + | Atom_broadcast_audio_session_reported -> Pbrt.Encoder.int_as_varint 927 encoder + | Atom_broadcast_audio_sync_reported -> Pbrt.Encoder.int_as_varint 928 encoder + | Atom_bluetooth_rfcomm_connection_reported_at_close -> Pbrt.Encoder.int_as_varint 982 encoder + | Atom_bluetooth_le_connection -> Pbrt.Encoder.int_as_varint 988 encoder + | Atom_broadcast_sent -> Pbrt.Encoder.int_as_varint 922 encoder + | Atom_camera_feature_combination_query_event -> Pbrt.Encoder.int_as_varint 900 encoder + | Atom_certificate_transparency_log_list_state_changed -> Pbrt.Encoder.int_as_varint 934 encoder + | Atom_certificate_transparency_log_list_update_failed -> Pbrt.Encoder.int_as_varint 972 encoder + | Atom_daily_keepalive_info_reported -> Pbrt.Encoder.int_as_varint 650 encoder + | Atom_network_request_state_changed -> Pbrt.Encoder.int_as_varint 779 encoder + | Atom_tethering_active_sessions_reported -> Pbrt.Encoder.int_as_varint 925 encoder + | Atom_network_stats_recorder_file_operated -> Pbrt.Encoder.int_as_varint 783 encoder + | Atom_core_networking_terrible_error_occurred -> Pbrt.Encoder.int_as_varint 979 encoder + | Atom_apf_session_info_reported -> Pbrt.Encoder.int_as_varint 777 encoder + | Atom_ip_client_ra_info_reported -> Pbrt.Encoder.int_as_varint 778 encoder + | Atom_vpn_connection_state_changed -> Pbrt.Encoder.int_as_varint 850 encoder + | Atom_vpn_connection_reported -> Pbrt.Encoder.int_as_varint 851 encoder + | Atom_cpu_policy -> Pbrt.Encoder.int_as_varint 10199 encoder + | Atom_credential_manager_api_called -> Pbrt.Encoder.int_as_varint 585 encoder + | Atom_credential_manager_init_phase_reported -> Pbrt.Encoder.int_as_varint 651 encoder + | Atom_credential_manager_candidate_phase_reported -> Pbrt.Encoder.int_as_varint 652 encoder + | Atom_credential_manager_final_phase_reported -> Pbrt.Encoder.int_as_varint 653 encoder + | Atom_credential_manager_total_reported -> Pbrt.Encoder.int_as_varint 667 encoder + | Atom_credential_manager_finalnouid_reported -> Pbrt.Encoder.int_as_varint 668 encoder + | Atom_credential_manager_get_reported -> Pbrt.Encoder.int_as_varint 669 encoder + | Atom_credential_manager_auth_click_reported -> Pbrt.Encoder.int_as_varint 670 encoder + | Atom_credential_manager_apiv2_called -> Pbrt.Encoder.int_as_varint 671 encoder + | Atom_cronet_engine_created -> Pbrt.Encoder.int_as_varint 703 encoder + | Atom_cronet_traffic_reported -> Pbrt.Encoder.int_as_varint 704 encoder + | Atom_cronet_engine_builder_initialized -> Pbrt.Encoder.int_as_varint 762 encoder + | Atom_cronet_http_flags_initialized -> Pbrt.Encoder.int_as_varint 763 encoder + | Atom_cronet_initialized -> Pbrt.Encoder.int_as_varint 764 encoder + | Atom_desktop_mode_ui_changed -> Pbrt.Encoder.int_as_varint 818 encoder + | Atom_desktop_mode_session_task_update -> Pbrt.Encoder.int_as_varint 819 encoder + | Atom_desktop_mode_task_size_updated -> Pbrt.Encoder.int_as_varint 935 encoder + | Atom_device_lock_check_in_request_reported -> Pbrt.Encoder.int_as_varint 726 encoder + | Atom_device_lock_provisioning_complete_reported -> Pbrt.Encoder.int_as_varint 727 encoder + | Atom_device_lock_kiosk_app_request_reported -> Pbrt.Encoder.int_as_varint 728 encoder + | Atom_device_lock_check_in_retry_reported -> Pbrt.Encoder.int_as_varint 789 encoder + | Atom_device_lock_provision_failure_reported -> Pbrt.Encoder.int_as_varint 790 encoder + | Atom_device_lock_lock_unlock_device_failure_reported -> Pbrt.Encoder.int_as_varint 791 encoder + | Atom_device_policy_management_mode -> Pbrt.Encoder.int_as_varint 10216 encoder + | Atom_device_policy_state -> Pbrt.Encoder.int_as_varint 10217 encoder + | Atom_display_mode_director_vote_changed -> Pbrt.Encoder.int_as_varint 792 encoder + | Atom_external_display_state_changed -> Pbrt.Encoder.int_as_varint 806 encoder + | Atom_dnd_state_changed -> Pbrt.Encoder.int_as_varint 657 encoder + | Atom_dream_setting_changed -> Pbrt.Encoder.int_as_varint 705 encoder + | Atom_dream_setting_snapshot -> Pbrt.Encoder.int_as_varint 10192 encoder + | Atom_express_event_reported -> Pbrt.Encoder.int_as_varint 528 encoder + | Atom_express_histogram_sample_reported -> Pbrt.Encoder.int_as_varint 593 encoder + | Atom_express_uid_event_reported -> Pbrt.Encoder.int_as_varint 644 encoder + | Atom_express_uid_histogram_sample_reported -> Pbrt.Encoder.int_as_varint 658 encoder + | Atom_federated_compute_api_called -> Pbrt.Encoder.int_as_varint 712 encoder + | Atom_federated_compute_training_event_reported -> Pbrt.Encoder.int_as_varint 771 encoder + | Atom_example_iterator_next_latency_reported -> Pbrt.Encoder.int_as_varint 838 encoder + | Atom_full_screen_intent_launched -> Pbrt.Encoder.int_as_varint 631 encoder + | Atom_bal_allowed -> Pbrt.Encoder.int_as_varint 632 encoder + | Atom_in_task_activity_started -> Pbrt.Encoder.int_as_varint 685 encoder + | Atom_device_orientation_changed -> Pbrt.Encoder.int_as_varint 906 encoder + | Atom_cached_apps_high_watermark -> Pbrt.Encoder.int_as_varint 10189 encoder + | Atom_stylus_prediction_metrics_reported -> Pbrt.Encoder.int_as_varint 718 encoder + | Atom_user_risk_event_reported -> Pbrt.Encoder.int_as_varint 725 encoder + | Atom_media_projection_state_changed -> Pbrt.Encoder.int_as_varint 729 encoder + | Atom_media_projection_target_changed -> Pbrt.Encoder.int_as_varint 730 encoder + | Atom_excessive_binder_proxy_count_reported -> Pbrt.Encoder.int_as_varint 853 encoder + | Atom_proxy_bytes_transfer_by_fg_bg -> Pbrt.Encoder.int_as_varint 10200 encoder + | Atom_mobile_bytes_transfer_by_proc_state -> Pbrt.Encoder.int_as_varint 10204 encoder + | Atom_biometric_frr_notification -> Pbrt.Encoder.int_as_varint 817 encoder + | Atom_sensitive_content_media_projection_session -> Pbrt.Encoder.int_as_varint 830 encoder + | Atom_sensitive_notification_app_protection_session -> Pbrt.Encoder.int_as_varint 831 encoder + | Atom_sensitive_notification_app_protection_applied -> Pbrt.Encoder.int_as_varint 832 encoder + | Atom_sensitive_notification_redaction -> Pbrt.Encoder.int_as_varint 833 encoder + | Atom_sensitive_content_app_protection -> Pbrt.Encoder.int_as_varint 835 encoder + | Atom_app_restriction_state_changed -> Pbrt.Encoder.int_as_varint 866 encoder + | Atom_battery_usage_stats_per_uid -> Pbrt.Encoder.int_as_varint 10209 encoder + | Atom_postgc_memory_snapshot -> Pbrt.Encoder.int_as_varint 924 encoder + | Atom_power_save_temp_allowlist_changed -> Pbrt.Encoder.int_as_varint 926 encoder + | Atom_app_op_access_tracked -> Pbrt.Encoder.int_as_varint 931 encoder + | Atom_content_or_file_uri_event_reported -> Pbrt.Encoder.int_as_varint 933 encoder + | Atom_application_grammatical_inflection_changed -> Pbrt.Encoder.int_as_varint 584 encoder + | Atom_system_grammatical_inflection_changed -> Pbrt.Encoder.int_as_varint 816 encoder + | Atom_battery_health -> Pbrt.Encoder.int_as_varint 10220 encoder + | Atom_hdmi_earc_status_reported -> Pbrt.Encoder.int_as_varint 701 encoder + | Atom_hdmi_soundbar_mode_status_reported -> Pbrt.Encoder.int_as_varint 724 encoder + | Atom_health_connect_api_called -> Pbrt.Encoder.int_as_varint 616 encoder + | Atom_health_connect_usage_stats -> Pbrt.Encoder.int_as_varint 617 encoder + | Atom_health_connect_storage_stats -> Pbrt.Encoder.int_as_varint 618 encoder + | Atom_health_connect_api_invoked -> Pbrt.Encoder.int_as_varint 643 encoder + | Atom_exercise_route_api_called -> Pbrt.Encoder.int_as_varint 654 encoder + | Atom_health_connect_export_invoked -> Pbrt.Encoder.int_as_varint 907 encoder + | Atom_health_connect_import_invoked -> Pbrt.Encoder.int_as_varint 918 encoder + | Atom_health_connect_export_import_stats_reported -> Pbrt.Encoder.int_as_varint 919 encoder + | Atom_health_connect_ui_impression -> Pbrt.Encoder.int_as_varint 623 encoder + | Atom_health_connect_ui_interaction -> Pbrt.Encoder.int_as_varint 624 encoder + | Atom_health_connect_app_opened_reported -> Pbrt.Encoder.int_as_varint 625 encoder + | Atom_hotword_egress_size_atom_reported -> Pbrt.Encoder.int_as_varint 761 encoder + | Atom_ike_session_terminated -> Pbrt.Encoder.int_as_varint 678 encoder + | Atom_ike_liveness_check_session_validated -> Pbrt.Encoder.int_as_varint 760 encoder + | Atom_negotiated_security_association -> Pbrt.Encoder.int_as_varint 821 encoder + | Atom_keyboard_configured -> Pbrt.Encoder.int_as_varint 682 encoder + | Atom_keyboard_systems_event_reported -> Pbrt.Encoder.int_as_varint 683 encoder + | Atom_inputdevice_usage_reported -> Pbrt.Encoder.int_as_varint 686 encoder + | Atom_input_event_latency_reported -> Pbrt.Encoder.int_as_varint 932 encoder + | Atom_touchpad_usage -> Pbrt.Encoder.int_as_varint 10191 encoder + | Atom_kernel_oom_kill_occurred -> Pbrt.Encoder.int_as_varint 754 encoder + | Atom_emergency_state_changed -> Pbrt.Encoder.int_as_varint 633 encoder + | Atom_chre_significant_motion_state_changed -> Pbrt.Encoder.int_as_varint 868 encoder + | Atom_population_density_provider_loading_reported -> Pbrt.Encoder.int_as_varint 1002 encoder + | Atom_density_based_coarse_locations_usage_reported -> Pbrt.Encoder.int_as_varint 1003 encoder + | Atom_density_based_coarse_locations_provider_query_reported -> Pbrt.Encoder.int_as_varint 1004 encoder + | Atom_media_codec_reclaim_request_completed -> Pbrt.Encoder.int_as_varint 600 encoder + | Atom_media_codec_started -> Pbrt.Encoder.int_as_varint 641 encoder + | Atom_media_codec_stopped -> Pbrt.Encoder.int_as_varint 642 encoder + | Atom_media_codec_rendered -> Pbrt.Encoder.int_as_varint 684 encoder + | Atom_media_editing_ended_reported -> Pbrt.Encoder.int_as_varint 798 encoder + | Atom_mte_state -> Pbrt.Encoder.int_as_varint 10181 encoder + | Atom_microxr_device_boot_complete_reported -> Pbrt.Encoder.int_as_varint 901 encoder + | Atom_nfc_observe_mode_state_changed -> Pbrt.Encoder.int_as_varint 855 encoder + | Atom_nfc_field_changed -> Pbrt.Encoder.int_as_varint 856 encoder + | Atom_nfc_polling_loop_notification_reported -> Pbrt.Encoder.int_as_varint 857 encoder + | Atom_nfc_proprietary_capabilities_reported -> Pbrt.Encoder.int_as_varint 858 encoder + | Atom_ondevicepersonalization_api_called -> Pbrt.Encoder.int_as_varint 711 encoder + | Atom_component_state_changed_reported -> Pbrt.Encoder.int_as_varint 863 encoder + | Atom_pdf_load_reported -> Pbrt.Encoder.int_as_varint 859 encoder + | Atom_pdf_api_usage_reported -> Pbrt.Encoder.int_as_varint 860 encoder + | Atom_pdf_search_reported -> Pbrt.Encoder.int_as_varint 861 encoder + | Atom_pressure_stall_information -> Pbrt.Encoder.int_as_varint 10229 encoder + | Atom_permission_rationale_dialog_viewed -> Pbrt.Encoder.int_as_varint 645 encoder + | Atom_permission_rationale_dialog_action_reported -> Pbrt.Encoder.int_as_varint 646 encoder + | Atom_app_data_sharing_updates_notification_interaction -> Pbrt.Encoder.int_as_varint 647 encoder + | Atom_app_data_sharing_updates_fragment_viewed -> Pbrt.Encoder.int_as_varint 648 encoder + | Atom_app_data_sharing_updates_fragment_action_reported -> Pbrt.Encoder.int_as_varint 649 encoder + | Atom_enhanced_confirmation_dialog_result_reported -> Pbrt.Encoder.int_as_varint 827 encoder + | Atom_enhanced_confirmation_restriction_cleared -> Pbrt.Encoder.int_as_varint 828 encoder + | Atom_photopicker_session_info_reported -> Pbrt.Encoder.int_as_varint 886 encoder + | Atom_photopicker_api_info_reported -> Pbrt.Encoder.int_as_varint 887 encoder + | Atom_photopicker_ui_event_logged -> Pbrt.Encoder.int_as_varint 888 encoder + | Atom_photopicker_media_item_status_reported -> Pbrt.Encoder.int_as_varint 889 encoder + | Atom_photopicker_preview_info_logged -> Pbrt.Encoder.int_as_varint 890 encoder + | Atom_photopicker_menu_interaction_logged -> Pbrt.Encoder.int_as_varint 891 encoder + | Atom_photopicker_banner_interaction_logged -> Pbrt.Encoder.int_as_varint 892 encoder + | Atom_photopicker_media_library_info_logged -> Pbrt.Encoder.int_as_varint 893 encoder + | Atom_photopicker_page_info_logged -> Pbrt.Encoder.int_as_varint 894 encoder + | Atom_photopicker_media_grid_sync_info_reported -> Pbrt.Encoder.int_as_varint 895 encoder + | Atom_photopicker_album_sync_info_reported -> Pbrt.Encoder.int_as_varint 896 encoder + | Atom_photopicker_search_info_reported -> Pbrt.Encoder.int_as_varint 897 encoder + | Atom_search_data_extraction_details_reported -> Pbrt.Encoder.int_as_varint 898 encoder + | Atom_embedded_photopicker_info_reported -> Pbrt.Encoder.int_as_varint 899 encoder + | Atom_atom_9999 -> Pbrt.Encoder.int_as_varint 9999 encoder + | Atom_atom_99999 -> Pbrt.Encoder.int_as_varint 99999 encoder + | Atom_screen_off_reported -> Pbrt.Encoder.int_as_varint 776 encoder + | Atom_screen_timeout_override_reported -> Pbrt.Encoder.int_as_varint 836 encoder + | Atom_screen_interactive_session_reported -> Pbrt.Encoder.int_as_varint 837 encoder + | Atom_screen_dim_reported -> Pbrt.Encoder.int_as_varint 867 encoder + | Atom_media_provider_database_rollback_reported -> Pbrt.Encoder.int_as_varint 784 encoder + | Atom_backup_setup_status_reported -> Pbrt.Encoder.int_as_varint 785 encoder + | Atom_ranging_session_configured -> Pbrt.Encoder.int_as_varint 993 encoder + | Atom_ranging_session_started -> Pbrt.Encoder.int_as_varint 994 encoder + | Atom_ranging_session_closed -> Pbrt.Encoder.int_as_varint 995 encoder + | Atom_ranging_technology_started -> Pbrt.Encoder.int_as_varint 996 encoder + | Atom_ranging_technology_stopped -> Pbrt.Encoder.int_as_varint 997 encoder + | Atom_rkpd_pool_stats -> Pbrt.Encoder.int_as_varint 664 encoder + | Atom_rkpd_client_operation -> Pbrt.Encoder.int_as_varint 665 encoder + | Atom_sandbox_api_called -> Pbrt.Encoder.int_as_varint 488 encoder + | Atom_sandbox_activity_event_occurred -> Pbrt.Encoder.int_as_varint 735 encoder + | Atom_sdk_sandbox_restricted_access_in_session -> Pbrt.Encoder.int_as_varint 796 encoder + | Atom_sandbox_sdk_storage -> Pbrt.Encoder.int_as_varint 10159 encoder + | Atom_selinux_audit_log -> Pbrt.Encoder.int_as_varint 799 encoder + | Atom_settings_spa_reported -> Pbrt.Encoder.int_as_varint 622 encoder + | Atom_test_extension_atom_reported -> Pbrt.Encoder.int_as_varint 660 encoder + | Atom_test_restricted_atom_reported -> Pbrt.Encoder.int_as_varint 672 encoder + | Atom_stats_socket_loss_reported -> Pbrt.Encoder.int_as_varint 752 encoder + | Atom_lockscreen_shortcut_selected -> Pbrt.Encoder.int_as_varint 611 encoder + | Atom_lockscreen_shortcut_triggered -> Pbrt.Encoder.int_as_varint 612 encoder + | Atom_launcher_impression_event_v2 -> Pbrt.Encoder.int_as_varint 716 encoder + | Atom_display_switch_latency_tracked -> Pbrt.Encoder.int_as_varint 753 encoder + | Atom_notification_listener_service -> Pbrt.Encoder.int_as_varint 829 encoder + | Atom_nav_handle_touch_points -> Pbrt.Encoder.int_as_varint 869 encoder + | Atom_communal_hub_widget_event_reported -> Pbrt.Encoder.int_as_varint 908 encoder + | Atom_communal_hub_snapshot -> Pbrt.Encoder.int_as_varint 10226 encoder + | Atom_emergency_number_dialed -> Pbrt.Encoder.int_as_varint 637 encoder + | Atom_call_stats -> Pbrt.Encoder.int_as_varint 10221 encoder + | Atom_call_audio_route_stats -> Pbrt.Encoder.int_as_varint 10222 encoder + | Atom_telecom_api_stats -> Pbrt.Encoder.int_as_varint 10223 encoder + | Atom_telecom_error_stats -> Pbrt.Encoder.int_as_varint 10224 encoder + | Atom_cellular_radio_power_state_changed -> Pbrt.Encoder.int_as_varint 713 encoder + | Atom_emergency_numbers_info -> Pbrt.Encoder.int_as_varint 10180 encoder + | Atom_data_network_validation -> Pbrt.Encoder.int_as_varint 10207 encoder + | Atom_data_rat_state_changed -> Pbrt.Encoder.int_as_varint 854 encoder + | Atom_connected_channel_changed -> Pbrt.Encoder.int_as_varint 882 encoder + | Atom_iwlan_underlying_network_validation_result_reported -> Pbrt.Encoder.int_as_varint 923 encoder + | Atom_qualified_rat_list_changed -> Pbrt.Encoder.int_as_varint 634 encoder + | Atom_qns_ims_call_drop_stats -> Pbrt.Encoder.int_as_varint 635 encoder + | Atom_qns_fallback_restriction_changed -> Pbrt.Encoder.int_as_varint 636 encoder + | Atom_qns_rat_preference_mismatch_info -> Pbrt.Encoder.int_as_varint 10177 encoder + | Atom_qns_handover_time_millis -> Pbrt.Encoder.int_as_varint 10178 encoder + | Atom_qns_handover_pingpong -> Pbrt.Encoder.int_as_varint 10179 encoder + | Atom_satellite_controller -> Pbrt.Encoder.int_as_varint 10182 encoder + | Atom_satellite_session -> Pbrt.Encoder.int_as_varint 10183 encoder + | Atom_satellite_incoming_datagram -> Pbrt.Encoder.int_as_varint 10184 encoder + | Atom_satellite_outgoing_datagram -> Pbrt.Encoder.int_as_varint 10185 encoder + | Atom_satellite_provision -> Pbrt.Encoder.int_as_varint 10186 encoder + | Atom_satellite_sos_message_recommender -> Pbrt.Encoder.int_as_varint 10187 encoder + | Atom_carrier_roaming_satellite_session -> Pbrt.Encoder.int_as_varint 10211 encoder + | Atom_carrier_roaming_satellite_controller_stats -> Pbrt.Encoder.int_as_varint 10212 encoder + | Atom_controller_stats_per_package -> Pbrt.Encoder.int_as_varint 10213 encoder + | Atom_satellite_entitlement -> Pbrt.Encoder.int_as_varint 10214 encoder + | Atom_satellite_config_updater -> Pbrt.Encoder.int_as_varint 10215 encoder + | Atom_satellite_access_controller -> Pbrt.Encoder.int_as_varint 10219 encoder + | Atom_cellular_identifier_disclosed -> Pbrt.Encoder.int_as_varint 800 encoder + | Atom_threadnetwork_telemetry_data_reported -> Pbrt.Encoder.int_as_varint 738 encoder + | Atom_threadnetwork_topo_entry_repeated -> Pbrt.Encoder.int_as_varint 739 encoder + | Atom_threadnetwork_device_info_reported -> Pbrt.Encoder.int_as_varint 740 encoder + | Atom_boot_integrity_info_reported -> Pbrt.Encoder.int_as_varint 775 encoder + | Atom_tv_low_power_standby_policy -> Pbrt.Encoder.int_as_varint 679 encoder + | Atom_external_tv_input_event -> Pbrt.Encoder.int_as_varint 717 encoder + | Atom_test_uprobestats_atom_reported -> Pbrt.Encoder.int_as_varint 915 encoder + | Atom_uwb_activity_info -> Pbrt.Encoder.int_as_varint 10188 encoder + | Atom_mediator_updated -> Pbrt.Encoder.int_as_varint 721 encoder + | Atom_sysproxy_bluetooth_bytes_transfer -> Pbrt.Encoder.int_as_varint 10196 encoder + | Atom_sysproxy_connection_updated -> Pbrt.Encoder.int_as_varint 786 encoder + | Atom_wear_companion_connection_state -> Pbrt.Encoder.int_as_varint 921 encoder + | Atom_media_action_reported -> Pbrt.Encoder.int_as_varint 608 encoder + | Atom_media_controls_launched -> Pbrt.Encoder.int_as_varint 609 encoder + | Atom_media_session_state_changed -> Pbrt.Encoder.int_as_varint 677 encoder + | Atom_wear_media_output_switcher_device_scan_api_latency -> Pbrt.Encoder.int_as_varint 757 encoder + | Atom_wear_media_output_switcher_sass_device_unavailable -> Pbrt.Encoder.int_as_varint 758 encoder + | Atom_wear_media_output_switcher_fastpair_api_timeout -> Pbrt.Encoder.int_as_varint 759 encoder + | Atom_wear_mode_state_changed -> Pbrt.Encoder.int_as_varint 715 encoder + | Atom_renderer_initialized -> Pbrt.Encoder.int_as_varint 736 encoder + | Atom_schema_version_received -> Pbrt.Encoder.int_as_varint 737 encoder + | Atom_layout_inspected -> Pbrt.Encoder.int_as_varint 741 encoder + | Atom_layout_expression_inspected -> Pbrt.Encoder.int_as_varint 742 encoder + | Atom_layout_animations_inspected -> Pbrt.Encoder.int_as_varint 743 encoder + | Atom_material_components_inspected -> Pbrt.Encoder.int_as_varint 744 encoder + | Atom_tile_requested -> Pbrt.Encoder.int_as_varint 745 encoder + | Atom_state_response_received -> Pbrt.Encoder.int_as_varint 746 encoder + | Atom_tile_response_received -> Pbrt.Encoder.int_as_varint 747 encoder + | Atom_inflation_finished -> Pbrt.Encoder.int_as_varint 748 encoder + | Atom_inflation_failed -> Pbrt.Encoder.int_as_varint 749 encoder + | Atom_ignored_inflation_failures_reported -> Pbrt.Encoder.int_as_varint 750 encoder + | Atom_drawable_rendered -> Pbrt.Encoder.int_as_varint 751 encoder + | Atom_wear_time_sync_requested -> Pbrt.Encoder.int_as_varint 911 encoder + | Atom_wear_time_update_started -> Pbrt.Encoder.int_as_varint 912 encoder + | Atom_wear_time_sync_attempt_completed -> Pbrt.Encoder.int_as_varint 913 encoder + | Atom_wear_time_changed -> Pbrt.Encoder.int_as_varint 914 encoder + | Atom_wear_adaptive_suspend_stats_reported -> Pbrt.Encoder.int_as_varint 619 encoder + | Atom_wear_power_anomaly_service_operational_stats_reported -> Pbrt.Encoder.int_as_varint 620 encoder + | Atom_wear_power_anomaly_service_event_stats_reported -> Pbrt.Encoder.int_as_varint 621 encoder + | Atom_ws_wear_time_session -> Pbrt.Encoder.int_as_varint 610 encoder + | Atom_ws_incoming_call_action_reported -> Pbrt.Encoder.int_as_varint 626 encoder + | Atom_ws_call_disconnection_reported -> Pbrt.Encoder.int_as_varint 627 encoder + | Atom_ws_call_duration_reported -> Pbrt.Encoder.int_as_varint 628 encoder + | Atom_ws_call_user_experience_latency_reported -> Pbrt.Encoder.int_as_varint 629 encoder + | Atom_ws_call_interaction_reported -> Pbrt.Encoder.int_as_varint 630 encoder + | Atom_ws_on_body_state_changed -> Pbrt.Encoder.int_as_varint 787 encoder + | Atom_ws_watch_face_restricted_complications_impacted -> Pbrt.Encoder.int_as_varint 802 encoder + | Atom_ws_watch_face_default_restricted_complications_removed -> Pbrt.Encoder.int_as_varint 803 encoder + | Atom_ws_complications_impacted_notification_event_reported -> Pbrt.Encoder.int_as_varint 804 encoder + | Atom_ws_remote_event_usage_reported -> Pbrt.Encoder.int_as_varint 920 encoder + | Atom_ws_bugreport_requested -> Pbrt.Encoder.int_as_varint 936 encoder + | Atom_ws_bugreport_triggered -> Pbrt.Encoder.int_as_varint 937 encoder + | Atom_ws_bugreport_finished -> Pbrt.Encoder.int_as_varint 938 encoder + | Atom_ws_bugreport_result_received -> Pbrt.Encoder.int_as_varint 939 encoder + | Atom_ws_standalone_mode_snapshot -> Pbrt.Encoder.int_as_varint 10197 encoder + | Atom_ws_favorite_watch_face_snapshot -> Pbrt.Encoder.int_as_varint 10206 encoder + | Atom_ws_photos_watch_face_feature_snapshot -> Pbrt.Encoder.int_as_varint 10225 encoder + | Atom_ws_watch_face_customization_snapshot -> Pbrt.Encoder.int_as_varint 10227 encoder + | Atom_wear_power_menu_opened -> Pbrt.Encoder.int_as_varint 731 encoder + | Atom_wear_assistant_opened -> Pbrt.Encoder.int_as_varint 755 encoder + | Atom_first_overlay_state_changed -> Pbrt.Encoder.int_as_varint 917 encoder + | Atom_wifi_aware_ndp_reported -> Pbrt.Encoder.int_as_varint 638 encoder + | Atom_wifi_aware_attach_reported -> Pbrt.Encoder.int_as_varint 639 encoder + | Atom_wifi_self_recovery_triggered -> Pbrt.Encoder.int_as_varint 661 encoder + | Atom_soft_ap_started -> Pbrt.Encoder.int_as_varint 680 encoder + | Atom_soft_ap_stopped -> Pbrt.Encoder.int_as_varint 681 encoder + | Atom_wifi_lock_released -> Pbrt.Encoder.int_as_varint 687 encoder + | Atom_wifi_lock_deactivated -> Pbrt.Encoder.int_as_varint 688 encoder + | Atom_wifi_config_saved -> Pbrt.Encoder.int_as_varint 689 encoder + | Atom_wifi_aware_resource_using_changed -> Pbrt.Encoder.int_as_varint 690 encoder + | Atom_wifi_aware_hal_api_called -> Pbrt.Encoder.int_as_varint 691 encoder + | Atom_wifi_local_only_request_received -> Pbrt.Encoder.int_as_varint 692 encoder + | Atom_wifi_local_only_request_scan_triggered -> Pbrt.Encoder.int_as_varint 693 encoder + | Atom_wifi_thread_task_executed -> Pbrt.Encoder.int_as_varint 694 encoder + | Atom_wifi_state_changed -> Pbrt.Encoder.int_as_varint 700 encoder + | Atom_pno_scan_started -> Pbrt.Encoder.int_as_varint 719 encoder + | Atom_pno_scan_stopped -> Pbrt.Encoder.int_as_varint 720 encoder + | Atom_wifi_is_unusable_reported -> Pbrt.Encoder.int_as_varint 722 encoder + | Atom_wifi_ap_capabilities_reported -> Pbrt.Encoder.int_as_varint 723 encoder + | Atom_soft_ap_state_changed -> Pbrt.Encoder.int_as_varint 805 encoder + | Atom_scorer_prediction_result_reported -> Pbrt.Encoder.int_as_varint 884 encoder + | Atom_wifi_aware_capabilities -> Pbrt.Encoder.int_as_varint 10190 encoder + | Atom_wifi_module_info -> Pbrt.Encoder.int_as_varint 10193 encoder + | Atom_wifi_setting_info -> Pbrt.Encoder.int_as_varint 10194 encoder + | Atom_wifi_complex_setting_info -> Pbrt.Encoder.int_as_varint 10195 encoder + | Atom_wifi_configured_network_info -> Pbrt.Encoder.int_as_varint 10198 encoder + +let rec encode_pb_statsd_pull_atom_config (v:statsd_pull_atom_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_atom_id x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.pull_atom_id encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.raw_pull_atom_id encoder; + if statsd_pull_atom_config_has_pull_frequency_ms v then ( + Pbrt.Encoder.int32_as_varint v.pull_frequency_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.packages encoder; + () + +let rec encode_pb_statsd_tracing_config (v:statsd_tracing_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_atom_id x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.push_atom_id encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.raw_push_atom_id encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_statsd_pull_atom_config x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.pull_config encoder; + () + +let rec encode_pb_meminfo_counters (v:meminfo_counters) encoder = + match v with + | Meminfo_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Meminfo_mem_total -> Pbrt.Encoder.int_as_varint 1 encoder + | Meminfo_mem_free -> Pbrt.Encoder.int_as_varint 2 encoder + | Meminfo_mem_available -> Pbrt.Encoder.int_as_varint 3 encoder + | Meminfo_buffers -> Pbrt.Encoder.int_as_varint 4 encoder + | Meminfo_cached -> Pbrt.Encoder.int_as_varint 5 encoder + | Meminfo_swap_cached -> Pbrt.Encoder.int_as_varint 6 encoder + | Meminfo_active -> Pbrt.Encoder.int_as_varint 7 encoder + | Meminfo_inactive -> Pbrt.Encoder.int_as_varint 8 encoder + | Meminfo_active_anon -> Pbrt.Encoder.int_as_varint 9 encoder + | Meminfo_inactive_anon -> Pbrt.Encoder.int_as_varint 10 encoder + | Meminfo_active_file -> Pbrt.Encoder.int_as_varint 11 encoder + | Meminfo_inactive_file -> Pbrt.Encoder.int_as_varint 12 encoder + | Meminfo_unevictable -> Pbrt.Encoder.int_as_varint 13 encoder + | Meminfo_mlocked -> Pbrt.Encoder.int_as_varint 14 encoder + | Meminfo_swap_total -> Pbrt.Encoder.int_as_varint 15 encoder + | Meminfo_swap_free -> Pbrt.Encoder.int_as_varint 16 encoder + | Meminfo_dirty -> Pbrt.Encoder.int_as_varint 17 encoder + | Meminfo_writeback -> Pbrt.Encoder.int_as_varint 18 encoder + | Meminfo_anon_pages -> Pbrt.Encoder.int_as_varint 19 encoder + | Meminfo_mapped -> Pbrt.Encoder.int_as_varint 20 encoder + | Meminfo_shmem -> Pbrt.Encoder.int_as_varint 21 encoder + | Meminfo_slab -> Pbrt.Encoder.int_as_varint 22 encoder + | Meminfo_slab_reclaimable -> Pbrt.Encoder.int_as_varint 23 encoder + | Meminfo_slab_unreclaimable -> Pbrt.Encoder.int_as_varint 24 encoder + | Meminfo_kernel_stack -> Pbrt.Encoder.int_as_varint 25 encoder + | Meminfo_page_tables -> Pbrt.Encoder.int_as_varint 26 encoder + | Meminfo_commit_limit -> Pbrt.Encoder.int_as_varint 27 encoder + | Meminfo_commited_as -> Pbrt.Encoder.int_as_varint 28 encoder + | Meminfo_vmalloc_total -> Pbrt.Encoder.int_as_varint 29 encoder + | Meminfo_vmalloc_used -> Pbrt.Encoder.int_as_varint 30 encoder + | Meminfo_vmalloc_chunk -> Pbrt.Encoder.int_as_varint 31 encoder + | Meminfo_cma_total -> Pbrt.Encoder.int_as_varint 32 encoder + | Meminfo_cma_free -> Pbrt.Encoder.int_as_varint 33 encoder + | Meminfo_gpu -> Pbrt.Encoder.int_as_varint 34 encoder + | Meminfo_zram -> Pbrt.Encoder.int_as_varint 35 encoder + | Meminfo_misc -> Pbrt.Encoder.int_as_varint 36 encoder + | Meminfo_ion_heap -> Pbrt.Encoder.int_as_varint 37 encoder + | Meminfo_ion_heap_pool -> Pbrt.Encoder.int_as_varint 38 encoder + +let rec encode_pb_vmstat_counters (v:vmstat_counters) encoder = + match v with + | Vmstat_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Vmstat_nr_free_pages -> Pbrt.Encoder.int_as_varint 1 encoder + | Vmstat_nr_alloc_batch -> Pbrt.Encoder.int_as_varint 2 encoder + | Vmstat_nr_inactive_anon -> Pbrt.Encoder.int_as_varint 3 encoder + | Vmstat_nr_active_anon -> Pbrt.Encoder.int_as_varint 4 encoder + | Vmstat_nr_inactive_file -> Pbrt.Encoder.int_as_varint 5 encoder + | Vmstat_nr_active_file -> Pbrt.Encoder.int_as_varint 6 encoder + | Vmstat_nr_unevictable -> Pbrt.Encoder.int_as_varint 7 encoder + | Vmstat_nr_mlock -> Pbrt.Encoder.int_as_varint 8 encoder + | Vmstat_nr_anon_pages -> Pbrt.Encoder.int_as_varint 9 encoder + | Vmstat_nr_mapped -> Pbrt.Encoder.int_as_varint 10 encoder + | Vmstat_nr_file_pages -> Pbrt.Encoder.int_as_varint 11 encoder + | Vmstat_nr_dirty -> Pbrt.Encoder.int_as_varint 12 encoder + | Vmstat_nr_writeback -> Pbrt.Encoder.int_as_varint 13 encoder + | Vmstat_nr_slab_reclaimable -> Pbrt.Encoder.int_as_varint 14 encoder + | Vmstat_nr_slab_unreclaimable -> Pbrt.Encoder.int_as_varint 15 encoder + | Vmstat_nr_page_table_pages -> Pbrt.Encoder.int_as_varint 16 encoder + | Vmstat_nr_kernel_stack -> Pbrt.Encoder.int_as_varint 17 encoder + | Vmstat_nr_overhead -> Pbrt.Encoder.int_as_varint 18 encoder + | Vmstat_nr_unstable -> Pbrt.Encoder.int_as_varint 19 encoder + | Vmstat_nr_bounce -> Pbrt.Encoder.int_as_varint 20 encoder + | Vmstat_nr_vmscan_write -> Pbrt.Encoder.int_as_varint 21 encoder + | Vmstat_nr_vmscan_immediate_reclaim -> Pbrt.Encoder.int_as_varint 22 encoder + | Vmstat_nr_writeback_temp -> Pbrt.Encoder.int_as_varint 23 encoder + | Vmstat_nr_isolated_anon -> Pbrt.Encoder.int_as_varint 24 encoder + | Vmstat_nr_isolated_file -> Pbrt.Encoder.int_as_varint 25 encoder + | Vmstat_nr_shmem -> Pbrt.Encoder.int_as_varint 26 encoder + | Vmstat_nr_dirtied -> Pbrt.Encoder.int_as_varint 27 encoder + | Vmstat_nr_written -> Pbrt.Encoder.int_as_varint 28 encoder + | Vmstat_nr_pages_scanned -> Pbrt.Encoder.int_as_varint 29 encoder + | Vmstat_workingset_refault -> Pbrt.Encoder.int_as_varint 30 encoder + | Vmstat_workingset_activate -> Pbrt.Encoder.int_as_varint 31 encoder + | Vmstat_workingset_nodereclaim -> Pbrt.Encoder.int_as_varint 32 encoder + | Vmstat_nr_anon_transparent_hugepages -> Pbrt.Encoder.int_as_varint 33 encoder + | Vmstat_nr_free_cma -> Pbrt.Encoder.int_as_varint 34 encoder + | Vmstat_nr_swapcache -> Pbrt.Encoder.int_as_varint 35 encoder + | Vmstat_nr_dirty_threshold -> Pbrt.Encoder.int_as_varint 36 encoder + | Vmstat_nr_dirty_background_threshold -> Pbrt.Encoder.int_as_varint 37 encoder + | Vmstat_pgpgin -> Pbrt.Encoder.int_as_varint 38 encoder + | Vmstat_pgpgout -> Pbrt.Encoder.int_as_varint 39 encoder + | Vmstat_pgpgoutclean -> Pbrt.Encoder.int_as_varint 40 encoder + | Vmstat_pswpin -> Pbrt.Encoder.int_as_varint 41 encoder + | Vmstat_pswpout -> Pbrt.Encoder.int_as_varint 42 encoder + | Vmstat_pgalloc_dma -> Pbrt.Encoder.int_as_varint 43 encoder + | Vmstat_pgalloc_normal -> Pbrt.Encoder.int_as_varint 44 encoder + | Vmstat_pgalloc_movable -> Pbrt.Encoder.int_as_varint 45 encoder + | Vmstat_pgfree -> Pbrt.Encoder.int_as_varint 46 encoder + | Vmstat_pgactivate -> Pbrt.Encoder.int_as_varint 47 encoder + | Vmstat_pgdeactivate -> Pbrt.Encoder.int_as_varint 48 encoder + | Vmstat_pgfault -> Pbrt.Encoder.int_as_varint 49 encoder + | Vmstat_pgmajfault -> Pbrt.Encoder.int_as_varint 50 encoder + | Vmstat_pgrefill_dma -> Pbrt.Encoder.int_as_varint 51 encoder + | Vmstat_pgrefill_normal -> Pbrt.Encoder.int_as_varint 52 encoder + | Vmstat_pgrefill_movable -> Pbrt.Encoder.int_as_varint 53 encoder + | Vmstat_pgsteal_kswapd_dma -> Pbrt.Encoder.int_as_varint 54 encoder + | Vmstat_pgsteal_kswapd_normal -> Pbrt.Encoder.int_as_varint 55 encoder + | Vmstat_pgsteal_kswapd_movable -> Pbrt.Encoder.int_as_varint 56 encoder + | Vmstat_pgsteal_direct_dma -> Pbrt.Encoder.int_as_varint 57 encoder + | Vmstat_pgsteal_direct_normal -> Pbrt.Encoder.int_as_varint 58 encoder + | Vmstat_pgsteal_direct_movable -> Pbrt.Encoder.int_as_varint 59 encoder + | Vmstat_pgscan_kswapd_dma -> Pbrt.Encoder.int_as_varint 60 encoder + | Vmstat_pgscan_kswapd_normal -> Pbrt.Encoder.int_as_varint 61 encoder + | Vmstat_pgscan_kswapd_movable -> Pbrt.Encoder.int_as_varint 62 encoder + | Vmstat_pgscan_direct_dma -> Pbrt.Encoder.int_as_varint 63 encoder + | Vmstat_pgscan_direct_normal -> Pbrt.Encoder.int_as_varint 64 encoder + | Vmstat_pgscan_direct_movable -> Pbrt.Encoder.int_as_varint 65 encoder + | Vmstat_pgscan_direct_throttle -> Pbrt.Encoder.int_as_varint 66 encoder + | Vmstat_pginodesteal -> Pbrt.Encoder.int_as_varint 67 encoder + | Vmstat_slabs_scanned -> Pbrt.Encoder.int_as_varint 68 encoder + | Vmstat_kswapd_inodesteal -> Pbrt.Encoder.int_as_varint 69 encoder + | Vmstat_kswapd_low_wmark_hit_quickly -> Pbrt.Encoder.int_as_varint 70 encoder + | Vmstat_kswapd_high_wmark_hit_quickly -> Pbrt.Encoder.int_as_varint 71 encoder + | Vmstat_pageoutrun -> Pbrt.Encoder.int_as_varint 72 encoder + | Vmstat_allocstall -> Pbrt.Encoder.int_as_varint 73 encoder + | Vmstat_pgrotated -> Pbrt.Encoder.int_as_varint 74 encoder + | Vmstat_drop_pagecache -> Pbrt.Encoder.int_as_varint 75 encoder + | Vmstat_drop_slab -> Pbrt.Encoder.int_as_varint 76 encoder + | Vmstat_pgmigrate_success -> Pbrt.Encoder.int_as_varint 77 encoder + | Vmstat_pgmigrate_fail -> Pbrt.Encoder.int_as_varint 78 encoder + | Vmstat_compact_migrate_scanned -> Pbrt.Encoder.int_as_varint 79 encoder + | Vmstat_compact_free_scanned -> Pbrt.Encoder.int_as_varint 80 encoder + | Vmstat_compact_isolated -> Pbrt.Encoder.int_as_varint 81 encoder + | Vmstat_compact_stall -> Pbrt.Encoder.int_as_varint 82 encoder + | Vmstat_compact_fail -> Pbrt.Encoder.int_as_varint 83 encoder + | Vmstat_compact_success -> Pbrt.Encoder.int_as_varint 84 encoder + | Vmstat_compact_daemon_wake -> Pbrt.Encoder.int_as_varint 85 encoder + | Vmstat_unevictable_pgs_culled -> Pbrt.Encoder.int_as_varint 86 encoder + | Vmstat_unevictable_pgs_scanned -> Pbrt.Encoder.int_as_varint 87 encoder + | Vmstat_unevictable_pgs_rescued -> Pbrt.Encoder.int_as_varint 88 encoder + | Vmstat_unevictable_pgs_mlocked -> Pbrt.Encoder.int_as_varint 89 encoder + | Vmstat_unevictable_pgs_munlocked -> Pbrt.Encoder.int_as_varint 90 encoder + | Vmstat_unevictable_pgs_cleared -> Pbrt.Encoder.int_as_varint 91 encoder + | Vmstat_unevictable_pgs_stranded -> Pbrt.Encoder.int_as_varint 92 encoder + | Vmstat_nr_zspages -> Pbrt.Encoder.int_as_varint 93 encoder + | Vmstat_nr_ion_heap -> Pbrt.Encoder.int_as_varint 94 encoder + | Vmstat_nr_gpu_heap -> Pbrt.Encoder.int_as_varint 95 encoder + | Vmstat_allocstall_dma -> Pbrt.Encoder.int_as_varint 96 encoder + | Vmstat_allocstall_movable -> Pbrt.Encoder.int_as_varint 97 encoder + | Vmstat_allocstall_normal -> Pbrt.Encoder.int_as_varint 98 encoder + | Vmstat_compact_daemon_free_scanned -> Pbrt.Encoder.int_as_varint 99 encoder + | Vmstat_compact_daemon_migrate_scanned -> Pbrt.Encoder.int_as_varint 100 encoder + | Vmstat_nr_fastrpc -> Pbrt.Encoder.int_as_varint 101 encoder + | Vmstat_nr_indirectly_reclaimable -> Pbrt.Encoder.int_as_varint 102 encoder + | Vmstat_nr_ion_heap_pool -> Pbrt.Encoder.int_as_varint 103 encoder + | Vmstat_nr_kernel_misc_reclaimable -> Pbrt.Encoder.int_as_varint 104 encoder + | Vmstat_nr_shadow_call_stack_bytes -> Pbrt.Encoder.int_as_varint 105 encoder + | Vmstat_nr_shmem_hugepages -> Pbrt.Encoder.int_as_varint 106 encoder + | Vmstat_nr_shmem_pmdmapped -> Pbrt.Encoder.int_as_varint 107 encoder + | Vmstat_nr_unreclaimable_pages -> Pbrt.Encoder.int_as_varint 108 encoder + | Vmstat_nr_zone_active_anon -> Pbrt.Encoder.int_as_varint 109 encoder + | Vmstat_nr_zone_active_file -> Pbrt.Encoder.int_as_varint 110 encoder + | Vmstat_nr_zone_inactive_anon -> Pbrt.Encoder.int_as_varint 111 encoder + | Vmstat_nr_zone_inactive_file -> Pbrt.Encoder.int_as_varint 112 encoder + | Vmstat_nr_zone_unevictable -> Pbrt.Encoder.int_as_varint 113 encoder + | Vmstat_nr_zone_write_pending -> Pbrt.Encoder.int_as_varint 114 encoder + | Vmstat_oom_kill -> Pbrt.Encoder.int_as_varint 115 encoder + | Vmstat_pglazyfree -> Pbrt.Encoder.int_as_varint 116 encoder + | Vmstat_pglazyfreed -> Pbrt.Encoder.int_as_varint 117 encoder + | Vmstat_pgrefill -> Pbrt.Encoder.int_as_varint 118 encoder + | Vmstat_pgscan_direct -> Pbrt.Encoder.int_as_varint 119 encoder + | Vmstat_pgscan_kswapd -> Pbrt.Encoder.int_as_varint 120 encoder + | Vmstat_pgskip_dma -> Pbrt.Encoder.int_as_varint 121 encoder + | Vmstat_pgskip_movable -> Pbrt.Encoder.int_as_varint 122 encoder + | Vmstat_pgskip_normal -> Pbrt.Encoder.int_as_varint 123 encoder + | Vmstat_pgsteal_direct -> Pbrt.Encoder.int_as_varint 124 encoder + | Vmstat_pgsteal_kswapd -> Pbrt.Encoder.int_as_varint 125 encoder + | Vmstat_swap_ra -> Pbrt.Encoder.int_as_varint 126 encoder + | Vmstat_swap_ra_hit -> Pbrt.Encoder.int_as_varint 127 encoder + | Vmstat_workingset_restore -> Pbrt.Encoder.int_as_varint 128 encoder + | Vmstat_allocstall_device -> Pbrt.Encoder.int_as_varint 129 encoder + | Vmstat_allocstall_dma32 -> Pbrt.Encoder.int_as_varint 130 encoder + | Vmstat_balloon_deflate -> Pbrt.Encoder.int_as_varint 131 encoder + | Vmstat_balloon_inflate -> Pbrt.Encoder.int_as_varint 132 encoder + | Vmstat_balloon_migrate -> Pbrt.Encoder.int_as_varint 133 encoder + | Vmstat_cma_alloc_fail -> Pbrt.Encoder.int_as_varint 134 encoder + | Vmstat_cma_alloc_success -> Pbrt.Encoder.int_as_varint 135 encoder + | Vmstat_nr_file_hugepages -> Pbrt.Encoder.int_as_varint 136 encoder + | Vmstat_nr_file_pmdmapped -> Pbrt.Encoder.int_as_varint 137 encoder + | Vmstat_nr_foll_pin_acquired -> Pbrt.Encoder.int_as_varint 138 encoder + | Vmstat_nr_foll_pin_released -> Pbrt.Encoder.int_as_varint 139 encoder + | Vmstat_nr_sec_page_table_pages -> Pbrt.Encoder.int_as_varint 140 encoder + | Vmstat_nr_shadow_call_stack -> Pbrt.Encoder.int_as_varint 141 encoder + | Vmstat_nr_swapcached -> Pbrt.Encoder.int_as_varint 142 encoder + | Vmstat_nr_throttled_written -> Pbrt.Encoder.int_as_varint 143 encoder + | Vmstat_pgalloc_device -> Pbrt.Encoder.int_as_varint 144 encoder + | Vmstat_pgalloc_dma32 -> Pbrt.Encoder.int_as_varint 145 encoder + | Vmstat_pgdemote_direct -> Pbrt.Encoder.int_as_varint 146 encoder + | Vmstat_pgdemote_kswapd -> Pbrt.Encoder.int_as_varint 147 encoder + | Vmstat_pgreuse -> Pbrt.Encoder.int_as_varint 148 encoder + | Vmstat_pgscan_anon -> Pbrt.Encoder.int_as_varint 149 encoder + | Vmstat_pgscan_file -> Pbrt.Encoder.int_as_varint 150 encoder + | Vmstat_pgskip_device -> Pbrt.Encoder.int_as_varint 151 encoder + | Vmstat_pgskip_dma32 -> Pbrt.Encoder.int_as_varint 152 encoder + | Vmstat_pgsteal_anon -> Pbrt.Encoder.int_as_varint 153 encoder + | Vmstat_pgsteal_file -> Pbrt.Encoder.int_as_varint 154 encoder + | Vmstat_thp_collapse_alloc -> Pbrt.Encoder.int_as_varint 155 encoder + | Vmstat_thp_collapse_alloc_failed -> Pbrt.Encoder.int_as_varint 156 encoder + | Vmstat_thp_deferred_split_page -> Pbrt.Encoder.int_as_varint 157 encoder + | Vmstat_thp_fault_alloc -> Pbrt.Encoder.int_as_varint 158 encoder + | Vmstat_thp_fault_fallback -> Pbrt.Encoder.int_as_varint 159 encoder + | Vmstat_thp_fault_fallback_charge -> Pbrt.Encoder.int_as_varint 160 encoder + | Vmstat_thp_file_alloc -> Pbrt.Encoder.int_as_varint 161 encoder + | Vmstat_thp_file_fallback -> Pbrt.Encoder.int_as_varint 162 encoder + | Vmstat_thp_file_fallback_charge -> Pbrt.Encoder.int_as_varint 163 encoder + | Vmstat_thp_file_mapped -> Pbrt.Encoder.int_as_varint 164 encoder + | Vmstat_thp_migration_fail -> Pbrt.Encoder.int_as_varint 165 encoder + | Vmstat_thp_migration_split -> Pbrt.Encoder.int_as_varint 166 encoder + | Vmstat_thp_migration_success -> Pbrt.Encoder.int_as_varint 167 encoder + | Vmstat_thp_scan_exceed_none_pte -> Pbrt.Encoder.int_as_varint 168 encoder + | Vmstat_thp_scan_exceed_share_pte -> Pbrt.Encoder.int_as_varint 169 encoder + | Vmstat_thp_scan_exceed_swap_pte -> Pbrt.Encoder.int_as_varint 170 encoder + | Vmstat_thp_split_page -> Pbrt.Encoder.int_as_varint 171 encoder + | Vmstat_thp_split_page_failed -> Pbrt.Encoder.int_as_varint 172 encoder + | Vmstat_thp_split_pmd -> Pbrt.Encoder.int_as_varint 173 encoder + | Vmstat_thp_swpout -> Pbrt.Encoder.int_as_varint 174 encoder + | Vmstat_thp_swpout_fallback -> Pbrt.Encoder.int_as_varint 175 encoder + | Vmstat_thp_zero_page_alloc -> Pbrt.Encoder.int_as_varint 176 encoder + | Vmstat_thp_zero_page_alloc_failed -> Pbrt.Encoder.int_as_varint 177 encoder + | Vmstat_vma_lock_abort -> Pbrt.Encoder.int_as_varint 178 encoder + | Vmstat_vma_lock_miss -> Pbrt.Encoder.int_as_varint 179 encoder + | Vmstat_vma_lock_retry -> Pbrt.Encoder.int_as_varint 180 encoder + | Vmstat_vma_lock_success -> Pbrt.Encoder.int_as_varint 181 encoder + | Vmstat_workingset_activate_anon -> Pbrt.Encoder.int_as_varint 182 encoder + | Vmstat_workingset_activate_file -> Pbrt.Encoder.int_as_varint 183 encoder + | Vmstat_workingset_nodes -> Pbrt.Encoder.int_as_varint 184 encoder + | Vmstat_workingset_refault_anon -> Pbrt.Encoder.int_as_varint 185 encoder + | Vmstat_workingset_refault_file -> Pbrt.Encoder.int_as_varint 186 encoder + | Vmstat_workingset_restore_anon -> Pbrt.Encoder.int_as_varint 187 encoder + | Vmstat_workingset_restore_file -> Pbrt.Encoder.int_as_varint 188 encoder + +let rec encode_pb_sys_stats_config_stat_counters (v:sys_stats_config_stat_counters) encoder = + match v with + | Stat_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Stat_cpu_times -> Pbrt.Encoder.int_as_varint 1 encoder + | Stat_irq_counts -> Pbrt.Encoder.int_as_varint 2 encoder + | Stat_softirq_counts -> Pbrt.Encoder.int_as_varint 3 encoder + | Stat_fork_count -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_sys_stats_config (v:sys_stats_config) encoder = + if sys_stats_config_has_meminfo_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.meminfo_period_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_meminfo_counters x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.meminfo_counters encoder; + if sys_stats_config_has_vmstat_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.vmstat_period_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_vmstat_counters x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ) v.vmstat_counters encoder; + if sys_stats_config_has_stat_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.stat_period_ms encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + encode_pb_sys_stats_config_stat_counters x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ) v.stat_counters encoder; + if sys_stats_config_has_devfreq_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.devfreq_period_ms encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if sys_stats_config_has_cpufreq_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.cpufreq_period_ms encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if sys_stats_config_has_buddyinfo_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.buddyinfo_period_ms encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if sys_stats_config_has_diskstat_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.diskstat_period_ms encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if sys_stats_config_has_psi_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.psi_period_ms encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if sys_stats_config_has_thermal_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.thermal_period_ms encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if sys_stats_config_has_cpuidle_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.cpuidle_period_ms encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if sys_stats_config_has_gpufreq_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.gpufreq_period_ms encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_system_info_config (v:system_info_config) encoder = +() + +let rec encode_pb_test_config_dummy_fields (v:test_config_dummy_fields) encoder = + if test_config_dummy_fields_has_field_uint32 v then ( + Pbrt.Encoder.int32_as_varint v.field_uint32 encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if test_config_dummy_fields_has_field_int32 v then ( + Pbrt.Encoder.int32_as_varint v.field_int32 encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if test_config_dummy_fields_has_field_uint64 v then ( + Pbrt.Encoder.int64_as_varint v.field_uint64 encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if test_config_dummy_fields_has_field_int64 v then ( + Pbrt.Encoder.int64_as_varint v.field_int64 encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if test_config_dummy_fields_has_field_fixed64 v then ( + Pbrt.Encoder.int64_as_bits64 v.field_fixed64 encoder; + Pbrt.Encoder.key 5 Pbrt.Bits64 encoder; + ); + if test_config_dummy_fields_has_field_sfixed64 v then ( + Pbrt.Encoder.int64_as_bits64 v.field_sfixed64 encoder; + Pbrt.Encoder.key 6 Pbrt.Bits64 encoder; + ); + if test_config_dummy_fields_has_field_fixed32 v then ( + Pbrt.Encoder.int32_as_bits32 v.field_fixed32 encoder; + Pbrt.Encoder.key 7 Pbrt.Bits32 encoder; + ); + if test_config_dummy_fields_has_field_sfixed32 v then ( + Pbrt.Encoder.int32_as_bits32 v.field_sfixed32 encoder; + Pbrt.Encoder.key 8 Pbrt.Bits32 encoder; + ); + if test_config_dummy_fields_has_field_double v then ( + Pbrt.Encoder.float_as_bits64 v.field_double encoder; + Pbrt.Encoder.key 9 Pbrt.Bits64 encoder; + ); + if test_config_dummy_fields_has_field_float v then ( + Pbrt.Encoder.float_as_bits32 v.field_float encoder; + Pbrt.Encoder.key 10 Pbrt.Bits32 encoder; + ); + if test_config_dummy_fields_has_field_sint64 v then ( + Pbrt.Encoder.int64_as_zigzag v.field_sint64 encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if test_config_dummy_fields_has_field_sint32 v then ( + Pbrt.Encoder.int32_as_zigzag v.field_sint32 encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if test_config_dummy_fields_has_field_string v then ( + Pbrt.Encoder.string v.field_string encoder; + Pbrt.Encoder.key 13 Pbrt.Bytes encoder; + ); + if test_config_dummy_fields_has_field_bytes v then ( + Pbrt.Encoder.bytes v.field_bytes encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_test_config (v:test_config) encoder = + if test_config_has_message_count v then ( + Pbrt.Encoder.int32_as_varint v.message_count encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if test_config_has_max_messages_per_second v then ( + Pbrt.Encoder.int32_as_varint v.max_messages_per_second encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if test_config_has_seed v then ( + Pbrt.Encoder.int32_as_varint v.seed encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if test_config_has_message_size v then ( + Pbrt.Encoder.int32_as_varint v.message_size encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if test_config_has_send_batch_on_register v then ( + Pbrt.Encoder.bool v.send_batch_on_register encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + begin match v.dummy_fields with + | Some x -> + Pbrt.Encoder.nested encode_pb_test_config_dummy_fields x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_track_event_config (v:track_event_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.disabled_categories encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.enabled_categories encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.disabled_tags encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.enabled_tags encoder; + if track_event_config_has_disable_incremental_timestamps v then ( + Pbrt.Encoder.bool v.disable_incremental_timestamps encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if track_event_config_has_timestamp_unit_multiplier v then ( + Pbrt.Encoder.int64_as_varint v.timestamp_unit_multiplier encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if track_event_config_has_filter_debug_annotations v then ( + Pbrt.Encoder.bool v.filter_debug_annotations encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if track_event_config_has_enable_thread_time_sampling v then ( + Pbrt.Encoder.bool v.enable_thread_time_sampling encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if track_event_config_has_thread_time_subsampling_ns v then ( + Pbrt.Encoder.int64_as_varint v.thread_time_subsampling_ns encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if track_event_config_has_filter_dynamic_event_names v then ( + Pbrt.Encoder.bool v.filter_dynamic_event_names encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_data_source_config_session_initiator (v:data_source_config_session_initiator) encoder = + match v with + | Session_initiator_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Session_initiator_trusted_system -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_data_source_config_buffer_exhausted_policy (v:data_source_config_buffer_exhausted_policy) encoder = + match v with + | Buffer_exhausted_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Buffer_exhausted_drop -> Pbrt.Encoder.int_as_varint 1 encoder + | Buffer_exhausted_stall_then_abort -> Pbrt.Encoder.int_as_varint 2 encoder + | Buffer_exhausted_stall_then_drop -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_data_source_config (v:data_source_config) encoder = + if data_source_config_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if data_source_config_has_target_buffer v then ( + Pbrt.Encoder.int32_as_varint v.target_buffer encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if data_source_config_has_trace_duration_ms v then ( + Pbrt.Encoder.int32_as_varint v.trace_duration_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if data_source_config_has_prefer_suspend_clock_for_duration v then ( + Pbrt.Encoder.bool v.prefer_suspend_clock_for_duration encoder; + Pbrt.Encoder.key 122 Pbrt.Varint encoder; + ); + if data_source_config_has_stop_timeout_ms v then ( + Pbrt.Encoder.int32_as_varint v.stop_timeout_ms encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if data_source_config_has_enable_extra_guardrails v then ( + Pbrt.Encoder.bool v.enable_extra_guardrails encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if data_source_config_has_session_initiator v then ( + encode_pb_data_source_config_session_initiator v.session_initiator encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if data_source_config_has_tracing_session_id v then ( + Pbrt.Encoder.int64_as_varint v.tracing_session_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if data_source_config_has_buffer_exhausted_policy v then ( + encode_pb_data_source_config_buffer_exhausted_policy v.buffer_exhausted_policy encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + begin match v.priority_boost with + | Some x -> + Pbrt.Encoder.nested encode_pb_priority_boost_config x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.ftrace_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_ftrace_config x encoder; + Pbrt.Encoder.key 100 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.inode_file_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_inode_file_config x encoder; + Pbrt.Encoder.key 102 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.process_stats_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_process_stats_config x encoder; + Pbrt.Encoder.key 103 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.sys_stats_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_sys_stats_config x encoder; + Pbrt.Encoder.key 104 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.heapprofd_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_heapprofd_config x encoder; + Pbrt.Encoder.key 105 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.android_power_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_power_config x encoder; + Pbrt.Encoder.key 106 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.android_log_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_log_config x encoder; + Pbrt.Encoder.key 107 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.gpu_counter_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_gpu_counter_config x encoder; + Pbrt.Encoder.key 108 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.android_game_intervention_list_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_game_intervention_list_config x encoder; + Pbrt.Encoder.key 116 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.packages_list_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_packages_list_config x encoder; + Pbrt.Encoder.key 109 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.vulkan_memory_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_vulkan_memory_config x encoder; + Pbrt.Encoder.key 112 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.track_event_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_track_event_config x encoder; + Pbrt.Encoder.key 113 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.android_polled_state_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_polled_state_config x encoder; + Pbrt.Encoder.key 114 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.android_system_property_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_system_property_config x encoder; + Pbrt.Encoder.key 118 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.statsd_tracing_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_statsd_tracing_config x encoder; + Pbrt.Encoder.key 117 Pbrt.Bytes encoder; + | None -> (); + end; + if data_source_config_has_system_info_config v then ( + Pbrt.Encoder.empty_nested encoder; + Pbrt.Encoder.key 119 Pbrt.Bytes encoder; + ); + begin match v.frozen_ftrace_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_frozen_ftrace_config x encoder; + Pbrt.Encoder.key 136 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_config x encoder; + Pbrt.Encoder.key 101 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.v8_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_v8_config x encoder; + Pbrt.Encoder.key 127 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.interceptor_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_interceptor_config x encoder; + Pbrt.Encoder.key 115 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.network_packet_trace_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_network_packet_trace_config x encoder; + Pbrt.Encoder.key 120 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.surfaceflinger_layers_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_surface_flinger_layers_config x encoder; + Pbrt.Encoder.key 121 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.surfaceflinger_transactions_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_surface_flinger_transactions_config x encoder; + Pbrt.Encoder.key 123 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.android_sdk_sysprop_guard_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_sdk_sysprop_guard_config x encoder; + Pbrt.Encoder.key 124 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.etw_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_etw_config x encoder; + Pbrt.Encoder.key 125 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.protolog_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_proto_log_config x encoder; + Pbrt.Encoder.key 126 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.android_input_event_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_input_event_config x encoder; + Pbrt.Encoder.key 128 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.pixel_modem_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_pixel_modem_config x encoder; + Pbrt.Encoder.key 129 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.windowmanager_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_window_manager_config x encoder; + Pbrt.Encoder.key 130 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chromium_system_metrics with + | Some x -> + Pbrt.Encoder.nested encode_pb_chromium_system_metrics_config x encoder; + Pbrt.Encoder.key 131 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.kernel_wakelocks_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_kernel_wakelocks_config x encoder; + Pbrt.Encoder.key 132 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.gpu_renderstages_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_gpu_render_stages_config x encoder; + Pbrt.Encoder.key 133 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chromium_histogram_samples with + | Some x -> + Pbrt.Encoder.nested encode_pb_chromium_histogram_samples_config x encoder; + Pbrt.Encoder.key 134 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.app_wakelocks_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_app_wakelocks_config x encoder; + Pbrt.Encoder.key 135 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.cpu_per_uid_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_cpu_per_uid_config x encoder; + Pbrt.Encoder.key 137 Pbrt.Bytes encoder; + | None -> (); + end; + if data_source_config_has_legacy_config v then ( + Pbrt.Encoder.string v.legacy_config encoder; + Pbrt.Encoder.key 1000 Pbrt.Bytes encoder; + ); + begin match v.for_testing with + | Some x -> + Pbrt.Encoder.nested encode_pb_test_config x encoder; + Pbrt.Encoder.key 1001 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_trace_config_buffer_config_fill_policy (v:trace_config_buffer_config_fill_policy) encoder = + match v with + | Unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Ring_buffer -> Pbrt.Encoder.int_as_varint 1 encoder + | Discard -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_trace_config_buffer_config (v:trace_config_buffer_config) encoder = + if trace_config_buffer_config_has_size_kb v then ( + Pbrt.Encoder.int32_as_varint v.size_kb encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_config_buffer_config_has_fill_policy v then ( + encode_pb_trace_config_buffer_config_fill_policy v.fill_policy encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if trace_config_buffer_config_has_transfer_on_clone v then ( + Pbrt.Encoder.bool v.transfer_on_clone encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if trace_config_buffer_config_has_clear_before_clone v then ( + Pbrt.Encoder.bool v.clear_before_clone encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_data_source (v:trace_config_data_source) encoder = + begin match v.config with + | Some x -> + Pbrt.Encoder.nested encode_pb_data_source_config x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.producer_name_filter encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.producer_name_regex_filter encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.machine_name_filter encoder; + () + +let rec encode_pb_trace_config_builtin_data_source (v:trace_config_builtin_data_source) encoder = + if trace_config_builtin_data_source_has_disable_clock_snapshotting v then ( + Pbrt.Encoder.bool v.disable_clock_snapshotting encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_config_builtin_data_source_has_disable_trace_config v then ( + Pbrt.Encoder.bool v.disable_trace_config encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if trace_config_builtin_data_source_has_disable_system_info v then ( + Pbrt.Encoder.bool v.disable_system_info encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_config_builtin_data_source_has_disable_service_events v then ( + Pbrt.Encoder.bool v.disable_service_events encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if trace_config_builtin_data_source_has_primary_trace_clock v then ( + encode_pb_builtin_clock v.primary_trace_clock encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if trace_config_builtin_data_source_has_snapshot_interval_ms v then ( + Pbrt.Encoder.int32_as_varint v.snapshot_interval_ms encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if trace_config_builtin_data_source_has_prefer_suspend_clock_for_snapshot v then ( + Pbrt.Encoder.bool v.prefer_suspend_clock_for_snapshot encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if trace_config_builtin_data_source_has_disable_chunk_usage_histograms v then ( + Pbrt.Encoder.bool v.disable_chunk_usage_histograms encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_lockdown_mode_operation (v:trace_config_lockdown_mode_operation) encoder = + match v with + | Lockdown_unchanged -> Pbrt.Encoder.int_as_varint (0) encoder + | Lockdown_clear -> Pbrt.Encoder.int_as_varint 1 encoder + | Lockdown_set -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_trace_config_producer_config (v:trace_config_producer_config) encoder = + if trace_config_producer_config_has_producer_name v then ( + Pbrt.Encoder.string v.producer_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if trace_config_producer_config_has_shm_size_kb v then ( + Pbrt.Encoder.int32_as_varint v.shm_size_kb encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if trace_config_producer_config_has_page_size_kb v then ( + Pbrt.Encoder.int32_as_varint v.page_size_kb encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_statsd_metadata (v:trace_config_statsd_metadata) encoder = + if trace_config_statsd_metadata_has_triggering_alert_id v then ( + Pbrt.Encoder.int64_as_varint v.triggering_alert_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_config_statsd_metadata_has_triggering_config_uid v then ( + Pbrt.Encoder.int32_as_varint v.triggering_config_uid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if trace_config_statsd_metadata_has_triggering_config_id v then ( + Pbrt.Encoder.int64_as_varint v.triggering_config_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_config_statsd_metadata_has_triggering_subscription_id v then ( + Pbrt.Encoder.int64_as_varint v.triggering_subscription_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_guardrail_overrides (v:trace_config_guardrail_overrides) encoder = + if trace_config_guardrail_overrides_has_max_upload_per_day_bytes v then ( + Pbrt.Encoder.int64_as_varint v.max_upload_per_day_bytes encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_config_guardrail_overrides_has_max_tracing_buffer_size_kb v then ( + Pbrt.Encoder.int32_as_varint v.max_tracing_buffer_size_kb encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_trigger_config_trigger_mode (v:trace_config_trigger_config_trigger_mode) encoder = + match v with + | Unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Start_tracing -> Pbrt.Encoder.int_as_varint 1 encoder + | Stop_tracing -> Pbrt.Encoder.int_as_varint 2 encoder + | Clone_snapshot -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_trace_config_trigger_config_trigger (v:trace_config_trigger_config_trigger) encoder = + if trace_config_trigger_config_trigger_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if trace_config_trigger_config_trigger_has_producer_name_regex v then ( + Pbrt.Encoder.string v.producer_name_regex encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if trace_config_trigger_config_trigger_has_stop_delay_ms v then ( + Pbrt.Encoder.int32_as_varint v.stop_delay_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_config_trigger_config_trigger_has_max_per_24_h v then ( + Pbrt.Encoder.int32_as_varint v.max_per_24_h encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if trace_config_trigger_config_trigger_has_skip_probability v then ( + Pbrt.Encoder.float_as_bits64 v.skip_probability encoder; + Pbrt.Encoder.key 5 Pbrt.Bits64 encoder; + ); + () + +let rec encode_pb_trace_config_trigger_config (v:trace_config_trigger_config) encoder = + if trace_config_trigger_config_has_trigger_mode v then ( + encode_pb_trace_config_trigger_config_trigger_mode v.trigger_mode encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_config_trigger_config_has_use_clone_snapshot_if_available v then ( + Pbrt.Encoder.bool v.use_clone_snapshot_if_available encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_config_trigger_config_trigger x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.triggers encoder; + if trace_config_trigger_config_has_trigger_timeout_ms v then ( + Pbrt.Encoder.int32_as_varint v.trigger_timeout_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_incremental_state_config (v:trace_config_incremental_state_config) encoder = + if trace_config_incremental_state_config_has_clear_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.clear_period_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_compression_type (v:trace_config_compression_type) encoder = + match v with + | Compression_type_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Compression_type_deflate -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_trace_config_incident_report_config (v:trace_config_incident_report_config) encoder = + if trace_config_incident_report_config_has_destination_package v then ( + Pbrt.Encoder.string v.destination_package encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if trace_config_incident_report_config_has_destination_class v then ( + Pbrt.Encoder.string v.destination_class encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if trace_config_incident_report_config_has_privacy_level v then ( + Pbrt.Encoder.int32_as_varint v.privacy_level encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_config_incident_report_config_has_skip_incidentd v then ( + Pbrt.Encoder.bool v.skip_incidentd encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if trace_config_incident_report_config_has_skip_dropbox v then ( + Pbrt.Encoder.bool v.skip_dropbox encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_statsd_logging (v:trace_config_statsd_logging) encoder = + match v with + | Statsd_logging_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Statsd_logging_enabled -> Pbrt.Encoder.int_as_varint 1 encoder + | Statsd_logging_disabled -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_trace_config_trace_filter_string_filter_policy (v:trace_config_trace_filter_string_filter_policy) encoder = + match v with + | Sfp_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Sfp_match_redact_groups -> Pbrt.Encoder.int_as_varint 1 encoder + | Sfp_atrace_match_redact_groups -> Pbrt.Encoder.int_as_varint 2 encoder + | Sfp_match_break -> Pbrt.Encoder.int_as_varint 3 encoder + | Sfp_atrace_match_break -> Pbrt.Encoder.int_as_varint 4 encoder + | Sfp_atrace_repeated_search_redact_groups -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_trace_config_trace_filter_string_filter_rule (v:trace_config_trace_filter_string_filter_rule) encoder = + if trace_config_trace_filter_string_filter_rule_has_policy v then ( + encode_pb_trace_config_trace_filter_string_filter_policy v.policy encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_config_trace_filter_string_filter_rule_has_regex_pattern v then ( + Pbrt.Encoder.string v.regex_pattern encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if trace_config_trace_filter_string_filter_rule_has_atrace_payload_starts_with v then ( + Pbrt.Encoder.string v.atrace_payload_starts_with encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_trace_config_trace_filter_string_filter_chain (v:trace_config_trace_filter_string_filter_chain) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_config_trace_filter_string_filter_rule x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.rules encoder; + () + +let rec encode_pb_trace_config_trace_filter (v:trace_config_trace_filter) encoder = + if trace_config_trace_filter_has_bytecode v then ( + Pbrt.Encoder.bytes v.bytecode encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if trace_config_trace_filter_has_bytecode_v2 v then ( + Pbrt.Encoder.bytes v.bytecode_v2 encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + begin match v.string_filter_chain with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_trace_filter_string_filter_chain x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_trace_config_android_report_config (v:trace_config_android_report_config) encoder = + if trace_config_android_report_config_has_reporter_service_package v then ( + Pbrt.Encoder.string v.reporter_service_package encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if trace_config_android_report_config_has_reporter_service_class v then ( + Pbrt.Encoder.string v.reporter_service_class encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if trace_config_android_report_config_has_skip_report v then ( + Pbrt.Encoder.bool v.skip_report encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_config_android_report_config_has_use_pipe_in_framework_for_testing v then ( + Pbrt.Encoder.bool v.use_pipe_in_framework_for_testing encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_cmd_trace_start_delay (v:trace_config_cmd_trace_start_delay) encoder = + if trace_config_cmd_trace_start_delay_has_min_delay_ms v then ( + Pbrt.Encoder.int32_as_varint v.min_delay_ms encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_config_cmd_trace_start_delay_has_max_delay_ms v then ( + Pbrt.Encoder.int32_as_varint v.max_delay_ms encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config_session_semaphore (v:trace_config_session_semaphore) encoder = + if trace_config_session_semaphore_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if trace_config_session_semaphore_has_max_other_session_count v then ( + Pbrt.Encoder.int64_as_varint v.max_other_session_count encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_config (v:trace_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_config_buffer_config x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.buffers encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_config_data_source x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.data_sources encoder; + begin match v.builtin_data_sources with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_builtin_data_source x encoder; + Pbrt.Encoder.key 20 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_config_has_duration_ms v then ( + Pbrt.Encoder.int32_as_varint v.duration_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_config_has_prefer_suspend_clock_for_duration v then ( + Pbrt.Encoder.bool v.prefer_suspend_clock_for_duration encoder; + Pbrt.Encoder.key 36 Pbrt.Varint encoder; + ); + if trace_config_has_enable_extra_guardrails v then ( + Pbrt.Encoder.bool v.enable_extra_guardrails encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if trace_config_has_lockdown_mode v then ( + encode_pb_trace_config_lockdown_mode_operation v.lockdown_mode encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_config_producer_config x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ) v.producers encoder; + begin match v.statsd_metadata with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_statsd_metadata x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_config_has_write_into_file v then ( + Pbrt.Encoder.bool v.write_into_file encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if trace_config_has_output_path v then ( + Pbrt.Encoder.string v.output_path encoder; + Pbrt.Encoder.key 29 Pbrt.Bytes encoder; + ); + if trace_config_has_file_write_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.file_write_period_ms encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if trace_config_has_max_file_size_bytes v then ( + Pbrt.Encoder.int64_as_varint v.max_file_size_bytes encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + begin match v.guardrail_overrides with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_guardrail_overrides x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_config_has_deferred_start v then ( + Pbrt.Encoder.bool v.deferred_start encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if trace_config_has_flush_period_ms v then ( + Pbrt.Encoder.int32_as_varint v.flush_period_ms encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if trace_config_has_flush_timeout_ms v then ( + Pbrt.Encoder.int32_as_varint v.flush_timeout_ms encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if trace_config_has_data_source_stop_timeout_ms v then ( + Pbrt.Encoder.int32_as_varint v.data_source_stop_timeout_ms encoder; + Pbrt.Encoder.key 23 Pbrt.Varint encoder; + ); + if trace_config_has_notify_traceur v then ( + Pbrt.Encoder.bool v.notify_traceur encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if trace_config_has_bugreport_score v then ( + Pbrt.Encoder.int32_as_varint v.bugreport_score encoder; + Pbrt.Encoder.key 30 Pbrt.Varint encoder; + ); + if trace_config_has_bugreport_filename v then ( + Pbrt.Encoder.string v.bugreport_filename encoder; + Pbrt.Encoder.key 38 Pbrt.Bytes encoder; + ); + begin match v.trigger_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_trigger_config x encoder; + Pbrt.Encoder.key 17 Pbrt.Bytes encoder; + | None -> (); + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 18 Pbrt.Bytes encoder; + ) v.activate_triggers encoder; + begin match v.incremental_state_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_incremental_state_config x encoder; + Pbrt.Encoder.key 21 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_config_has_allow_user_build_tracing v then ( + Pbrt.Encoder.bool v.allow_user_build_tracing encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + if trace_config_has_unique_session_name v then ( + Pbrt.Encoder.string v.unique_session_name encoder; + Pbrt.Encoder.key 22 Pbrt.Bytes encoder; + ); + if trace_config_has_compression_type v then ( + encode_pb_trace_config_compression_type v.compression_type encoder; + Pbrt.Encoder.key 24 Pbrt.Varint encoder; + ); + begin match v.incident_report_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_incident_report_config x encoder; + Pbrt.Encoder.key 25 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_config_has_statsd_logging v then ( + encode_pb_trace_config_statsd_logging v.statsd_logging encoder; + Pbrt.Encoder.key 31 Pbrt.Varint encoder; + ); + if trace_config_has_trace_uuid_msb v then ( + Pbrt.Encoder.int64_as_varint v.trace_uuid_msb encoder; + Pbrt.Encoder.key 27 Pbrt.Varint encoder; + ); + if trace_config_has_trace_uuid_lsb v then ( + Pbrt.Encoder.int64_as_varint v.trace_uuid_lsb encoder; + Pbrt.Encoder.key 28 Pbrt.Varint encoder; + ); + begin match v.trace_filter with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_trace_filter x encoder; + Pbrt.Encoder.key 33 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.android_report_config with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_android_report_config x encoder; + Pbrt.Encoder.key 34 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.cmd_trace_start_delay with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_config_cmd_trace_start_delay x encoder; + Pbrt.Encoder.key 35 Pbrt.Bytes encoder; + | None -> (); + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_config_session_semaphore x encoder; + Pbrt.Encoder.key 39 Pbrt.Bytes encoder; + ) v.session_semaphores encoder; + begin match v.priority_boost with + | Some x -> + Pbrt.Encoder.nested encode_pb_priority_boost_config x encoder; + Pbrt.Encoder.key 40 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_config_has_exclusive_prio v then ( + Pbrt.Encoder.int32_as_varint v.exclusive_prio encoder; + Pbrt.Encoder.key 41 Pbrt.Varint encoder; + ); + if trace_config_has_no_flush_before_write_into_file v then ( + Pbrt.Encoder.bool v.no_flush_before_write_into_file encoder; + Pbrt.Encoder.key 42 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_utsname (v:utsname) encoder = + if utsname_has_sysname v then ( + Pbrt.Encoder.string v.sysname encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if utsname_has_version v then ( + Pbrt.Encoder.string v.version encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if utsname_has_release v then ( + Pbrt.Encoder.string v.release encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if utsname_has_machine v then ( + Pbrt.Encoder.string v.machine encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_system_info (v:system_info) encoder = + begin match v.utsname with + | Some x -> + Pbrt.Encoder.nested encode_pb_utsname x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + if system_info_has_android_build_fingerprint v then ( + Pbrt.Encoder.string v.android_build_fingerprint encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if system_info_has_android_device_manufacturer v then ( + Pbrt.Encoder.string v.android_device_manufacturer encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ); + if system_info_has_android_soc_model v then ( + Pbrt.Encoder.string v.android_soc_model encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + ); + if system_info_has_android_guest_soc_model v then ( + Pbrt.Encoder.string v.android_guest_soc_model encoder; + Pbrt.Encoder.key 13 Pbrt.Bytes encoder; + ); + if system_info_has_android_hardware_revision v then ( + Pbrt.Encoder.string v.android_hardware_revision encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + ); + if system_info_has_android_storage_model v then ( + Pbrt.Encoder.string v.android_storage_model encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + ); + if system_info_has_android_ram_model v then ( + Pbrt.Encoder.string v.android_ram_model encoder; + Pbrt.Encoder.key 12 Pbrt.Bytes encoder; + ); + if system_info_has_android_serial_console v then ( + Pbrt.Encoder.string v.android_serial_console encoder; + Pbrt.Encoder.key 15 Pbrt.Bytes encoder; + ); + if system_info_has_tracing_service_version v then ( + Pbrt.Encoder.string v.tracing_service_version encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + if system_info_has_android_sdk_version v then ( + Pbrt.Encoder.int64_as_varint v.android_sdk_version encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if system_info_has_page_size v then ( + Pbrt.Encoder.int32_as_varint v.page_size encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if system_info_has_num_cpus v then ( + Pbrt.Encoder.int32_as_varint v.num_cpus encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if system_info_has_timezone_off_mins v then ( + Pbrt.Encoder.int32_as_varint v.timezone_off_mins encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if system_info_has_hz v then ( + Pbrt.Encoder.int64_as_varint v.hz encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_stats_buffer_stats (v:trace_stats_buffer_stats) encoder = + if trace_stats_buffer_stats_has_buffer_size v then ( + Pbrt.Encoder.int64_as_varint v.buffer_size encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_bytes_written v then ( + Pbrt.Encoder.int64_as_varint v.bytes_written encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_bytes_overwritten v then ( + Pbrt.Encoder.int64_as_varint v.bytes_overwritten encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_bytes_read v then ( + Pbrt.Encoder.int64_as_varint v.bytes_read encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_padding_bytes_written v then ( + Pbrt.Encoder.int64_as_varint v.padding_bytes_written encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_padding_bytes_cleared v then ( + Pbrt.Encoder.int64_as_varint v.padding_bytes_cleared encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_chunks_written v then ( + Pbrt.Encoder.int64_as_varint v.chunks_written encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_chunks_rewritten v then ( + Pbrt.Encoder.int64_as_varint v.chunks_rewritten encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_chunks_overwritten v then ( + Pbrt.Encoder.int64_as_varint v.chunks_overwritten encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_chunks_discarded v then ( + Pbrt.Encoder.int64_as_varint v.chunks_discarded encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_chunks_read v then ( + Pbrt.Encoder.int64_as_varint v.chunks_read encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_chunks_committed_out_of_order v then ( + Pbrt.Encoder.int64_as_varint v.chunks_committed_out_of_order encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_write_wrap_count v then ( + Pbrt.Encoder.int64_as_varint v.write_wrap_count encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_patches_succeeded v then ( + Pbrt.Encoder.int64_as_varint v.patches_succeeded encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_patches_failed v then ( + Pbrt.Encoder.int64_as_varint v.patches_failed encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_readaheads_succeeded v then ( + Pbrt.Encoder.int64_as_varint v.readaheads_succeeded encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_readaheads_failed v then ( + Pbrt.Encoder.int64_as_varint v.readaheads_failed encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_abi_violations v then ( + Pbrt.Encoder.int64_as_varint v.abi_violations encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if trace_stats_buffer_stats_has_trace_writer_packet_loss v then ( + Pbrt.Encoder.int64_as_varint v.trace_writer_packet_loss encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace_stats_writer_stats (v:trace_stats_writer_stats) encoder = + if trace_stats_writer_stats_has_sequence_id v then ( + Pbrt.Encoder.int64_as_varint v.sequence_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_stats_writer_stats_has_buffer v then ( + Pbrt.Encoder.int32_as_varint v.buffer encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.chunk_payload_histogram_counts encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.chunk_payload_histogram_sum encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + () + +let rec encode_pb_trace_stats_filter_stats (v:trace_stats_filter_stats) encoder = + if trace_stats_filter_stats_has_input_packets v then ( + Pbrt.Encoder.int64_as_varint v.input_packets encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_stats_filter_stats_has_input_bytes v then ( + Pbrt.Encoder.int64_as_varint v.input_bytes encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if trace_stats_filter_stats_has_output_bytes v then ( + Pbrt.Encoder.int64_as_varint v.output_bytes encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_stats_filter_stats_has_errors v then ( + Pbrt.Encoder.int64_as_varint v.errors encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if trace_stats_filter_stats_has_time_taken_ns v then ( + Pbrt.Encoder.int64_as_varint v.time_taken_ns encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 20 Pbrt.Varint encoder; + ) v.bytes_discarded_per_buffer encoder; + () + +let rec encode_pb_trace_stats_final_flush_outcome (v:trace_stats_final_flush_outcome) encoder = + match v with + | Final_flush_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Final_flush_succeeded -> Pbrt.Encoder.int_as_varint 1 encoder + | Final_flush_failed -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_trace_stats (v:trace_stats) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_stats_buffer_stats x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.buffer_stats encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ) v.chunk_payload_histogram_def encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_stats_writer_stats x encoder; + Pbrt.Encoder.key 18 Pbrt.Bytes encoder; + ) v.writer_stats encoder; + if trace_stats_has_producers_connected v then ( + Pbrt.Encoder.int32_as_varint v.producers_connected encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if trace_stats_has_producers_seen v then ( + Pbrt.Encoder.int64_as_varint v.producers_seen encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trace_stats_has_data_sources_registered v then ( + Pbrt.Encoder.int32_as_varint v.data_sources_registered encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if trace_stats_has_data_sources_seen v then ( + Pbrt.Encoder.int64_as_varint v.data_sources_seen encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if trace_stats_has_tracing_sessions v then ( + Pbrt.Encoder.int32_as_varint v.tracing_sessions encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if trace_stats_has_total_buffers v then ( + Pbrt.Encoder.int32_as_varint v.total_buffers encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if trace_stats_has_chunks_discarded v then ( + Pbrt.Encoder.int64_as_varint v.chunks_discarded encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if trace_stats_has_patches_discarded v then ( + Pbrt.Encoder.int64_as_varint v.patches_discarded encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if trace_stats_has_invalid_packets v then ( + Pbrt.Encoder.int64_as_varint v.invalid_packets encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + begin match v.filter_stats with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_stats_filter_stats x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_stats_has_flushes_requested v then ( + Pbrt.Encoder.int64_as_varint v.flushes_requested encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if trace_stats_has_flushes_succeeded v then ( + Pbrt.Encoder.int64_as_varint v.flushes_succeeded encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if trace_stats_has_flushes_failed v then ( + Pbrt.Encoder.int64_as_varint v.flushes_failed encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if trace_stats_has_final_flush_outcome v then ( + encode_pb_trace_stats_final_flush_outcome v.final_flush_outcome encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_game_intervention_list_game_mode_info (v:android_game_intervention_list_game_mode_info) encoder = + if android_game_intervention_list_game_mode_info_has_mode v then ( + Pbrt.Encoder.int32_as_varint v.mode encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_game_intervention_list_game_mode_info_has_use_angle v then ( + Pbrt.Encoder.bool v.use_angle encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_game_intervention_list_game_mode_info_has_resolution_downscale v then ( + Pbrt.Encoder.float_as_bits32 v.resolution_downscale encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if android_game_intervention_list_game_mode_info_has_fps v then ( + Pbrt.Encoder.float_as_bits32 v.fps encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_android_game_intervention_list_game_package_info (v:android_game_intervention_list_game_package_info) encoder = + if android_game_intervention_list_game_package_info_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if android_game_intervention_list_game_package_info_has_uid v then ( + Pbrt.Encoder.int64_as_varint v.uid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_game_intervention_list_game_package_info_has_current_mode v then ( + Pbrt.Encoder.int32_as_varint v.current_mode encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_game_intervention_list_game_mode_info x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.game_mode_info encoder; + () + +let rec encode_pb_android_game_intervention_list (v:android_game_intervention_list) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_game_intervention_list_game_package_info x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.game_packages encoder; + if android_game_intervention_list_has_parse_error v then ( + Pbrt.Encoder.bool v.parse_error encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_game_intervention_list_has_read_error v then ( + Pbrt.Encoder.bool v.read_error encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_log_packet_log_event_arg_value (v:android_log_packet_log_event_arg_value) encoder = + begin match v with + | Int_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Float_value x -> + Pbrt.Encoder.float_as_bits32 x encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + | String_value x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + end + +and encode_pb_android_log_packet_log_event_arg (v:android_log_packet_log_event_arg) encoder = + if android_log_packet_log_event_arg_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + begin match v.value with + | None -> () + | Some (Int_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Some (Float_value x) -> + Pbrt.Encoder.float_as_bits32 x encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + | Some (String_value x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + end; + () + +let rec encode_pb_android_log_packet_log_event (v:android_log_packet_log_event) encoder = + if android_log_packet_log_event_has_log_id v then ( + encode_pb_android_log_id v.log_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_log_packet_log_event_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_log_packet_log_event_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if android_log_packet_log_event_has_uid v then ( + Pbrt.Encoder.int32_as_varint v.uid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if android_log_packet_log_event_has_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.timestamp encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if android_log_packet_log_event_has_tag v then ( + Pbrt.Encoder.string v.tag encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ); + if android_log_packet_log_event_has_prio v then ( + encode_pb_android_log_priority v.prio encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if android_log_packet_log_event_has_message v then ( + Pbrt.Encoder.string v.message encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_log_packet_log_event_arg x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + ) v.args encoder; + () + +let rec encode_pb_android_log_packet_stats (v:android_log_packet_stats) encoder = + if android_log_packet_stats_has_num_total v then ( + Pbrt.Encoder.int64_as_varint v.num_total encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_log_packet_stats_has_num_failed v then ( + Pbrt.Encoder.int64_as_varint v.num_failed encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_log_packet_stats_has_num_skipped v then ( + Pbrt.Encoder.int64_as_varint v.num_skipped encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_log_packet (v:android_log_packet) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_log_packet_log_event x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.events encoder; + begin match v.stats with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_log_packet_stats x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_android_system_property_property_value (v:android_system_property_property_value) encoder = + if android_system_property_property_value_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if android_system_property_property_value_has_value v then ( + Pbrt.Encoder.string v.value encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_android_system_property (v:android_system_property) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_system_property_property_value x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.values encoder; + () + +let rec encode_pb_app_wakelock_info (v:app_wakelock_info) encoder = + if app_wakelock_info_has_iid v then ( + Pbrt.Encoder.int32_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if app_wakelock_info_has_tag v then ( + Pbrt.Encoder.string v.tag encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if app_wakelock_info_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if app_wakelock_info_has_owner_pid v then ( + Pbrt.Encoder.int32_as_varint v.owner_pid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if app_wakelock_info_has_owner_uid v then ( + Pbrt.Encoder.int32_as_varint v.owner_uid encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if app_wakelock_info_has_work_uid v then ( + Pbrt.Encoder.int32_as_varint v.work_uid encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_app_wakelock_bundle (v:app_wakelock_bundle) encoder = + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + ) lst encoder; + ) v.intern_id encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.encoded_ts encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + begin match v.info with + | Some x -> + Pbrt.Encoder.nested encode_pb_app_wakelock_info x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + if app_wakelock_bundle_has_acquired v then ( + Pbrt.Encoder.bool v.acquired encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_bluetooth_trace_packet_type (v:bluetooth_trace_packet_type) encoder = + match v with + | Hci_cmd -> Pbrt.Encoder.int_as_varint 1 encoder + | Hci_evt -> Pbrt.Encoder.int_as_varint 2 encoder + | Hci_acl_rx -> Pbrt.Encoder.int_as_varint 3 encoder + | Hci_acl_tx -> Pbrt.Encoder.int_as_varint 4 encoder + | Hci_sco_rx -> Pbrt.Encoder.int_as_varint 5 encoder + | Hci_sco_tx -> Pbrt.Encoder.int_as_varint 6 encoder + | Hci_iso_rx -> Pbrt.Encoder.int_as_varint 7 encoder + | Hci_iso_tx -> Pbrt.Encoder.int_as_varint 8 encoder + +let rec encode_pb_bluetooth_trace_event (v:bluetooth_trace_event) encoder = + if bluetooth_trace_event_has_packet_type v then ( + encode_pb_bluetooth_trace_packet_type v.packet_type encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if bluetooth_trace_event_has_count v then ( + Pbrt.Encoder.int32_as_varint v.count encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if bluetooth_trace_event_has_length v then ( + Pbrt.Encoder.int32_as_varint v.length encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if bluetooth_trace_event_has_duration v then ( + Pbrt.Encoder.int32_as_varint v.duration encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if bluetooth_trace_event_has_op_code v then ( + Pbrt.Encoder.int32_as_varint v.op_code encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if bluetooth_trace_event_has_event_code v then ( + Pbrt.Encoder.int32_as_varint v.event_code encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if bluetooth_trace_event_has_subevent_code v then ( + Pbrt.Encoder.int32_as_varint v.subevent_code encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if bluetooth_trace_event_has_connection_handle v then ( + Pbrt.Encoder.int32_as_varint v.connection_handle encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_camera_frame_event_capture_result_status (v:android_camera_frame_event_capture_result_status) encoder = + match v with + | Status_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Status_ok -> Pbrt.Encoder.int_as_varint 1 encoder + | Status_early_metadata_error -> Pbrt.Encoder.int_as_varint 2 encoder + | Status_final_metadata_error -> Pbrt.Encoder.int_as_varint 3 encoder + | Status_buffer_error -> Pbrt.Encoder.int_as_varint 4 encoder + | Status_flush_error -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_android_camera_frame_event_camera_node_processing_details (v:android_camera_frame_event_camera_node_processing_details) encoder = + if android_camera_frame_event_camera_node_processing_details_has_node_id v then ( + Pbrt.Encoder.int64_as_varint v.node_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_camera_frame_event_camera_node_processing_details_has_start_processing_ns v then ( + Pbrt.Encoder.int64_as_varint v.start_processing_ns encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_camera_frame_event_camera_node_processing_details_has_end_processing_ns v then ( + Pbrt.Encoder.int64_as_varint v.end_processing_ns encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if android_camera_frame_event_camera_node_processing_details_has_scheduling_latency_ns v then ( + Pbrt.Encoder.int64_as_varint v.scheduling_latency_ns encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_camera_frame_event (v:android_camera_frame_event) encoder = + if android_camera_frame_event_has_session_id v then ( + Pbrt.Encoder.int64_as_varint v.session_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_camera_id v then ( + Pbrt.Encoder.int32_as_varint v.camera_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_frame_number v then ( + Pbrt.Encoder.int64_as_varint v.frame_number encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_request_id v then ( + Pbrt.Encoder.int64_as_varint v.request_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_request_received_ns v then ( + Pbrt.Encoder.int64_as_varint v.request_received_ns encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_request_processing_started_ns v then ( + Pbrt.Encoder.int64_as_varint v.request_processing_started_ns encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_start_of_exposure_ns v then ( + Pbrt.Encoder.int64_as_varint v.start_of_exposure_ns encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_start_of_frame_ns v then ( + Pbrt.Encoder.int64_as_varint v.start_of_frame_ns encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_responses_all_sent_ns v then ( + Pbrt.Encoder.int64_as_varint v.responses_all_sent_ns encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_capture_result_status v then ( + encode_pb_android_camera_frame_event_capture_result_status v.capture_result_status encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_skipped_sensor_frames v then ( + Pbrt.Encoder.int32_as_varint v.skipped_sensor_frames encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_capture_intent v then ( + Pbrt.Encoder.int32_as_varint v.capture_intent encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_num_streams v then ( + Pbrt.Encoder.int32_as_varint v.num_streams encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_camera_frame_event_camera_node_processing_details x encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ) v.node_processing_details encoder; + if android_camera_frame_event_has_vendor_data_version v then ( + Pbrt.Encoder.int32_as_varint v.vendor_data_version encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if android_camera_frame_event_has_vendor_data v then ( + Pbrt.Encoder.bytes v.vendor_data encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_android_camera_session_stats_camera_graph_camera_node (v:android_camera_session_stats_camera_graph_camera_node) encoder = + if android_camera_session_stats_camera_graph_camera_node_has_node_id v then ( + Pbrt.Encoder.int64_as_varint v.node_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.input_ids encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ) v.output_ids encoder; + if android_camera_session_stats_camera_graph_camera_node_has_vendor_data_version v then ( + Pbrt.Encoder.int32_as_varint v.vendor_data_version encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if android_camera_session_stats_camera_graph_camera_node_has_vendor_data v then ( + Pbrt.Encoder.bytes v.vendor_data encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_android_camera_session_stats_camera_graph_camera_edge (v:android_camera_session_stats_camera_graph_camera_edge) encoder = + if android_camera_session_stats_camera_graph_camera_edge_has_output_node_id v then ( + Pbrt.Encoder.int64_as_varint v.output_node_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_camera_session_stats_camera_graph_camera_edge_has_output_id v then ( + Pbrt.Encoder.int64_as_varint v.output_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_camera_session_stats_camera_graph_camera_edge_has_input_node_id v then ( + Pbrt.Encoder.int64_as_varint v.input_node_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if android_camera_session_stats_camera_graph_camera_edge_has_input_id v then ( + Pbrt.Encoder.int64_as_varint v.input_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if android_camera_session_stats_camera_graph_camera_edge_has_vendor_data_version v then ( + Pbrt.Encoder.int32_as_varint v.vendor_data_version encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if android_camera_session_stats_camera_graph_camera_edge_has_vendor_data v then ( + Pbrt.Encoder.bytes v.vendor_data encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_android_camera_session_stats_camera_graph (v:android_camera_session_stats_camera_graph) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_camera_session_stats_camera_graph_camera_node x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.nodes encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_camera_session_stats_camera_graph_camera_edge x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.edges encoder; + () + +let rec encode_pb_android_camera_session_stats (v:android_camera_session_stats) encoder = + if android_camera_session_stats_has_session_id v then ( + Pbrt.Encoder.int64_as_varint v.session_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.graph with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_camera_session_stats_camera_graph x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_cpu_per_uid_data (v:cpu_per_uid_data) encoder = + if cpu_per_uid_data_has_cluster_count v then ( + Pbrt.Encoder.int32_as_varint v.cluster_count encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + ) lst encoder; + ) v.uid encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.total_time_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + () + +let rec encode_pb_frame_timeline_event_jank_type (v:frame_timeline_event_jank_type) encoder = + match v with + | Jank_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Jank_none -> Pbrt.Encoder.int_as_varint 1 encoder + | Jank_sf_scheduling -> Pbrt.Encoder.int_as_varint 2 encoder + | Jank_prediction_error -> Pbrt.Encoder.int_as_varint 4 encoder + | Jank_display_hal -> Pbrt.Encoder.int_as_varint 8 encoder + | Jank_sf_cpu_deadline_missed -> Pbrt.Encoder.int_as_varint 16 encoder + | Jank_sf_gpu_deadline_missed -> Pbrt.Encoder.int_as_varint 32 encoder + | Jank_app_deadline_missed -> Pbrt.Encoder.int_as_varint 64 encoder + | Jank_buffer_stuffing -> Pbrt.Encoder.int_as_varint 128 encoder + | Jank_unknown -> Pbrt.Encoder.int_as_varint 256 encoder + | Jank_sf_stuffing -> Pbrt.Encoder.int_as_varint 512 encoder + | Jank_dropped -> Pbrt.Encoder.int_as_varint 1024 encoder + | Jank_non_animating -> Pbrt.Encoder.int_as_varint 2048 encoder + | Jank_app_resynced_jitter -> Pbrt.Encoder.int_as_varint 4096 encoder + | Jank_display_not_on -> Pbrt.Encoder.int_as_varint 8192 encoder + +let rec encode_pb_frame_timeline_event_jank_severity_type (v:frame_timeline_event_jank_severity_type) encoder = + match v with + | Severity_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Severity_none -> Pbrt.Encoder.int_as_varint 1 encoder + | Severity_partial -> Pbrt.Encoder.int_as_varint 2 encoder + | Severity_full -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_frame_timeline_event_present_type (v:frame_timeline_event_present_type) encoder = + match v with + | Present_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Present_on_time -> Pbrt.Encoder.int_as_varint 1 encoder + | Present_late -> Pbrt.Encoder.int_as_varint 2 encoder + | Present_early -> Pbrt.Encoder.int_as_varint 3 encoder + | Present_dropped -> Pbrt.Encoder.int_as_varint 4 encoder + | Present_unknown -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_frame_timeline_event_prediction_type (v:frame_timeline_event_prediction_type) encoder = + match v with + | Prediction_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Prediction_valid -> Pbrt.Encoder.int_as_varint 1 encoder + | Prediction_expired -> Pbrt.Encoder.int_as_varint 2 encoder + | Prediction_unknown -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_frame_timeline_event_expected_surface_frame_start (v:frame_timeline_event_expected_surface_frame_start) encoder = + if frame_timeline_event_expected_surface_frame_start_has_cookie v then ( + Pbrt.Encoder.int64_as_varint v.cookie encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if frame_timeline_event_expected_surface_frame_start_has_token v then ( + Pbrt.Encoder.int64_as_varint v.token encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if frame_timeline_event_expected_surface_frame_start_has_display_frame_token v then ( + Pbrt.Encoder.int64_as_varint v.display_frame_token encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if frame_timeline_event_expected_surface_frame_start_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if frame_timeline_event_expected_surface_frame_start_has_layer_name v then ( + Pbrt.Encoder.string v.layer_name encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_frame_timeline_event_actual_surface_frame_start (v:frame_timeline_event_actual_surface_frame_start) encoder = + if frame_timeline_event_actual_surface_frame_start_has_cookie v then ( + Pbrt.Encoder.int64_as_varint v.cookie encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_token v then ( + Pbrt.Encoder.int64_as_varint v.token encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_display_frame_token v then ( + Pbrt.Encoder.int64_as_varint v.display_frame_token encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_layer_name v then ( + Pbrt.Encoder.string v.layer_name encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_present_type v then ( + encode_pb_frame_timeline_event_present_type v.present_type encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_on_time_finish v then ( + Pbrt.Encoder.bool v.on_time_finish encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_gpu_composition v then ( + Pbrt.Encoder.bool v.gpu_composition encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_jank_type v then ( + Pbrt.Encoder.int32_as_varint v.jank_type encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_prediction_type v then ( + encode_pb_frame_timeline_event_prediction_type v.prediction_type encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_is_buffer v then ( + Pbrt.Encoder.bool v.is_buffer encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_jank_severity_type v then ( + encode_pb_frame_timeline_event_jank_severity_type v.jank_severity_type encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_present_delay_millis v then ( + Pbrt.Encoder.float_as_bits32 v.present_delay_millis encoder; + Pbrt.Encoder.key 13 Pbrt.Bits32 encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_vsync_resynced_jitter_millis v then ( + Pbrt.Encoder.float_as_bits32 v.vsync_resynced_jitter_millis encoder; + Pbrt.Encoder.key 14 Pbrt.Bits32 encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_jank_severity_score v then ( + Pbrt.Encoder.float_as_bits32 v.jank_severity_score encoder; + Pbrt.Encoder.key 15 Pbrt.Bits32 encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_jank_type_experimental v then ( + Pbrt.Encoder.int32_as_varint v.jank_type_experimental encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_surface_frame_start_has_present_type_experimental v then ( + encode_pb_frame_timeline_event_present_type v.present_type_experimental encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_frame_timeline_event_expected_display_frame_start (v:frame_timeline_event_expected_display_frame_start) encoder = + if frame_timeline_event_expected_display_frame_start_has_cookie v then ( + Pbrt.Encoder.int64_as_varint v.cookie encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if frame_timeline_event_expected_display_frame_start_has_token v then ( + Pbrt.Encoder.int64_as_varint v.token encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if frame_timeline_event_expected_display_frame_start_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_frame_timeline_event_actual_display_frame_start (v:frame_timeline_event_actual_display_frame_start) encoder = + if frame_timeline_event_actual_display_frame_start_has_cookie v then ( + Pbrt.Encoder.int64_as_varint v.cookie encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_token v then ( + Pbrt.Encoder.int64_as_varint v.token encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_present_type v then ( + encode_pb_frame_timeline_event_present_type v.present_type encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_on_time_finish v then ( + Pbrt.Encoder.bool v.on_time_finish encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_gpu_composition v then ( + Pbrt.Encoder.bool v.gpu_composition encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_jank_type v then ( + Pbrt.Encoder.int32_as_varint v.jank_type encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_prediction_type v then ( + encode_pb_frame_timeline_event_prediction_type v.prediction_type encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_jank_severity_type v then ( + encode_pb_frame_timeline_event_jank_severity_type v.jank_severity_type encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_present_delay_millis v then ( + Pbrt.Encoder.float_as_bits32 v.present_delay_millis encoder; + Pbrt.Encoder.key 10 Pbrt.Bits32 encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_jank_severity_score v then ( + Pbrt.Encoder.float_as_bits32 v.jank_severity_score encoder; + Pbrt.Encoder.key 11 Pbrt.Bits32 encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_jank_type_experimental v then ( + Pbrt.Encoder.int32_as_varint v.jank_type_experimental encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if frame_timeline_event_actual_display_frame_start_has_present_type_experimental v then ( + encode_pb_frame_timeline_event_present_type v.present_type_experimental encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_frame_timeline_event_frame_end (v:frame_timeline_event_frame_end) encoder = + if frame_timeline_event_frame_end_has_cookie v then ( + Pbrt.Encoder.int64_as_varint v.cookie encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_frame_timeline_event (v:frame_timeline_event) encoder = + begin match v with + | Expected_display_frame_start x -> + Pbrt.Encoder.nested encode_pb_frame_timeline_event_expected_display_frame_start x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | Actual_display_frame_start x -> + Pbrt.Encoder.nested encode_pb_frame_timeline_event_actual_display_frame_start x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Expected_surface_frame_start x -> + Pbrt.Encoder.nested encode_pb_frame_timeline_event_expected_surface_frame_start x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | Actual_surface_frame_start x -> + Pbrt.Encoder.nested encode_pb_frame_timeline_event_actual_surface_frame_start x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | Frame_end x -> + Pbrt.Encoder.nested encode_pb_frame_timeline_event_frame_end x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + end + +let rec encode_pb_gpu_mem_total_event (v:gpu_mem_total_event) encoder = + if gpu_mem_total_event_has_gpu_id v then ( + Pbrt.Encoder.int32_as_varint v.gpu_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if gpu_mem_total_event_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if gpu_mem_total_event_has_size v then ( + Pbrt.Encoder.int64_as_varint v.size encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_graphics_frame_event_buffer_event_type (v:graphics_frame_event_buffer_event_type) encoder = + match v with + | Unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Dequeue -> Pbrt.Encoder.int_as_varint 1 encoder + | Queue -> Pbrt.Encoder.int_as_varint 2 encoder + | Post -> Pbrt.Encoder.int_as_varint 3 encoder + | Acquire_fence -> Pbrt.Encoder.int_as_varint 4 encoder + | Latch -> Pbrt.Encoder.int_as_varint 5 encoder + | Hwc_composition_queued -> Pbrt.Encoder.int_as_varint 6 encoder + | Fallback_composition -> Pbrt.Encoder.int_as_varint 7 encoder + | Present_fence -> Pbrt.Encoder.int_as_varint 8 encoder + | Release_fence -> Pbrt.Encoder.int_as_varint 9 encoder + | Modify -> Pbrt.Encoder.int_as_varint 10 encoder + | Detach -> Pbrt.Encoder.int_as_varint 11 encoder + | Attach -> Pbrt.Encoder.int_as_varint 12 encoder + | Cancel -> Pbrt.Encoder.int_as_varint 13 encoder + +let rec encode_pb_graphics_frame_event_buffer_event (v:graphics_frame_event_buffer_event) encoder = + if graphics_frame_event_buffer_event_has_frame_number v then ( + Pbrt.Encoder.int32_as_varint v.frame_number encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if graphics_frame_event_buffer_event_has_type_ v then ( + encode_pb_graphics_frame_event_buffer_event_type v.type_ encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if graphics_frame_event_buffer_event_has_layer_name v then ( + Pbrt.Encoder.string v.layer_name encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if graphics_frame_event_buffer_event_has_duration_ns v then ( + Pbrt.Encoder.int64_as_varint v.duration_ns encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if graphics_frame_event_buffer_event_has_buffer_id v then ( + Pbrt.Encoder.int32_as_varint v.buffer_id encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_graphics_frame_event (v:graphics_frame_event) encoder = + begin match v.buffer_event with + | Some x -> + Pbrt.Encoder.nested encode_pb_graphics_frame_event_buffer_event x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_initial_display_state (v:initial_display_state) encoder = + if initial_display_state_has_display_state v then ( + Pbrt.Encoder.int32_as_varint v.display_state encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if initial_display_state_has_brightness v then ( + Pbrt.Encoder.float_as_bits64 v.brightness encoder; + Pbrt.Encoder.key 2 Pbrt.Bits64 encoder; + ); + () + +let rec encode_pb_kernel_wakelock_data_wakelock_type (v:kernel_wakelock_data_wakelock_type) encoder = + match v with + | Wakelock_type_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Wakelock_type_kernel -> Pbrt.Encoder.int_as_varint 1 encoder + | Wakelock_type_native -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_kernel_wakelock_data_wakelock (v:kernel_wakelock_data_wakelock) encoder = + if kernel_wakelock_data_wakelock_has_wakelock_id v then ( + Pbrt.Encoder.int32_as_varint v.wakelock_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if kernel_wakelock_data_wakelock_has_wakelock_name v then ( + Pbrt.Encoder.string v.wakelock_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if kernel_wakelock_data_wakelock_has_wakelock_type v then ( + encode_pb_kernel_wakelock_data_wakelock_type v.wakelock_type encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_kernel_wakelock_data (v:kernel_wakelock_data) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_kernel_wakelock_data_wakelock x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.wakelock encoder; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + ) lst encoder; + ) v.wakelock_id encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.time_held_millis encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + if kernel_wakelock_data_has_error_flags v then ( + Pbrt.Encoder.int64_as_varint v.error_flags encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_traffic_direction (v:traffic_direction) encoder = + match v with + | Dir_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Dir_ingress -> Pbrt.Encoder.int_as_varint 1 encoder + | Dir_egress -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_network_packet_event (v:network_packet_event) encoder = + if network_packet_event_has_direction v then ( + encode_pb_traffic_direction v.direction encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if network_packet_event_has_network_interface v then ( + Pbrt.Encoder.string v.network_interface encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if network_packet_event_has_length v then ( + Pbrt.Encoder.int32_as_varint v.length encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if network_packet_event_has_uid v then ( + Pbrt.Encoder.int32_as_varint v.uid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if network_packet_event_has_tag v then ( + Pbrt.Encoder.int32_as_varint v.tag encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if network_packet_event_has_ip_proto v then ( + Pbrt.Encoder.int32_as_varint v.ip_proto encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if network_packet_event_has_tcp_flags v then ( + Pbrt.Encoder.int32_as_varint v.tcp_flags encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if network_packet_event_has_local_port v then ( + Pbrt.Encoder.int32_as_varint v.local_port encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if network_packet_event_has_remote_port v then ( + Pbrt.Encoder.int32_as_varint v.remote_port encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if network_packet_event_has_icmp_type v then ( + Pbrt.Encoder.int32_as_varint v.icmp_type encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if network_packet_event_has_icmp_code v then ( + Pbrt.Encoder.int32_as_varint v.icmp_code encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_network_packet_bundle_packet_context (v:network_packet_bundle_packet_context) encoder = + begin match v with + | Iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Ctx x -> + Pbrt.Encoder.nested encode_pb_network_packet_event x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + end + +and encode_pb_network_packet_bundle (v:network_packet_bundle) encoder = + begin match v.packet_context with + | None -> () + | Some (Iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Some (Ctx x) -> + Pbrt.Encoder.nested encode_pb_network_packet_event x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + end; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.packet_timestamps encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + ) lst encoder; + ) v.packet_lengths encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + if network_packet_bundle_has_total_packets v then ( + Pbrt.Encoder.int32_as_varint v.total_packets encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if network_packet_bundle_has_total_duration v then ( + Pbrt.Encoder.int64_as_varint v.total_duration encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if network_packet_bundle_has_total_length v then ( + Pbrt.Encoder.int64_as_varint v.total_length encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_network_packet_context (v:network_packet_context) encoder = + if network_packet_context_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.ctx with + | Some x -> + Pbrt.Encoder.nested encode_pb_network_packet_event x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_packages_list_package_info (v:packages_list_package_info) encoder = + if packages_list_package_info_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if packages_list_package_info_has_uid v then ( + Pbrt.Encoder.int64_as_varint v.uid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if packages_list_package_info_has_debuggable v then ( + Pbrt.Encoder.bool v.debuggable encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if packages_list_package_info_has_profileable_from_shell v then ( + Pbrt.Encoder.bool v.profileable_from_shell encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if packages_list_package_info_has_version_code v then ( + Pbrt.Encoder.int64_as_varint v.version_code encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_packages_list (v:packages_list) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_packages_list_package_info x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.packages encoder; + if packages_list_has_parse_error v then ( + Pbrt.Encoder.bool v.parse_error encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if packages_list_has_read_error v then ( + Pbrt.Encoder.bool v.read_error encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_pixel_modem_events (v:pixel_modem_events) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.events encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.event_time_nanos encoder; + () + +let rec encode_pb_pixel_modem_token_database (v:pixel_modem_token_database) encoder = + if pixel_modem_token_database_has_database v then ( + Pbrt.Encoder.bytes v.database encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_proto_log_message (v:proto_log_message) encoder = + if proto_log_message_has_message_id v then ( + Pbrt.Encoder.int64_as_bits64 v.message_id encoder; + Pbrt.Encoder.key 1 Pbrt.Bits64 encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.str_param_iids encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_zigzag x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ) v.sint64_params encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 4 Pbrt.Bits64 encoder; + ) v.double_params encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ) v.boolean_params encoder; + if proto_log_message_has_stacktrace_iid v then ( + Pbrt.Encoder.int32_as_varint v.stacktrace_iid encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_proto_log_viewer_config_message_data (v:proto_log_viewer_config_message_data) encoder = + if proto_log_viewer_config_message_data_has_message_id v then ( + Pbrt.Encoder.int64_as_bits64 v.message_id encoder; + Pbrt.Encoder.key 1 Pbrt.Bits64 encoder; + ); + if proto_log_viewer_config_message_data_has_message v then ( + Pbrt.Encoder.string v.message encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if proto_log_viewer_config_message_data_has_level v then ( + encode_pb_proto_log_level v.level encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if proto_log_viewer_config_message_data_has_group_id v then ( + Pbrt.Encoder.int32_as_varint v.group_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if proto_log_viewer_config_message_data_has_location v then ( + Pbrt.Encoder.string v.location encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_proto_log_viewer_config_group (v:proto_log_viewer_config_group) encoder = + if proto_log_viewer_config_group_has_id v then ( + Pbrt.Encoder.int32_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if proto_log_viewer_config_group_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if proto_log_viewer_config_group_has_tag v then ( + Pbrt.Encoder.string v.tag encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_proto_log_viewer_config (v:proto_log_viewer_config) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_proto_log_viewer_config_message_data x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.messages encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_proto_log_viewer_config_group x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.groups encoder; + () + +let rec encode_pb_shell_transition_target (v:shell_transition_target) encoder = + if shell_transition_target_has_mode v then ( + Pbrt.Encoder.int32_as_varint v.mode encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if shell_transition_target_has_layer_id v then ( + Pbrt.Encoder.int32_as_varint v.layer_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if shell_transition_target_has_window_id v then ( + Pbrt.Encoder.int32_as_varint v.window_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if shell_transition_target_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_shell_transition (v:shell_transition) encoder = + if shell_transition_has_id v then ( + Pbrt.Encoder.int32_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if shell_transition_has_create_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.create_time_ns encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if shell_transition_has_send_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.send_time_ns encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if shell_transition_has_dispatch_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.dispatch_time_ns encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if shell_transition_has_merge_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.merge_time_ns encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if shell_transition_has_merge_request_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.merge_request_time_ns encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if shell_transition_has_shell_abort_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.shell_abort_time_ns encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if shell_transition_has_wm_abort_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.wm_abort_time_ns encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if shell_transition_has_finish_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.finish_time_ns encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if shell_transition_has_start_transaction_id v then ( + Pbrt.Encoder.int64_as_varint v.start_transaction_id encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if shell_transition_has_finish_transaction_id v then ( + Pbrt.Encoder.int64_as_varint v.finish_transaction_id encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if shell_transition_has_handler v then ( + Pbrt.Encoder.int32_as_varint v.handler encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if shell_transition_has_type_ v then ( + Pbrt.Encoder.int32_as_varint v.type_ encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_shell_transition_target x encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ) v.targets encoder; + if shell_transition_has_merge_target v then ( + Pbrt.Encoder.int32_as_varint v.merge_target encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if shell_transition_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if shell_transition_has_starting_window_remove_time_ns v then ( + Pbrt.Encoder.int64_as_varint v.starting_window_remove_time_ns encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_shell_handler_mapping (v:shell_handler_mapping) encoder = + if shell_handler_mapping_has_id v then ( + Pbrt.Encoder.int32_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if shell_handler_mapping_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_shell_handler_mappings (v:shell_handler_mappings) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_shell_handler_mapping x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.mapping encoder; + () + +let rec encode_pb_rect_proto (v:rect_proto) encoder = + if rect_proto_has_left v then ( + Pbrt.Encoder.int32_as_varint v.left encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if rect_proto_has_top v then ( + Pbrt.Encoder.int32_as_varint v.top encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if rect_proto_has_right v then ( + Pbrt.Encoder.int32_as_varint v.right encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if rect_proto_has_bottom v then ( + Pbrt.Encoder.int32_as_varint v.bottom encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_region_proto (v:region_proto) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.rect encoder; + () + +let rec encode_pb_size_proto (v:size_proto) encoder = + if size_proto_has_w v then ( + Pbrt.Encoder.int32_as_varint v.w encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if size_proto_has_h v then ( + Pbrt.Encoder.int32_as_varint v.h encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_transform_proto (v:transform_proto) encoder = + if transform_proto_has_dsdx v then ( + Pbrt.Encoder.float_as_bits32 v.dsdx encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if transform_proto_has_dtdx v then ( + Pbrt.Encoder.float_as_bits32 v.dtdx encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if transform_proto_has_dsdy v then ( + Pbrt.Encoder.float_as_bits32 v.dsdy encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if transform_proto_has_dtdy v then ( + Pbrt.Encoder.float_as_bits32 v.dtdy encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + if transform_proto_has_type_ v then ( + Pbrt.Encoder.int32_as_varint v.type_ encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_color_proto (v:color_proto) encoder = + if color_proto_has_r v then ( + Pbrt.Encoder.float_as_bits32 v.r encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if color_proto_has_g v then ( + Pbrt.Encoder.float_as_bits32 v.g encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if color_proto_has_b v then ( + Pbrt.Encoder.float_as_bits32 v.b encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if color_proto_has_a v then ( + Pbrt.Encoder.float_as_bits32 v.a encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_input_window_info_proto (v:input_window_info_proto) encoder = + if input_window_info_proto_has_layout_params_flags v then ( + Pbrt.Encoder.int32_as_varint v.layout_params_flags encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if input_window_info_proto_has_layout_params_type v then ( + Pbrt.Encoder.int32_as_varint v.layout_params_type encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + begin match v.frame with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.touchable_region with + | Some x -> + Pbrt.Encoder.nested encode_pb_region_proto x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | None -> (); + end; + if input_window_info_proto_has_surface_inset v then ( + Pbrt.Encoder.int32_as_varint v.surface_inset encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if input_window_info_proto_has_visible v then ( + Pbrt.Encoder.bool v.visible encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if input_window_info_proto_has_can_receive_keys v then ( + Pbrt.Encoder.bool v.can_receive_keys encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if input_window_info_proto_has_focusable v then ( + Pbrt.Encoder.bool v.focusable encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if input_window_info_proto_has_has_wallpaper v then ( + Pbrt.Encoder.bool v.has_wallpaper encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if input_window_info_proto_has_global_scale_factor v then ( + Pbrt.Encoder.float_as_bits32 v.global_scale_factor encoder; + Pbrt.Encoder.key 10 Pbrt.Bits32 encoder; + ); + if input_window_info_proto_has_window_x_scale v then ( + Pbrt.Encoder.float_as_bits32 v.window_x_scale encoder; + Pbrt.Encoder.key 11 Pbrt.Bits32 encoder; + ); + if input_window_info_proto_has_window_y_scale v then ( + Pbrt.Encoder.float_as_bits32 v.window_y_scale encoder; + Pbrt.Encoder.key 12 Pbrt.Bits32 encoder; + ); + if input_window_info_proto_has_crop_layer_id v then ( + Pbrt.Encoder.int32_as_varint v.crop_layer_id encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if input_window_info_proto_has_replace_touchable_region_with_crop v then ( + Pbrt.Encoder.bool v.replace_touchable_region_with_crop encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + begin match v.touchable_region_crop with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 15 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform_proto x encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + | None -> (); + end; + if input_window_info_proto_has_input_config v then ( + Pbrt.Encoder.int32_as_varint v.input_config encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_blur_region (v:blur_region) encoder = + if blur_region_has_blur_radius v then ( + Pbrt.Encoder.int32_as_varint v.blur_radius encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if blur_region_has_corner_radius_tl v then ( + Pbrt.Encoder.int32_as_varint v.corner_radius_tl encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if blur_region_has_corner_radius_tr v then ( + Pbrt.Encoder.int32_as_varint v.corner_radius_tr encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if blur_region_has_corner_radius_bl v then ( + Pbrt.Encoder.int32_as_varint v.corner_radius_bl encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if blur_region_has_corner_radius_br v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_br encoder; + Pbrt.Encoder.key 5 Pbrt.Bits32 encoder; + ); + if blur_region_has_corner_radius_tlx v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_tlx encoder; + Pbrt.Encoder.key 11 Pbrt.Bits32 encoder; + ); + if blur_region_has_corner_radius_tly v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_tly encoder; + Pbrt.Encoder.key 12 Pbrt.Bits32 encoder; + ); + if blur_region_has_corner_radius_trx v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_trx encoder; + Pbrt.Encoder.key 13 Pbrt.Bits32 encoder; + ); + if blur_region_has_corner_radius_try v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_try encoder; + Pbrt.Encoder.key 14 Pbrt.Bits32 encoder; + ); + if blur_region_has_corner_radius_blx v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_blx encoder; + Pbrt.Encoder.key 15 Pbrt.Bits32 encoder; + ); + if blur_region_has_corner_radius_bly v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_bly encoder; + Pbrt.Encoder.key 16 Pbrt.Bits32 encoder; + ); + if blur_region_has_corner_radius_brx v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_brx encoder; + Pbrt.Encoder.key 17 Pbrt.Bits32 encoder; + ); + if blur_region_has_corner_radius_bry v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius_bry encoder; + Pbrt.Encoder.key 18 Pbrt.Bits32 encoder; + ); + if blur_region_has_alpha v then ( + Pbrt.Encoder.float_as_bits32 v.alpha encoder; + Pbrt.Encoder.key 6 Pbrt.Bits32 encoder; + ); + if blur_region_has_left v then ( + Pbrt.Encoder.int32_as_varint v.left encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if blur_region_has_top v then ( + Pbrt.Encoder.int32_as_varint v.top encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if blur_region_has_right v then ( + Pbrt.Encoder.int32_as_varint v.right encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if blur_region_has_bottom v then ( + Pbrt.Encoder.int32_as_varint v.bottom encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_color_transform_proto (v:color_transform_proto) encoder = + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.float_as_bits32 x encoder; + ) lst encoder; + ) v.val_ encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + () + +let rec encode_pb_trusted_overlay (v:trusted_overlay) encoder = + match v with + | Unset -> Pbrt.Encoder.int_as_varint (0) encoder + | Disabled -> Pbrt.Encoder.int_as_varint 1 encoder + | Enabled -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_box_shadow_settings_box_shadow_params (v:box_shadow_settings_box_shadow_params) encoder = + if box_shadow_settings_box_shadow_params_has_blur_radius v then ( + Pbrt.Encoder.float_as_bits32 v.blur_radius encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if box_shadow_settings_box_shadow_params_has_spread_radius v then ( + Pbrt.Encoder.float_as_bits32 v.spread_radius encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if box_shadow_settings_box_shadow_params_has_color v then ( + Pbrt.Encoder.int32_as_varint v.color encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if box_shadow_settings_box_shadow_params_has_offset_x v then ( + Pbrt.Encoder.float_as_bits32 v.offset_x encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + if box_shadow_settings_box_shadow_params_has_offset_y v then ( + Pbrt.Encoder.float_as_bits32 v.offset_y encoder; + Pbrt.Encoder.key 5 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_box_shadow_settings (v:box_shadow_settings) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_box_shadow_settings_box_shadow_params x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.box_shadows encoder; + () + +let rec encode_pb_border_settings (v:border_settings) encoder = + if border_settings_has_stroke_width v then ( + Pbrt.Encoder.float_as_bits32 v.stroke_width encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if border_settings_has_color v then ( + Pbrt.Encoder.int32_as_varint v.color encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_layers_trace_file_proto_magic_number (v:layers_trace_file_proto_magic_number) encoder = + match v with + | Invalid -> Pbrt.Encoder.int_as_varint (0) encoder + | Magic_number_l -> Pbrt.Encoder.int_as_varint 1414682956 encoder + | Magic_number_h -> Pbrt.Encoder.int_as_varint 1162035538 encoder + +let rec encode_pb_position_proto (v:position_proto) encoder = + if position_proto_has_x v then ( + Pbrt.Encoder.float_as_bits32 v.x encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if position_proto_has_y v then ( + Pbrt.Encoder.float_as_bits32 v.y encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_active_buffer_proto (v:active_buffer_proto) encoder = + if active_buffer_proto_has_width v then ( + Pbrt.Encoder.int32_as_varint v.width encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if active_buffer_proto_has_height v then ( + Pbrt.Encoder.int32_as_varint v.height encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if active_buffer_proto_has_stride v then ( + Pbrt.Encoder.int32_as_varint v.stride encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if active_buffer_proto_has_format v then ( + Pbrt.Encoder.int32_as_varint v.format encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if active_buffer_proto_has_usage v then ( + Pbrt.Encoder.int64_as_varint v.usage encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_float_rect_proto (v:float_rect_proto) encoder = + if float_rect_proto_has_left v then ( + Pbrt.Encoder.float_as_bits32 v.left encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if float_rect_proto_has_top v then ( + Pbrt.Encoder.float_as_bits32 v.top encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if float_rect_proto_has_right v then ( + Pbrt.Encoder.float_as_bits32 v.right encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if float_rect_proto_has_bottom v then ( + Pbrt.Encoder.float_as_bits32 v.bottom encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_hwc_composition_type (v:hwc_composition_type) encoder = + match v with + | Hwc_type_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Hwc_type_client -> Pbrt.Encoder.int_as_varint 1 encoder + | Hwc_type_device -> Pbrt.Encoder.int_as_varint 2 encoder + | Hwc_type_solid_color -> Pbrt.Encoder.int_as_varint 3 encoder + | Hwc_type_cursor -> Pbrt.Encoder.int_as_varint 4 encoder + | Hwc_type_sideband -> Pbrt.Encoder.int_as_varint 5 encoder + | Hwc_type_display_decoration -> Pbrt.Encoder.int_as_varint 6 encoder + +let rec encode_pb_barrier_layer_proto (v:barrier_layer_proto) encoder = + if barrier_layer_proto_has_id v then ( + Pbrt.Encoder.int32_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if barrier_layer_proto_has_frame_number v then ( + Pbrt.Encoder.int64_as_varint v.frame_number encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_corner_radii_proto (v:corner_radii_proto) encoder = + if corner_radii_proto_has_tl v then ( + Pbrt.Encoder.float_as_bits32 v.tl encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if corner_radii_proto_has_tr v then ( + Pbrt.Encoder.float_as_bits32 v.tr encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if corner_radii_proto_has_bl v then ( + Pbrt.Encoder.float_as_bits32 v.bl encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if corner_radii_proto_has_br v then ( + Pbrt.Encoder.float_as_bits32 v.br encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_layer_proto (v:layer_proto) encoder = + if layer_proto_has_id v then ( + Pbrt.Encoder.int32_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if layer_proto_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + ) lst encoder; + ) v.children encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + ) lst encoder; + ) v.relatives encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + if layer_proto_has_type_ v then ( + Pbrt.Encoder.string v.type_ encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + begin match v.transparent_region with + | Some x -> + Pbrt.Encoder.nested encode_pb_region_proto x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.visible_region with + | Some x -> + Pbrt.Encoder.nested encode_pb_region_proto x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.damage_region with + | Some x -> + Pbrt.Encoder.nested encode_pb_region_proto x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_layer_stack v then ( + Pbrt.Encoder.int32_as_varint v.layer_stack encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if layer_proto_has_z v then ( + Pbrt.Encoder.int32_as_varint v.z encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + begin match v.position with + | Some x -> + Pbrt.Encoder.nested encode_pb_position_proto x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.requested_position with + | Some x -> + Pbrt.Encoder.nested encode_pb_position_proto x encoder; + Pbrt.Encoder.key 12 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.size with + | Some x -> + Pbrt.Encoder.nested encode_pb_size_proto x encoder; + Pbrt.Encoder.key 13 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.crop with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.final_crop with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 15 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_is_opaque v then ( + Pbrt.Encoder.bool v.is_opaque encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if layer_proto_has_invalidate v then ( + Pbrt.Encoder.bool v.invalidate encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + if layer_proto_has_dataspace v then ( + Pbrt.Encoder.string v.dataspace encoder; + Pbrt.Encoder.key 18 Pbrt.Bytes encoder; + ); + if layer_proto_has_pixel_format v then ( + Pbrt.Encoder.string v.pixel_format encoder; + Pbrt.Encoder.key 19 Pbrt.Bytes encoder; + ); + begin match v.color with + | Some x -> + Pbrt.Encoder.nested encode_pb_color_proto x encoder; + Pbrt.Encoder.key 20 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.requested_color with + | Some x -> + Pbrt.Encoder.nested encode_pb_color_proto x encoder; + Pbrt.Encoder.key 21 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 22 Pbrt.Varint encoder; + ); + begin match v.transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform_proto x encoder; + Pbrt.Encoder.key 23 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.requested_transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform_proto x encoder; + Pbrt.Encoder.key 24 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_parent v then ( + Pbrt.Encoder.int32_as_varint v.parent encoder; + Pbrt.Encoder.key 25 Pbrt.Varint encoder; + ); + if layer_proto_has_z_order_relative_of v then ( + Pbrt.Encoder.int32_as_varint v.z_order_relative_of encoder; + Pbrt.Encoder.key 26 Pbrt.Varint encoder; + ); + begin match v.active_buffer with + | Some x -> + Pbrt.Encoder.nested encode_pb_active_buffer_proto x encoder; + Pbrt.Encoder.key 27 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_queued_frames v then ( + Pbrt.Encoder.int32_as_varint v.queued_frames encoder; + Pbrt.Encoder.key 28 Pbrt.Varint encoder; + ); + if layer_proto_has_refresh_pending v then ( + Pbrt.Encoder.bool v.refresh_pending encoder; + Pbrt.Encoder.key 29 Pbrt.Varint encoder; + ); + begin match v.hwc_frame with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 30 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.hwc_crop with + | Some x -> + Pbrt.Encoder.nested encode_pb_float_rect_proto x encoder; + Pbrt.Encoder.key 31 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_hwc_transform v then ( + Pbrt.Encoder.int32_as_varint v.hwc_transform encoder; + Pbrt.Encoder.key 32 Pbrt.Varint encoder; + ); + if layer_proto_has_window_type v then ( + Pbrt.Encoder.int32_as_varint v.window_type encoder; + Pbrt.Encoder.key 33 Pbrt.Varint encoder; + ); + if layer_proto_has_app_id v then ( + Pbrt.Encoder.int32_as_varint v.app_id encoder; + Pbrt.Encoder.key 34 Pbrt.Varint encoder; + ); + if layer_proto_has_hwc_composition_type v then ( + encode_pb_hwc_composition_type v.hwc_composition_type encoder; + Pbrt.Encoder.key 35 Pbrt.Varint encoder; + ); + if layer_proto_has_is_protected v then ( + Pbrt.Encoder.bool v.is_protected encoder; + Pbrt.Encoder.key 36 Pbrt.Varint encoder; + ); + if layer_proto_has_curr_frame v then ( + Pbrt.Encoder.int64_as_varint v.curr_frame encoder; + Pbrt.Encoder.key 37 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_barrier_layer_proto x encoder; + Pbrt.Encoder.key 38 Pbrt.Bytes encoder; + ) v.barrier_layer encoder; + begin match v.buffer_transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform_proto x encoder; + Pbrt.Encoder.key 39 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_effective_scaling_mode v then ( + Pbrt.Encoder.int32_as_varint v.effective_scaling_mode encoder; + Pbrt.Encoder.key 40 Pbrt.Varint encoder; + ); + if layer_proto_has_corner_radius v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius encoder; + Pbrt.Encoder.key 41 Pbrt.Bits32 encoder; + ); + let encode_key = Pbrt.Encoder.int32_as_varint in + let encode_value = (fun x encoder -> + Pbrt.Encoder.string x encoder; + ) in + Pbrt.List_util.rev_iter_with (fun (k, v) encoder -> + let map_entry = (k, Pbrt.Varint), (v, Pbrt.Bytes) in + Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder; + Pbrt.Encoder.key 42 Pbrt.Bytes encoder; + ) v.metadata encoder; + begin match v.effective_transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform_proto x encoder; + Pbrt.Encoder.key 43 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.source_bounds with + | Some x -> + Pbrt.Encoder.nested encode_pb_float_rect_proto x encoder; + Pbrt.Encoder.key 44 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.bounds with + | Some x -> + Pbrt.Encoder.nested encode_pb_float_rect_proto x encoder; + Pbrt.Encoder.key 45 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.screen_bounds with + | Some x -> + Pbrt.Encoder.nested encode_pb_float_rect_proto x encoder; + Pbrt.Encoder.key 46 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.input_window_info with + | Some x -> + Pbrt.Encoder.nested encode_pb_input_window_info_proto x encoder; + Pbrt.Encoder.key 47 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.corner_radius_crop with + | Some x -> + Pbrt.Encoder.nested encode_pb_float_rect_proto x encoder; + Pbrt.Encoder.key 48 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_shadow_radius v then ( + Pbrt.Encoder.float_as_bits32 v.shadow_radius encoder; + Pbrt.Encoder.key 49 Pbrt.Bits32 encoder; + ); + begin match v.color_transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_color_transform_proto x encoder; + Pbrt.Encoder.key 50 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_is_relative_of v then ( + Pbrt.Encoder.bool v.is_relative_of encoder; + Pbrt.Encoder.key 51 Pbrt.Varint encoder; + ); + if layer_proto_has_background_blur_radius v then ( + Pbrt.Encoder.int32_as_varint v.background_blur_radius encoder; + Pbrt.Encoder.key 52 Pbrt.Varint encoder; + ); + if layer_proto_has_owner_uid v then ( + Pbrt.Encoder.int32_as_varint v.owner_uid encoder; + Pbrt.Encoder.key 53 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_blur_region x encoder; + Pbrt.Encoder.key 54 Pbrt.Bytes encoder; + ) v.blur_regions encoder; + if layer_proto_has_is_trusted_overlay v then ( + Pbrt.Encoder.bool v.is_trusted_overlay encoder; + Pbrt.Encoder.key 55 Pbrt.Varint encoder; + ); + if layer_proto_has_requested_corner_radius v then ( + Pbrt.Encoder.float_as_bits32 v.requested_corner_radius encoder; + Pbrt.Encoder.key 56 Pbrt.Bits32 encoder; + ); + begin match v.destination_frame with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 57 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_original_id v then ( + Pbrt.Encoder.int32_as_varint v.original_id encoder; + Pbrt.Encoder.key 58 Pbrt.Varint encoder; + ); + if layer_proto_has_trusted_overlay v then ( + encode_pb_trusted_overlay v.trusted_overlay encoder; + Pbrt.Encoder.key 59 Pbrt.Varint encoder; + ); + if layer_proto_has_background_blur_scale v then ( + Pbrt.Encoder.float_as_bits32 v.background_blur_scale encoder; + Pbrt.Encoder.key 60 Pbrt.Bits32 encoder; + ); + begin match v.corner_radii with + | Some x -> + Pbrt.Encoder.nested encode_pb_corner_radii_proto x encoder; + Pbrt.Encoder.key 61 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.requested_corner_radii with + | Some x -> + Pbrt.Encoder.nested encode_pb_corner_radii_proto x encoder; + Pbrt.Encoder.key 62 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.client_drawn_corner_radii with + | Some x -> + Pbrt.Encoder.nested encode_pb_corner_radii_proto x encoder; + Pbrt.Encoder.key 63 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_proto_has_system_content_priority v then ( + Pbrt.Encoder.int32_as_varint v.system_content_priority encoder; + Pbrt.Encoder.key 64 Pbrt.Varint encoder; + ); + begin match v.box_shadow_settings with + | Some x -> + Pbrt.Encoder.nested encode_pb_box_shadow_settings x encoder; + Pbrt.Encoder.key 65 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.border_settings with + | Some x -> + Pbrt.Encoder.nested encode_pb_border_settings x encoder; + Pbrt.Encoder.key 66 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.effective_radii with + | Some x -> + Pbrt.Encoder.nested encode_pb_corner_radii_proto x encoder; + Pbrt.Encoder.key 67 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_layers_proto (v:layers_proto) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_layer_proto x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.layers encoder; + () + +let rec encode_pb_display_proto (v:display_proto) encoder = + if display_proto_has_id v then ( + Pbrt.Encoder.int64_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if display_proto_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if display_proto_has_layer_stack v then ( + Pbrt.Encoder.int32_as_varint v.layer_stack encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + begin match v.size with + | Some x -> + Pbrt.Encoder.nested encode_pb_size_proto x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.layer_stack_space_rect with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform_proto x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + if display_proto_has_is_virtual v then ( + Pbrt.Encoder.bool v.is_virtual encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if display_proto_has_dpi_x v then ( + Pbrt.Encoder.float_as_bits64 v.dpi_x encoder; + Pbrt.Encoder.key 8 Pbrt.Bits64 encoder; + ); + if display_proto_has_dpi_y v then ( + Pbrt.Encoder.float_as_bits64 v.dpi_y encoder; + Pbrt.Encoder.key 9 Pbrt.Bits64 encoder; + ); + () + +let rec encode_pb_layers_snapshot_proto (v:layers_snapshot_proto) encoder = + if layers_snapshot_proto_has_elapsed_realtime_nanos v then ( + Pbrt.Encoder.int64_as_bits64 v.elapsed_realtime_nanos encoder; + Pbrt.Encoder.key 1 Pbrt.Bits64 encoder; + ); + if layers_snapshot_proto_has_where v then ( + Pbrt.Encoder.string v.where encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + begin match v.layers with + | Some x -> + Pbrt.Encoder.nested encode_pb_layers_proto x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + if layers_snapshot_proto_has_hwc_blob v then ( + Pbrt.Encoder.string v.hwc_blob encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + if layers_snapshot_proto_has_excludes_composition_state v then ( + Pbrt.Encoder.bool v.excludes_composition_state encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if layers_snapshot_proto_has_missed_entries v then ( + Pbrt.Encoder.int32_as_varint v.missed_entries encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_display_proto x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.displays encoder; + if layers_snapshot_proto_has_vsync_id v then ( + Pbrt.Encoder.int64_as_varint v.vsync_id encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_layers_trace_file_proto (v:layers_trace_file_proto) encoder = + if layers_trace_file_proto_has_magic_number v then ( + Pbrt.Encoder.int64_as_bits64 v.magic_number encoder; + Pbrt.Encoder.key 1 Pbrt.Bits64 encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_layers_snapshot_proto x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.entry encoder; + if layers_trace_file_proto_has_real_to_elapsed_time_offset_nanos v then ( + Pbrt.Encoder.int64_as_bits64 v.real_to_elapsed_time_offset_nanos encoder; + Pbrt.Encoder.key 3 Pbrt.Bits64 encoder; + ); + () + +let rec encode_pb_transaction_trace_file_magic_number (v:transaction_trace_file_magic_number) encoder = + match v with + | Invalid -> Pbrt.Encoder.int_as_varint (0) encoder + | Magic_number_l -> Pbrt.Encoder.int_as_varint 1415073364 encoder + | Magic_number_h -> Pbrt.Encoder.int_as_varint 1162035538 encoder + +let rec encode_pb_layer_state_matrix22 (v:layer_state_matrix22) encoder = + if layer_state_matrix22_has_dsdx v then ( + Pbrt.Encoder.float_as_bits32 v.dsdx encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if layer_state_matrix22_has_dtdx v then ( + Pbrt.Encoder.float_as_bits32 v.dtdx encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if layer_state_matrix22_has_dtdy v then ( + Pbrt.Encoder.float_as_bits32 v.dtdy encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if layer_state_matrix22_has_dsdy v then ( + Pbrt.Encoder.float_as_bits32 v.dsdy encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_layer_state_color3 (v:layer_state_color3) encoder = + if layer_state_color3_has_r v then ( + Pbrt.Encoder.float_as_bits32 v.r encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if layer_state_color3_has_g v then ( + Pbrt.Encoder.float_as_bits32 v.g encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if layer_state_color3_has_b v then ( + Pbrt.Encoder.float_as_bits32 v.b encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_layer_state_buffer_data_pixel_format (v:layer_state_buffer_data_pixel_format) encoder = + match v with + | Pixel_format_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Pixel_format_custom -> Pbrt.Encoder.int_as_varint (-4) encoder + | Pixel_format_translucent -> Pbrt.Encoder.int_as_varint (-3) encoder + | Pixel_format_transparent -> Pbrt.Encoder.int_as_varint (-2) encoder + | Pixel_format_opaque -> Pbrt.Encoder.int_as_varint (-1) encoder + | Pixel_format_rgba_8888 -> Pbrt.Encoder.int_as_varint 1 encoder + | Pixel_format_rgbx_8888 -> Pbrt.Encoder.int_as_varint 2 encoder + | Pixel_format_rgb_888 -> Pbrt.Encoder.int_as_varint 3 encoder + | Pixel_format_rgb_565 -> Pbrt.Encoder.int_as_varint 4 encoder + | Pixel_format_bgra_8888 -> Pbrt.Encoder.int_as_varint 5 encoder + | Pixel_format_rgba_5551 -> Pbrt.Encoder.int_as_varint 6 encoder + | Pixel_format_rgba_4444 -> Pbrt.Encoder.int_as_varint 7 encoder + | Pixel_format_rgba_fp16 -> Pbrt.Encoder.int_as_varint 22 encoder + | Pixel_format_rgba_1010102 -> Pbrt.Encoder.int_as_varint 43 encoder + | Pixel_format_r_8 -> Pbrt.Encoder.int_as_varint 56 encoder + +let rec encode_pb_layer_state_buffer_data (v:layer_state_buffer_data) encoder = + if layer_state_buffer_data_has_buffer_id v then ( + Pbrt.Encoder.int64_as_varint v.buffer_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if layer_state_buffer_data_has_width v then ( + Pbrt.Encoder.int32_as_varint v.width encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if layer_state_buffer_data_has_height v then ( + Pbrt.Encoder.int32_as_varint v.height encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if layer_state_buffer_data_has_frame_number v then ( + Pbrt.Encoder.int64_as_varint v.frame_number encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if layer_state_buffer_data_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if layer_state_buffer_data_has_cached_buffer_id v then ( + Pbrt.Encoder.int64_as_varint v.cached_buffer_id encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if layer_state_buffer_data_has_pixel_format v then ( + encode_pb_layer_state_buffer_data_pixel_format v.pixel_format encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if layer_state_buffer_data_has_usage v then ( + Pbrt.Encoder.int64_as_varint v.usage encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_transform (v:transform) encoder = + if transform_has_dsdx v then ( + Pbrt.Encoder.float_as_bits32 v.dsdx encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if transform_has_dtdx v then ( + Pbrt.Encoder.float_as_bits32 v.dtdx encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if transform_has_dtdy v then ( + Pbrt.Encoder.float_as_bits32 v.dtdy encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if transform_has_dsdy v then ( + Pbrt.Encoder.float_as_bits32 v.dsdy encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + if transform_has_tx v then ( + Pbrt.Encoder.float_as_bits32 v.tx encoder; + Pbrt.Encoder.key 5 Pbrt.Bits32 encoder; + ); + if transform_has_ty v then ( + Pbrt.Encoder.float_as_bits32 v.ty encoder; + Pbrt.Encoder.key 6 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_layer_state_window_info (v:layer_state_window_info) encoder = + if layer_state_window_info_has_layout_params_flags v then ( + Pbrt.Encoder.int32_as_varint v.layout_params_flags encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if layer_state_window_info_has_layout_params_type v then ( + Pbrt.Encoder.int32_as_varint v.layout_params_type encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + begin match v.touchable_region with + | Some x -> + Pbrt.Encoder.nested encode_pb_region_proto x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_state_window_info_has_surface_inset v then ( + Pbrt.Encoder.int32_as_varint v.surface_inset encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if layer_state_window_info_has_focusable v then ( + Pbrt.Encoder.bool v.focusable encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if layer_state_window_info_has_has_wallpaper v then ( + Pbrt.Encoder.bool v.has_wallpaper encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if layer_state_window_info_has_global_scale_factor v then ( + Pbrt.Encoder.float_as_bits32 v.global_scale_factor encoder; + Pbrt.Encoder.key 7 Pbrt.Bits32 encoder; + ); + if layer_state_window_info_has_crop_layer_id v then ( + Pbrt.Encoder.int32_as_varint v.crop_layer_id encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if layer_state_window_info_has_replace_touchable_region_with_crop v then ( + Pbrt.Encoder.bool v.replace_touchable_region_with_crop encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + begin match v.touchable_region_crop with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_state_window_info_has_input_config v then ( + Pbrt.Encoder.int32_as_varint v.input_config encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_layer_state_drop_input_mode (v:layer_state_drop_input_mode) encoder = + match v with + | None -> Pbrt.Encoder.int_as_varint (0) encoder + | All -> Pbrt.Encoder.int_as_varint 1 encoder + | Obscured -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_layer_state_corner_radii (v:layer_state_corner_radii) encoder = + if layer_state_corner_radii_has_tl v then ( + Pbrt.Encoder.float_as_bits32 v.tl encoder; + Pbrt.Encoder.key 1 Pbrt.Bits32 encoder; + ); + if layer_state_corner_radii_has_tr v then ( + Pbrt.Encoder.float_as_bits32 v.tr encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if layer_state_corner_radii_has_bl v then ( + Pbrt.Encoder.float_as_bits32 v.bl encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if layer_state_corner_radii_has_br v then ( + Pbrt.Encoder.float_as_bits32 v.br encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_layer_state (v:layer_state) encoder = + if layer_state_has_layer_id v then ( + Pbrt.Encoder.int32_as_varint v.layer_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if layer_state_has_what v then ( + Pbrt.Encoder.int64_as_varint v.what encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if layer_state_has_x v then ( + Pbrt.Encoder.float_as_bits32 v.x encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + if layer_state_has_y v then ( + Pbrt.Encoder.float_as_bits32 v.y encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + if layer_state_has_z v then ( + Pbrt.Encoder.int32_as_varint v.z encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if layer_state_has_w v then ( + Pbrt.Encoder.int32_as_varint v.w encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if layer_state_has_h v then ( + Pbrt.Encoder.int32_as_varint v.h encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if layer_state_has_layer_stack v then ( + Pbrt.Encoder.int32_as_varint v.layer_stack encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if layer_state_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if layer_state_has_mask v then ( + Pbrt.Encoder.int32_as_varint v.mask encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + begin match v.matrix with + | Some x -> + Pbrt.Encoder.nested encode_pb_layer_state_matrix22 x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_state_has_corner_radius v then ( + Pbrt.Encoder.float_as_bits32 v.corner_radius encoder; + Pbrt.Encoder.key 12 Pbrt.Bits32 encoder; + ); + if layer_state_has_background_blur_radius v then ( + Pbrt.Encoder.int32_as_varint v.background_blur_radius encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if layer_state_has_parent_id v then ( + Pbrt.Encoder.int32_as_varint v.parent_id encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if layer_state_has_relative_parent_id v then ( + Pbrt.Encoder.int32_as_varint v.relative_parent_id encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if layer_state_has_alpha v then ( + Pbrt.Encoder.float_as_bits32 v.alpha encoder; + Pbrt.Encoder.key 16 Pbrt.Bits32 encoder; + ); + begin match v.color with + | Some x -> + Pbrt.Encoder.nested encode_pb_layer_state_color3 x encoder; + Pbrt.Encoder.key 17 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.transparent_region with + | Some x -> + Pbrt.Encoder.nested encode_pb_region_proto x encoder; + Pbrt.Encoder.key 18 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_state_has_transform v then ( + Pbrt.Encoder.int32_as_varint v.transform encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + if layer_state_has_transform_to_display_inverse v then ( + Pbrt.Encoder.bool v.transform_to_display_inverse encoder; + Pbrt.Encoder.key 20 Pbrt.Varint encoder; + ); + begin match v.crop with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 21 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.buffer_data with + | Some x -> + Pbrt.Encoder.nested encode_pb_layer_state_buffer_data x encoder; + Pbrt.Encoder.key 22 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_state_has_api v then ( + Pbrt.Encoder.int32_as_varint v.api encoder; + Pbrt.Encoder.key 23 Pbrt.Varint encoder; + ); + if layer_state_has_has_sideband_stream v then ( + Pbrt.Encoder.bool v.has_sideband_stream encoder; + Pbrt.Encoder.key 24 Pbrt.Varint encoder; + ); + begin match v.color_transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_color_transform_proto x encoder; + Pbrt.Encoder.key 25 Pbrt.Bytes encoder; + | None -> (); + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_blur_region x encoder; + Pbrt.Encoder.key 26 Pbrt.Bytes encoder; + ) v.blur_regions encoder; + begin match v.window_info_handle with + | Some x -> + Pbrt.Encoder.nested encode_pb_layer_state_window_info x encoder; + Pbrt.Encoder.key 27 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_state_has_bg_color_alpha v then ( + Pbrt.Encoder.float_as_bits32 v.bg_color_alpha encoder; + Pbrt.Encoder.key 28 Pbrt.Bits32 encoder; + ); + if layer_state_has_bg_color_dataspace v then ( + Pbrt.Encoder.int32_as_varint v.bg_color_dataspace encoder; + Pbrt.Encoder.key 29 Pbrt.Varint encoder; + ); + if layer_state_has_color_space_agnostic v then ( + Pbrt.Encoder.bool v.color_space_agnostic encoder; + Pbrt.Encoder.key 30 Pbrt.Varint encoder; + ); + if layer_state_has_shadow_radius v then ( + Pbrt.Encoder.float_as_bits32 v.shadow_radius encoder; + Pbrt.Encoder.key 31 Pbrt.Bits32 encoder; + ); + if layer_state_has_frame_rate_selection_priority v then ( + Pbrt.Encoder.int32_as_varint v.frame_rate_selection_priority encoder; + Pbrt.Encoder.key 32 Pbrt.Varint encoder; + ); + if layer_state_has_frame_rate v then ( + Pbrt.Encoder.float_as_bits32 v.frame_rate encoder; + Pbrt.Encoder.key 33 Pbrt.Bits32 encoder; + ); + if layer_state_has_frame_rate_compatibility v then ( + Pbrt.Encoder.int32_as_varint v.frame_rate_compatibility encoder; + Pbrt.Encoder.key 34 Pbrt.Varint encoder; + ); + if layer_state_has_change_frame_rate_strategy v then ( + Pbrt.Encoder.int32_as_varint v.change_frame_rate_strategy encoder; + Pbrt.Encoder.key 35 Pbrt.Varint encoder; + ); + if layer_state_has_fixed_transform_hint v then ( + Pbrt.Encoder.int32_as_varint v.fixed_transform_hint encoder; + Pbrt.Encoder.key 36 Pbrt.Varint encoder; + ); + if layer_state_has_frame_number v then ( + Pbrt.Encoder.int64_as_varint v.frame_number encoder; + Pbrt.Encoder.key 37 Pbrt.Varint encoder; + ); + if layer_state_has_auto_refresh v then ( + Pbrt.Encoder.bool v.auto_refresh encoder; + Pbrt.Encoder.key 38 Pbrt.Varint encoder; + ); + if layer_state_has_is_trusted_overlay v then ( + Pbrt.Encoder.bool v.is_trusted_overlay encoder; + Pbrt.Encoder.key 39 Pbrt.Varint encoder; + ); + begin match v.buffer_crop with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 40 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.destination_frame with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 41 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_state_has_drop_input_mode v then ( + encode_pb_layer_state_drop_input_mode v.drop_input_mode encoder; + Pbrt.Encoder.key 42 Pbrt.Varint encoder; + ); + if layer_state_has_trusted_overlay v then ( + encode_pb_trusted_overlay v.trusted_overlay encoder; + Pbrt.Encoder.key 43 Pbrt.Varint encoder; + ); + if layer_state_has_background_blur_scale v then ( + Pbrt.Encoder.float_as_bits32 v.background_blur_scale encoder; + Pbrt.Encoder.key 44 Pbrt.Bits32 encoder; + ); + begin match v.corner_radii with + | Some x -> + Pbrt.Encoder.nested encode_pb_layer_state_corner_radii x encoder; + Pbrt.Encoder.key 45 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.client_drawn_corner_radii with + | Some x -> + Pbrt.Encoder.nested encode_pb_layer_state_corner_radii x encoder; + Pbrt.Encoder.key 46 Pbrt.Bytes encoder; + | None -> (); + end; + if layer_state_has_system_content_priority v then ( + Pbrt.Encoder.int32_as_varint v.system_content_priority encoder; + Pbrt.Encoder.key 47 Pbrt.Varint encoder; + ); + begin match v.box_shadow_settings with + | Some x -> + Pbrt.Encoder.nested encode_pb_box_shadow_settings x encoder; + Pbrt.Encoder.key 48 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.border_settings with + | Some x -> + Pbrt.Encoder.nested encode_pb_border_settings x encoder; + Pbrt.Encoder.key 49 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_display_state (v:display_state) encoder = + if display_state_has_id v then ( + Pbrt.Encoder.int32_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if display_state_has_what v then ( + Pbrt.Encoder.int32_as_varint v.what encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if display_state_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if display_state_has_layer_stack v then ( + Pbrt.Encoder.int32_as_varint v.layer_stack encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if display_state_has_orientation v then ( + Pbrt.Encoder.int32_as_varint v.orientation encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + begin match v.layer_stack_space_rect with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.oriented_display_space_rect with + | Some x -> + Pbrt.Encoder.nested encode_pb_rect_proto x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | None -> (); + end; + if display_state_has_width v then ( + Pbrt.Encoder.int32_as_varint v.width encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if display_state_has_height v then ( + Pbrt.Encoder.int32_as_varint v.height encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_transaction_barrier (v:transaction_barrier) encoder = + if transaction_barrier_has_barrier_token v then ( + Pbrt.Encoder.string v.barrier_token encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if transaction_barrier_has_kind v then ( + Pbrt.Encoder.int32_as_varint v.kind encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_transaction_state (v:transaction_state) encoder = + if transaction_state_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if transaction_state_has_uid v then ( + Pbrt.Encoder.int32_as_varint v.uid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if transaction_state_has_vsync_id v then ( + Pbrt.Encoder.int64_as_varint v.vsync_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if transaction_state_has_input_event_id v then ( + Pbrt.Encoder.int32_as_varint v.input_event_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if transaction_state_has_post_time v then ( + Pbrt.Encoder.int64_as_varint v.post_time encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if transaction_state_has_transaction_id v then ( + Pbrt.Encoder.int64_as_varint v.transaction_id encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_layer_state x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.layer_changes encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_display_state x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ) v.display_changes encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ) v.merged_transaction_ids encoder; + if transaction_state_has_apply_token v then ( + Pbrt.Encoder.int64_as_varint v.apply_token encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_transaction_barrier x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + ) v.transaction_barriers encoder; + () + +let rec encode_pb_layer_creation_args (v:layer_creation_args) encoder = + if layer_creation_args_has_layer_id v then ( + Pbrt.Encoder.int32_as_varint v.layer_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if layer_creation_args_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if layer_creation_args_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if layer_creation_args_has_parent_id v then ( + Pbrt.Encoder.int32_as_varint v.parent_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if layer_creation_args_has_mirror_from_id v then ( + Pbrt.Encoder.int32_as_varint v.mirror_from_id encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if layer_creation_args_has_add_to_root v then ( + Pbrt.Encoder.bool v.add_to_root encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if layer_creation_args_has_layer_stack_to_mirror v then ( + Pbrt.Encoder.int32_as_varint v.layer_stack_to_mirror encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_display_info (v:display_info) encoder = + if display_info_has_layer_stack v then ( + Pbrt.Encoder.int32_as_varint v.layer_stack encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if display_info_has_display_id v then ( + Pbrt.Encoder.int32_as_varint v.display_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if display_info_has_logical_width v then ( + Pbrt.Encoder.int32_as_varint v.logical_width encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if display_info_has_logical_height v then ( + Pbrt.Encoder.int32_as_varint v.logical_height encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + begin match v.transform_inverse with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.transform with + | Some x -> + Pbrt.Encoder.nested encode_pb_transform x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + if display_info_has_receives_input v then ( + Pbrt.Encoder.bool v.receives_input encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if display_info_has_is_secure v then ( + Pbrt.Encoder.bool v.is_secure encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if display_info_has_is_primary v then ( + Pbrt.Encoder.bool v.is_primary encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if display_info_has_is_virtual v then ( + Pbrt.Encoder.bool v.is_virtual encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if display_info_has_rotation_flags v then ( + Pbrt.Encoder.int32_as_varint v.rotation_flags encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if display_info_has_transform_hint v then ( + Pbrt.Encoder.int32_as_varint v.transform_hint encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_transaction_trace_entry (v:transaction_trace_entry) encoder = + if transaction_trace_entry_has_elapsed_realtime_nanos v then ( + Pbrt.Encoder.int64_as_varint v.elapsed_realtime_nanos encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if transaction_trace_entry_has_vsync_id v then ( + Pbrt.Encoder.int64_as_varint v.vsync_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_transaction_state x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.transactions encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_layer_creation_args x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.added_layers encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ) v.destroyed_layers encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_display_state x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ) v.added_displays encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ) v.removed_displays encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ) v.destroyed_layer_handles encoder; + if transaction_trace_entry_has_displays_changed v then ( + Pbrt.Encoder.bool v.displays_changed encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_display_info x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + ) v.displays encoder; + () + +let rec encode_pb_transaction_trace_file (v:transaction_trace_file) encoder = + if transaction_trace_file_has_magic_number v then ( + Pbrt.Encoder.int64_as_bits64 v.magic_number encoder; + Pbrt.Encoder.key 1 Pbrt.Bits64 encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_transaction_trace_entry x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.entry encoder; + if transaction_trace_file_has_real_to_elapsed_time_offset_nanos v then ( + Pbrt.Encoder.int64_as_bits64 v.real_to_elapsed_time_offset_nanos encoder; + Pbrt.Encoder.key 3 Pbrt.Bits64 encoder; + ); + if transaction_trace_file_has_version v then ( + Pbrt.Encoder.int32_as_varint v.version encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_layer_state_changes_lsb (v:layer_state_changes_lsb) encoder = + match v with + | E_changes_lsb_none -> Pbrt.Encoder.int_as_varint (0) encoder + | E_position_changed -> Pbrt.Encoder.int_as_varint 1 encoder + | E_layer_changed -> Pbrt.Encoder.int_as_varint 2 encoder + | E_alpha_changed -> Pbrt.Encoder.int_as_varint 8 encoder + | E_matrix_changed -> Pbrt.Encoder.int_as_varint 16 encoder + | E_transparent_region_changed -> Pbrt.Encoder.int_as_varint 32 encoder + | E_flags_changed -> Pbrt.Encoder.int_as_varint 64 encoder + | E_layer_stack_changed -> Pbrt.Encoder.int_as_varint 128 encoder + | E_release_buffer_listener_changed -> Pbrt.Encoder.int_as_varint 1024 encoder + | E_shadow_radius_changed -> Pbrt.Encoder.int_as_varint 2048 encoder + | E_buffer_crop_changed -> Pbrt.Encoder.int_as_varint 8192 encoder + | E_relative_layer_changed -> Pbrt.Encoder.int_as_varint 16384 encoder + | E_reparent -> Pbrt.Encoder.int_as_varint 32768 encoder + | E_color_changed -> Pbrt.Encoder.int_as_varint 65536 encoder + | E_buffer_transform_changed -> Pbrt.Encoder.int_as_varint 262144 encoder + | E_transform_to_display_inverse_changed -> Pbrt.Encoder.int_as_varint 524288 encoder + | E_crop_changed -> Pbrt.Encoder.int_as_varint 1048576 encoder + | E_buffer_changed -> Pbrt.Encoder.int_as_varint 2097152 encoder + | E_acquire_fence_changed -> Pbrt.Encoder.int_as_varint 4194304 encoder + | E_dataspace_changed -> Pbrt.Encoder.int_as_varint 8388608 encoder + | E_hdr_metadata_changed -> Pbrt.Encoder.int_as_varint 16777216 encoder + | E_surface_damage_region_changed -> Pbrt.Encoder.int_as_varint 33554432 encoder + | E_api_changed -> Pbrt.Encoder.int_as_varint 67108864 encoder + | E_sideband_stream_changed -> Pbrt.Encoder.int_as_varint 134217728 encoder + | E_color_transform_changed -> Pbrt.Encoder.int_as_varint 268435456 encoder + | E_has_listener_callbacks_changed -> Pbrt.Encoder.int_as_varint 536870912 encoder + | E_input_info_changed -> Pbrt.Encoder.int_as_varint 1073741824 encoder + | E_corner_radius_changed -> Pbrt.Encoder.int_as_varint (-2147483648) encoder + +let rec encode_pb_layer_state_changes_msb (v:layer_state_changes_msb) encoder = + match v with + | E_changes_msb_none -> Pbrt.Encoder.int_as_varint (0) encoder + | E_destination_frame_changed -> Pbrt.Encoder.int_as_varint 1 encoder + | E_cached_buffer_changed -> Pbrt.Encoder.int_as_varint 2 encoder + | E_background_color_changed -> Pbrt.Encoder.int_as_varint 4 encoder + | E_metadata_changed -> Pbrt.Encoder.int_as_varint 8 encoder + | E_color_space_agnostic_changed -> Pbrt.Encoder.int_as_varint 16 encoder + | E_frame_rate_selection_priority -> Pbrt.Encoder.int_as_varint 32 encoder + | E_frame_rate_changed -> Pbrt.Encoder.int_as_varint 64 encoder + | E_background_blur_radius_changed -> Pbrt.Encoder.int_as_varint 128 encoder + | E_producer_disconnect -> Pbrt.Encoder.int_as_varint 256 encoder + | E_fixed_transform_hint_changed -> Pbrt.Encoder.int_as_varint 512 encoder + | E_frame_number_changed -> Pbrt.Encoder.int_as_varint 1024 encoder + | E_blur_regions_changed -> Pbrt.Encoder.int_as_varint 2048 encoder + | E_auto_refresh_changed -> Pbrt.Encoder.int_as_varint 4096 encoder + | E_stretch_changed -> Pbrt.Encoder.int_as_varint 8192 encoder + | E_trusted_overlay_changed -> Pbrt.Encoder.int_as_varint 16384 encoder + | E_drop_input_mode_changed -> Pbrt.Encoder.int_as_varint 32768 encoder + | E_client_drawn_corner_radius_changed -> Pbrt.Encoder.int_as_varint 65536 encoder + | E_system_content_priority_changed -> Pbrt.Encoder.int_as_varint 131072 encoder + | E_box_shadow_settings_changed -> Pbrt.Encoder.int_as_varint 262144 encoder + | E_border_settings_changed -> Pbrt.Encoder.int_as_varint 524288 encoder + +let rec encode_pb_layer_state_flags (v:layer_state_flags) encoder = + match v with + | E_flags_none -> Pbrt.Encoder.int_as_varint (0) encoder + | E_layer_hidden -> Pbrt.Encoder.int_as_varint 1 encoder + | E_layer_opaque -> Pbrt.Encoder.int_as_varint 2 encoder + | E_layer_skip_screenshot -> Pbrt.Encoder.int_as_varint 64 encoder + | E_layer_secure -> Pbrt.Encoder.int_as_varint 128 encoder + | E_enable_backpressure -> Pbrt.Encoder.int_as_varint 256 encoder + | E_layer_is_display_decoration -> Pbrt.Encoder.int_as_varint 512 encoder + +let rec encode_pb_layer_state_buffer_data_buffer_data_change (v:layer_state_buffer_data_buffer_data_change) encoder = + match v with + | Buffer_data_change_none -> Pbrt.Encoder.int_as_varint (0) encoder + | Fence_changed -> Pbrt.Encoder.int_as_varint 1 encoder + | Frame_number_changed -> Pbrt.Encoder.int_as_varint 2 encoder + | Cached_buffer_changed -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_display_state_changes (v:display_state_changes) encoder = + match v with + | E_changes_none -> Pbrt.Encoder.int_as_varint (0) encoder + | E_surface_changed -> Pbrt.Encoder.int_as_varint 1 encoder + | E_layer_stack_changed -> Pbrt.Encoder.int_as_varint 2 encoder + | E_display_projection_changed -> Pbrt.Encoder.int_as_varint 4 encoder + | E_display_size_changed -> Pbrt.Encoder.int_as_varint 8 encoder + | E_flags_changed -> Pbrt.Encoder.int_as_varint 16 encoder + +let rec encode_pb_winscope_extensions (v:winscope_extensions) encoder = +() + +let rec encode_pb_chrome_benchmark_metadata (v:chrome_benchmark_metadata) encoder = + if chrome_benchmark_metadata_has_benchmark_start_time_us v then ( + Pbrt.Encoder.int64_as_varint v.benchmark_start_time_us encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_benchmark_metadata_has_story_run_time_us v then ( + Pbrt.Encoder.int64_as_varint v.story_run_time_us encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_benchmark_metadata_has_benchmark_name v then ( + Pbrt.Encoder.string v.benchmark_name encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if chrome_benchmark_metadata_has_benchmark_description v then ( + Pbrt.Encoder.string v.benchmark_description encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + if chrome_benchmark_metadata_has_label v then ( + Pbrt.Encoder.string v.label encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + if chrome_benchmark_metadata_has_story_name v then ( + Pbrt.Encoder.string v.story_name encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.story_tags encoder; + if chrome_benchmark_metadata_has_story_run_index v then ( + Pbrt.Encoder.int32_as_varint v.story_run_index encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if chrome_benchmark_metadata_has_had_failures v then ( + Pbrt.Encoder.bool v.had_failures encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_metadata_packet_finch_hash (v:chrome_metadata_packet_finch_hash) encoder = + if chrome_metadata_packet_finch_hash_has_name v then ( + Pbrt.Encoder.int32_as_varint v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_metadata_packet_finch_hash_has_group v then ( + Pbrt.Encoder.int32_as_varint v.group encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_background_tracing_metadata_trigger_rule_trigger_type (v:background_tracing_metadata_trigger_rule_trigger_type) encoder = + match v with + | Trigger_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Monitor_and_dump_when_specific_histogram_and_value -> Pbrt.Encoder.int_as_varint 1 encoder + | Monitor_and_dump_when_trigger_named -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_background_tracing_metadata_trigger_rule_histogram_rule (v:background_tracing_metadata_trigger_rule_histogram_rule) encoder = + if background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_name_hash v then ( + Pbrt.Encoder.int64_as_bits64 v.histogram_name_hash encoder; + Pbrt.Encoder.key 1 Pbrt.Bits64 encoder; + ); + if background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_min_trigger v then ( + Pbrt.Encoder.int64_as_varint v.histogram_min_trigger encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_max_trigger v then ( + Pbrt.Encoder.int64_as_varint v.histogram_max_trigger encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_background_tracing_metadata_trigger_rule_named_rule_event_type (v:background_tracing_metadata_trigger_rule_named_rule_event_type) encoder = + match v with + | Unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Session_restore -> Pbrt.Encoder.int_as_varint 1 encoder + | Navigation -> Pbrt.Encoder.int_as_varint 2 encoder + | Startup -> Pbrt.Encoder.int_as_varint 3 encoder + | Reached_code -> Pbrt.Encoder.int_as_varint 4 encoder + | Content_trigger -> Pbrt.Encoder.int_as_varint 5 encoder + | Test_rule -> Pbrt.Encoder.int_as_varint 1000 encoder + +let rec encode_pb_background_tracing_metadata_trigger_rule_named_rule (v:background_tracing_metadata_trigger_rule_named_rule) encoder = + if background_tracing_metadata_trigger_rule_named_rule_has_event_type v then ( + encode_pb_background_tracing_metadata_trigger_rule_named_rule_event_type v.event_type encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if background_tracing_metadata_trigger_rule_named_rule_has_content_trigger_name_hash v then ( + Pbrt.Encoder.int64_as_bits64 v.content_trigger_name_hash encoder; + Pbrt.Encoder.key 2 Pbrt.Bits64 encoder; + ); + () + +let rec encode_pb_background_tracing_metadata_trigger_rule (v:background_tracing_metadata_trigger_rule) encoder = + if background_tracing_metadata_trigger_rule_has_trigger_type v then ( + encode_pb_background_tracing_metadata_trigger_rule_trigger_type v.trigger_type encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.histogram_rule with + | Some x -> + Pbrt.Encoder.nested encode_pb_background_tracing_metadata_trigger_rule_histogram_rule x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.named_rule with + | Some x -> + Pbrt.Encoder.nested encode_pb_background_tracing_metadata_trigger_rule_named_rule x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + if background_tracing_metadata_trigger_rule_has_name_hash v then ( + Pbrt.Encoder.int32_as_bits32 v.name_hash encoder; + Pbrt.Encoder.key 4 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_background_tracing_metadata (v:background_tracing_metadata) encoder = + begin match v.triggered_rule with + | Some x -> + Pbrt.Encoder.nested encode_pb_background_tracing_metadata_trigger_rule x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_background_tracing_metadata_trigger_rule x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.active_rules encoder; + if background_tracing_metadata_has_scenario_name_hash v then ( + Pbrt.Encoder.int32_as_bits32 v.scenario_name_hash encoder; + Pbrt.Encoder.key 3 Pbrt.Bits32 encoder; + ); + () + +let rec encode_pb_chrome_metadata_packet (v:chrome_metadata_packet) encoder = + begin match v.background_tracing_metadata with + | Some x -> + Pbrt.Encoder.nested encode_pb_background_tracing_metadata x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + if chrome_metadata_packet_has_chrome_version_code v then ( + Pbrt.Encoder.int32_as_varint v.chrome_version_code encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_metadata_packet_has_enabled_categories v then ( + Pbrt.Encoder.string v.enabled_categories encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_metadata_packet_finch_hash x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.field_trial_hashes encoder; + () + +let rec encode_pb_chrome_traced_value_nested_type (v:chrome_traced_value_nested_type) encoder = + match v with + | Dict -> Pbrt.Encoder.int_as_varint (0) encoder + | Array -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_chrome_traced_value (v:chrome_traced_value) encoder = + if chrome_traced_value_has_nested_type v then ( + encode_pb_chrome_traced_value_nested_type v.nested_type encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.dict_keys encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_traced_value x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.dict_values encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_traced_value x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.array_values encoder; + if chrome_traced_value_has_int_value v then ( + Pbrt.Encoder.int32_as_varint v.int_value encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if chrome_traced_value_has_double_value v then ( + Pbrt.Encoder.float_as_bits64 v.double_value encoder; + Pbrt.Encoder.key 6 Pbrt.Bits64 encoder; + ); + if chrome_traced_value_has_bool_value v then ( + Pbrt.Encoder.bool v.bool_value encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if chrome_traced_value_has_string_value v then ( + Pbrt.Encoder.string v.string_value encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_chrome_string_table_entry (v:chrome_string_table_entry) encoder = + if chrome_string_table_entry_has_value v then ( + Pbrt.Encoder.string v.value encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if chrome_string_table_entry_has_index v then ( + Pbrt.Encoder.int32_as_varint v.index encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_trace_event_arg_value (v:chrome_trace_event_arg_value) encoder = + begin match v with + | Bool_value x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Uint_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + | Int_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Double_value x -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 5 Pbrt.Bits64 encoder; + | String_value x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | Pointer_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + | Json_value x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | Traced_value x -> + Pbrt.Encoder.nested encode_pb_chrome_traced_value x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + end + +and encode_pb_chrome_trace_event_arg (v:chrome_trace_event_arg) encoder = + if chrome_trace_event_arg_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + begin match v.value with + | None -> () + | Some (Bool_value x) -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Some (Uint_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + | Some (Int_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Some (Double_value x) -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 5 Pbrt.Bits64 encoder; + | Some (String_value x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | Some (Pointer_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + | Some (Json_value x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | Some (Traced_value x) -> + Pbrt.Encoder.nested encode_pb_chrome_traced_value x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + end; + if chrome_trace_event_arg_has_name_index v then ( + Pbrt.Encoder.int32_as_varint v.name_index encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_trace_event (v:chrome_trace_event) encoder = + if chrome_trace_event_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if chrome_trace_event_has_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.timestamp encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_phase v then ( + Pbrt.Encoder.int32_as_varint v.phase encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_thread_id v then ( + Pbrt.Encoder.int32_as_varint v.thread_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_duration v then ( + Pbrt.Encoder.int64_as_varint v.duration encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_thread_duration v then ( + Pbrt.Encoder.int64_as_varint v.thread_duration encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_scope v then ( + Pbrt.Encoder.string v.scope encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ); + if chrome_trace_event_has_id v then ( + Pbrt.Encoder.int64_as_varint v.id encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_flags v then ( + Pbrt.Encoder.int32_as_varint v.flags encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_category_group_name v then ( + Pbrt.Encoder.string v.category_group_name encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + ); + if chrome_trace_event_has_process_id v then ( + Pbrt.Encoder.int32_as_varint v.process_id encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_thread_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.thread_timestamp encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_bind_id v then ( + Pbrt.Encoder.int64_as_varint v.bind_id encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_trace_event_arg x encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ) v.args encoder; + if chrome_trace_event_has_name_index v then ( + Pbrt.Encoder.int32_as_varint v.name_index encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if chrome_trace_event_has_category_group_name_index v then ( + Pbrt.Encoder.int32_as_varint v.category_group_name_index encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_metadata_value (v:chrome_metadata_value) encoder = + begin match v with + | String_value x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Bool_value x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + | Int_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Json_value x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + end + +and encode_pb_chrome_metadata (v:chrome_metadata) encoder = + if chrome_metadata_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + begin match v.value with + | None -> () + | Some (String_value x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Some (Bool_value x) -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + | Some (Int_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Some (Json_value x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + end; + () + +let rec encode_pb_chrome_legacy_json_trace_trace_type (v:chrome_legacy_json_trace_trace_type) encoder = + match v with + | User_trace -> Pbrt.Encoder.int_as_varint (0) encoder + | System_trace -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_chrome_legacy_json_trace (v:chrome_legacy_json_trace) encoder = + if chrome_legacy_json_trace_has_type_ v then ( + encode_pb_chrome_legacy_json_trace_trace_type v.type_ encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_legacy_json_trace_has_data v then ( + Pbrt.Encoder.string v.data encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_chrome_event_bundle (v:chrome_event_bundle) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_trace_event x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.trace_events encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_metadata x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.metadata encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.legacy_ftrace_output encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_legacy_json_trace x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ) v.legacy_json_trace encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_string_table_entry x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.string_table encoder; + () + +let rec encode_pb_chrome_trigger (v:chrome_trigger) encoder = + if chrome_trigger_has_trigger_name v then ( + Pbrt.Encoder.string v.trigger_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if chrome_trigger_has_trigger_name_hash v then ( + Pbrt.Encoder.int32_as_bits32 v.trigger_name_hash encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if chrome_trigger_has_flow_id v then ( + Pbrt.Encoder.int64_as_bits64 v.flow_id encoder; + Pbrt.Encoder.key 3 Pbrt.Bits64 encoder; + ); + () + +let rec encode_pb_v8_string (v:v8_string) encoder = + begin match v with + | Latin1 x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | Utf16_le x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Utf16_be x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + end + +let rec encode_pb_interned_v8_string_encoded_string (v:interned_v8_string_encoded_string) encoder = + begin match v with + | Latin1 x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Utf16_le x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | Utf16_be x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + end + +and encode_pb_interned_v8_string (v:interned_v8_string) encoder = + if interned_v8_string_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.encoded_string with + | None -> () + | Some (Latin1 x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Some (Utf16_le x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | Some (Utf16_be x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + end; + () + +let rec encode_pb_interned_v8_js_script_type (v:interned_v8_js_script_type) encoder = + match v with + | Type_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Type_normal -> Pbrt.Encoder.int_as_varint 1 encoder + | Type_eval -> Pbrt.Encoder.int_as_varint 2 encoder + | Type_module -> Pbrt.Encoder.int_as_varint 3 encoder + | Type_native -> Pbrt.Encoder.int_as_varint 4 encoder + | Type_extension -> Pbrt.Encoder.int_as_varint 5 encoder + | Type_inspector -> Pbrt.Encoder.int_as_varint 6 encoder + +let rec encode_pb_interned_v8_js_script (v:interned_v8_js_script) encoder = + if interned_v8_js_script_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if interned_v8_js_script_has_script_id v then ( + Pbrt.Encoder.int32_as_varint v.script_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if interned_v8_js_script_has_type_ v then ( + encode_pb_interned_v8_js_script_type v.type_ encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + begin match v.name with + | Some x -> + Pbrt.Encoder.nested encode_pb_v8_string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.source with + | Some x -> + Pbrt.Encoder.nested encode_pb_v8_string x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_interned_v8_wasm_script (v:interned_v8_wasm_script) encoder = + if interned_v8_wasm_script_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if interned_v8_wasm_script_has_script_id v then ( + Pbrt.Encoder.int32_as_varint v.script_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if interned_v8_wasm_script_has_url v then ( + Pbrt.Encoder.string v.url encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if interned_v8_wasm_script_has_wire_bytes v then ( + Pbrt.Encoder.bytes v.wire_bytes encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_interned_v8_js_function_kind (v:interned_v8_js_function_kind) encoder = + match v with + | Kind_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Kind_normal_function -> Pbrt.Encoder.int_as_varint 1 encoder + | Kind_module -> Pbrt.Encoder.int_as_varint 2 encoder + | Kind_async_module -> Pbrt.Encoder.int_as_varint 3 encoder + | Kind_base_constructor -> Pbrt.Encoder.int_as_varint 4 encoder + | Kind_default_base_constructor -> Pbrt.Encoder.int_as_varint 5 encoder + | Kind_default_derived_constructor -> Pbrt.Encoder.int_as_varint 6 encoder + | Kind_derived_constructor -> Pbrt.Encoder.int_as_varint 7 encoder + | Kind_getter_function -> Pbrt.Encoder.int_as_varint 8 encoder + | Kind_static_getter_function -> Pbrt.Encoder.int_as_varint 9 encoder + | Kind_setter_function -> Pbrt.Encoder.int_as_varint 10 encoder + | Kind_static_setter_function -> Pbrt.Encoder.int_as_varint 11 encoder + | Kind_arrow_function -> Pbrt.Encoder.int_as_varint 12 encoder + | Kind_async_arrow_function -> Pbrt.Encoder.int_as_varint 13 encoder + | Kind_async_function -> Pbrt.Encoder.int_as_varint 14 encoder + | Kind_async_concise_method -> Pbrt.Encoder.int_as_varint 15 encoder + | Kind_static_async_concise_method -> Pbrt.Encoder.int_as_varint 16 encoder + | Kind_async_concise_generator_method -> Pbrt.Encoder.int_as_varint 17 encoder + | Kind_static_async_concise_generator_method -> Pbrt.Encoder.int_as_varint 18 encoder + | Kind_async_generator_function -> Pbrt.Encoder.int_as_varint 19 encoder + | Kind_generator_function -> Pbrt.Encoder.int_as_varint 20 encoder + | Kind_concise_generator_method -> Pbrt.Encoder.int_as_varint 21 encoder + | Kind_static_concise_generator_method -> Pbrt.Encoder.int_as_varint 22 encoder + | Kind_concise_method -> Pbrt.Encoder.int_as_varint 23 encoder + | Kind_static_concise_method -> Pbrt.Encoder.int_as_varint 24 encoder + | Kind_class_members_initializer_function -> Pbrt.Encoder.int_as_varint 25 encoder + | Kind_class_static_initializer_function -> Pbrt.Encoder.int_as_varint 26 encoder + | Kind_invalid -> Pbrt.Encoder.int_as_varint 27 encoder + +let rec encode_pb_interned_v8_js_function (v:interned_v8_js_function) encoder = + if interned_v8_js_function_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if interned_v8_js_function_has_v8_js_function_name_iid v then ( + Pbrt.Encoder.int64_as_varint v.v8_js_function_name_iid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if interned_v8_js_function_has_v8_js_script_iid v then ( + Pbrt.Encoder.int64_as_varint v.v8_js_script_iid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if interned_v8_js_function_has_is_toplevel v then ( + Pbrt.Encoder.bool v.is_toplevel encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if interned_v8_js_function_has_kind v then ( + encode_pb_interned_v8_js_function_kind v.kind encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if interned_v8_js_function_has_byte_offset v then ( + Pbrt.Encoder.int32_as_varint v.byte_offset encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if interned_v8_js_function_has_line v then ( + Pbrt.Encoder.int32_as_varint v.line encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if interned_v8_js_function_has_column v then ( + Pbrt.Encoder.int32_as_varint v.column encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_interned_v8_isolate_code_range (v:interned_v8_isolate_code_range) encoder = + if interned_v8_isolate_code_range_has_base_address v then ( + Pbrt.Encoder.int64_as_varint v.base_address encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if interned_v8_isolate_code_range_has_size v then ( + Pbrt.Encoder.int64_as_varint v.size encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if interned_v8_isolate_code_range_has_embedded_blob_code_copy_start_address v then ( + Pbrt.Encoder.int64_as_varint v.embedded_blob_code_copy_start_address encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if interned_v8_isolate_code_range_has_is_process_wide v then ( + Pbrt.Encoder.bool v.is_process_wide encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_interned_v8_isolate (v:interned_v8_isolate) encoder = + if interned_v8_isolate_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if interned_v8_isolate_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if interned_v8_isolate_has_isolate_id v then ( + Pbrt.Encoder.int32_as_varint v.isolate_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + begin match v.code_range with + | Some x -> + Pbrt.Encoder.nested encode_pb_interned_v8_isolate_code_range x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | None -> (); + end; + if interned_v8_isolate_has_embedded_blob_code_start_address v then ( + Pbrt.Encoder.int64_as_varint v.embedded_blob_code_start_address encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if interned_v8_isolate_has_embedded_blob_code_size v then ( + Pbrt.Encoder.int64_as_varint v.embedded_blob_code_size encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_v8_js_code_tier (v:v8_js_code_tier) encoder = + match v with + | Tier_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Tier_ignition -> Pbrt.Encoder.int_as_varint 1 encoder + | Tier_sparkplug -> Pbrt.Encoder.int_as_varint 2 encoder + | Tier_maglev -> Pbrt.Encoder.int_as_varint 3 encoder + | Tier_turboshaft -> Pbrt.Encoder.int_as_varint 4 encoder + | Tier_turbofan -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_v8_js_code_instructions (v:v8_js_code_instructions) encoder = + begin match v with + | Machine_code x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | Bytecode x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + end + +and encode_pb_v8_js_code (v:v8_js_code) encoder = + if v8_js_code_has_v8_isolate_iid v then ( + Pbrt.Encoder.int64_as_varint v.v8_isolate_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if v8_js_code_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if v8_js_code_has_v8_js_function_iid v then ( + Pbrt.Encoder.int64_as_varint v.v8_js_function_iid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if v8_js_code_has_tier v then ( + encode_pb_v8_js_code_tier v.tier encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if v8_js_code_has_instruction_start v then ( + Pbrt.Encoder.int64_as_varint v.instruction_start encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if v8_js_code_has_instruction_size_bytes v then ( + Pbrt.Encoder.int64_as_varint v.instruction_size_bytes encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + begin match v.instructions with + | None -> () + | Some (Machine_code x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | Some (Bytecode x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + end; + () + +let rec encode_pb_v8_internal_code_type (v:v8_internal_code_type) encoder = + match v with + | Type_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Type_bytecode_handler -> Pbrt.Encoder.int_as_varint 1 encoder + | Type_for_testing -> Pbrt.Encoder.int_as_varint 2 encoder + | Type_builtin -> Pbrt.Encoder.int_as_varint 3 encoder + | Type_wasm_function -> Pbrt.Encoder.int_as_varint 4 encoder + | Type_wasm_to_capi_function -> Pbrt.Encoder.int_as_varint 5 encoder + | Type_wasm_to_js_function -> Pbrt.Encoder.int_as_varint 6 encoder + | Type_js_to_wasm_function -> Pbrt.Encoder.int_as_varint 7 encoder + | Type_js_to_js_function -> Pbrt.Encoder.int_as_varint 8 encoder + | Type_c_wasm_entry -> Pbrt.Encoder.int_as_varint 9 encoder + +let rec encode_pb_v8_internal_code (v:v8_internal_code) encoder = + if v8_internal_code_has_v8_isolate_iid v then ( + Pbrt.Encoder.int64_as_varint v.v8_isolate_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if v8_internal_code_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if v8_internal_code_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if v8_internal_code_has_type_ v then ( + encode_pb_v8_internal_code_type v.type_ encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if v8_internal_code_has_builtin_id v then ( + Pbrt.Encoder.int32_as_varint v.builtin_id encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if v8_internal_code_has_instruction_start v then ( + Pbrt.Encoder.int64_as_varint v.instruction_start encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if v8_internal_code_has_instruction_size_bytes v then ( + Pbrt.Encoder.int64_as_varint v.instruction_size_bytes encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if v8_internal_code_has_machine_code v then ( + Pbrt.Encoder.bytes v.machine_code encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_v8_wasm_code_tier (v:v8_wasm_code_tier) encoder = + match v with + | Tier_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Tier_liftoff -> Pbrt.Encoder.int_as_varint 1 encoder + | Tier_turbofan -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_v8_wasm_code (v:v8_wasm_code) encoder = + if v8_wasm_code_has_v8_isolate_iid v then ( + Pbrt.Encoder.int64_as_varint v.v8_isolate_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if v8_wasm_code_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if v8_wasm_code_has_v8_wasm_script_iid v then ( + Pbrt.Encoder.int64_as_varint v.v8_wasm_script_iid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if v8_wasm_code_has_function_name v then ( + Pbrt.Encoder.string v.function_name encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + if v8_wasm_code_has_tier v then ( + encode_pb_v8_wasm_code_tier v.tier encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if v8_wasm_code_has_code_offset_in_module v then ( + Pbrt.Encoder.int32_as_varint v.code_offset_in_module encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if v8_wasm_code_has_instruction_start v then ( + Pbrt.Encoder.int64_as_varint v.instruction_start encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if v8_wasm_code_has_instruction_size_bytes v then ( + Pbrt.Encoder.int64_as_varint v.instruction_size_bytes encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if v8_wasm_code_has_machine_code v then ( + Pbrt.Encoder.bytes v.machine_code encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_v8_reg_exp_code (v:v8_reg_exp_code) encoder = + if v8_reg_exp_code_has_v8_isolate_iid v then ( + Pbrt.Encoder.int64_as_varint v.v8_isolate_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if v8_reg_exp_code_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + begin match v.pattern with + | Some x -> + Pbrt.Encoder.nested encode_pb_v8_string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + if v8_reg_exp_code_has_instruction_start v then ( + Pbrt.Encoder.int64_as_varint v.instruction_start encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if v8_reg_exp_code_has_instruction_size_bytes v then ( + Pbrt.Encoder.int64_as_varint v.instruction_size_bytes encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if v8_reg_exp_code_has_machine_code v then ( + Pbrt.Encoder.bytes v.machine_code encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_v8_code_move_to_instructions (v:v8_code_move_to_instructions) encoder = + begin match v with + | To_machine_code x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | To_bytecode x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + end + +and encode_pb_v8_code_move (v:v8_code_move) encoder = + if v8_code_move_has_isolate_iid v then ( + Pbrt.Encoder.int64_as_varint v.isolate_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if v8_code_move_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if v8_code_move_has_from_instruction_start_address v then ( + Pbrt.Encoder.int64_as_varint v.from_instruction_start_address encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if v8_code_move_has_to_instruction_start_address v then ( + Pbrt.Encoder.int64_as_varint v.to_instruction_start_address encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if v8_code_move_has_instruction_size_bytes v then ( + Pbrt.Encoder.int64_as_varint v.instruction_size_bytes encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + begin match v.to_instructions with + | None -> () + | Some (To_machine_code x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | Some (To_bytecode x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + end; + () + +let rec encode_pb_v8_code_defaults (v:v8_code_defaults) encoder = + if v8_code_defaults_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_clock_snapshot_clock_builtin_clocks (v:clock_snapshot_clock_builtin_clocks) encoder = + match v with + | Unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Realtime -> Pbrt.Encoder.int_as_varint 1 encoder + | Realtime_coarse -> Pbrt.Encoder.int_as_varint 2 encoder + | Monotonic -> Pbrt.Encoder.int_as_varint 3 encoder + | Monotonic_coarse -> Pbrt.Encoder.int_as_varint 4 encoder + | Monotonic_raw -> Pbrt.Encoder.int_as_varint 5 encoder + | Boottime -> Pbrt.Encoder.int_as_varint 6 encoder + | Builtin_clock_max_id -> Pbrt.Encoder.int_as_varint 63 encoder + +let rec encode_pb_clock_snapshot_clock (v:clock_snapshot_clock) encoder = + if clock_snapshot_clock_has_clock_id v then ( + Pbrt.Encoder.int32_as_varint v.clock_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if clock_snapshot_clock_has_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.timestamp encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if clock_snapshot_clock_has_is_incremental v then ( + Pbrt.Encoder.bool v.is_incremental encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if clock_snapshot_clock_has_unit_multiplier_ns v then ( + Pbrt.Encoder.int64_as_varint v.unit_multiplier_ns encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_clock_snapshot (v:clock_snapshot) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_clock_snapshot_clock x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.clocks encoder; + if clock_snapshot_has_primary_trace_clock v then ( + encode_pb_builtin_clock v.primary_trace_clock encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_cswitch_etw_event_old_thread_wait_reason (v:cswitch_etw_event_old_thread_wait_reason) encoder = + match v with + | Executive -> Pbrt.Encoder.int_as_varint (0) encoder + | Free_page -> Pbrt.Encoder.int_as_varint 1 encoder + | Page_in -> Pbrt.Encoder.int_as_varint 2 encoder + | Pool_allocation -> Pbrt.Encoder.int_as_varint 3 encoder + | Delay_execution -> Pbrt.Encoder.int_as_varint 4 encoder + | Suspend -> Pbrt.Encoder.int_as_varint 5 encoder + | User_request -> Pbrt.Encoder.int_as_varint 6 encoder + | Wr_executive -> Pbrt.Encoder.int_as_varint 7 encoder + | Wr_free_page -> Pbrt.Encoder.int_as_varint 8 encoder + | Wr_page_in -> Pbrt.Encoder.int_as_varint 9 encoder + | Wr_pool_allocation -> Pbrt.Encoder.int_as_varint 10 encoder + | Wr_delay_execution -> Pbrt.Encoder.int_as_varint 11 encoder + | Wr_suspended -> Pbrt.Encoder.int_as_varint 12 encoder + | Wr_user_request -> Pbrt.Encoder.int_as_varint 13 encoder + | Wr_event_pair -> Pbrt.Encoder.int_as_varint 14 encoder + | Wr_queue -> Pbrt.Encoder.int_as_varint 15 encoder + | Wr_lpc_receiver -> Pbrt.Encoder.int_as_varint 16 encoder + | Wr_lpc_reply -> Pbrt.Encoder.int_as_varint 17 encoder + | Wr_virtual_memory -> Pbrt.Encoder.int_as_varint 18 encoder + | Wr_page_out -> Pbrt.Encoder.int_as_varint 19 encoder + | Wr_rendez_vous -> Pbrt.Encoder.int_as_varint 20 encoder + | Wr_keyed_event -> Pbrt.Encoder.int_as_varint 21 encoder + | Wr_terminated -> Pbrt.Encoder.int_as_varint 22 encoder + | Wr_process_in_swap -> Pbrt.Encoder.int_as_varint 23 encoder + | Wr_cpu_rate_control -> Pbrt.Encoder.int_as_varint 24 encoder + | Wr_callout_stack -> Pbrt.Encoder.int_as_varint 25 encoder + | Wr_kernel -> Pbrt.Encoder.int_as_varint 26 encoder + | Wr_resource -> Pbrt.Encoder.int_as_varint 27 encoder + | Wr_push_lock -> Pbrt.Encoder.int_as_varint 28 encoder + | Wr_mutex -> Pbrt.Encoder.int_as_varint 29 encoder + | Wr_quantum_end -> Pbrt.Encoder.int_as_varint 30 encoder + | Wr_dispatch_int -> Pbrt.Encoder.int_as_varint 31 encoder + | Wr_preempted -> Pbrt.Encoder.int_as_varint 32 encoder + | Wr_yield_execution -> Pbrt.Encoder.int_as_varint 33 encoder + | Wr_fast_mutex -> Pbrt.Encoder.int_as_varint 34 encoder + | Wr_guard_mutex -> Pbrt.Encoder.int_as_varint 35 encoder + | Wr_rundown -> Pbrt.Encoder.int_as_varint 36 encoder + | Maximum_wait_reason -> Pbrt.Encoder.int_as_varint 37 encoder + +let rec encode_pb_cswitch_etw_event_old_thread_wait_mode (v:cswitch_etw_event_old_thread_wait_mode) encoder = + match v with + | Kernel_mode -> Pbrt.Encoder.int_as_varint (0) encoder + | User_mode -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_cswitch_etw_event_old_thread_state (v:cswitch_etw_event_old_thread_state) encoder = + match v with + | Initialized -> Pbrt.Encoder.int_as_varint (0) encoder + | Ready -> Pbrt.Encoder.int_as_varint 1 encoder + | Running -> Pbrt.Encoder.int_as_varint 2 encoder + | Standby -> Pbrt.Encoder.int_as_varint 3 encoder + | Terminated -> Pbrt.Encoder.int_as_varint 4 encoder + | Waiting -> Pbrt.Encoder.int_as_varint 5 encoder + | Transition -> Pbrt.Encoder.int_as_varint 6 encoder + | Deferred_ready -> Pbrt.Encoder.int_as_varint 7 encoder + +let rec encode_pb_cswitch_etw_event_old_thread_wait_reason_enum_or_int (v:cswitch_etw_event_old_thread_wait_reason_enum_or_int) encoder = + begin match v with + | Old_thread_wait_reason x -> + encode_pb_cswitch_etw_event_old_thread_wait_reason x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + | Old_thread_wait_reason_int x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + end + +and encode_pb_cswitch_etw_event_old_thread_wait_mode_enum_or_int (v:cswitch_etw_event_old_thread_wait_mode_enum_or_int) encoder = + begin match v with + | Old_thread_wait_mode x -> + encode_pb_cswitch_etw_event_old_thread_wait_mode x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + | Old_thread_wait_mode_int x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + end + +and encode_pb_cswitch_etw_event_old_thread_state_enum_or_int (v:cswitch_etw_event_old_thread_state_enum_or_int) encoder = + begin match v with + | Old_thread_state x -> + encode_pb_cswitch_etw_event_old_thread_state x encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + | Old_thread_state_int x -> + Pbrt.Encoder.int32_as_zigzag x encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + end + +and encode_pb_cswitch_etw_event (v:cswitch_etw_event) encoder = + if cswitch_etw_event_has_new_thread_id v then ( + Pbrt.Encoder.int32_as_varint v.new_thread_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if cswitch_etw_event_has_old_thread_id v then ( + Pbrt.Encoder.int32_as_varint v.old_thread_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if cswitch_etw_event_has_new_thread_priority v then ( + Pbrt.Encoder.int32_as_zigzag v.new_thread_priority encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if cswitch_etw_event_has_old_thread_priority v then ( + Pbrt.Encoder.int32_as_zigzag v.old_thread_priority encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if cswitch_etw_event_has_previous_c_state v then ( + Pbrt.Encoder.int32_as_varint v.previous_c_state encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + begin match v.old_thread_wait_reason_enum_or_int with + | None -> () + | Some (Old_thread_wait_reason x) -> + encode_pb_cswitch_etw_event_old_thread_wait_reason x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + | Some (Old_thread_wait_reason_int x) -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + end; + begin match v.old_thread_wait_mode_enum_or_int with + | None -> () + | Some (Old_thread_wait_mode x) -> + encode_pb_cswitch_etw_event_old_thread_wait_mode x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + | Some (Old_thread_wait_mode_int x) -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + end; + begin match v.old_thread_state_enum_or_int with + | None -> () + | Some (Old_thread_state x) -> + encode_pb_cswitch_etw_event_old_thread_state x encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + | Some (Old_thread_state_int x) -> + Pbrt.Encoder.int32_as_zigzag x encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + end; + if cswitch_etw_event_has_old_thread_wait_ideal_processor v then ( + Pbrt.Encoder.int32_as_zigzag v.old_thread_wait_ideal_processor encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if cswitch_etw_event_has_new_thread_wait_time v then ( + Pbrt.Encoder.int32_as_varint v.new_thread_wait_time encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_ready_thread_etw_event_adjust_reason (v:ready_thread_etw_event_adjust_reason) encoder = + match v with + | Ignore_the_increment -> Pbrt.Encoder.int_as_varint (0) encoder + | Apply_increment -> Pbrt.Encoder.int_as_varint 1 encoder + | Apply_increment_boost -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_ready_thread_etw_event_trace_flag (v:ready_thread_etw_event_trace_flag) encoder = + match v with + | Trace_flag_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Thread_readied -> Pbrt.Encoder.int_as_varint 1 encoder + | Kernel_stack_swapped_out -> Pbrt.Encoder.int_as_varint 2 encoder + | Process_address_swapped_out -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_ready_thread_etw_event_adjust_reason_enum_or_int (v:ready_thread_etw_event_adjust_reason_enum_or_int) encoder = + begin match v with + | Adjust_reason x -> + encode_pb_ready_thread_etw_event_adjust_reason x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Adjust_reason_int x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + end + +and encode_pb_ready_thread_etw_event_flag_enum_or_int (v:ready_thread_etw_event_flag_enum_or_int) encoder = + begin match v with + | Flag x -> + encode_pb_ready_thread_etw_event_trace_flag x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Flag_int x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + end + +and encode_pb_ready_thread_etw_event (v:ready_thread_etw_event) encoder = + if ready_thread_etw_event_has_t_thread_id v then ( + Pbrt.Encoder.int32_as_varint v.t_thread_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.adjust_reason_enum_or_int with + | None -> () + | Some (Adjust_reason x) -> + encode_pb_ready_thread_etw_event_adjust_reason x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Some (Adjust_reason_int x) -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + end; + if ready_thread_etw_event_has_adjust_increment v then ( + Pbrt.Encoder.int32_as_zigzag v.adjust_increment encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + begin match v.flag_enum_or_int with + | None -> () + | Some (Flag x) -> + encode_pb_ready_thread_etw_event_trace_flag x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Some (Flag_int x) -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + end; + () + +let rec encode_pb_mem_info_etw_event (v:mem_info_etw_event) encoder = + if mem_info_etw_event_has_priority_levels v then ( + Pbrt.Encoder.int32_as_varint v.priority_levels encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_zero_page_count v then ( + Pbrt.Encoder.int64_as_varint v.zero_page_count encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_free_page_count v then ( + Pbrt.Encoder.int64_as_varint v.free_page_count encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_modified_page_count v then ( + Pbrt.Encoder.int64_as_varint v.modified_page_count encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_modified_no_write_page_count v then ( + Pbrt.Encoder.int64_as_varint v.modified_no_write_page_count encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_bad_page_count v then ( + Pbrt.Encoder.int64_as_varint v.bad_page_count encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ) v.standby_page_counts encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ) v.repurposed_page_counts encoder; + if mem_info_etw_event_has_modified_page_count_page_file v then ( + Pbrt.Encoder.int64_as_varint v.modified_page_count_page_file encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_paged_pool_page_count v then ( + Pbrt.Encoder.int64_as_varint v.paged_pool_page_count encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_non_paged_pool_page_count v then ( + Pbrt.Encoder.int64_as_varint v.non_paged_pool_page_count encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_mdl_page_count v then ( + Pbrt.Encoder.int64_as_varint v.mdl_page_count encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if mem_info_etw_event_has_commit_page_count v then ( + Pbrt.Encoder.int64_as_varint v.commit_page_count encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_file_io_create_etw_event (v:file_io_create_etw_event) encoder = + if file_io_create_etw_event_has_irp_ptr v then ( + Pbrt.Encoder.int64_as_varint v.irp_ptr encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if file_io_create_etw_event_has_file_object v then ( + Pbrt.Encoder.int64_as_varint v.file_object encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if file_io_create_etw_event_has_ttid v then ( + Pbrt.Encoder.int32_as_varint v.ttid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if file_io_create_etw_event_has_create_options v then ( + Pbrt.Encoder.int32_as_varint v.create_options encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if file_io_create_etw_event_has_file_attributes v then ( + Pbrt.Encoder.int32_as_varint v.file_attributes encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if file_io_create_etw_event_has_share_access v then ( + Pbrt.Encoder.int32_as_varint v.share_access encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if file_io_create_etw_event_has_open_path v then ( + Pbrt.Encoder.string v.open_path encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_file_io_dir_enum_etw_event (v:file_io_dir_enum_etw_event) encoder = + if file_io_dir_enum_etw_event_has_irp_ptr v then ( + Pbrt.Encoder.int64_as_varint v.irp_ptr encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if file_io_dir_enum_etw_event_has_file_object v then ( + Pbrt.Encoder.int64_as_varint v.file_object encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if file_io_dir_enum_etw_event_has_file_key v then ( + Pbrt.Encoder.int64_as_varint v.file_key encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if file_io_dir_enum_etw_event_has_ttid v then ( + Pbrt.Encoder.int32_as_varint v.ttid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if file_io_dir_enum_etw_event_has_length v then ( + Pbrt.Encoder.int32_as_varint v.length encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if file_io_dir_enum_etw_event_has_info_class v then ( + Pbrt.Encoder.int32_as_varint v.info_class encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if file_io_dir_enum_etw_event_has_file_index v then ( + Pbrt.Encoder.int32_as_varint v.file_index encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if file_io_dir_enum_etw_event_has_file_name v then ( + Pbrt.Encoder.string v.file_name encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_file_io_info_etw_event (v:file_io_info_etw_event) encoder = + if file_io_info_etw_event_has_irp_ptr v then ( + Pbrt.Encoder.int64_as_varint v.irp_ptr encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if file_io_info_etw_event_has_file_object v then ( + Pbrt.Encoder.int64_as_varint v.file_object encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if file_io_info_etw_event_has_file_key v then ( + Pbrt.Encoder.int64_as_varint v.file_key encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if file_io_info_etw_event_has_extra_info v then ( + Pbrt.Encoder.int64_as_varint v.extra_info encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if file_io_info_etw_event_has_ttid v then ( + Pbrt.Encoder.int32_as_varint v.ttid encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if file_io_info_etw_event_has_info_class v then ( + Pbrt.Encoder.int32_as_varint v.info_class encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_file_io_read_write_etw_event (v:file_io_read_write_etw_event) encoder = + if file_io_read_write_etw_event_has_offset v then ( + Pbrt.Encoder.int64_as_varint v.offset encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if file_io_read_write_etw_event_has_irp_ptr v then ( + Pbrt.Encoder.int64_as_varint v.irp_ptr encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if file_io_read_write_etw_event_has_file_object v then ( + Pbrt.Encoder.int64_as_varint v.file_object encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if file_io_read_write_etw_event_has_file_key v then ( + Pbrt.Encoder.int64_as_varint v.file_key encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if file_io_read_write_etw_event_has_ttid v then ( + Pbrt.Encoder.int32_as_varint v.ttid encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if file_io_read_write_etw_event_has_io_size v then ( + Pbrt.Encoder.int32_as_varint v.io_size encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if file_io_read_write_etw_event_has_io_flags v then ( + Pbrt.Encoder.int32_as_varint v.io_flags encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_file_io_simple_op_etw_event (v:file_io_simple_op_etw_event) encoder = + if file_io_simple_op_etw_event_has_irp_ptr v then ( + Pbrt.Encoder.int64_as_varint v.irp_ptr encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if file_io_simple_op_etw_event_has_file_object v then ( + Pbrt.Encoder.int64_as_varint v.file_object encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if file_io_simple_op_etw_event_has_file_key v then ( + Pbrt.Encoder.int64_as_varint v.file_key encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if file_io_simple_op_etw_event_has_ttid v then ( + Pbrt.Encoder.int32_as_varint v.ttid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_file_io_op_end_etw_event (v:file_io_op_end_etw_event) encoder = + if file_io_op_end_etw_event_has_irp_ptr v then ( + Pbrt.Encoder.int64_as_varint v.irp_ptr encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if file_io_op_end_etw_event_has_extra_info v then ( + Pbrt.Encoder.int64_as_varint v.extra_info encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if file_io_op_end_etw_event_has_nt_status v then ( + Pbrt.Encoder.int32_as_varint v.nt_status encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_etw_trace_event_event (v:etw_trace_event_event) encoder = + begin match v with + | C_switch x -> + Pbrt.Encoder.nested encode_pb_cswitch_etw_event x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Ready_thread x -> + Pbrt.Encoder.nested encode_pb_ready_thread_etw_event x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | Mem_info x -> + Pbrt.Encoder.nested encode_pb_mem_info_etw_event x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | File_io_create x -> + Pbrt.Encoder.nested encode_pb_file_io_create_etw_event x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | File_io_dir_enum x -> + Pbrt.Encoder.nested encode_pb_file_io_dir_enum_etw_event x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | File_io_info x -> + Pbrt.Encoder.nested encode_pb_file_io_info_etw_event x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + | File_io_read_write x -> + Pbrt.Encoder.nested encode_pb_file_io_read_write_etw_event x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + | File_io_simple_op x -> + Pbrt.Encoder.nested encode_pb_file_io_simple_op_etw_event x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | File_io_op_end x -> + Pbrt.Encoder.nested encode_pb_file_io_op_end_etw_event x encoder; + Pbrt.Encoder.key 12 Pbrt.Bytes encoder; + end + +and encode_pb_etw_trace_event (v:etw_trace_event) encoder = + if etw_trace_event_has_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.timestamp encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if etw_trace_event_has_cpu v then ( + Pbrt.Encoder.int32_as_varint v.cpu encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if etw_trace_event_has_thread_id v then ( + Pbrt.Encoder.int32_as_varint v.thread_id encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + begin match v.event with + | None -> () + | Some (C_switch x) -> + Pbrt.Encoder.nested encode_pb_cswitch_etw_event x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Some (Ready_thread x) -> + Pbrt.Encoder.nested encode_pb_ready_thread_etw_event x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | Some (Mem_info x) -> + Pbrt.Encoder.nested encode_pb_mem_info_etw_event x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | Some (File_io_create x) -> + Pbrt.Encoder.nested encode_pb_file_io_create_etw_event x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | Some (File_io_dir_enum x) -> + Pbrt.Encoder.nested encode_pb_file_io_dir_enum_etw_event x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | Some (File_io_info x) -> + Pbrt.Encoder.nested encode_pb_file_io_info_etw_event x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + | Some (File_io_read_write x) -> + Pbrt.Encoder.nested encode_pb_file_io_read_write_etw_event x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + | Some (File_io_simple_op x) -> + Pbrt.Encoder.nested encode_pb_file_io_simple_op_etw_event x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | Some (File_io_op_end x) -> + Pbrt.Encoder.nested encode_pb_file_io_op_end_etw_event x encoder; + Pbrt.Encoder.key 12 Pbrt.Bytes encoder; + end; + () + +let rec encode_pb_etw_trace_event_bundle (v:etw_trace_event_bundle) encoder = + if etw_trace_event_bundle_has_cpu v then ( + Pbrt.Encoder.int32_as_varint v.cpu encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_etw_trace_event x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.event encoder; + () + +let rec encode_pb_evdev_event_input_event (v:evdev_event_input_event) encoder = + if evdev_event_input_event_has_kernel_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.kernel_timestamp encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if evdev_event_input_event_has_type_ v then ( + Pbrt.Encoder.int32_as_varint v.type_ encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if evdev_event_input_event_has_code v then ( + Pbrt.Encoder.int32_as_varint v.code encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if evdev_event_input_event_has_value v then ( + Pbrt.Encoder.int32_as_zigzag v.value encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_evdev_event_event (v:evdev_event_event) encoder = + begin match v with + | Input_event x -> + Pbrt.Encoder.nested encode_pb_evdev_event_input_event x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + end + +and encode_pb_evdev_event (v:evdev_event) encoder = + if evdev_event_has_device_id v then ( + Pbrt.Encoder.int32_as_varint v.device_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.event with + | None -> () + | Some (Input_event x) -> + Pbrt.Encoder.nested encode_pb_evdev_event_input_event x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + end; + () + +let rec encode_pb_field_descriptor_proto_label (v:field_descriptor_proto_label) encoder = + match v with + | Label_optional -> Pbrt.Encoder.int_as_varint 1 encoder + | Label_required -> Pbrt.Encoder.int_as_varint 2 encoder + | Label_repeated -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_field_descriptor_proto_type (v:field_descriptor_proto_type) encoder = + match v with + | Type_double -> Pbrt.Encoder.int_as_varint 1 encoder + | Type_float -> Pbrt.Encoder.int_as_varint 2 encoder + | Type_int64 -> Pbrt.Encoder.int_as_varint 3 encoder + | Type_uint64 -> Pbrt.Encoder.int_as_varint 4 encoder + | Type_int32 -> Pbrt.Encoder.int_as_varint 5 encoder + | Type_fixed64 -> Pbrt.Encoder.int_as_varint 6 encoder + | Type_fixed32 -> Pbrt.Encoder.int_as_varint 7 encoder + | Type_bool -> Pbrt.Encoder.int_as_varint 8 encoder + | Type_string -> Pbrt.Encoder.int_as_varint 9 encoder + | Type_group -> Pbrt.Encoder.int_as_varint 10 encoder + | Type_message -> Pbrt.Encoder.int_as_varint 11 encoder + | Type_bytes -> Pbrt.Encoder.int_as_varint 12 encoder + | Type_uint32 -> Pbrt.Encoder.int_as_varint 13 encoder + | Type_enum -> Pbrt.Encoder.int_as_varint 14 encoder + | Type_sfixed32 -> Pbrt.Encoder.int_as_varint 15 encoder + | Type_sfixed64 -> Pbrt.Encoder.int_as_varint 16 encoder + | Type_sint32 -> Pbrt.Encoder.int_as_varint 17 encoder + | Type_sint64 -> Pbrt.Encoder.int_as_varint 18 encoder + +let rec encode_pb_uninterpreted_option_name_part (v:uninterpreted_option_name_part) encoder = + if uninterpreted_option_name_part_has_name_part v then ( + Pbrt.Encoder.string v.name_part encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if uninterpreted_option_name_part_has_is_extension v then ( + Pbrt.Encoder.bool v.is_extension encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_uninterpreted_option (v:uninterpreted_option) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_uninterpreted_option_name_part x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.name encoder; + if uninterpreted_option_has_identifier_value v then ( + Pbrt.Encoder.string v.identifier_value encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if uninterpreted_option_has_positive_int_value v then ( + Pbrt.Encoder.int64_as_varint v.positive_int_value encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if uninterpreted_option_has_negative_int_value v then ( + Pbrt.Encoder.int64_as_varint v.negative_int_value encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if uninterpreted_option_has_double_value v then ( + Pbrt.Encoder.float_as_bits64 v.double_value encoder; + Pbrt.Encoder.key 6 Pbrt.Bits64 encoder; + ); + if uninterpreted_option_has_string_value v then ( + Pbrt.Encoder.bytes v.string_value encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ); + if uninterpreted_option_has_aggregate_value v then ( + Pbrt.Encoder.string v.aggregate_value encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_field_options (v:field_options) encoder = + if field_options_has_packed v then ( + Pbrt.Encoder.bool v.packed encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_uninterpreted_option x encoder; + Pbrt.Encoder.key 999 Pbrt.Bytes encoder; + ) v.uninterpreted_option encoder; + () + +let rec encode_pb_field_descriptor_proto (v:field_descriptor_proto) encoder = + if field_descriptor_proto_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if field_descriptor_proto_has_number v then ( + Pbrt.Encoder.int32_as_varint v.number encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if field_descriptor_proto_has_label v then ( + encode_pb_field_descriptor_proto_label v.label encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if field_descriptor_proto_has_type_ v then ( + encode_pb_field_descriptor_proto_type v.type_ encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if field_descriptor_proto_has_type_name v then ( + Pbrt.Encoder.string v.type_name encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ); + if field_descriptor_proto_has_extendee v then ( + Pbrt.Encoder.string v.extendee encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if field_descriptor_proto_has_default_value v then ( + Pbrt.Encoder.string v.default_value encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ); + begin match v.options with + | Some x -> + Pbrt.Encoder.nested encode_pb_field_options x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | None -> (); + end; + if field_descriptor_proto_has_oneof_index v then ( + Pbrt.Encoder.int32_as_varint v.oneof_index encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_enum_value_descriptor_proto (v:enum_value_descriptor_proto) encoder = + if enum_value_descriptor_proto_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if enum_value_descriptor_proto_has_number v then ( + Pbrt.Encoder.int32_as_varint v.number encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_enum_descriptor_proto (v:enum_descriptor_proto) encoder = + if enum_descriptor_proto_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_enum_value_descriptor_proto x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.value encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ) v.reserved_name encoder; + () + +let rec encode_pb_oneof_options (v:oneof_options) encoder = +() + +let rec encode_pb_oneof_descriptor_proto (v:oneof_descriptor_proto) encoder = + if oneof_descriptor_proto_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if oneof_descriptor_proto_has_options v then ( + Pbrt.Encoder.empty_nested encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_descriptor_proto_reserved_range (v:descriptor_proto_reserved_range) encoder = + if descriptor_proto_reserved_range_has_start v then ( + Pbrt.Encoder.int32_as_varint v.start encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if descriptor_proto_reserved_range_has_end_ v then ( + Pbrt.Encoder.int32_as_varint v.end_ encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_descriptor_proto (v:descriptor_proto) encoder = + if descriptor_proto_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_field_descriptor_proto x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.field encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_field_descriptor_proto x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ) v.extension encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_descriptor_proto x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.nested_type encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_enum_descriptor_proto x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.enum_type encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_oneof_descriptor_proto x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ) v.oneof_decl encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_descriptor_proto_reserved_range x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + ) v.reserved_range encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + ) v.reserved_name encoder; + () + +let rec encode_pb_file_descriptor_proto (v:file_descriptor_proto) encoder = + if file_descriptor_proto_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if file_descriptor_proto_has_package v then ( + Pbrt.Encoder.string v.package encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.dependency encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ) v.public_dependency encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ) v.weak_dependency encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_descriptor_proto x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.message_type encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_enum_descriptor_proto x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ) v.enum_type encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_field_descriptor_proto x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.extension encoder; + () + +let rec encode_pb_file_descriptor_set (v:file_descriptor_set) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_file_descriptor_proto x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.file encoder; + () + +let rec encode_pb_extension_descriptor (v:extension_descriptor) encoder = + begin match v.extension_set with + | Some x -> + Pbrt.Encoder.nested encode_pb_file_descriptor_set x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_inode_file_map_entry_type (v:inode_file_map_entry_type) encoder = + match v with + | Unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | File -> Pbrt.Encoder.int_as_varint 1 encoder + | Directory -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_inode_file_map_entry (v:inode_file_map_entry) encoder = + if inode_file_map_entry_has_inode_number v then ( + Pbrt.Encoder.int64_as_varint v.inode_number encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.paths encoder; + if inode_file_map_entry_has_type_ v then ( + encode_pb_inode_file_map_entry_type v.type_ encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_inode_file_map (v:inode_file_map) encoder = + if inode_file_map_has_block_device_id v then ( + Pbrt.Encoder.int64_as_varint v.block_device_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.mount_points encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_inode_file_map_entry x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.entries encoder; + () + +let rec encode_pb_generic_kernel_cpu_frequency_event (v:generic_kernel_cpu_frequency_event) encoder = + if generic_kernel_cpu_frequency_event_has_cpu v then ( + Pbrt.Encoder.int32_as_varint v.cpu encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if generic_kernel_cpu_frequency_event_has_freq_hz v then ( + Pbrt.Encoder.int64_as_varint v.freq_hz encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_generic_kernel_task_state_event_task_state_enum (v:generic_kernel_task_state_event_task_state_enum) encoder = + match v with + | Task_state_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Task_state_created -> Pbrt.Encoder.int_as_varint 1 encoder + | Task_state_runnable -> Pbrt.Encoder.int_as_varint 2 encoder + | Task_state_running -> Pbrt.Encoder.int_as_varint 3 encoder + | Task_state_interruptible_sleep -> Pbrt.Encoder.int_as_varint 4 encoder + | Task_state_uninterruptible_sleep -> Pbrt.Encoder.int_as_varint 5 encoder + | Task_state_stopped -> Pbrt.Encoder.int_as_varint 6 encoder + | Task_state_dead -> Pbrt.Encoder.int_as_varint 7 encoder + | Task_state_destroyed -> Pbrt.Encoder.int_as_varint 8 encoder + +let rec encode_pb_generic_kernel_task_state_event (v:generic_kernel_task_state_event) encoder = + if generic_kernel_task_state_event_has_cpu v then ( + Pbrt.Encoder.int32_as_varint v.cpu encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if generic_kernel_task_state_event_has_comm v then ( + Pbrt.Encoder.string v.comm encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if generic_kernel_task_state_event_has_tid v then ( + Pbrt.Encoder.int64_as_varint v.tid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if generic_kernel_task_state_event_has_state v then ( + encode_pb_generic_kernel_task_state_event_task_state_enum v.state encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if generic_kernel_task_state_event_has_prio v then ( + Pbrt.Encoder.int32_as_varint v.prio encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_generic_kernel_task_rename_event (v:generic_kernel_task_rename_event) encoder = + if generic_kernel_task_rename_event_has_tid v then ( + Pbrt.Encoder.int64_as_varint v.tid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if generic_kernel_task_rename_event_has_comm v then ( + Pbrt.Encoder.string v.comm encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_generic_kernel_process_tree_thread (v:generic_kernel_process_tree_thread) encoder = + if generic_kernel_process_tree_thread_has_tid v then ( + Pbrt.Encoder.int64_as_varint v.tid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if generic_kernel_process_tree_thread_has_pid v then ( + Pbrt.Encoder.int64_as_varint v.pid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if generic_kernel_process_tree_thread_has_comm v then ( + Pbrt.Encoder.string v.comm encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if generic_kernel_process_tree_thread_has_is_main_thread v then ( + Pbrt.Encoder.bool v.is_main_thread encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_generic_kernel_process_tree_process (v:generic_kernel_process_tree_process) encoder = + if generic_kernel_process_tree_process_has_pid v then ( + Pbrt.Encoder.int64_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if generic_kernel_process_tree_process_has_ppid v then ( + Pbrt.Encoder.int64_as_varint v.ppid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if generic_kernel_process_tree_process_has_cmdline v then ( + Pbrt.Encoder.string v.cmdline encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_generic_kernel_process_tree (v:generic_kernel_process_tree) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_generic_kernel_process_tree_process x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.processes encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_generic_kernel_process_tree_thread x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.threads encoder; + () + +let rec encode_pb_gpu_counter_event_gpu_counter_value (v:gpu_counter_event_gpu_counter_value) encoder = + begin match v with + | Int_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Double_value x -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 3 Pbrt.Bits64 encoder; + end + +and encode_pb_gpu_counter_event_gpu_counter (v:gpu_counter_event_gpu_counter) encoder = + if gpu_counter_event_gpu_counter_has_counter_id v then ( + Pbrt.Encoder.int32_as_varint v.counter_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.value with + | None -> () + | Some (Int_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Some (Double_value x) -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 3 Pbrt.Bits64 encoder; + end; + () + +let rec encode_pb_gpu_counter_event (v:gpu_counter_event) encoder = + begin match v.counter_descriptor with + | Some x -> + Pbrt.Encoder.nested encode_pb_gpu_counter_descriptor x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_gpu_counter_event_gpu_counter x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.counters encoder; + if gpu_counter_event_has_gpu_id v then ( + Pbrt.Encoder.int32_as_varint v.gpu_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_gpu_log_severity (v:gpu_log_severity) encoder = + match v with + | Log_severity_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Log_severity_verbose -> Pbrt.Encoder.int_as_varint 1 encoder + | Log_severity_debug -> Pbrt.Encoder.int_as_varint 2 encoder + | Log_severity_info -> Pbrt.Encoder.int_as_varint 3 encoder + | Log_severity_warning -> Pbrt.Encoder.int_as_varint 4 encoder + | Log_severity_error -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_gpu_log (v:gpu_log) encoder = + if gpu_log_has_severity v then ( + encode_pb_gpu_log_severity v.severity encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if gpu_log_has_tag v then ( + Pbrt.Encoder.string v.tag encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if gpu_log_has_log_message v then ( + Pbrt.Encoder.string v.log_message encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_gpu_render_stage_event_extra_data (v:gpu_render_stage_event_extra_data) encoder = + if gpu_render_stage_event_extra_data_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if gpu_render_stage_event_extra_data_has_value v then ( + Pbrt.Encoder.string v.value encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_gpu_render_stage_event_specifications_context_spec (v:gpu_render_stage_event_specifications_context_spec) encoder = + if gpu_render_stage_event_specifications_context_spec_has_context v then ( + Pbrt.Encoder.int64_as_varint v.context encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_specifications_context_spec_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_gpu_render_stage_event_specifications_description (v:gpu_render_stage_event_specifications_description) encoder = + if gpu_render_stage_event_specifications_description_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if gpu_render_stage_event_specifications_description_has_description v then ( + Pbrt.Encoder.string v.description encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_gpu_render_stage_event_specifications (v:gpu_render_stage_event_specifications) encoder = + begin match v.context_spec with + | Some x -> + Pbrt.Encoder.nested encode_pb_gpu_render_stage_event_specifications_context_spec x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_gpu_render_stage_event_specifications_description x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.hw_queue encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_gpu_render_stage_event_specifications_description x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.stage encoder; + () + +let rec encode_pb_gpu_render_stage_event (v:gpu_render_stage_event) encoder = + if gpu_render_stage_event_has_event_id v then ( + Pbrt.Encoder.int64_as_varint v.event_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_duration v then ( + Pbrt.Encoder.int64_as_varint v.duration encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_hw_queue_iid v then ( + Pbrt.Encoder.int64_as_varint v.hw_queue_iid encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_stage_iid v then ( + Pbrt.Encoder.int64_as_varint v.stage_iid encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_gpu_id v then ( + Pbrt.Encoder.int32_as_varint v.gpu_id encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_context v then ( + Pbrt.Encoder.int64_as_varint v.context encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_render_target_handle v then ( + Pbrt.Encoder.int64_as_varint v.render_target_handle encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_submission_id v then ( + Pbrt.Encoder.int32_as_varint v.submission_id encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_gpu_render_stage_event_extra_data x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ) v.extra_data encoder; + if gpu_render_stage_event_has_render_pass_handle v then ( + Pbrt.Encoder.int64_as_varint v.render_pass_handle encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_render_pass_instance_id v then ( + Pbrt.Encoder.int64_as_varint v.render_pass_instance_id encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ) v.render_subpass_index_mask encoder; + if gpu_render_stage_event_has_command_buffer_handle v then ( + Pbrt.Encoder.int64_as_varint v.command_buffer_handle encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + begin match v.specifications with + | Some x -> + Pbrt.Encoder.nested encode_pb_gpu_render_stage_event_specifications x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | None -> (); + end; + if gpu_render_stage_event_has_hw_queue_id v then ( + Pbrt.Encoder.int32_as_varint v.hw_queue_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if gpu_render_stage_event_has_stage_id v then ( + Pbrt.Encoder.int32_as_varint v.stage_id encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_interned_graphics_context_api (v:interned_graphics_context_api) encoder = + match v with + | Undefined -> Pbrt.Encoder.int_as_varint (0) encoder + | Open_gl -> Pbrt.Encoder.int_as_varint 1 encoder + | Vulkan -> Pbrt.Encoder.int_as_varint 2 encoder + | Open_cl -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_interned_graphics_context (v:interned_graphics_context) encoder = + if interned_graphics_context_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if interned_graphics_context_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if interned_graphics_context_has_api v then ( + encode_pb_interned_graphics_context_api v.api encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_interned_gpu_render_stage_specification_render_stage_category (v:interned_gpu_render_stage_specification_render_stage_category) encoder = + match v with + | Other -> Pbrt.Encoder.int_as_varint (0) encoder + | Graphics -> Pbrt.Encoder.int_as_varint 1 encoder + | Compute -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_interned_gpu_render_stage_specification (v:interned_gpu_render_stage_specification) encoder = + if interned_gpu_render_stage_specification_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if interned_gpu_render_stage_specification_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if interned_gpu_render_stage_specification_has_description v then ( + Pbrt.Encoder.string v.description encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if interned_gpu_render_stage_specification_has_category v then ( + encode_pb_interned_gpu_render_stage_specification_render_stage_category v.category encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_vulkan_api_event_vk_debug_utils_object_name (v:vulkan_api_event_vk_debug_utils_object_name) encoder = + if vulkan_api_event_vk_debug_utils_object_name_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if vulkan_api_event_vk_debug_utils_object_name_has_vk_device v then ( + Pbrt.Encoder.int64_as_varint v.vk_device encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if vulkan_api_event_vk_debug_utils_object_name_has_object_type v then ( + Pbrt.Encoder.int32_as_varint v.object_type encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if vulkan_api_event_vk_debug_utils_object_name_has_object_ v then ( + Pbrt.Encoder.int64_as_varint v.object_ encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if vulkan_api_event_vk_debug_utils_object_name_has_object_name v then ( + Pbrt.Encoder.string v.object_name encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_vulkan_api_event_vk_queue_submit (v:vulkan_api_event_vk_queue_submit) encoder = + if vulkan_api_event_vk_queue_submit_has_duration_ns v then ( + Pbrt.Encoder.int64_as_varint v.duration_ns encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if vulkan_api_event_vk_queue_submit_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if vulkan_api_event_vk_queue_submit_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if vulkan_api_event_vk_queue_submit_has_vk_queue v then ( + Pbrt.Encoder.int64_as_varint v.vk_queue encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ) v.vk_command_buffers encoder; + if vulkan_api_event_vk_queue_submit_has_submission_id v then ( + Pbrt.Encoder.int32_as_varint v.submission_id encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_vulkan_api_event (v:vulkan_api_event) encoder = + begin match v with + | Vk_debug_utils_object_name x -> + Pbrt.Encoder.nested encode_pb_vulkan_api_event_vk_debug_utils_object_name x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | Vk_queue_submit x -> + Pbrt.Encoder.nested encode_pb_vulkan_api_event_vk_queue_submit x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + end + +let rec encode_pb_vulkan_memory_event_annotation_value (v:vulkan_memory_event_annotation_value) encoder = + begin match v with + | Int_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Double_value x -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 3 Pbrt.Bits64 encoder; + | String_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + end + +and encode_pb_vulkan_memory_event_annotation (v:vulkan_memory_event_annotation) encoder = + if vulkan_memory_event_annotation_has_key_iid v then ( + Pbrt.Encoder.int64_as_varint v.key_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.value with + | None -> () + | Some (Int_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Some (Double_value x) -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 3 Pbrt.Bits64 encoder; + | Some (String_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + end; + () + +let rec encode_pb_vulkan_memory_event_source (v:vulkan_memory_event_source) encoder = + match v with + | Source_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Source_driver -> Pbrt.Encoder.int_as_varint 1 encoder + | Source_device -> Pbrt.Encoder.int_as_varint 2 encoder + | Source_device_memory -> Pbrt.Encoder.int_as_varint 3 encoder + | Source_buffer -> Pbrt.Encoder.int_as_varint 4 encoder + | Source_image -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_vulkan_memory_event_operation (v:vulkan_memory_event_operation) encoder = + match v with + | Op_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Op_create -> Pbrt.Encoder.int_as_varint 1 encoder + | Op_destroy -> Pbrt.Encoder.int_as_varint 2 encoder + | Op_bind -> Pbrt.Encoder.int_as_varint 3 encoder + | Op_destroy_bound -> Pbrt.Encoder.int_as_varint 4 encoder + | Op_annotations -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_vulkan_memory_event_allocation_scope (v:vulkan_memory_event_allocation_scope) encoder = + match v with + | Scope_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Scope_command -> Pbrt.Encoder.int_as_varint 1 encoder + | Scope_object -> Pbrt.Encoder.int_as_varint 2 encoder + | Scope_cache -> Pbrt.Encoder.int_as_varint 3 encoder + | Scope_device -> Pbrt.Encoder.int_as_varint 4 encoder + | Scope_instance -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_vulkan_memory_event (v:vulkan_memory_event) encoder = + if vulkan_memory_event_has_source v then ( + encode_pb_vulkan_memory_event_source v.source encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if vulkan_memory_event_has_operation v then ( + encode_pb_vulkan_memory_event_operation v.operation encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if vulkan_memory_event_has_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.timestamp encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if vulkan_memory_event_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if vulkan_memory_event_has_memory_address v then ( + Pbrt.Encoder.int64_as_bits64 v.memory_address encoder; + Pbrt.Encoder.key 5 Pbrt.Bits64 encoder; + ); + if vulkan_memory_event_has_memory_size v then ( + Pbrt.Encoder.int64_as_varint v.memory_size encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if vulkan_memory_event_has_caller_iid v then ( + Pbrt.Encoder.int64_as_varint v.caller_iid encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if vulkan_memory_event_has_allocation_scope v then ( + encode_pb_vulkan_memory_event_allocation_scope v.allocation_scope encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_vulkan_memory_event_annotation x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + ) v.annotations encoder; + if vulkan_memory_event_has_device v then ( + Pbrt.Encoder.int64_as_bits64 v.device encoder; + Pbrt.Encoder.key 16 Pbrt.Bits64 encoder; + ); + if vulkan_memory_event_has_device_memory v then ( + Pbrt.Encoder.int64_as_bits64 v.device_memory encoder; + Pbrt.Encoder.key 17 Pbrt.Bits64 encoder; + ); + if vulkan_memory_event_has_memory_type v then ( + Pbrt.Encoder.int32_as_varint v.memory_type encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + ); + if vulkan_memory_event_has_heap v then ( + Pbrt.Encoder.int32_as_varint v.heap encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + if vulkan_memory_event_has_object_handle v then ( + Pbrt.Encoder.int64_as_bits64 v.object_handle encoder; + Pbrt.Encoder.key 20 Pbrt.Bits64 encoder; + ); + () + +let rec encode_pb_interned_string (v:interned_string) encoder = + if interned_string_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if interned_string_has_str v then ( + Pbrt.Encoder.bytes v.str encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_line (v:line) encoder = + if line_has_function_name v then ( + Pbrt.Encoder.string v.function_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if line_has_source_file_name v then ( + Pbrt.Encoder.string v.source_file_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if line_has_line_number v then ( + Pbrt.Encoder.int32_as_varint v.line_number encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_address_symbols (v:address_symbols) encoder = + if address_symbols_has_address v then ( + Pbrt.Encoder.int64_as_varint v.address encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_line x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.lines encoder; + () + +let rec encode_pb_module_symbols (v:module_symbols) encoder = + if module_symbols_has_path v then ( + Pbrt.Encoder.string v.path encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if module_symbols_has_build_id v then ( + Pbrt.Encoder.string v.build_id encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_address_symbols x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.address_symbols encoder; + () + +let rec encode_pb_mapping (v:mapping) encoder = + if mapping_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if mapping_has_build_id v then ( + Pbrt.Encoder.int64_as_varint v.build_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if mapping_has_exact_offset v then ( + Pbrt.Encoder.int64_as_varint v.exact_offset encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if mapping_has_start_offset v then ( + Pbrt.Encoder.int64_as_varint v.start_offset encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if mapping_has_start v then ( + Pbrt.Encoder.int64_as_varint v.start encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if mapping_has_end_ v then ( + Pbrt.Encoder.int64_as_varint v.end_ encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if mapping_has_load_bias v then ( + Pbrt.Encoder.int64_as_varint v.load_bias encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ) v.path_string_ids encoder; + () + +let rec encode_pb_frame (v:frame) encoder = + if frame_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if frame_has_function_name_id v then ( + Pbrt.Encoder.int64_as_varint v.function_name_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if frame_has_mapping_id v then ( + Pbrt.Encoder.int64_as_varint v.mapping_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if frame_has_rel_pc v then ( + Pbrt.Encoder.int64_as_varint v.rel_pc encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if frame_has_source_path_iid v then ( + Pbrt.Encoder.int64_as_varint v.source_path_iid encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if frame_has_line_number v then ( + Pbrt.Encoder.int32_as_varint v.line_number encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_callstack (v:callstack) encoder = + if callstack_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.frame_ids encoder; + () + +let rec encode_pb_histogram_name (v:histogram_name) encoder = + if histogram_name_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if histogram_name_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_chrome_histogram_sample (v:chrome_histogram_sample) encoder = + if chrome_histogram_sample_has_name_hash v then ( + Pbrt.Encoder.int64_as_varint v.name_hash encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_histogram_sample_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if chrome_histogram_sample_has_sample v then ( + Pbrt.Encoder.int64_as_varint v.sample encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if chrome_histogram_sample_has_name_iid v then ( + Pbrt.Encoder.int64_as_varint v.name_iid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_debug_annotation_nested_value_nested_type (v:debug_annotation_nested_value_nested_type) encoder = + match v with + | Unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Dict -> Pbrt.Encoder.int_as_varint 1 encoder + | Array -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_debug_annotation_nested_value (v:debug_annotation_nested_value) encoder = + if debug_annotation_nested_value_has_nested_type v then ( + encode_pb_debug_annotation_nested_value_nested_type v.nested_type encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.dict_keys encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_debug_annotation_nested_value x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.dict_values encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_debug_annotation_nested_value x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.array_values encoder; + if debug_annotation_nested_value_has_int_value v then ( + Pbrt.Encoder.int64_as_varint v.int_value encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if debug_annotation_nested_value_has_double_value v then ( + Pbrt.Encoder.float_as_bits64 v.double_value encoder; + Pbrt.Encoder.key 6 Pbrt.Bits64 encoder; + ); + if debug_annotation_nested_value_has_bool_value v then ( + Pbrt.Encoder.bool v.bool_value encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if debug_annotation_nested_value_has_string_value v then ( + Pbrt.Encoder.string v.string_value encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_debug_annotation_name_field (v:debug_annotation_name_field) encoder = + begin match v with + | Name_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Name x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + end + +and encode_pb_debug_annotation_value (v:debug_annotation_value) encoder = + begin match v with + | Bool_value x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Uint_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + | Int_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Double_value x -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 5 Pbrt.Bits64 encoder; + | Pointer_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + | Nested_value x -> + Pbrt.Encoder.nested encode_pb_debug_annotation_nested_value x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | Legacy_json_value x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + | String_value x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | String_value_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + end + +and encode_pb_debug_annotation_proto_type_descriptor (v:debug_annotation_proto_type_descriptor) encoder = + begin match v with + | Proto_type_name x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + | Proto_type_name_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + end + +and encode_pb_debug_annotation (v:debug_annotation) encoder = + begin match v.name_field with + | None -> () + | Some (Name_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Some (Name x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + end; + begin match v.value with + | None -> () + | Some (Bool_value x) -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Some (Uint_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + | Some (Int_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Some (Double_value x) -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 5 Pbrt.Bits64 encoder; + | Some (Pointer_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + | Some (Nested_value x) -> + Pbrt.Encoder.nested encode_pb_debug_annotation_nested_value x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | Some (Legacy_json_value x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + | Some (String_value x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | Some (String_value_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + end; + begin match v.proto_type_descriptor with + | None -> () + | Some (Proto_type_name x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + | Some (Proto_type_name_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + end; + if debug_annotation_has_proto_value v then ( + Pbrt.Encoder.bytes v.proto_value encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_debug_annotation x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + ) v.dict_entries encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_debug_annotation x encoder; + Pbrt.Encoder.key 12 Pbrt.Bytes encoder; + ) v.array_values encoder; + () + +let rec encode_pb_debug_annotation_name (v:debug_annotation_name) encoder = + if debug_annotation_name_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if debug_annotation_name_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_debug_annotation_value_type_name (v:debug_annotation_value_type_name) encoder = + if debug_annotation_value_type_name_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if debug_annotation_value_type_name_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_log_message_priority (v:log_message_priority) encoder = + match v with + | Prio_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Prio_unused -> Pbrt.Encoder.int_as_varint 1 encoder + | Prio_verbose -> Pbrt.Encoder.int_as_varint 2 encoder + | Prio_debug -> Pbrt.Encoder.int_as_varint 3 encoder + | Prio_info -> Pbrt.Encoder.int_as_varint 4 encoder + | Prio_warn -> Pbrt.Encoder.int_as_varint 5 encoder + | Prio_error -> Pbrt.Encoder.int_as_varint 6 encoder + | Prio_fatal -> Pbrt.Encoder.int_as_varint 7 encoder + +let rec encode_pb_log_message (v:log_message) encoder = + if log_message_has_source_location_iid v then ( + Pbrt.Encoder.int64_as_varint v.source_location_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if log_message_has_body_iid v then ( + Pbrt.Encoder.int64_as_varint v.body_iid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if log_message_has_prio v then ( + encode_pb_log_message_priority v.prio encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_log_message_body (v:log_message_body) encoder = + if log_message_body_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if log_message_body_has_body v then ( + Pbrt.Encoder.string v.body encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_unsymbolized_source_location (v:unsymbolized_source_location) encoder = + if unsymbolized_source_location_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if unsymbolized_source_location_has_mapping_id v then ( + Pbrt.Encoder.int64_as_varint v.mapping_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if unsymbolized_source_location_has_rel_pc v then ( + Pbrt.Encoder.int64_as_varint v.rel_pc encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_source_location (v:source_location) encoder = + if source_location_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if source_location_has_file_name v then ( + Pbrt.Encoder.string v.file_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if source_location_has_function_name v then ( + Pbrt.Encoder.string v.function_name encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if source_location_has_line_number v then ( + Pbrt.Encoder.int32_as_varint v.line_number encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_active_processes (v:chrome_active_processes) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.pid encoder; + () + +let rec encode_pb_chrome_application_state_info_chrome_application_state (v:chrome_application_state_info_chrome_application_state) encoder = + match v with + | Application_state_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Application_state_has_running_activities -> Pbrt.Encoder.int_as_varint 1 encoder + | Application_state_has_paused_activities -> Pbrt.Encoder.int_as_varint 2 encoder + | Application_state_has_stopped_activities -> Pbrt.Encoder.int_as_varint 3 encoder + | Application_state_has_destroyed_activities -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_chrome_application_state_info (v:chrome_application_state_info) encoder = + if chrome_application_state_info_has_application_state v then ( + encode_pb_chrome_application_state_info_chrome_application_state v.application_state encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_compositor_scheduler_action (v:chrome_compositor_scheduler_action) encoder = + match v with + | Cc_scheduler_action_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Cc_scheduler_action_none -> Pbrt.Encoder.int_as_varint 1 encoder + | Cc_scheduler_action_send_begin_main_frame -> Pbrt.Encoder.int_as_varint 2 encoder + | Cc_scheduler_action_commit -> Pbrt.Encoder.int_as_varint 3 encoder + | Cc_scheduler_action_activate_sync_tree -> Pbrt.Encoder.int_as_varint 4 encoder + | Cc_scheduler_action_draw_if_possible -> Pbrt.Encoder.int_as_varint 5 encoder + | Cc_scheduler_action_draw_forced -> Pbrt.Encoder.int_as_varint 6 encoder + | Cc_scheduler_action_draw_abort -> Pbrt.Encoder.int_as_varint 7 encoder + | Cc_scheduler_action_begin_layer_tree_frame_sink_creation -> Pbrt.Encoder.int_as_varint 8 encoder + | Cc_scheduler_action_prepare_tiles -> Pbrt.Encoder.int_as_varint 9 encoder + | Cc_scheduler_action_invalidate_layer_tree_frame_sink -> Pbrt.Encoder.int_as_varint 10 encoder + | Cc_scheduler_action_perform_impl_side_invalidation -> Pbrt.Encoder.int_as_varint 11 encoder + | Cc_scheduler_action_notify_begin_main_frame_not_expected_until -> Pbrt.Encoder.int_as_varint 12 encoder + | Cc_scheduler_action_notify_begin_main_frame_not_expected_soon -> Pbrt.Encoder.int_as_varint 13 encoder + +let rec encode_pb_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode (v:chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode) encoder = + match v with + | Deadline_mode_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Deadline_mode_none -> Pbrt.Encoder.int_as_varint 1 encoder + | Deadline_mode_immediate -> Pbrt.Encoder.int_as_varint 2 encoder + | Deadline_mode_regular -> Pbrt.Encoder.int_as_varint 3 encoder + | Deadline_mode_late -> Pbrt.Encoder.int_as_varint 4 encoder + | Deadline_mode_blocked -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_chrome_compositor_state_machine_major_state_begin_impl_frame_state (v:chrome_compositor_state_machine_major_state_begin_impl_frame_state) encoder = + match v with + | Begin_impl_frame_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Begin_impl_frame_idle -> Pbrt.Encoder.int_as_varint 1 encoder + | Begin_impl_frame_inside_begin_frame -> Pbrt.Encoder.int_as_varint 2 encoder + | Begin_impl_frame_inside_deadline -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_chrome_compositor_state_machine_major_state_begin_main_frame_state (v:chrome_compositor_state_machine_major_state_begin_main_frame_state) encoder = + match v with + | Begin_main_frame_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Begin_main_frame_idle -> Pbrt.Encoder.int_as_varint 1 encoder + | Begin_main_frame_sent -> Pbrt.Encoder.int_as_varint 2 encoder + | Begin_main_frame_ready_to_commit -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state (v:chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state) encoder = + match v with + | Layer_tree_frame_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Layer_tree_frame_none -> Pbrt.Encoder.int_as_varint 1 encoder + | Layer_tree_frame_active -> Pbrt.Encoder.int_as_varint 2 encoder + | Layer_tree_frame_creating -> Pbrt.Encoder.int_as_varint 3 encoder + | Layer_tree_frame_waiting_for_first_commit -> Pbrt.Encoder.int_as_varint 4 encoder + | Layer_tree_frame_waiting_for_first_activation -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state (v:chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state) encoder = + match v with + | Forced_redraw_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Forced_redraw_idle -> Pbrt.Encoder.int_as_varint 1 encoder + | Forced_redraw_waiting_for_commit -> Pbrt.Encoder.int_as_varint 2 encoder + | Forced_redraw_waiting_for_activation -> Pbrt.Encoder.int_as_varint 3 encoder + | Forced_redraw_waiting_for_draw -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_chrome_compositor_state_machine_major_state (v:chrome_compositor_state_machine_major_state) encoder = + if chrome_compositor_state_machine_major_state_has_next_action v then ( + encode_pb_chrome_compositor_scheduler_action v.next_action encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_major_state_has_begin_impl_frame_state v then ( + encode_pb_chrome_compositor_state_machine_major_state_begin_impl_frame_state v.begin_impl_frame_state encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_major_state_has_begin_main_frame_state v then ( + encode_pb_chrome_compositor_state_machine_major_state_begin_main_frame_state v.begin_main_frame_state encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_major_state_has_layer_tree_frame_sink_state v then ( + encode_pb_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state v.layer_tree_frame_sink_state encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_major_state_has_forced_redraw_state v then ( + encode_pb_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state v.forced_redraw_state encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_compositor_state_machine_minor_state_tree_priority (v:chrome_compositor_state_machine_minor_state_tree_priority) encoder = + match v with + | Tree_priority_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Tree_priority_same_priority_for_both_trees -> Pbrt.Encoder.int_as_varint 1 encoder + | Tree_priority_smoothness_takes_priority -> Pbrt.Encoder.int_as_varint 2 encoder + | Tree_priority_new_content_takes_priority -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_chrome_compositor_state_machine_minor_state_scroll_handler_state (v:chrome_compositor_state_machine_minor_state_scroll_handler_state) encoder = + match v with + | Scroll_handler_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Scroll_affects_scroll_handler -> Pbrt.Encoder.int_as_varint 1 encoder + | Scroll_does_not_affect_scroll_handler -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_chrome_compositor_state_machine_minor_state (v:chrome_compositor_state_machine_minor_state) encoder = + if chrome_compositor_state_machine_minor_state_has_commit_count v then ( + Pbrt.Encoder.int32_as_varint v.commit_count encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_current_frame_number v then ( + Pbrt.Encoder.int32_as_varint v.current_frame_number encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_last_frame_number_submit_performed v then ( + Pbrt.Encoder.int32_as_varint v.last_frame_number_submit_performed encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_last_frame_number_draw_performed v then ( + Pbrt.Encoder.int32_as_varint v.last_frame_number_draw_performed encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_last_frame_number_begin_main_frame_sent v then ( + Pbrt.Encoder.int32_as_varint v.last_frame_number_begin_main_frame_sent encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_draw v then ( + Pbrt.Encoder.bool v.did_draw encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_send_begin_main_frame_for_current_frame v then ( + Pbrt.Encoder.bool v.did_send_begin_main_frame_for_current_frame encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_notify_begin_main_frame_not_expected_until v then ( + Pbrt.Encoder.bool v.did_notify_begin_main_frame_not_expected_until encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_notify_begin_main_frame_not_expected_soon v then ( + Pbrt.Encoder.bool v.did_notify_begin_main_frame_not_expected_soon encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_wants_begin_main_frame_not_expected v then ( + Pbrt.Encoder.bool v.wants_begin_main_frame_not_expected encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_commit_during_frame v then ( + Pbrt.Encoder.bool v.did_commit_during_frame encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_invalidate_layer_tree_frame_sink v then ( + Pbrt.Encoder.bool v.did_invalidate_layer_tree_frame_sink encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_perform_impl_side_invalidaion v then ( + Pbrt.Encoder.bool v.did_perform_impl_side_invalidaion encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_prepare_tiles v then ( + Pbrt.Encoder.bool v.did_prepare_tiles encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_consecutive_checkerboard_animations v then ( + Pbrt.Encoder.int32_as_varint v.consecutive_checkerboard_animations encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_pending_submit_frames v then ( + Pbrt.Encoder.int32_as_varint v.pending_submit_frames encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_submit_frames_with_current_layer_tree_frame_sink v then ( + Pbrt.Encoder.int32_as_varint v.submit_frames_with_current_layer_tree_frame_sink encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_needs_redraw v then ( + Pbrt.Encoder.bool v.needs_redraw encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_needs_prepare_tiles v then ( + Pbrt.Encoder.bool v.needs_prepare_tiles encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_needs_begin_main_frame v then ( + Pbrt.Encoder.bool v.needs_begin_main_frame encoder; + Pbrt.Encoder.key 20 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_needs_one_begin_impl_frame v then ( + Pbrt.Encoder.bool v.needs_one_begin_impl_frame encoder; + Pbrt.Encoder.key 21 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_visible v then ( + Pbrt.Encoder.bool v.visible encoder; + Pbrt.Encoder.key 22 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_begin_frame_source_paused v then ( + Pbrt.Encoder.bool v.begin_frame_source_paused encoder; + Pbrt.Encoder.key 23 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_can_draw v then ( + Pbrt.Encoder.bool v.can_draw encoder; + Pbrt.Encoder.key 24 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_resourceless_draw v then ( + Pbrt.Encoder.bool v.resourceless_draw encoder; + Pbrt.Encoder.key 25 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_has_pending_tree v then ( + Pbrt.Encoder.bool v.has_pending_tree encoder; + Pbrt.Encoder.key 26 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_pending_tree_is_ready_for_activation v then ( + Pbrt.Encoder.bool v.pending_tree_is_ready_for_activation encoder; + Pbrt.Encoder.key 27 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_active_tree_needs_first_draw v then ( + Pbrt.Encoder.bool v.active_tree_needs_first_draw encoder; + Pbrt.Encoder.key 28 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_active_tree_is_ready_to_draw v then ( + Pbrt.Encoder.bool v.active_tree_is_ready_to_draw encoder; + Pbrt.Encoder.key 29 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_create_and_initialize_first_layer_tree_frame_sink v then ( + Pbrt.Encoder.bool v.did_create_and_initialize_first_layer_tree_frame_sink encoder; + Pbrt.Encoder.key 30 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_tree_priority v then ( + encode_pb_chrome_compositor_state_machine_minor_state_tree_priority v.tree_priority encoder; + Pbrt.Encoder.key 31 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_scroll_handler_state v then ( + encode_pb_chrome_compositor_state_machine_minor_state_scroll_handler_state v.scroll_handler_state encoder; + Pbrt.Encoder.key 32 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_critical_begin_main_frame_to_activate_is_fast v then ( + Pbrt.Encoder.bool v.critical_begin_main_frame_to_activate_is_fast encoder; + Pbrt.Encoder.key 33 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_main_thread_missed_last_deadline v then ( + Pbrt.Encoder.bool v.main_thread_missed_last_deadline encoder; + Pbrt.Encoder.key 34 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_video_needs_begin_frames v then ( + Pbrt.Encoder.bool v.video_needs_begin_frames encoder; + Pbrt.Encoder.key 36 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_defer_begin_main_frame v then ( + Pbrt.Encoder.bool v.defer_begin_main_frame encoder; + Pbrt.Encoder.key 37 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_last_commit_had_no_updates v then ( + Pbrt.Encoder.bool v.last_commit_had_no_updates encoder; + Pbrt.Encoder.key 38 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_draw_in_last_frame v then ( + Pbrt.Encoder.bool v.did_draw_in_last_frame encoder; + Pbrt.Encoder.key 39 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_did_submit_in_last_frame v then ( + Pbrt.Encoder.bool v.did_submit_in_last_frame encoder; + Pbrt.Encoder.key 40 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_needs_impl_side_invalidation v then ( + Pbrt.Encoder.bool v.needs_impl_side_invalidation encoder; + Pbrt.Encoder.key 41 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_current_pending_tree_is_impl_side v then ( + Pbrt.Encoder.bool v.current_pending_tree_is_impl_side encoder; + Pbrt.Encoder.key 42 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_previous_pending_tree_was_impl_side v then ( + Pbrt.Encoder.bool v.previous_pending_tree_was_impl_side encoder; + Pbrt.Encoder.key 43 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_processing_animation_worklets_for_active_tree v then ( + Pbrt.Encoder.bool v.processing_animation_worklets_for_active_tree encoder; + Pbrt.Encoder.key 44 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_processing_animation_worklets_for_pending_tree v then ( + Pbrt.Encoder.bool v.processing_animation_worklets_for_pending_tree encoder; + Pbrt.Encoder.key 45 Pbrt.Varint encoder; + ); + if chrome_compositor_state_machine_minor_state_has_processing_paint_worklets_for_pending_tree v then ( + Pbrt.Encoder.bool v.processing_paint_worklets_for_pending_tree encoder; + Pbrt.Encoder.key 46 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_compositor_state_machine (v:chrome_compositor_state_machine) encoder = + begin match v.major_state with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_compositor_state_machine_major_state x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.minor_state with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_compositor_state_machine_minor_state x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_begin_impl_frame_args_state (v:begin_impl_frame_args_state) encoder = + match v with + | Begin_frame_finished -> Pbrt.Encoder.int_as_varint (0) encoder + | Begin_frame_using -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_begin_frame_args_begin_frame_args_type (v:begin_frame_args_begin_frame_args_type) encoder = + match v with + | Begin_frame_args_type_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Begin_frame_args_type_invalid -> Pbrt.Encoder.int_as_varint 1 encoder + | Begin_frame_args_type_normal -> Pbrt.Encoder.int_as_varint 2 encoder + | Begin_frame_args_type_missed -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_begin_frame_args_created_from (v:begin_frame_args_created_from) encoder = + begin match v with + | Source_location_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + | Source_location x -> + Pbrt.Encoder.nested encode_pb_source_location x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + end + +and encode_pb_begin_frame_args (v:begin_frame_args) encoder = + if begin_frame_args_has_type_ v then ( + encode_pb_begin_frame_args_begin_frame_args_type v.type_ encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if begin_frame_args_has_source_id v then ( + Pbrt.Encoder.int64_as_varint v.source_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if begin_frame_args_has_sequence_number v then ( + Pbrt.Encoder.int64_as_varint v.sequence_number encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if begin_frame_args_has_frame_time_us v then ( + Pbrt.Encoder.int64_as_varint v.frame_time_us encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if begin_frame_args_has_deadline_us v then ( + Pbrt.Encoder.int64_as_varint v.deadline_us encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if begin_frame_args_has_interval_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.interval_delta_us encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if begin_frame_args_has_on_critical_path v then ( + Pbrt.Encoder.bool v.on_critical_path encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if begin_frame_args_has_animate_only v then ( + Pbrt.Encoder.bool v.animate_only encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + begin match v.created_from with + | None -> () + | Some (Source_location_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + | Some (Source_location x) -> + Pbrt.Encoder.nested encode_pb_source_location x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + end; + if begin_frame_args_has_frames_throttled_since_last v then ( + Pbrt.Encoder.int64_as_varint v.frames_throttled_since_last encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_begin_impl_frame_args_timestamps_in_us (v:begin_impl_frame_args_timestamps_in_us) encoder = + if begin_impl_frame_args_timestamps_in_us_has_interval_delta v then ( + Pbrt.Encoder.int64_as_varint v.interval_delta encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if begin_impl_frame_args_timestamps_in_us_has_now_to_deadline_delta v then ( + Pbrt.Encoder.int64_as_varint v.now_to_deadline_delta encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if begin_impl_frame_args_timestamps_in_us_has_frame_time_to_now_delta v then ( + Pbrt.Encoder.int64_as_varint v.frame_time_to_now_delta encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if begin_impl_frame_args_timestamps_in_us_has_frame_time_to_deadline_delta v then ( + Pbrt.Encoder.int64_as_varint v.frame_time_to_deadline_delta encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if begin_impl_frame_args_timestamps_in_us_has_now v then ( + Pbrt.Encoder.int64_as_varint v.now encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if begin_impl_frame_args_timestamps_in_us_has_frame_time v then ( + Pbrt.Encoder.int64_as_varint v.frame_time encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if begin_impl_frame_args_timestamps_in_us_has_deadline v then ( + Pbrt.Encoder.int64_as_varint v.deadline encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_begin_impl_frame_args_args (v:begin_impl_frame_args_args) encoder = + begin match v with + | Current_args x -> + Pbrt.Encoder.nested encode_pb_begin_frame_args x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | Last_args x -> + Pbrt.Encoder.nested encode_pb_begin_frame_args x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + end + +and encode_pb_begin_impl_frame_args (v:begin_impl_frame_args) encoder = + if begin_impl_frame_args_has_updated_at_us v then ( + Pbrt.Encoder.int64_as_varint v.updated_at_us encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if begin_impl_frame_args_has_finished_at_us v then ( + Pbrt.Encoder.int64_as_varint v.finished_at_us encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if begin_impl_frame_args_has_state v then ( + encode_pb_begin_impl_frame_args_state v.state encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + begin match v.args with + | None -> () + | Some (Current_args x) -> + Pbrt.Encoder.nested encode_pb_begin_frame_args x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | Some (Last_args x) -> + Pbrt.Encoder.nested encode_pb_begin_frame_args x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + end; + begin match v.timestamps_in_us with + | Some x -> + Pbrt.Encoder.nested encode_pb_begin_impl_frame_args_timestamps_in_us x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_begin_frame_observer_state (v:begin_frame_observer_state) encoder = + if begin_frame_observer_state_has_dropped_begin_frame_args v then ( + Pbrt.Encoder.int64_as_varint v.dropped_begin_frame_args encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + begin match v.last_begin_frame_args with + | Some x -> + Pbrt.Encoder.nested encode_pb_begin_frame_args x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_begin_frame_source_state (v:begin_frame_source_state) encoder = + if begin_frame_source_state_has_source_id v then ( + Pbrt.Encoder.int32_as_varint v.source_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if begin_frame_source_state_has_paused v then ( + Pbrt.Encoder.bool v.paused encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if begin_frame_source_state_has_num_observers v then ( + Pbrt.Encoder.int32_as_varint v.num_observers encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + begin match v.last_begin_frame_args with + | Some x -> + Pbrt.Encoder.nested encode_pb_begin_frame_args x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_compositor_timing_history (v:compositor_timing_history) encoder = + if compositor_timing_history_has_begin_main_frame_queue_critical_estimate_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.begin_main_frame_queue_critical_estimate_delta_us encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if compositor_timing_history_has_begin_main_frame_queue_not_critical_estimate_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.begin_main_frame_queue_not_critical_estimate_delta_us encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if compositor_timing_history_has_begin_main_frame_start_to_ready_to_commit_estimate_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.begin_main_frame_start_to_ready_to_commit_estimate_delta_us encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if compositor_timing_history_has_commit_to_ready_to_activate_estimate_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.commit_to_ready_to_activate_estimate_delta_us encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if compositor_timing_history_has_prepare_tiles_estimate_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.prepare_tiles_estimate_delta_us encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if compositor_timing_history_has_activate_estimate_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.activate_estimate_delta_us encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if compositor_timing_history_has_draw_estimate_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.draw_estimate_delta_us encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_compositor_scheduler_state (v:chrome_compositor_scheduler_state) encoder = + begin match v.state_machine with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_compositor_state_machine x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + if chrome_compositor_scheduler_state_has_observing_begin_frame_source v then ( + Pbrt.Encoder.bool v.observing_begin_frame_source encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_begin_impl_frame_deadline_task v then ( + Pbrt.Encoder.bool v.begin_impl_frame_deadline_task encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_pending_begin_frame_task v then ( + Pbrt.Encoder.bool v.pending_begin_frame_task encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_skipped_last_frame_missed_exceeded_deadline v then ( + Pbrt.Encoder.bool v.skipped_last_frame_missed_exceeded_deadline encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_inside_action v then ( + encode_pb_chrome_compositor_scheduler_action v.inside_action encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_deadline_mode v then ( + encode_pb_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode v.deadline_mode encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_deadline_us v then ( + Pbrt.Encoder.int64_as_varint v.deadline_us encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_deadline_scheduled_at_us v then ( + Pbrt.Encoder.int64_as_varint v.deadline_scheduled_at_us encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_now_us v then ( + Pbrt.Encoder.int64_as_varint v.now_us encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_now_to_deadline_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.now_to_deadline_delta_us encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if chrome_compositor_scheduler_state_has_now_to_deadline_scheduled_at_delta_us v then ( + Pbrt.Encoder.int64_as_varint v.now_to_deadline_scheduled_at_delta_us encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + begin match v.begin_impl_frame_args with + | Some x -> + Pbrt.Encoder.nested encode_pb_begin_impl_frame_args x encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.begin_frame_observer_state with + | Some x -> + Pbrt.Encoder.nested encode_pb_begin_frame_observer_state x encoder; + Pbrt.Encoder.key 15 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.begin_frame_source_state with + | Some x -> + Pbrt.Encoder.nested encode_pb_begin_frame_source_state x encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.compositor_timing_history with + | Some x -> + Pbrt.Encoder.nested encode_pb_compositor_timing_history x encoder; + Pbrt.Encoder.key 17 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_chrome_content_settings_event_info (v:chrome_content_settings_event_info) encoder = + if chrome_content_settings_event_info_has_number_of_exceptions v then ( + Pbrt.Encoder.int32_as_varint v.number_of_exceptions encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_frame_reporter_state (v:chrome_frame_reporter_state) encoder = + match v with + | State_no_update_desired -> Pbrt.Encoder.int_as_varint (0) encoder + | State_presented_all -> Pbrt.Encoder.int_as_varint 1 encoder + | State_presented_partial -> Pbrt.Encoder.int_as_varint 2 encoder + | State_dropped -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_chrome_frame_reporter_frame_drop_reason (v:chrome_frame_reporter_frame_drop_reason) encoder = + match v with + | Reason_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Reason_display_compositor -> Pbrt.Encoder.int_as_varint 1 encoder + | Reason_main_thread -> Pbrt.Encoder.int_as_varint 2 encoder + | Reason_client_compositor -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_chrome_frame_reporter_scroll_state (v:chrome_frame_reporter_scroll_state) encoder = + match v with + | Scroll_none -> Pbrt.Encoder.int_as_varint (0) encoder + | Scroll_main_thread -> Pbrt.Encoder.int_as_varint 1 encoder + | Scroll_compositor_thread -> Pbrt.Encoder.int_as_varint 2 encoder + | Scroll_raster -> Pbrt.Encoder.int_as_varint 3 encoder + | Scroll_unknown -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_chrome_frame_reporter_frame_type (v:chrome_frame_reporter_frame_type) encoder = + match v with + | Forked -> Pbrt.Encoder.int_as_varint (0) encoder + | Backfill -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_chrome_frame_reporter (v:chrome_frame_reporter) encoder = + if chrome_frame_reporter_has_state v then ( + encode_pb_chrome_frame_reporter_state v.state encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_reason v then ( + encode_pb_chrome_frame_reporter_frame_drop_reason v.reason encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_frame_source v then ( + Pbrt.Encoder.int64_as_varint v.frame_source encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_frame_sequence v then ( + Pbrt.Encoder.int64_as_varint v.frame_sequence encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_affects_smoothness v then ( + Pbrt.Encoder.bool v.affects_smoothness encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_scroll_state v then ( + encode_pb_chrome_frame_reporter_scroll_state v.scroll_state encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_has_main_animation v then ( + Pbrt.Encoder.bool v.has_main_animation encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_has_compositor_animation v then ( + Pbrt.Encoder.bool v.has_compositor_animation encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_has_smooth_input_main v then ( + Pbrt.Encoder.bool v.has_smooth_input_main encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_has_missing_content v then ( + Pbrt.Encoder.bool v.has_missing_content encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_layer_tree_host_id v then ( + Pbrt.Encoder.int64_as_varint v.layer_tree_host_id encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_has_high_latency v then ( + Pbrt.Encoder.bool v.has_high_latency encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_frame_type v then ( + encode_pb_chrome_frame_reporter_frame_type v.frame_type encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ) v.high_latency_contribution_stage encoder; + if chrome_frame_reporter_has_checkerboarded_needs_raster v then ( + Pbrt.Encoder.bool v.checkerboarded_needs_raster encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_checkerboarded_needs_record v then ( + Pbrt.Encoder.bool v.checkerboarded_needs_record encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_surface_frame_trace_id v then ( + Pbrt.Encoder.int64_as_varint v.surface_frame_trace_id encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + if chrome_frame_reporter_has_display_trace_id v then ( + Pbrt.Encoder.int64_as_varint v.display_trace_id encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_keyed_service (v:chrome_keyed_service) encoder = + if chrome_keyed_service_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_chrome_latency_info_step (v:chrome_latency_info_step) encoder = + match v with + | Step_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Step_send_input_event_ui -> Pbrt.Encoder.int_as_varint 3 encoder + | Step_handle_input_event_impl -> Pbrt.Encoder.int_as_varint 5 encoder + | Step_did_handle_input_and_overscroll -> Pbrt.Encoder.int_as_varint 8 encoder + | Step_handle_input_event_main -> Pbrt.Encoder.int_as_varint 4 encoder + | Step_main_thread_scroll_update -> Pbrt.Encoder.int_as_varint 2 encoder + | Step_handle_input_event_main_commit -> Pbrt.Encoder.int_as_varint 1 encoder + | Step_handled_input_event_main_or_impl -> Pbrt.Encoder.int_as_varint 9 encoder + | Step_handled_input_event_impl -> Pbrt.Encoder.int_as_varint 10 encoder + | Step_swap_buffers -> Pbrt.Encoder.int_as_varint 6 encoder + | Step_draw_and_swap -> Pbrt.Encoder.int_as_varint 7 encoder + | Step_finished_swap_buffers -> Pbrt.Encoder.int_as_varint 11 encoder + +let rec encode_pb_chrome_latency_info_latency_component_type (v:chrome_latency_info_latency_component_type) encoder = + match v with + | Component_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Component_input_event_latency_begin_rwh -> Pbrt.Encoder.int_as_varint 1 encoder + | Component_input_event_latency_scroll_update_original -> Pbrt.Encoder.int_as_varint 2 encoder + | Component_input_event_latency_first_scroll_update_original -> Pbrt.Encoder.int_as_varint 3 encoder + | Component_input_event_latency_original -> Pbrt.Encoder.int_as_varint 4 encoder + | Component_input_event_latency_ui -> Pbrt.Encoder.int_as_varint 5 encoder + | Component_input_event_latency_renderer_main -> Pbrt.Encoder.int_as_varint 6 encoder + | Component_input_event_latency_rendering_scheduled_main -> Pbrt.Encoder.int_as_varint 7 encoder + | Component_input_event_latency_rendering_scheduled_impl -> Pbrt.Encoder.int_as_varint 8 encoder + | Component_input_event_latency_scroll_update_last_event -> Pbrt.Encoder.int_as_varint 9 encoder + | Component_input_event_latency_ack_rwh -> Pbrt.Encoder.int_as_varint 10 encoder + | Component_input_event_latency_renderer_swap -> Pbrt.Encoder.int_as_varint 11 encoder + | Component_display_compositor_received_frame -> Pbrt.Encoder.int_as_varint 12 encoder + | Component_input_event_gpu_swap_buffer -> Pbrt.Encoder.int_as_varint 13 encoder + | Component_input_event_latency_frame_swap -> Pbrt.Encoder.int_as_varint 14 encoder + +let rec encode_pb_chrome_latency_info_component_info (v:chrome_latency_info_component_info) encoder = + if chrome_latency_info_component_info_has_component_type v then ( + encode_pb_chrome_latency_info_latency_component_type v.component_type encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_latency_info_component_info_has_time_us v then ( + Pbrt.Encoder.int64_as_varint v.time_us encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_latency_info_input_type (v:chrome_latency_info_input_type) encoder = + match v with + | Unspecified_or_other -> Pbrt.Encoder.int_as_varint (0) encoder + | Touch_moved -> Pbrt.Encoder.int_as_varint 1 encoder + | Gesture_scroll_begin -> Pbrt.Encoder.int_as_varint 2 encoder + | Gesture_scroll_update -> Pbrt.Encoder.int_as_varint 3 encoder + | Gesture_scroll_end -> Pbrt.Encoder.int_as_varint 4 encoder + | Gesture_tap -> Pbrt.Encoder.int_as_varint 5 encoder + | Gesture_tap_cancel -> Pbrt.Encoder.int_as_varint 6 encoder + +let rec encode_pb_chrome_latency_info (v:chrome_latency_info) encoder = + if chrome_latency_info_has_trace_id v then ( + Pbrt.Encoder.int64_as_varint v.trace_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_latency_info_has_step v then ( + encode_pb_chrome_latency_info_step v.step encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_latency_info_has_frame_tree_node_id v then ( + Pbrt.Encoder.int32_as_varint v.frame_tree_node_id encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_chrome_latency_info_component_info x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.component_info encoder; + if chrome_latency_info_has_is_coalesced v then ( + Pbrt.Encoder.bool v.is_coalesced encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if chrome_latency_info_has_gesture_scroll_id v then ( + Pbrt.Encoder.int64_as_varint v.gesture_scroll_id encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if chrome_latency_info_has_touch_id v then ( + Pbrt.Encoder.int64_as_varint v.touch_id encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if chrome_latency_info_has_input_type v then ( + encode_pb_chrome_latency_info_input_type v.input_type encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_legacy_ipc_message_class (v:chrome_legacy_ipc_message_class) encoder = + match v with + | Class_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Class_automation -> Pbrt.Encoder.int_as_varint 1 encoder + | Class_frame -> Pbrt.Encoder.int_as_varint 2 encoder + | Class_page -> Pbrt.Encoder.int_as_varint 3 encoder + | Class_view -> Pbrt.Encoder.int_as_varint 4 encoder + | Class_widget -> Pbrt.Encoder.int_as_varint 5 encoder + | Class_input -> Pbrt.Encoder.int_as_varint 6 encoder + | Class_test -> Pbrt.Encoder.int_as_varint 7 encoder + | Class_worker -> Pbrt.Encoder.int_as_varint 8 encoder + | Class_nacl -> Pbrt.Encoder.int_as_varint 9 encoder + | Class_gpu_channel -> Pbrt.Encoder.int_as_varint 10 encoder + | Class_media -> Pbrt.Encoder.int_as_varint 11 encoder + | Class_ppapi -> Pbrt.Encoder.int_as_varint 12 encoder + | Class_chrome -> Pbrt.Encoder.int_as_varint 13 encoder + | Class_drag -> Pbrt.Encoder.int_as_varint 14 encoder + | Class_print -> Pbrt.Encoder.int_as_varint 15 encoder + | Class_extension -> Pbrt.Encoder.int_as_varint 16 encoder + | Class_text_input_client -> Pbrt.Encoder.int_as_varint 17 encoder + | Class_blink_test -> Pbrt.Encoder.int_as_varint 18 encoder + | Class_accessibility -> Pbrt.Encoder.int_as_varint 19 encoder + | Class_prerender -> Pbrt.Encoder.int_as_varint 20 encoder + | Class_chromoting -> Pbrt.Encoder.int_as_varint 21 encoder + | Class_browser_plugin -> Pbrt.Encoder.int_as_varint 22 encoder + | Class_android_web_view -> Pbrt.Encoder.int_as_varint 23 encoder + | Class_nacl_host -> Pbrt.Encoder.int_as_varint 24 encoder + | Class_encrypted_media -> Pbrt.Encoder.int_as_varint 25 encoder + | Class_cast -> Pbrt.Encoder.int_as_varint 26 encoder + | Class_gin_java_bridge -> Pbrt.Encoder.int_as_varint 27 encoder + | Class_chrome_utility_printing -> Pbrt.Encoder.int_as_varint 28 encoder + | Class_ozone_gpu -> Pbrt.Encoder.int_as_varint 29 encoder + | Class_web_test -> Pbrt.Encoder.int_as_varint 30 encoder + | Class_network_hints -> Pbrt.Encoder.int_as_varint 31 encoder + | Class_extensions_guest_view -> Pbrt.Encoder.int_as_varint 32 encoder + | Class_guest_view -> Pbrt.Encoder.int_as_varint 33 encoder + | Class_media_player_delegate -> Pbrt.Encoder.int_as_varint 34 encoder + | Class_extension_worker -> Pbrt.Encoder.int_as_varint 35 encoder + | Class_subresource_filter -> Pbrt.Encoder.int_as_varint 36 encoder + | Class_unfreezable_frame -> Pbrt.Encoder.int_as_varint 37 encoder + +let rec encode_pb_chrome_legacy_ipc (v:chrome_legacy_ipc) encoder = + if chrome_legacy_ipc_has_message_class v then ( + encode_pb_chrome_legacy_ipc_message_class v.message_class encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_legacy_ipc_has_message_line v then ( + Pbrt.Encoder.int32_as_varint v.message_line encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_message_pump (v:chrome_message_pump) encoder = + if chrome_message_pump_has_sent_messages_in_queue v then ( + Pbrt.Encoder.bool v.sent_messages_in_queue encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_message_pump_has_io_handler_location_iid v then ( + Pbrt.Encoder.int64_as_varint v.io_handler_location_iid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_mojo_event_info (v:chrome_mojo_event_info) encoder = + if chrome_mojo_event_info_has_watcher_notify_interface_tag v then ( + Pbrt.Encoder.string v.watcher_notify_interface_tag encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if chrome_mojo_event_info_has_ipc_hash v then ( + Pbrt.Encoder.int32_as_varint v.ipc_hash encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_mojo_event_info_has_mojo_interface_tag v then ( + Pbrt.Encoder.string v.mojo_interface_tag encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if chrome_mojo_event_info_has_mojo_interface_method_iid v then ( + Pbrt.Encoder.int64_as_varint v.mojo_interface_method_iid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if chrome_mojo_event_info_has_is_reply v then ( + Pbrt.Encoder.bool v.is_reply encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if chrome_mojo_event_info_has_payload_size v then ( + Pbrt.Encoder.int64_as_varint v.payload_size encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if chrome_mojo_event_info_has_data_num_bytes v then ( + Pbrt.Encoder.int64_as_varint v.data_num_bytes encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_railmode (v:chrome_railmode) encoder = + match v with + | Rail_mode_none -> Pbrt.Encoder.int_as_varint (0) encoder + | Rail_mode_response -> Pbrt.Encoder.int_as_varint 1 encoder + | Rail_mode_animation -> Pbrt.Encoder.int_as_varint 2 encoder + | Rail_mode_idle -> Pbrt.Encoder.int_as_varint 3 encoder + | Rail_mode_load -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_chrome_renderer_scheduler_state (v:chrome_renderer_scheduler_state) encoder = + if chrome_renderer_scheduler_state_has_rail_mode v then ( + encode_pb_chrome_railmode v.rail_mode encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_renderer_scheduler_state_has_is_backgrounded v then ( + Pbrt.Encoder.bool v.is_backgrounded encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_renderer_scheduler_state_has_is_hidden v then ( + Pbrt.Encoder.bool v.is_hidden encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_user_event (v:chrome_user_event) encoder = + if chrome_user_event_has_action v then ( + Pbrt.Encoder.string v.action encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if chrome_user_event_has_action_hash v then ( + Pbrt.Encoder.int64_as_varint v.action_hash encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_window_handle_event_info (v:chrome_window_handle_event_info) encoder = + if chrome_window_handle_event_info_has_dpi v then ( + Pbrt.Encoder.int32_as_varint v.dpi encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_window_handle_event_info_has_message_id v then ( + Pbrt.Encoder.int32_as_varint v.message_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_window_handle_event_info_has_hwnd_ptr v then ( + Pbrt.Encoder.int64_as_bits64 v.hwnd_ptr encoder; + Pbrt.Encoder.key 3 Pbrt.Bits64 encoder; + ); + () + +let rec encode_pb_screenshot (v:screenshot) encoder = + if screenshot_has_jpg_image v then ( + Pbrt.Encoder.bytes v.jpg_image encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_task_execution (v:task_execution) encoder = + if task_execution_has_posted_from_iid v then ( + Pbrt.Encoder.int64_as_varint v.posted_from_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_track_event_type (v:track_event_type) encoder = + match v with + | Type_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Type_slice_begin -> Pbrt.Encoder.int_as_varint 1 encoder + | Type_slice_end -> Pbrt.Encoder.int_as_varint 2 encoder + | Type_instant -> Pbrt.Encoder.int_as_varint 3 encoder + | Type_counter -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_track_event_callstack_frame (v:track_event_callstack_frame) encoder = + if track_event_callstack_frame_has_function_name v then ( + Pbrt.Encoder.string v.function_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if track_event_callstack_frame_has_source_file v then ( + Pbrt.Encoder.string v.source_file encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if track_event_callstack_frame_has_line_number v then ( + Pbrt.Encoder.int32_as_varint v.line_number encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_track_event_callstack (v:track_event_callstack) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_track_event_callstack_frame x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.frames encoder; + () + +let rec encode_pb_track_event_legacy_event_flow_direction (v:track_event_legacy_event_flow_direction) encoder = + match v with + | Flow_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Flow_in -> Pbrt.Encoder.int_as_varint 1 encoder + | Flow_out -> Pbrt.Encoder.int_as_varint 2 encoder + | Flow_inout -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_track_event_legacy_event_instant_event_scope (v:track_event_legacy_event_instant_event_scope) encoder = + match v with + | Scope_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Scope_global -> Pbrt.Encoder.int_as_varint 1 encoder + | Scope_process -> Pbrt.Encoder.int_as_varint 2 encoder + | Scope_thread -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_track_event_legacy_event_id (v:track_event_legacy_event_id) encoder = + begin match v with + | Unscoped_id x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + | Local_id x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + | Global_id x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + end + +and encode_pb_track_event_legacy_event (v:track_event_legacy_event) encoder = + if track_event_legacy_event_has_name_iid v then ( + Pbrt.Encoder.int64_as_varint v.name_iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_phase v then ( + Pbrt.Encoder.int32_as_varint v.phase encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_duration_us v then ( + Pbrt.Encoder.int64_as_varint v.duration_us encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_thread_duration_us v then ( + Pbrt.Encoder.int64_as_varint v.thread_duration_us encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_thread_instruction_delta v then ( + Pbrt.Encoder.int64_as_varint v.thread_instruction_delta encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + begin match v.id with + | None -> () + | Some (Unscoped_id x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + | Some (Local_id x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + | Some (Global_id x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + end; + if track_event_legacy_event_has_id_scope v then ( + Pbrt.Encoder.string v.id_scope encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ); + if track_event_legacy_event_has_use_async_tts v then ( + Pbrt.Encoder.bool v.use_async_tts encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_bind_id v then ( + Pbrt.Encoder.int64_as_varint v.bind_id encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_bind_to_enclosing v then ( + Pbrt.Encoder.bool v.bind_to_enclosing encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_flow_direction v then ( + encode_pb_track_event_legacy_event_flow_direction v.flow_direction encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_instant_event_scope v then ( + encode_pb_track_event_legacy_event_instant_event_scope v.instant_event_scope encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_pid_override v then ( + Pbrt.Encoder.int32_as_varint v.pid_override encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + ); + if track_event_legacy_event_has_tid_override v then ( + Pbrt.Encoder.int32_as_varint v.tid_override encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_track_event_name_field (v:track_event_name_field) encoder = + begin match v with + | Name_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + | Name x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 23 Pbrt.Bytes encoder; + end + +and encode_pb_track_event_counter_value_field (v:track_event_counter_value_field) encoder = + begin match v with + | Counter_value x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 30 Pbrt.Varint encoder; + | Double_counter_value x -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 44 Pbrt.Bits64 encoder; + end + +and encode_pb_track_event_correlation_id_field (v:track_event_correlation_id_field) encoder = + begin match v with + | Correlation_id x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 52 Pbrt.Varint encoder; + | Correlation_id_str x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 53 Pbrt.Bytes encoder; + | Correlation_id_str_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 54 Pbrt.Varint encoder; + end + +and encode_pb_track_event_callstack_field (v:track_event_callstack_field) encoder = + begin match v with + | Callstack x -> + Pbrt.Encoder.nested encode_pb_track_event_callstack x encoder; + Pbrt.Encoder.key 55 Pbrt.Bytes encoder; + | Callstack_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 56 Pbrt.Varint encoder; + end + +and encode_pb_track_event_source_location_field (v:track_event_source_location_field) encoder = + begin match v with + | Source_location x -> + Pbrt.Encoder.nested encode_pb_source_location x encoder; + Pbrt.Encoder.key 33 Pbrt.Bytes encoder; + | Source_location_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 34 Pbrt.Varint encoder; + end + +and encode_pb_track_event_timestamp (v:track_event_timestamp) encoder = + begin match v with + | Timestamp_delta_us x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Timestamp_absolute_us x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + end + +and encode_pb_track_event_thread_time (v:track_event_thread_time) encoder = + begin match v with + | Thread_time_delta_us x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Thread_time_absolute_us x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + end + +and encode_pb_track_event_thread_instruction_count (v:track_event_thread_instruction_count) encoder = + begin match v with + | Thread_instruction_count_delta x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + | Thread_instruction_count_absolute x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 20 Pbrt.Varint encoder; + end + +and encode_pb_track_event (v:track_event) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ) v.category_iids encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 22 Pbrt.Bytes encoder; + ) v.categories encoder; + begin match v.name_field with + | None -> () + | Some (Name_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + | Some (Name x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 23 Pbrt.Bytes encoder; + end; + if track_event_has_type_ v then ( + encode_pb_track_event_type v.type_ encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if track_event_has_track_uuid v then ( + Pbrt.Encoder.int64_as_varint v.track_uuid encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + begin match v.counter_value_field with + | None -> () + | Some (Counter_value x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 30 Pbrt.Varint encoder; + | Some (Double_counter_value x) -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 44 Pbrt.Bits64 encoder; + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 31 Pbrt.Varint encoder; + ) v.extra_counter_track_uuids encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ) v.extra_counter_values encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 45 Pbrt.Varint encoder; + ) v.extra_double_counter_track_uuids encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.float_as_bits64 x encoder; + Pbrt.Encoder.key 46 Pbrt.Bits64 encoder; + ) v.extra_double_counter_values encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 36 Pbrt.Varint encoder; + ) v.flow_ids_old encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_bits64 x encoder; + Pbrt.Encoder.key 47 Pbrt.Bits64 encoder; + ) v.flow_ids encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 42 Pbrt.Varint encoder; + ) v.terminating_flow_ids_old encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_bits64 x encoder; + Pbrt.Encoder.key 48 Pbrt.Bits64 encoder; + ) v.terminating_flow_ids encoder; + begin match v.correlation_id_field with + | None -> () + | Some (Correlation_id x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 52 Pbrt.Varint encoder; + | Some (Correlation_id_str x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 53 Pbrt.Bytes encoder; + | Some (Correlation_id_str_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 54 Pbrt.Varint encoder; + end; + begin match v.callstack_field with + | None -> () + | Some (Callstack x) -> + Pbrt.Encoder.nested encode_pb_track_event_callstack x encoder; + Pbrt.Encoder.key 55 Pbrt.Bytes encoder; + | Some (Callstack_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 56 Pbrt.Varint encoder; + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_debug_annotation x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.debug_annotations encoder; + begin match v.task_execution with + | Some x -> + Pbrt.Encoder.nested encode_pb_task_execution x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.log_message with + | Some x -> + Pbrt.Encoder.nested encode_pb_log_message x encoder; + Pbrt.Encoder.key 21 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.cc_scheduler_state with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_compositor_scheduler_state x encoder; + Pbrt.Encoder.key 24 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_user_event with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_user_event x encoder; + Pbrt.Encoder.key 25 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_keyed_service with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_keyed_service x encoder; + Pbrt.Encoder.key 26 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_legacy_ipc with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_legacy_ipc x encoder; + Pbrt.Encoder.key 27 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_histogram_sample with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_histogram_sample x encoder; + Pbrt.Encoder.key 28 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_latency_info with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_latency_info x encoder; + Pbrt.Encoder.key 29 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_frame_reporter with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_frame_reporter x encoder; + Pbrt.Encoder.key 32 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_application_state_info with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_application_state_info x encoder; + Pbrt.Encoder.key 39 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_renderer_scheduler_state with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_renderer_scheduler_state x encoder; + Pbrt.Encoder.key 40 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_window_handle_event_info with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_window_handle_event_info x encoder; + Pbrt.Encoder.key 41 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_content_settings_event_info with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_content_settings_event_info x encoder; + Pbrt.Encoder.key 43 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_active_processes with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_active_processes x encoder; + Pbrt.Encoder.key 49 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.screenshot with + | Some x -> + Pbrt.Encoder.nested encode_pb_screenshot x encoder; + Pbrt.Encoder.key 50 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.source_location_field with + | None -> () + | Some (Source_location x) -> + Pbrt.Encoder.nested encode_pb_source_location x encoder; + Pbrt.Encoder.key 33 Pbrt.Bytes encoder; + | Some (Source_location_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 34 Pbrt.Varint encoder; + end; + begin match v.chrome_message_pump with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_message_pump x encoder; + Pbrt.Encoder.key 35 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_mojo_event_info with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_mojo_event_info x encoder; + Pbrt.Encoder.key 38 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.timestamp with + | None -> () + | Some (Timestamp_delta_us x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Some (Timestamp_absolute_us x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + end; + begin match v.thread_time with + | None -> () + | Some (Thread_time_delta_us x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Some (Thread_time_absolute_us x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + end; + begin match v.thread_instruction_count with + | None -> () + | Some (Thread_instruction_count_delta x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + | Some (Thread_instruction_count_absolute x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 20 Pbrt.Varint encoder; + end; + begin match v.legacy_event with + | Some x -> + Pbrt.Encoder.nested encode_pb_track_event_legacy_event x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_track_event_defaults (v:track_event_defaults) encoder = + if track_event_defaults_has_track_uuid v then ( + Pbrt.Encoder.int64_as_varint v.track_uuid encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 31 Pbrt.Varint encoder; + ) v.extra_counter_track_uuids encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 45 Pbrt.Varint encoder; + ) v.extra_double_counter_track_uuids encoder; + () + +let rec encode_pb_event_category (v:event_category) encoder = + if event_category_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if event_category_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_event_name (v:event_name) encoder = + if event_name_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if event_name_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_interned_data (v:interned_data) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_event_category x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.event_categories encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_event_name x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.event_names encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_debug_annotation_name x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.debug_annotation_names encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_debug_annotation_value_type_name x encoder; + Pbrt.Encoder.key 27 Pbrt.Bytes encoder; + ) v.debug_annotation_value_type_names encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_source_location x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.source_locations encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_unsymbolized_source_location x encoder; + Pbrt.Encoder.key 28 Pbrt.Bytes encoder; + ) v.unsymbolized_source_locations encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_log_message_body x encoder; + Pbrt.Encoder.key 20 Pbrt.Bytes encoder; + ) v.log_message_body encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_histogram_name x encoder; + Pbrt.Encoder.key 25 Pbrt.Bytes encoder; + ) v.histogram_names encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + ) v.build_ids encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 17 Pbrt.Bytes encoder; + ) v.mapping_paths encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 18 Pbrt.Bytes encoder; + ) v.source_paths encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ) v.function_names encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_mapping x encoder; + Pbrt.Encoder.key 19 Pbrt.Bytes encoder; + ) v.mappings encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_frame x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ) v.frames encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_callstack x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.callstacks encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 22 Pbrt.Bytes encoder; + ) v.vulkan_memory_keys encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_graphics_context x encoder; + Pbrt.Encoder.key 23 Pbrt.Bytes encoder; + ) v.graphics_contexts encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_gpu_render_stage_specification x encoder; + Pbrt.Encoder.key 24 Pbrt.Bytes encoder; + ) v.gpu_specifications encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 26 Pbrt.Bytes encoder; + ) v.kernel_symbols encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 29 Pbrt.Bytes encoder; + ) v.debug_annotation_string_values encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_network_packet_context x encoder; + Pbrt.Encoder.key 30 Pbrt.Bytes encoder; + ) v.packet_context encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_v8_string x encoder; + Pbrt.Encoder.key 31 Pbrt.Bytes encoder; + ) v.v8_js_function_name encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_v8_js_function x encoder; + Pbrt.Encoder.key 32 Pbrt.Bytes encoder; + ) v.v8_js_function encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_v8_js_script x encoder; + Pbrt.Encoder.key 33 Pbrt.Bytes encoder; + ) v.v8_js_script encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_v8_wasm_script x encoder; + Pbrt.Encoder.key 34 Pbrt.Bytes encoder; + ) v.v8_wasm_script encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_v8_isolate x encoder; + Pbrt.Encoder.key 35 Pbrt.Bytes encoder; + ) v.v8_isolate encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 36 Pbrt.Bytes encoder; + ) v.protolog_string_args encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 37 Pbrt.Bytes encoder; + ) v.protolog_stacktrace encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 38 Pbrt.Bytes encoder; + ) v.viewcapture_package_name encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 39 Pbrt.Bytes encoder; + ) v.viewcapture_window_name encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 40 Pbrt.Bytes encoder; + ) v.viewcapture_view_id encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 41 Pbrt.Bytes encoder; + ) v.viewcapture_class_name encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_app_wakelock_info x encoder; + Pbrt.Encoder.key 42 Pbrt.Bytes encoder; + ) v.app_wakelock_info encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 43 Pbrt.Bytes encoder; + ) v.correlation_id_str encoder; + () + +let rec encode_pb_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units (v:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units) encoder = + match v with + | Unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Bytes -> Pbrt.Encoder.int_as_varint 1 encoder + | Count -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry (v:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry) encoder = + if memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_units v then ( + encode_pb_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units v.units encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_value_uint64 v then ( + Pbrt.Encoder.int64_as_varint v.value_uint64 encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_value_string v then ( + Pbrt.Encoder.string v.value_string encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_memory_tracker_snapshot_process_snapshot_memory_node (v:memory_tracker_snapshot_process_snapshot_memory_node) encoder = + if memory_tracker_snapshot_process_snapshot_memory_node_has_id v then ( + Pbrt.Encoder.int64_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_node_has_absolute_name v then ( + Pbrt.Encoder.string v.absolute_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_node_has_weak v then ( + Pbrt.Encoder.bool v.weak encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_node_has_size_bytes v then ( + Pbrt.Encoder.int64_as_varint v.size_bytes encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ) v.entries encoder; + () + +let rec encode_pb_memory_tracker_snapshot_process_snapshot_memory_edge (v:memory_tracker_snapshot_process_snapshot_memory_edge) encoder = + if memory_tracker_snapshot_process_snapshot_memory_edge_has_source_id v then ( + Pbrt.Encoder.int64_as_varint v.source_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_edge_has_target_id v then ( + Pbrt.Encoder.int64_as_varint v.target_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_edge_has_importance v then ( + Pbrt.Encoder.int32_as_varint v.importance encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if memory_tracker_snapshot_process_snapshot_memory_edge_has_overridable v then ( + Pbrt.Encoder.bool v.overridable encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_memory_tracker_snapshot_process_snapshot (v:memory_tracker_snapshot_process_snapshot) encoder = + if memory_tracker_snapshot_process_snapshot_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_memory_tracker_snapshot_process_snapshot_memory_node x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.allocator_dumps encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_memory_tracker_snapshot_process_snapshot_memory_edge x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.memory_edges encoder; + () + +let rec encode_pb_memory_tracker_snapshot_level_of_detail (v:memory_tracker_snapshot_level_of_detail) encoder = + match v with + | Detail_full -> Pbrt.Encoder.int_as_varint (0) encoder + | Detail_light -> Pbrt.Encoder.int_as_varint 1 encoder + | Detail_background -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_memory_tracker_snapshot (v:memory_tracker_snapshot) encoder = + if memory_tracker_snapshot_has_global_dump_id v then ( + Pbrt.Encoder.int64_as_varint v.global_dump_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if memory_tracker_snapshot_has_level_of_detail v then ( + encode_pb_memory_tracker_snapshot_level_of_detail v.level_of_detail encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_memory_tracker_snapshot_process_snapshot x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.process_memory_dumps encoder; + () + +let rec encode_pb_perfetto_metatrace_arg_key_or_interned_key (v:perfetto_metatrace_arg_key_or_interned_key) encoder = + begin match v with + | Key x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | Key_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + end + +and encode_pb_perfetto_metatrace_arg_value_or_interned_value (v:perfetto_metatrace_arg_value_or_interned_value) encoder = + begin match v with + | Value x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Value_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + end + +and encode_pb_perfetto_metatrace_arg (v:perfetto_metatrace_arg) encoder = + begin match v.key_or_interned_key with + | None -> () + | Some (Key x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | Some (Key_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + end; + begin match v.value_or_interned_value with + | None -> () + | Some (Value x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Some (Value_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + end; + () + +let rec encode_pb_perfetto_metatrace_interned_string (v:perfetto_metatrace_interned_string) encoder = + if perfetto_metatrace_interned_string_has_iid v then ( + Pbrt.Encoder.int64_as_varint v.iid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if perfetto_metatrace_interned_string_has_value v then ( + Pbrt.Encoder.string v.value encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_perfetto_metatrace_record_type (v:perfetto_metatrace_record_type) encoder = + begin match v with + | Event_id x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Counter_id x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Event_name x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | Event_name_iid x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + | Counter_name x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + end + +and encode_pb_perfetto_metatrace (v:perfetto_metatrace) encoder = + begin match v.record_type with + | None -> () + | Some (Event_id x) -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Some (Counter_id x) -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | Some (Event_name x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | Some (Event_name_iid x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + | Some (Counter_name x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + end; + if perfetto_metatrace_has_event_duration_ns v then ( + Pbrt.Encoder.int64_as_varint v.event_duration_ns encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if perfetto_metatrace_has_counter_value v then ( + Pbrt.Encoder.int32_as_varint v.counter_value encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if perfetto_metatrace_has_thread_id v then ( + Pbrt.Encoder.int32_as_varint v.thread_id encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if perfetto_metatrace_has_has_overruns v then ( + Pbrt.Encoder.bool v.has_overruns encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_perfetto_metatrace_arg x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.args encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_perfetto_metatrace_interned_string x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + ) v.interned_strings encoder; + () + +let rec encode_pb_tracing_service_event_data_sources_data_source (v:tracing_service_event_data_sources_data_source) encoder = + if tracing_service_event_data_sources_data_source_has_producer_name v then ( + Pbrt.Encoder.string v.producer_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if tracing_service_event_data_sources_data_source_has_data_source_name v then ( + Pbrt.Encoder.string v.data_source_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_tracing_service_event_data_sources (v:tracing_service_event_data_sources) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_tracing_service_event_data_sources_data_source x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.data_source encoder; + () + +let rec encode_pb_tracing_service_event (v:tracing_service_event) encoder = + begin match v with + | Tracing_started x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + | All_data_sources_started x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Flush_started x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + | All_data_sources_flushed x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + | Read_tracing_buffers_completed x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + | Tracing_disabled x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + | Seized_for_bugreport x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + | Slow_starting_data_sources x -> + Pbrt.Encoder.nested encode_pb_tracing_service_event_data_sources x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | Last_flush_slow_data_sources x -> + Pbrt.Encoder.nested encode_pb_tracing_service_event_data_sources x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | Clone_started x -> + Pbrt.Encoder.bool x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + | Buffer_cloned x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + end + +let rec encode_pb_android_energy_consumer (v:android_energy_consumer) encoder = + if android_energy_consumer_has_energy_consumer_id v then ( + Pbrt.Encoder.int32_as_varint v.energy_consumer_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_energy_consumer_has_ordinal v then ( + Pbrt.Encoder.int32_as_varint v.ordinal encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_energy_consumer_has_type_ v then ( + Pbrt.Encoder.string v.type_ encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if android_energy_consumer_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_android_energy_consumer_descriptor (v:android_energy_consumer_descriptor) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_energy_consumer x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.energy_consumers encoder; + () + +let rec encode_pb_android_energy_estimation_breakdown_energy_uid_breakdown (v:android_energy_estimation_breakdown_energy_uid_breakdown) encoder = + if android_energy_estimation_breakdown_energy_uid_breakdown_has_uid v then ( + Pbrt.Encoder.int32_as_varint v.uid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if android_energy_estimation_breakdown_energy_uid_breakdown_has_energy_uws v then ( + Pbrt.Encoder.int64_as_varint v.energy_uws encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_android_energy_estimation_breakdown (v:android_energy_estimation_breakdown) encoder = + begin match v.energy_consumer_descriptor with + | Some x -> + Pbrt.Encoder.nested encode_pb_android_energy_consumer_descriptor x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | None -> (); + end; + if android_energy_estimation_breakdown_has_energy_consumer_id v then ( + Pbrt.Encoder.int32_as_varint v.energy_consumer_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if android_energy_estimation_breakdown_has_energy_uws v then ( + Pbrt.Encoder.int64_as_varint v.energy_uws encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_android_energy_estimation_breakdown_energy_uid_breakdown x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.per_uid_breakdown encoder; + () + +let rec encode_pb_entity_state_residency_power_entity_state (v:entity_state_residency_power_entity_state) encoder = + if entity_state_residency_power_entity_state_has_entity_index v then ( + Pbrt.Encoder.int32_as_varint v.entity_index encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if entity_state_residency_power_entity_state_has_state_index v then ( + Pbrt.Encoder.int32_as_varint v.state_index encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if entity_state_residency_power_entity_state_has_entity_name v then ( + Pbrt.Encoder.string v.entity_name encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if entity_state_residency_power_entity_state_has_state_name v then ( + Pbrt.Encoder.string v.state_name encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_entity_state_residency_state_residency (v:entity_state_residency_state_residency) encoder = + if entity_state_residency_state_residency_has_entity_index v then ( + Pbrt.Encoder.int32_as_varint v.entity_index encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if entity_state_residency_state_residency_has_state_index v then ( + Pbrt.Encoder.int32_as_varint v.state_index encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if entity_state_residency_state_residency_has_total_time_in_state_ms v then ( + Pbrt.Encoder.int64_as_varint v.total_time_in_state_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if entity_state_residency_state_residency_has_total_state_entry_count v then ( + Pbrt.Encoder.int64_as_varint v.total_state_entry_count encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if entity_state_residency_state_residency_has_last_entry_timestamp_ms v then ( + Pbrt.Encoder.int64_as_varint v.last_entry_timestamp_ms encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_entity_state_residency (v:entity_state_residency) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_entity_state_residency_power_entity_state x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.power_entity_state encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_entity_state_residency_state_residency x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.residency encoder; + () + +let rec encode_pb_battery_counters (v:battery_counters) encoder = + if battery_counters_has_charge_counter_uah v then ( + Pbrt.Encoder.int64_as_varint v.charge_counter_uah encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if battery_counters_has_capacity_percent v then ( + Pbrt.Encoder.float_as_bits32 v.capacity_percent encoder; + Pbrt.Encoder.key 2 Pbrt.Bits32 encoder; + ); + if battery_counters_has_current_ua v then ( + Pbrt.Encoder.int64_as_varint v.current_ua encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if battery_counters_has_current_avg_ua v then ( + Pbrt.Encoder.int64_as_varint v.current_avg_ua encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if battery_counters_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + if battery_counters_has_energy_counter_uwh v then ( + Pbrt.Encoder.int64_as_varint v.energy_counter_uwh encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if battery_counters_has_voltage_uv v then ( + Pbrt.Encoder.int64_as_varint v.voltage_uv encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_power_rails_rail_descriptor (v:power_rails_rail_descriptor) encoder = + if power_rails_rail_descriptor_has_index v then ( + Pbrt.Encoder.int32_as_varint v.index encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if power_rails_rail_descriptor_has_rail_name v then ( + Pbrt.Encoder.string v.rail_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if power_rails_rail_descriptor_has_subsys_name v then ( + Pbrt.Encoder.string v.subsys_name encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if power_rails_rail_descriptor_has_sampling_rate v then ( + Pbrt.Encoder.int32_as_varint v.sampling_rate encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_power_rails_energy_data (v:power_rails_energy_data) encoder = + if power_rails_energy_data_has_index v then ( + Pbrt.Encoder.int32_as_varint v.index encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if power_rails_energy_data_has_timestamp_ms v then ( + Pbrt.Encoder.int64_as_varint v.timestamp_ms encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if power_rails_energy_data_has_energy v then ( + Pbrt.Encoder.int64_as_varint v.energy encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_power_rails (v:power_rails) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_power_rails_rail_descriptor x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.rail_descriptor encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_power_rails_energy_data x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.energy_data encoder; + if power_rails_has_session_uuid v then ( + Pbrt.Encoder.int64_as_varint v.session_uuid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_obfuscated_member (v:obfuscated_member) encoder = + if obfuscated_member_has_obfuscated_name v then ( + Pbrt.Encoder.string v.obfuscated_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if obfuscated_member_has_deobfuscated_name v then ( + Pbrt.Encoder.string v.deobfuscated_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_obfuscated_class (v:obfuscated_class) encoder = + if obfuscated_class_has_obfuscated_name v then ( + Pbrt.Encoder.string v.obfuscated_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if obfuscated_class_has_deobfuscated_name v then ( + Pbrt.Encoder.string v.deobfuscated_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_obfuscated_member x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.obfuscated_members encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_obfuscated_member x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.obfuscated_methods encoder; + () + +let rec encode_pb_deobfuscation_mapping (v:deobfuscation_mapping) encoder = + if deobfuscation_mapping_has_package_name v then ( + Pbrt.Encoder.string v.package_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if deobfuscation_mapping_has_version_code v then ( + Pbrt.Encoder.int64_as_varint v.version_code encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_obfuscated_class x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.obfuscated_classes encoder; + () + +let rec encode_pb_heap_graph_root_type (v:heap_graph_root_type) encoder = + match v with + | Root_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Root_jni_global -> Pbrt.Encoder.int_as_varint 1 encoder + | Root_jni_local -> Pbrt.Encoder.int_as_varint 2 encoder + | Root_java_frame -> Pbrt.Encoder.int_as_varint 3 encoder + | Root_native_stack -> Pbrt.Encoder.int_as_varint 4 encoder + | Root_sticky_class -> Pbrt.Encoder.int_as_varint 5 encoder + | Root_thread_block -> Pbrt.Encoder.int_as_varint 6 encoder + | Root_monitor_used -> Pbrt.Encoder.int_as_varint 7 encoder + | Root_thread_object -> Pbrt.Encoder.int_as_varint 8 encoder + | Root_interned_string -> Pbrt.Encoder.int_as_varint 9 encoder + | Root_finalizing -> Pbrt.Encoder.int_as_varint 10 encoder + | Root_debugger -> Pbrt.Encoder.int_as_varint 11 encoder + | Root_reference_cleanup -> Pbrt.Encoder.int_as_varint 12 encoder + | Root_vm_internal -> Pbrt.Encoder.int_as_varint 13 encoder + | Root_jni_monitor -> Pbrt.Encoder.int_as_varint 14 encoder + +let rec encode_pb_heap_graph_root (v:heap_graph_root) encoder = + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.object_ids encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + if heap_graph_root_has_root_type v then ( + encode_pb_heap_graph_root_type v.root_type encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_heap_graph_type_kind (v:heap_graph_type_kind) encoder = + match v with + | Kind_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Kind_normal -> Pbrt.Encoder.int_as_varint 1 encoder + | Kind_noreferences -> Pbrt.Encoder.int_as_varint 2 encoder + | Kind_string -> Pbrt.Encoder.int_as_varint 3 encoder + | Kind_array -> Pbrt.Encoder.int_as_varint 4 encoder + | Kind_class -> Pbrt.Encoder.int_as_varint 5 encoder + | Kind_classloader -> Pbrt.Encoder.int_as_varint 6 encoder + | Kind_dexcache -> Pbrt.Encoder.int_as_varint 7 encoder + | Kind_soft_reference -> Pbrt.Encoder.int_as_varint 8 encoder + | Kind_weak_reference -> Pbrt.Encoder.int_as_varint 9 encoder + | Kind_finalizer_reference -> Pbrt.Encoder.int_as_varint 10 encoder + | Kind_phantom_reference -> Pbrt.Encoder.int_as_varint 11 encoder + +let rec encode_pb_heap_graph_type (v:heap_graph_type) encoder = + if heap_graph_type_has_id v then ( + Pbrt.Encoder.int64_as_varint v.id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if heap_graph_type_has_location_id v then ( + Pbrt.Encoder.int64_as_varint v.location_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if heap_graph_type_has_class_name v then ( + Pbrt.Encoder.string v.class_name encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + if heap_graph_type_has_object_size v then ( + Pbrt.Encoder.int64_as_varint v.object_size encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if heap_graph_type_has_superclass_id v then ( + Pbrt.Encoder.int64_as_varint v.superclass_id encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.reference_field_id encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + if heap_graph_type_has_kind v then ( + encode_pb_heap_graph_type_kind v.kind encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if heap_graph_type_has_classloader_id v then ( + Pbrt.Encoder.int64_as_varint v.classloader_id encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_heap_graph_object_heap_type (v:heap_graph_object_heap_type) encoder = + match v with + | Heap_type_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Heap_type_app -> Pbrt.Encoder.int_as_varint 1 encoder + | Heap_type_zygote -> Pbrt.Encoder.int_as_varint 2 encoder + | Heap_type_boot_image -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_heap_graph_object_identifier (v:heap_graph_object_identifier) encoder = + begin match v with + | Id x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Id_delta x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + end + +and encode_pb_heap_graph_object (v:heap_graph_object) encoder = + begin match v.identifier with + | None -> () + | Some (Id x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Some (Id_delta x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + end; + if heap_graph_object_has_type_id v then ( + Pbrt.Encoder.int64_as_varint v.type_id encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if heap_graph_object_has_self_size v then ( + Pbrt.Encoder.int64_as_varint v.self_size encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if heap_graph_object_has_reference_field_id_base v then ( + Pbrt.Encoder.int64_as_varint v.reference_field_id_base encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.reference_field_id encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.reference_object_id encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + if heap_graph_object_has_native_allocation_registry_size_field v then ( + Pbrt.Encoder.int64_as_varint v.native_allocation_registry_size_field encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if heap_graph_object_has_heap_type_delta v then ( + encode_pb_heap_graph_object_heap_type v.heap_type_delta encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + Pbrt.Encoder.nested (fun lst encoder -> + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + ) lst encoder; + ) v.runtime_internal_object_id encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + () + +let rec encode_pb_heap_graph (v:heap_graph) encoder = + if heap_graph_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_heap_graph_object x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.objects encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_heap_graph_root x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.roots encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_heap_graph_type x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + ) v.types encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.field_names encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ) v.location_names encoder; + if heap_graph_has_continued v then ( + Pbrt.Encoder.bool v.continued encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if heap_graph_has_index v then ( + Pbrt.Encoder.int64_as_varint v.index encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_profile_packet_heap_sample (v:profile_packet_heap_sample) encoder = + if profile_packet_heap_sample_has_callstack_id v then ( + Pbrt.Encoder.int64_as_varint v.callstack_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if profile_packet_heap_sample_has_self_allocated v then ( + Pbrt.Encoder.int64_as_varint v.self_allocated encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if profile_packet_heap_sample_has_self_freed v then ( + Pbrt.Encoder.int64_as_varint v.self_freed encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if profile_packet_heap_sample_has_self_max v then ( + Pbrt.Encoder.int64_as_varint v.self_max encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if profile_packet_heap_sample_has_self_max_count v then ( + Pbrt.Encoder.int64_as_varint v.self_max_count encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if profile_packet_heap_sample_has_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.timestamp encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if profile_packet_heap_sample_has_alloc_count v then ( + Pbrt.Encoder.int64_as_varint v.alloc_count encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if profile_packet_heap_sample_has_free_count v then ( + Pbrt.Encoder.int64_as_varint v.free_count encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_profile_packet_histogram_bucket (v:profile_packet_histogram_bucket) encoder = + if profile_packet_histogram_bucket_has_upper_limit v then ( + Pbrt.Encoder.int64_as_varint v.upper_limit encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if profile_packet_histogram_bucket_has_max_bucket v then ( + Pbrt.Encoder.bool v.max_bucket encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if profile_packet_histogram_bucket_has_count v then ( + Pbrt.Encoder.int64_as_varint v.count encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_profile_packet_histogram (v:profile_packet_histogram) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_profile_packet_histogram_bucket x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.buckets encoder; + () + +let rec encode_pb_profile_packet_process_stats (v:profile_packet_process_stats) encoder = + if profile_packet_process_stats_has_unwinding_errors v then ( + Pbrt.Encoder.int64_as_varint v.unwinding_errors encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if profile_packet_process_stats_has_heap_samples v then ( + Pbrt.Encoder.int64_as_varint v.heap_samples encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if profile_packet_process_stats_has_map_reparses v then ( + Pbrt.Encoder.int64_as_varint v.map_reparses encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + begin match v.unwinding_time_us with + | Some x -> + Pbrt.Encoder.nested encode_pb_profile_packet_histogram x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | None -> (); + end; + if profile_packet_process_stats_has_total_unwinding_time_us v then ( + Pbrt.Encoder.int64_as_varint v.total_unwinding_time_us encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if profile_packet_process_stats_has_client_spinlock_blocked_us v then ( + Pbrt.Encoder.int64_as_varint v.client_spinlock_blocked_us encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_profile_packet_process_heap_samples_client_error (v:profile_packet_process_heap_samples_client_error) encoder = + match v with + | Client_error_none -> Pbrt.Encoder.int_as_varint (0) encoder + | Client_error_hit_timeout -> Pbrt.Encoder.int_as_varint 1 encoder + | Client_error_invalid_stack_bounds -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_profile_packet_process_heap_samples (v:profile_packet_process_heap_samples) encoder = + if profile_packet_process_heap_samples_has_pid v then ( + Pbrt.Encoder.int64_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_from_startup v then ( + Pbrt.Encoder.bool v.from_startup encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_rejected_concurrent v then ( + Pbrt.Encoder.bool v.rejected_concurrent encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_disconnected v then ( + Pbrt.Encoder.bool v.disconnected encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_buffer_overran v then ( + Pbrt.Encoder.bool v.buffer_overran encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_client_error v then ( + encode_pb_profile_packet_process_heap_samples_client_error v.client_error encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_buffer_corrupted v then ( + Pbrt.Encoder.bool v.buffer_corrupted encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_hit_guardrail v then ( + Pbrt.Encoder.bool v.hit_guardrail encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_heap_name v then ( + Pbrt.Encoder.string v.heap_name encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + ); + if profile_packet_process_heap_samples_has_sampling_interval_bytes v then ( + Pbrt.Encoder.int64_as_varint v.sampling_interval_bytes encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_orig_sampling_interval_bytes v then ( + Pbrt.Encoder.int64_as_varint v.orig_sampling_interval_bytes encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if profile_packet_process_heap_samples_has_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.timestamp encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + begin match v.stats with + | Some x -> + Pbrt.Encoder.nested encode_pb_profile_packet_process_stats x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | None -> (); + end; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_profile_packet_heap_sample x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.samples encoder; + () + +let rec encode_pb_profile_packet (v:profile_packet) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_interned_string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.strings encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_mapping x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ) v.mappings encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_frame x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.frames encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_callstack x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.callstacks encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_profile_packet_process_heap_samples x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ) v.process_dumps encoder; + if profile_packet_has_continued v then ( + Pbrt.Encoder.bool v.continued encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if profile_packet_has_index v then ( + Pbrt.Encoder.int64_as_varint v.index encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_streaming_allocation (v:streaming_allocation) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.address encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.size encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ) v.sample_size encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ) v.clock_monotonic_coarse_timestamp encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ) v.heap_id encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ) v.sequence_number encoder; + () + +let rec encode_pb_streaming_free (v:streaming_free) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.address encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.heap_id encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ) v.sequence_number encoder; + () + +let rec encode_pb_streaming_profile_packet (v:streaming_profile_packet) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ) v.callstack_iid encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.timestamp_delta_us encoder; + if streaming_profile_packet_has_process_priority v then ( + Pbrt.Encoder.int32_as_varint v.process_priority encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_profiling_cpu_mode (v:profiling_cpu_mode) encoder = + match v with + | Mode_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Mode_kernel -> Pbrt.Encoder.int_as_varint 1 encoder + | Mode_user -> Pbrt.Encoder.int_as_varint 2 encoder + | Mode_hypervisor -> Pbrt.Encoder.int_as_varint 3 encoder + | Mode_guest_kernel -> Pbrt.Encoder.int_as_varint 4 encoder + | Mode_guest_user -> Pbrt.Encoder.int_as_varint 5 encoder + +let rec encode_pb_profiling_stack_unwind_error (v:profiling_stack_unwind_error) encoder = + match v with + | Unwind_error_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Unwind_error_none -> Pbrt.Encoder.int_as_varint 1 encoder + | Unwind_error_memory_invalid -> Pbrt.Encoder.int_as_varint 2 encoder + | Unwind_error_unwind_info -> Pbrt.Encoder.int_as_varint 3 encoder + | Unwind_error_unsupported -> Pbrt.Encoder.int_as_varint 4 encoder + | Unwind_error_invalid_map -> Pbrt.Encoder.int_as_varint 5 encoder + | Unwind_error_max_frames_exceeded -> Pbrt.Encoder.int_as_varint 6 encoder + | Unwind_error_repeated_frame -> Pbrt.Encoder.int_as_varint 7 encoder + | Unwind_error_invalid_elf -> Pbrt.Encoder.int_as_varint 8 encoder + | Unwind_error_system_call -> Pbrt.Encoder.int_as_varint 9 encoder + | Unwind_error_thread_timeout -> Pbrt.Encoder.int_as_varint 10 encoder + | Unwind_error_thread_does_not_exist -> Pbrt.Encoder.int_as_varint 11 encoder + | Unwind_error_bad_arch -> Pbrt.Encoder.int_as_varint 12 encoder + | Unwind_error_maps_parse -> Pbrt.Encoder.int_as_varint 13 encoder + | Unwind_error_invalid_parameter -> Pbrt.Encoder.int_as_varint 14 encoder + | Unwind_error_ptrace_call -> Pbrt.Encoder.int_as_varint 15 encoder + +let rec encode_pb_profiling (v:profiling) encoder = +() + +let rec encode_pb_perf_sample_sample_skip_reason (v:perf_sample_sample_skip_reason) encoder = + match v with + | Profiler_skip_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Profiler_skip_read_stage -> Pbrt.Encoder.int_as_varint 1 encoder + | Profiler_skip_unwind_stage -> Pbrt.Encoder.int_as_varint 2 encoder + | Profiler_skip_unwind_enqueue -> Pbrt.Encoder.int_as_varint 3 encoder + | Profiler_skip_not_in_scope -> Pbrt.Encoder.int_as_varint 4 encoder + +let rec encode_pb_perf_sample_producer_event_data_source_stop_reason (v:perf_sample_producer_event_data_source_stop_reason) encoder = + match v with + | Profiler_stop_unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Profiler_stop_guardrail -> Pbrt.Encoder.int_as_varint 1 encoder + +let rec encode_pb_perf_sample_producer_event (v:perf_sample_producer_event) encoder = + begin match v with + | Source_stop_reason x -> + encode_pb_perf_sample_producer_event_data_source_stop_reason x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + end + +let rec encode_pb_perf_sample_optional_unwind_error (v:perf_sample_optional_unwind_error) encoder = + begin match v with + | Unwind_error x -> + encode_pb_profiling_stack_unwind_error x encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + end + +and encode_pb_perf_sample_optional_sample_skipped_reason (v:perf_sample_optional_sample_skipped_reason) encoder = + begin match v with + | Sample_skipped_reason x -> + encode_pb_perf_sample_sample_skip_reason x encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + end + +and encode_pb_perf_sample (v:perf_sample) encoder = + if perf_sample_has_cpu v then ( + Pbrt.Encoder.int32_as_varint v.cpu encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if perf_sample_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if perf_sample_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if perf_sample_has_cpu_mode v then ( + encode_pb_profiling_cpu_mode v.cpu_mode encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if perf_sample_has_timebase_count v then ( + Pbrt.Encoder.int64_as_varint v.timebase_count encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ) v.follower_counts encoder; + if perf_sample_has_callstack_iid v then ( + Pbrt.Encoder.int64_as_varint v.callstack_iid encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + begin match v.optional_unwind_error with + | None -> () + | Some (Unwind_error x) -> + encode_pb_profiling_stack_unwind_error x encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + end; + if perf_sample_has_kernel_records_lost v then ( + Pbrt.Encoder.int64_as_varint v.kernel_records_lost encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + begin match v.optional_sample_skipped_reason with + | None -> () + | Some (Sample_skipped_reason x) -> + encode_pb_perf_sample_sample_skip_reason x encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + end; + begin match v.producer_event with + | Some x -> + Pbrt.Encoder.nested encode_pb_perf_sample_producer_event x encoder; + Pbrt.Encoder.key 19 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_smaps_entry (v:smaps_entry) encoder = + if smaps_entry_has_path v then ( + Pbrt.Encoder.string v.path encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if smaps_entry_has_size_kb v then ( + Pbrt.Encoder.int64_as_varint v.size_kb encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if smaps_entry_has_private_dirty_kb v then ( + Pbrt.Encoder.int64_as_varint v.private_dirty_kb encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if smaps_entry_has_swap_kb v then ( + Pbrt.Encoder.int64_as_varint v.swap_kb encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if smaps_entry_has_file_name v then ( + Pbrt.Encoder.string v.file_name encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + if smaps_entry_has_start_address v then ( + Pbrt.Encoder.int64_as_varint v.start_address encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if smaps_entry_has_module_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.module_timestamp encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if smaps_entry_has_module_debugid v then ( + Pbrt.Encoder.string v.module_debugid encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ); + if smaps_entry_has_module_debug_path v then ( + Pbrt.Encoder.string v.module_debug_path encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + ); + if smaps_entry_has_protection_flags v then ( + Pbrt.Encoder.int32_as_varint v.protection_flags encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if smaps_entry_has_private_clean_resident_kb v then ( + Pbrt.Encoder.int64_as_varint v.private_clean_resident_kb encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if smaps_entry_has_shared_dirty_resident_kb v then ( + Pbrt.Encoder.int64_as_varint v.shared_dirty_resident_kb encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if smaps_entry_has_shared_clean_resident_kb v then ( + Pbrt.Encoder.int64_as_varint v.shared_clean_resident_kb encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if smaps_entry_has_locked_kb v then ( + Pbrt.Encoder.int64_as_varint v.locked_kb encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + if smaps_entry_has_proportional_resident_kb v then ( + Pbrt.Encoder.int64_as_varint v.proportional_resident_kb encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_smaps_packet (v:smaps_packet) encoder = + if smaps_packet_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_smaps_entry x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.entries encoder; + () + +let rec encode_pb_process_stats_thread (v:process_stats_thread) encoder = + if process_stats_thread_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_process_stats_fdinfo (v:process_stats_fdinfo) encoder = + if process_stats_fdinfo_has_fd v then ( + Pbrt.Encoder.int64_as_varint v.fd encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if process_stats_fdinfo_has_path v then ( + Pbrt.Encoder.string v.path encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_process_stats_process (v:process_stats_process) encoder = + if process_stats_process_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_process_stats_thread x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + ) v.threads encoder; + if process_stats_process_has_vm_size_kb v then ( + Pbrt.Encoder.int64_as_varint v.vm_size_kb encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if process_stats_process_has_vm_rss_kb v then ( + Pbrt.Encoder.int64_as_varint v.vm_rss_kb encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if process_stats_process_has_rss_anon_kb v then ( + Pbrt.Encoder.int64_as_varint v.rss_anon_kb encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if process_stats_process_has_rss_file_kb v then ( + Pbrt.Encoder.int64_as_varint v.rss_file_kb encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if process_stats_process_has_rss_shmem_kb v then ( + Pbrt.Encoder.int64_as_varint v.rss_shmem_kb encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if process_stats_process_has_vm_swap_kb v then ( + Pbrt.Encoder.int64_as_varint v.vm_swap_kb encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if process_stats_process_has_vm_locked_kb v then ( + Pbrt.Encoder.int64_as_varint v.vm_locked_kb encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if process_stats_process_has_vm_hwm_kb v then ( + Pbrt.Encoder.int64_as_varint v.vm_hwm_kb encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if process_stats_process_has_oom_score_adj v then ( + Pbrt.Encoder.int64_as_varint v.oom_score_adj encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + ); + if process_stats_process_has_is_peak_rss_resettable v then ( + Pbrt.Encoder.bool v.is_peak_rss_resettable encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if process_stats_process_has_chrome_private_footprint_kb v then ( + Pbrt.Encoder.int32_as_varint v.chrome_private_footprint_kb encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if process_stats_process_has_chrome_peak_resident_set_kb v then ( + Pbrt.Encoder.int32_as_varint v.chrome_peak_resident_set_kb encoder; + Pbrt.Encoder.key 14 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_process_stats_fdinfo x encoder; + Pbrt.Encoder.key 15 Pbrt.Bytes encoder; + ) v.fds encoder; + if process_stats_process_has_smr_rss_kb v then ( + Pbrt.Encoder.int64_as_varint v.smr_rss_kb encoder; + Pbrt.Encoder.key 16 Pbrt.Varint encoder; + ); + if process_stats_process_has_smr_pss_kb v then ( + Pbrt.Encoder.int64_as_varint v.smr_pss_kb encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ); + if process_stats_process_has_smr_pss_anon_kb v then ( + Pbrt.Encoder.int64_as_varint v.smr_pss_anon_kb encoder; + Pbrt.Encoder.key 18 Pbrt.Varint encoder; + ); + if process_stats_process_has_smr_pss_file_kb v then ( + Pbrt.Encoder.int64_as_varint v.smr_pss_file_kb encoder; + Pbrt.Encoder.key 19 Pbrt.Varint encoder; + ); + if process_stats_process_has_smr_pss_shmem_kb v then ( + Pbrt.Encoder.int64_as_varint v.smr_pss_shmem_kb encoder; + Pbrt.Encoder.key 20 Pbrt.Varint encoder; + ); + if process_stats_process_has_smr_swap_pss_kb v then ( + Pbrt.Encoder.int64_as_varint v.smr_swap_pss_kb encoder; + Pbrt.Encoder.key 23 Pbrt.Varint encoder; + ); + if process_stats_process_has_runtime_user_mode v then ( + Pbrt.Encoder.int64_as_varint v.runtime_user_mode encoder; + Pbrt.Encoder.key 21 Pbrt.Varint encoder; + ); + if process_stats_process_has_runtime_kernel_mode v then ( + Pbrt.Encoder.int64_as_varint v.runtime_kernel_mode encoder; + Pbrt.Encoder.key 22 Pbrt.Varint encoder; + ); + if process_stats_process_has_dmabuf_rss_kb v then ( + Pbrt.Encoder.int64_as_varint v.dmabuf_rss_kb encoder; + Pbrt.Encoder.key 24 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_process_stats (v:process_stats) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_process_stats_process x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.processes encoder; + if process_stats_has_collection_end_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.collection_end_timestamp encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_process_tree_thread (v:process_tree_thread) encoder = + if process_tree_thread_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if process_tree_thread_has_tgid v then ( + Pbrt.Encoder.int32_as_varint v.tgid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if process_tree_thread_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ) v.nstid encoder; + () + +let rec encode_pb_process_tree_process (v:process_tree_process) encoder = + if process_tree_process_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if process_tree_process_has_ppid v then ( + Pbrt.Encoder.int32_as_varint v.ppid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.cmdline encoder; + if process_tree_process_has_cmdline_is_comm v then ( + Pbrt.Encoder.bool v.cmdline_is_comm encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if process_tree_process_has_uid v then ( + Pbrt.Encoder.int32_as_varint v.uid encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ) v.nspid encoder; + if process_tree_process_has_process_start_from_boot v then ( + Pbrt.Encoder.int64_as_varint v.process_start_from_boot encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if process_tree_process_has_is_kthread v then ( + Pbrt.Encoder.bool v.is_kthread encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_process_tree (v:process_tree) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_process_tree_process x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.processes encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_process_tree_thread x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.threads encoder; + if process_tree_has_collection_end_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.collection_end_timestamp encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_remote_clock_sync_synced_clocks (v:remote_clock_sync_synced_clocks) encoder = + begin match v.client_clocks with + | Some x -> + Pbrt.Encoder.nested encode_pb_clock_snapshot x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.host_clocks with + | Some x -> + Pbrt.Encoder.nested encode_pb_clock_snapshot x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_remote_clock_sync (v:remote_clock_sync) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_remote_clock_sync_synced_clocks x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.synced_clocks encoder; + () + +let rec encode_pb_atom (v:atom) encoder = +() + +let rec encode_pb_statsd_atom (v:statsd_atom) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.empty_nested encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.atom encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.timestamp_nanos encoder; + () + +let rec encode_pb_sys_stats_meminfo_value (v:sys_stats_meminfo_value) encoder = + if sys_stats_meminfo_value_has_key v then ( + encode_pb_meminfo_counters v.key encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if sys_stats_meminfo_value_has_value v then ( + Pbrt.Encoder.int64_as_varint v.value encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_sys_stats_vmstat_value (v:sys_stats_vmstat_value) encoder = + if sys_stats_vmstat_value_has_key v then ( + encode_pb_vmstat_counters v.key encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if sys_stats_vmstat_value_has_value v then ( + Pbrt.Encoder.int64_as_varint v.value encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_sys_stats_cpu_times (v:sys_stats_cpu_times) encoder = + if sys_stats_cpu_times_has_cpu_id v then ( + Pbrt.Encoder.int32_as_varint v.cpu_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if sys_stats_cpu_times_has_user_ns v then ( + Pbrt.Encoder.int64_as_varint v.user_ns encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if sys_stats_cpu_times_has_user_nice_ns v then ( + Pbrt.Encoder.int64_as_varint v.user_nice_ns encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if sys_stats_cpu_times_has_system_mode_ns v then ( + Pbrt.Encoder.int64_as_varint v.system_mode_ns encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if sys_stats_cpu_times_has_idle_ns v then ( + Pbrt.Encoder.int64_as_varint v.idle_ns encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if sys_stats_cpu_times_has_io_wait_ns v then ( + Pbrt.Encoder.int64_as_varint v.io_wait_ns encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if sys_stats_cpu_times_has_irq_ns v then ( + Pbrt.Encoder.int64_as_varint v.irq_ns encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if sys_stats_cpu_times_has_softirq_ns v then ( + Pbrt.Encoder.int64_as_varint v.softirq_ns encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if sys_stats_cpu_times_has_steal_ns v then ( + Pbrt.Encoder.int64_as_varint v.steal_ns encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_sys_stats_interrupt_count (v:sys_stats_interrupt_count) encoder = + if sys_stats_interrupt_count_has_irq v then ( + Pbrt.Encoder.int32_as_varint v.irq encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if sys_stats_interrupt_count_has_count v then ( + Pbrt.Encoder.int64_as_varint v.count encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_sys_stats_devfreq_value (v:sys_stats_devfreq_value) encoder = + if sys_stats_devfreq_value_has_key v then ( + Pbrt.Encoder.string v.key encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if sys_stats_devfreq_value_has_value v then ( + Pbrt.Encoder.int64_as_varint v.value encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_sys_stats_buddy_info (v:sys_stats_buddy_info) encoder = + if sys_stats_buddy_info_has_node v then ( + Pbrt.Encoder.string v.node encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if sys_stats_buddy_info_has_zone v then ( + Pbrt.Encoder.string v.zone encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ) v.order_pages encoder; + () + +let rec encode_pb_sys_stats_disk_stat (v:sys_stats_disk_stat) encoder = + if sys_stats_disk_stat_has_device_name v then ( + Pbrt.Encoder.string v.device_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if sys_stats_disk_stat_has_read_sectors v then ( + Pbrt.Encoder.int64_as_varint v.read_sectors encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if sys_stats_disk_stat_has_read_time_ms v then ( + Pbrt.Encoder.int64_as_varint v.read_time_ms encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if sys_stats_disk_stat_has_write_sectors v then ( + Pbrt.Encoder.int64_as_varint v.write_sectors encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if sys_stats_disk_stat_has_write_time_ms v then ( + Pbrt.Encoder.int64_as_varint v.write_time_ms encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if sys_stats_disk_stat_has_discard_sectors v then ( + Pbrt.Encoder.int64_as_varint v.discard_sectors encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if sys_stats_disk_stat_has_discard_time_ms v then ( + Pbrt.Encoder.int64_as_varint v.discard_time_ms encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if sys_stats_disk_stat_has_flush_count v then ( + Pbrt.Encoder.int64_as_varint v.flush_count encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if sys_stats_disk_stat_has_flush_time_ms v then ( + Pbrt.Encoder.int64_as_varint v.flush_time_ms encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_sys_stats_psi_sample_psi_resource (v:sys_stats_psi_sample_psi_resource) encoder = + match v with + | Psi_resource_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Psi_resource_cpu_some -> Pbrt.Encoder.int_as_varint 1 encoder + | Psi_resource_cpu_full -> Pbrt.Encoder.int_as_varint 2 encoder + | Psi_resource_io_some -> Pbrt.Encoder.int_as_varint 3 encoder + | Psi_resource_io_full -> Pbrt.Encoder.int_as_varint 4 encoder + | Psi_resource_memory_some -> Pbrt.Encoder.int_as_varint 5 encoder + | Psi_resource_memory_full -> Pbrt.Encoder.int_as_varint 6 encoder + +let rec encode_pb_sys_stats_psi_sample (v:sys_stats_psi_sample) encoder = + if sys_stats_psi_sample_has_resource v then ( + encode_pb_sys_stats_psi_sample_psi_resource v.resource encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if sys_stats_psi_sample_has_total_ns v then ( + Pbrt.Encoder.int64_as_varint v.total_ns encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_sys_stats_thermal_zone (v:sys_stats_thermal_zone) encoder = + if sys_stats_thermal_zone_has_name v then ( + Pbrt.Encoder.string v.name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if sys_stats_thermal_zone_has_temp v then ( + Pbrt.Encoder.int64_as_varint v.temp encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if sys_stats_thermal_zone_has_type_ v then ( + Pbrt.Encoder.string v.type_ encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_sys_stats_cpu_idle_state_entry (v:sys_stats_cpu_idle_state_entry) encoder = + if sys_stats_cpu_idle_state_entry_has_state v then ( + Pbrt.Encoder.string v.state encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if sys_stats_cpu_idle_state_entry_has_duration_us v then ( + Pbrt.Encoder.int64_as_varint v.duration_us encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_sys_stats_cpu_idle_state (v:sys_stats_cpu_idle_state) encoder = + if sys_stats_cpu_idle_state_has_cpu_id v then ( + Pbrt.Encoder.int32_as_varint v.cpu_id encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_cpu_idle_state_entry x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.cpuidle_state_entry encoder; + () + +let rec encode_pb_sys_stats (v:sys_stats) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_meminfo_value x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.meminfo encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_vmstat_value x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.vmstat encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_cpu_times x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + ) v.cpu_stat encoder; + if sys_stats_has_num_forks v then ( + Pbrt.Encoder.int64_as_varint v.num_forks encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if sys_stats_has_num_irq_total v then ( + Pbrt.Encoder.int64_as_varint v.num_irq_total encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_interrupt_count x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ) v.num_irq encoder; + if sys_stats_has_num_softirq_total v then ( + Pbrt.Encoder.int64_as_varint v.num_softirq_total encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_interrupt_count x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ) v.num_softirq encoder; + if sys_stats_has_collection_end_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.collection_end_timestamp encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_devfreq_value x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + ) v.devfreq encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ) v.cpufreq_khz encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_buddy_info x encoder; + Pbrt.Encoder.key 12 Pbrt.Bytes encoder; + ) v.buddy_info encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_disk_stat x encoder; + Pbrt.Encoder.key 13 Pbrt.Bytes encoder; + ) v.disk_stat encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_psi_sample x encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ) v.psi encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_thermal_zone x encoder; + Pbrt.Encoder.key 15 Pbrt.Bytes encoder; + ) v.thermal_zone encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_sys_stats_cpu_idle_state x encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + ) v.cpuidle_state encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + ) v.gpufreq_mhz encoder; + () + +let rec encode_pb_cpu_info_arm_cpu_identifier (v:cpu_info_arm_cpu_identifier) encoder = + if cpu_info_arm_cpu_identifier_has_implementer v then ( + Pbrt.Encoder.int32_as_varint v.implementer encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if cpu_info_arm_cpu_identifier_has_architecture v then ( + Pbrt.Encoder.int32_as_varint v.architecture encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if cpu_info_arm_cpu_identifier_has_variant v then ( + Pbrt.Encoder.int32_as_varint v.variant encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if cpu_info_arm_cpu_identifier_has_part v then ( + Pbrt.Encoder.int32_as_varint v.part encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if cpu_info_arm_cpu_identifier_has_revision v then ( + Pbrt.Encoder.int32_as_varint v.revision encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_cpu_info_cpu_identifier (v:cpu_info_cpu_identifier) encoder = + begin match v with + | Arm_identifier x -> + Pbrt.Encoder.nested encode_pb_cpu_info_arm_cpu_identifier x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + end + +and encode_pb_cpu_info_cpu (v:cpu_info_cpu) encoder = + if cpu_info_cpu_has_processor v then ( + Pbrt.Encoder.string v.processor encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ) v.frequencies encoder; + if cpu_info_cpu_has_capacity v then ( + Pbrt.Encoder.int32_as_varint v.capacity encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + begin match v.identifier with + | None -> () + | Some (Arm_identifier x) -> + Pbrt.Encoder.nested encode_pb_cpu_info_arm_cpu_identifier x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + end; + if cpu_info_cpu_has_features v then ( + Pbrt.Encoder.int64_as_varint v.features encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_cpu_info (v:cpu_info) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_cpu_info_cpu x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.cpus encoder; + () + +let rec encode_pb_test_event_test_payload (v:test_event_test_payload) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.str encoder; + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_test_event_test_payload x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.nested encoder; + if test_event_test_payload_has_single_string v then ( + Pbrt.Encoder.string v.single_string encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + if test_event_test_payload_has_single_int v then ( + Pbrt.Encoder.int32_as_varint v.single_int encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ) v.repeated_ints encoder; + if test_event_test_payload_has_remaining_nesting_depth v then ( + Pbrt.Encoder.int32_as_varint v.remaining_nesting_depth encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_debug_annotation x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ) v.debug_annotations encoder; + () + +let rec encode_pb_test_event (v:test_event) encoder = + if test_event_has_str v then ( + Pbrt.Encoder.string v.str encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if test_event_has_seq_value v then ( + Pbrt.Encoder.int32_as_varint v.seq_value encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if test_event_has_counter v then ( + Pbrt.Encoder.int64_as_varint v.counter encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if test_event_has_is_last v then ( + Pbrt.Encoder.bool v.is_last encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + begin match v.payload with + | Some x -> + Pbrt.Encoder.nested encode_pb_test_event_test_payload x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_trace_packet_defaults (v:trace_packet_defaults) encoder = + if trace_packet_defaults_has_timestamp_clock_id v then ( + Pbrt.Encoder.int32_as_varint v.timestamp_clock_id encoder; + Pbrt.Encoder.key 58 Pbrt.Varint encoder; + ); + begin match v.track_event_defaults with + | Some x -> + Pbrt.Encoder.nested encode_pb_track_event_defaults x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.v8_code_defaults with + | Some x -> + Pbrt.Encoder.nested encode_pb_v8_code_defaults x encoder; + Pbrt.Encoder.key 99 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_trace_uuid (v:trace_uuid) encoder = + if trace_uuid_has_msb v then ( + Pbrt.Encoder.int64_as_varint v.msb encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if trace_uuid_has_lsb v then ( + Pbrt.Encoder.int64_as_varint v.lsb encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_process_descriptor_chrome_process_type (v:process_descriptor_chrome_process_type) encoder = + match v with + | Process_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Process_browser -> Pbrt.Encoder.int_as_varint 1 encoder + | Process_renderer -> Pbrt.Encoder.int_as_varint 2 encoder + | Process_utility -> Pbrt.Encoder.int_as_varint 3 encoder + | Process_zygote -> Pbrt.Encoder.int_as_varint 4 encoder + | Process_sandbox_helper -> Pbrt.Encoder.int_as_varint 5 encoder + | Process_gpu -> Pbrt.Encoder.int_as_varint 6 encoder + | Process_ppapi_plugin -> Pbrt.Encoder.int_as_varint 7 encoder + | Process_ppapi_broker -> Pbrt.Encoder.int_as_varint 8 encoder + +let rec encode_pb_process_descriptor (v:process_descriptor) encoder = + if process_descriptor_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.cmdline encoder; + if process_descriptor_has_process_name v then ( + Pbrt.Encoder.string v.process_name encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ); + if process_descriptor_has_process_priority v then ( + Pbrt.Encoder.int32_as_varint v.process_priority encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if process_descriptor_has_start_timestamp_ns v then ( + Pbrt.Encoder.int64_as_varint v.start_timestamp_ns encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if process_descriptor_has_chrome_process_type v then ( + encode_pb_process_descriptor_chrome_process_type v.chrome_process_type encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if process_descriptor_has_legacy_sort_index v then ( + Pbrt.Encoder.int32_as_varint v.legacy_sort_index encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + ) v.process_labels encoder; + () + +let rec encode_pb_track_event_range_of_interest (v:track_event_range_of_interest) encoder = + if track_event_range_of_interest_has_start_us v then ( + Pbrt.Encoder.int64_as_varint v.start_us encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_thread_descriptor_chrome_thread_type (v:thread_descriptor_chrome_thread_type) encoder = + match v with + | Chrome_thread_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Chrome_thread_main -> Pbrt.Encoder.int_as_varint 1 encoder + | Chrome_thread_io -> Pbrt.Encoder.int_as_varint 2 encoder + | Chrome_thread_pool_bg_worker -> Pbrt.Encoder.int_as_varint 3 encoder + | Chrome_thread_pool_fg_worker -> Pbrt.Encoder.int_as_varint 4 encoder + | Chrome_thread_pool_fb_blocking -> Pbrt.Encoder.int_as_varint 5 encoder + | Chrome_thread_pool_bg_blocking -> Pbrt.Encoder.int_as_varint 6 encoder + | Chrome_thread_pool_service -> Pbrt.Encoder.int_as_varint 7 encoder + | Chrome_thread_compositor -> Pbrt.Encoder.int_as_varint 8 encoder + | Chrome_thread_viz_compositor -> Pbrt.Encoder.int_as_varint 9 encoder + | Chrome_thread_compositor_worker -> Pbrt.Encoder.int_as_varint 10 encoder + | Chrome_thread_service_worker -> Pbrt.Encoder.int_as_varint 11 encoder + | Chrome_thread_memory_infra -> Pbrt.Encoder.int_as_varint 50 encoder + | Chrome_thread_sampling_profiler -> Pbrt.Encoder.int_as_varint 51 encoder + +let rec encode_pb_thread_descriptor (v:thread_descriptor) encoder = + if thread_descriptor_has_pid v then ( + Pbrt.Encoder.int32_as_varint v.pid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if thread_descriptor_has_tid v then ( + Pbrt.Encoder.int32_as_varint v.tid encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if thread_descriptor_has_thread_name v then ( + Pbrt.Encoder.string v.thread_name encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + ); + if thread_descriptor_has_chrome_thread_type v then ( + encode_pb_thread_descriptor_chrome_thread_type v.chrome_thread_type encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if thread_descriptor_has_reference_timestamp_us v then ( + Pbrt.Encoder.int64_as_varint v.reference_timestamp_us encoder; + Pbrt.Encoder.key 6 Pbrt.Varint encoder; + ); + if thread_descriptor_has_reference_thread_time_us v then ( + Pbrt.Encoder.int64_as_varint v.reference_thread_time_us encoder; + Pbrt.Encoder.key 7 Pbrt.Varint encoder; + ); + if thread_descriptor_has_reference_thread_instruction_count v then ( + Pbrt.Encoder.int64_as_varint v.reference_thread_instruction_count encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if thread_descriptor_has_legacy_sort_index v then ( + Pbrt.Encoder.int32_as_varint v.legacy_sort_index encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_process_descriptor (v:chrome_process_descriptor) encoder = + if chrome_process_descriptor_has_process_type v then ( + Pbrt.Encoder.int32_as_varint v.process_type encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_process_descriptor_has_process_priority v then ( + Pbrt.Encoder.int32_as_varint v.process_priority encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_process_descriptor_has_legacy_sort_index v then ( + Pbrt.Encoder.int32_as_varint v.legacy_sort_index encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if chrome_process_descriptor_has_host_app_package_name v then ( + Pbrt.Encoder.string v.host_app_package_name encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + ); + if chrome_process_descriptor_has_crash_trace_id v then ( + Pbrt.Encoder.int64_as_varint v.crash_trace_id encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_chrome_thread_descriptor (v:chrome_thread_descriptor) encoder = + if chrome_thread_descriptor_has_thread_type v then ( + Pbrt.Encoder.int32_as_varint v.thread_type encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if chrome_thread_descriptor_has_legacy_sort_index v then ( + Pbrt.Encoder.int32_as_varint v.legacy_sort_index encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + if chrome_thread_descriptor_has_is_sandboxed_tid v then ( + Pbrt.Encoder.bool v.is_sandboxed_tid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_counter_descriptor_builtin_counter_type (v:counter_descriptor_builtin_counter_type) encoder = + match v with + | Counter_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Counter_thread_time_ns -> Pbrt.Encoder.int_as_varint 1 encoder + | Counter_thread_instruction_count -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_counter_descriptor_unit (v:counter_descriptor_unit) encoder = + match v with + | Unit_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Unit_time_ns -> Pbrt.Encoder.int_as_varint 1 encoder + | Unit_count -> Pbrt.Encoder.int_as_varint 2 encoder + | Unit_size_bytes -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_counter_descriptor (v:counter_descriptor) encoder = + if counter_descriptor_has_type_ v then ( + encode_pb_counter_descriptor_builtin_counter_type v.type_ encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.categories encoder; + if counter_descriptor_has_unit_ v then ( + encode_pb_counter_descriptor_unit v.unit_ encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if counter_descriptor_has_unit_name v then ( + Pbrt.Encoder.string v.unit_name encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + ); + if counter_descriptor_has_unit_multiplier v then ( + Pbrt.Encoder.int64_as_varint v.unit_multiplier encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + if counter_descriptor_has_is_incremental v then ( + Pbrt.Encoder.bool v.is_incremental encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + if counter_descriptor_has_y_axis_share_key v then ( + Pbrt.Encoder.string v.y_axis_share_key encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + ); + () + +let rec encode_pb_track_descriptor_child_tracks_ordering (v:track_descriptor_child_tracks_ordering) encoder = + match v with + | Unknown -> Pbrt.Encoder.int_as_varint (0) encoder + | Lexicographic -> Pbrt.Encoder.int_as_varint 1 encoder + | Chronological -> Pbrt.Encoder.int_as_varint 2 encoder + | Explicit -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_track_descriptor_sibling_merge_behavior (v:track_descriptor_sibling_merge_behavior) encoder = + match v with + | Sibling_merge_behavior_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Sibling_merge_behavior_by_track_name -> Pbrt.Encoder.int_as_varint 1 encoder + | Sibling_merge_behavior_none -> Pbrt.Encoder.int_as_varint 2 encoder + | Sibling_merge_behavior_by_sibling_merge_key -> Pbrt.Encoder.int_as_varint 3 encoder + +let rec encode_pb_track_descriptor_static_or_dynamic_name (v:track_descriptor_static_or_dynamic_name) encoder = + begin match v with + | Name x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Static_name x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + | Atrace_name x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 13 Pbrt.Bytes encoder; + end + +and encode_pb_track_descriptor_sibling_merge_key_field (v:track_descriptor_sibling_merge_key_field) encoder = + begin match v with + | Sibling_merge_key x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + | Sibling_merge_key_int x -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + end + +and encode_pb_track_descriptor (v:track_descriptor) encoder = + if track_descriptor_has_uuid v then ( + Pbrt.Encoder.int64_as_varint v.uuid encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if track_descriptor_has_parent_uuid v then ( + Pbrt.Encoder.int64_as_varint v.parent_uuid encoder; + Pbrt.Encoder.key 5 Pbrt.Varint encoder; + ); + begin match v.static_or_dynamic_name with + | None -> () + | Some (Name x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Some (Static_name x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 10 Pbrt.Bytes encoder; + | Some (Atrace_name x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 13 Pbrt.Bytes encoder; + end; + if track_descriptor_has_description v then ( + Pbrt.Encoder.string v.description encoder; + Pbrt.Encoder.key 14 Pbrt.Bytes encoder; + ); + begin match v.process with + | Some x -> + Pbrt.Encoder.nested encode_pb_process_descriptor x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_process with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_process_descriptor x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.thread with + | Some x -> + Pbrt.Encoder.nested encode_pb_thread_descriptor x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.chrome_thread with + | Some x -> + Pbrt.Encoder.nested encode_pb_chrome_thread_descriptor x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | None -> (); + end; + begin match v.counter with + | Some x -> + Pbrt.Encoder.nested encode_pb_counter_descriptor x encoder; + Pbrt.Encoder.key 8 Pbrt.Bytes encoder; + | None -> (); + end; + if track_descriptor_has_disallow_merging_with_system_tracks v then ( + Pbrt.Encoder.bool v.disallow_merging_with_system_tracks encoder; + Pbrt.Encoder.key 9 Pbrt.Varint encoder; + ); + if track_descriptor_has_child_ordering v then ( + encode_pb_track_descriptor_child_tracks_ordering v.child_ordering encoder; + Pbrt.Encoder.key 11 Pbrt.Varint encoder; + ); + if track_descriptor_has_sibling_order_rank v then ( + Pbrt.Encoder.int32_as_varint v.sibling_order_rank encoder; + Pbrt.Encoder.key 12 Pbrt.Varint encoder; + ); + if track_descriptor_has_sibling_merge_behavior v then ( + encode_pb_track_descriptor_sibling_merge_behavior v.sibling_merge_behavior encoder; + Pbrt.Encoder.key 15 Pbrt.Varint encoder; + ); + begin match v.sibling_merge_key_field with + | None -> () + | Some (Sibling_merge_key x) -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 16 Pbrt.Bytes encoder; + | Some (Sibling_merge_key_int x) -> + Pbrt.Encoder.int64_as_varint x encoder; + Pbrt.Encoder.key 17 Pbrt.Varint encoder; + end; + () + +let rec encode_pb_chrome_historgram_translation_table (v:chrome_historgram_translation_table) encoder = + let encode_key = Pbrt.Encoder.int64_as_varint in + let encode_value = (fun x encoder -> + Pbrt.Encoder.string x encoder; + ) in + Pbrt.List_util.rev_iter_with (fun (k, v) encoder -> + let map_entry = (k, Pbrt.Varint), (v, Pbrt.Bytes) in + Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.hash_to_name encoder; + () + +let rec encode_pb_chrome_user_event_translation_table (v:chrome_user_event_translation_table) encoder = + let encode_key = Pbrt.Encoder.int64_as_varint in + let encode_value = (fun x encoder -> + Pbrt.Encoder.string x encoder; + ) in + Pbrt.List_util.rev_iter_with (fun (k, v) encoder -> + let map_entry = (k, Pbrt.Varint), (v, Pbrt.Bytes) in + Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.action_hash_to_name encoder; + () + +let rec encode_pb_chrome_performance_mark_translation_table (v:chrome_performance_mark_translation_table) encoder = + let encode_key = Pbrt.Encoder.int32_as_varint in + let encode_value = (fun x encoder -> + Pbrt.Encoder.string x encoder; + ) in + Pbrt.List_util.rev_iter_with (fun (k, v) encoder -> + let map_entry = (k, Pbrt.Varint), (v, Pbrt.Bytes) in + Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.site_hash_to_name encoder; + let encode_key = Pbrt.Encoder.int32_as_varint in + let encode_value = (fun x encoder -> + Pbrt.Encoder.string x encoder; + ) in + Pbrt.List_util.rev_iter_with (fun (k, v) encoder -> + let map_entry = (k, Pbrt.Varint), (v, Pbrt.Bytes) in + Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ) v.mark_hash_to_name encoder; + () + +let rec encode_pb_slice_name_translation_table (v:slice_name_translation_table) encoder = + let encode_key = Pbrt.Encoder.string in + let encode_value = (fun x encoder -> + Pbrt.Encoder.string x encoder; + ) in + Pbrt.List_util.rev_iter_with (fun (k, v) encoder -> + let map_entry = (k, Pbrt.Bytes), (v, Pbrt.Bytes) in + Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.raw_to_deobfuscated_name encoder; + () + +let rec encode_pb_process_track_name_translation_table (v:process_track_name_translation_table) encoder = + let encode_key = Pbrt.Encoder.string in + let encode_value = (fun x encoder -> + Pbrt.Encoder.string x encoder; + ) in + Pbrt.List_util.rev_iter_with (fun (k, v) encoder -> + let map_entry = (k, Pbrt.Bytes), (v, Pbrt.Bytes) in + Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.raw_to_deobfuscated_name encoder; + () + +let rec encode_pb_chrome_study_translation_table (v:chrome_study_translation_table) encoder = + let encode_key = Pbrt.Encoder.int64_as_varint in + let encode_value = (fun x encoder -> + Pbrt.Encoder.string x encoder; + ) in + Pbrt.List_util.rev_iter_with (fun (k, v) encoder -> + let map_entry = (k, Pbrt.Varint), (v, Pbrt.Bytes) in + Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.hash_to_name encoder; + () + +let rec encode_pb_translation_table (v:translation_table) encoder = + begin match v with + | Chrome_histogram x -> + Pbrt.Encoder.nested encode_pb_chrome_historgram_translation_table x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + | Chrome_user_event x -> + Pbrt.Encoder.nested encode_pb_chrome_user_event_translation_table x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Chrome_performance_mark x -> + Pbrt.Encoder.nested encode_pb_chrome_performance_mark_translation_table x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | Slice_name x -> + Pbrt.Encoder.nested encode_pb_slice_name_translation_table x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | Process_track_name x -> + Pbrt.Encoder.nested encode_pb_process_track_name_translation_table x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | Chrome_study x -> + Pbrt.Encoder.nested encode_pb_chrome_study_translation_table x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + end + +let rec encode_pb_trigger (v:trigger) encoder = + if trigger_has_trigger_name v then ( + Pbrt.Encoder.string v.trigger_name encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ); + if trigger_has_producer_name v then ( + Pbrt.Encoder.string v.producer_name encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + ); + if trigger_has_trusted_producer_uid v then ( + Pbrt.Encoder.int32_as_varint v.trusted_producer_uid encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + ); + if trigger_has_stop_delay_ms v then ( + Pbrt.Encoder.int64_as_varint v.stop_delay_ms encoder; + Pbrt.Encoder.key 4 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_ui_state_highlight_process (v:ui_state_highlight_process) encoder = + begin match v with + | Pid x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + | Cmdline x -> + Pbrt.Encoder.string x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + end + +let rec encode_pb_ui_state (v:ui_state) encoder = + if ui_state_has_timeline_start_ts v then ( + Pbrt.Encoder.int64_as_varint v.timeline_start_ts encoder; + Pbrt.Encoder.key 1 Pbrt.Varint encoder; + ); + if ui_state_has_timeline_end_ts v then ( + Pbrt.Encoder.int64_as_varint v.timeline_end_ts encoder; + Pbrt.Encoder.key 2 Pbrt.Varint encoder; + ); + begin match v.highlight_process with + | Some x -> + Pbrt.Encoder.nested encode_pb_ui_state_highlight_process x encoder; + Pbrt.Encoder.key 3 Pbrt.Bytes encoder; + | None -> (); + end; + () + +let rec encode_pb_trace_packet_sequence_flags (v:trace_packet_sequence_flags) encoder = + match v with + | Seq_unspecified -> Pbrt.Encoder.int_as_varint (0) encoder + | Seq_incremental_state_cleared -> Pbrt.Encoder.int_as_varint 1 encoder + | Seq_needs_incremental_state -> Pbrt.Encoder.int_as_varint 2 encoder + +let rec encode_pb_trace_packet_data (v:trace_packet_data) encoder = + begin match v with + | Process_tree x -> + Pbrt.Encoder.nested encode_pb_process_tree x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Process_stats x -> + Pbrt.Encoder.nested encode_pb_process_stats x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + | Inode_file_map x -> + Pbrt.Encoder.nested encode_pb_inode_file_map x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | Chrome_events x -> + Pbrt.Encoder.nested encode_pb_chrome_event_bundle x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | Clock_snapshot x -> + Pbrt.Encoder.nested encode_pb_clock_snapshot x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | Sys_stats x -> + Pbrt.Encoder.nested encode_pb_sys_stats x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | Track_event x -> + Pbrt.Encoder.nested encode_pb_track_event x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | Trace_uuid x -> + Pbrt.Encoder.nested encode_pb_trace_uuid x encoder; + Pbrt.Encoder.key 89 Pbrt.Bytes encoder; + | Trace_config x -> + Pbrt.Encoder.nested encode_pb_trace_config x encoder; + Pbrt.Encoder.key 33 Pbrt.Bytes encoder; + | Trace_stats x -> + Pbrt.Encoder.nested encode_pb_trace_stats x encoder; + Pbrt.Encoder.key 35 Pbrt.Bytes encoder; + | Profile_packet x -> + Pbrt.Encoder.nested encode_pb_profile_packet x encoder; + Pbrt.Encoder.key 37 Pbrt.Bytes encoder; + | Streaming_allocation x -> + Pbrt.Encoder.nested encode_pb_streaming_allocation x encoder; + Pbrt.Encoder.key 74 Pbrt.Bytes encoder; + | Streaming_free x -> + Pbrt.Encoder.nested encode_pb_streaming_free x encoder; + Pbrt.Encoder.key 75 Pbrt.Bytes encoder; + | Battery x -> + Pbrt.Encoder.nested encode_pb_battery_counters x encoder; + Pbrt.Encoder.key 38 Pbrt.Bytes encoder; + | Power_rails x -> + Pbrt.Encoder.nested encode_pb_power_rails x encoder; + Pbrt.Encoder.key 40 Pbrt.Bytes encoder; + | Android_log x -> + Pbrt.Encoder.nested encode_pb_android_log_packet x encoder; + Pbrt.Encoder.key 39 Pbrt.Bytes encoder; + | System_info x -> + Pbrt.Encoder.nested encode_pb_system_info x encoder; + Pbrt.Encoder.key 45 Pbrt.Bytes encoder; + | Trigger x -> + Pbrt.Encoder.nested encode_pb_trigger x encoder; + Pbrt.Encoder.key 46 Pbrt.Bytes encoder; + | Chrome_trigger x -> + Pbrt.Encoder.nested encode_pb_chrome_trigger x encoder; + Pbrt.Encoder.key 109 Pbrt.Bytes encoder; + | Packages_list x -> + Pbrt.Encoder.nested encode_pb_packages_list x encoder; + Pbrt.Encoder.key 47 Pbrt.Bytes encoder; + | Chrome_benchmark_metadata x -> + Pbrt.Encoder.nested encode_pb_chrome_benchmark_metadata x encoder; + Pbrt.Encoder.key 48 Pbrt.Bytes encoder; + | Perfetto_metatrace x -> + Pbrt.Encoder.nested encode_pb_perfetto_metatrace x encoder; + Pbrt.Encoder.key 49 Pbrt.Bytes encoder; + | Chrome_metadata x -> + Pbrt.Encoder.nested encode_pb_chrome_metadata_packet x encoder; + Pbrt.Encoder.key 51 Pbrt.Bytes encoder; + | Gpu_counter_event x -> + Pbrt.Encoder.nested encode_pb_gpu_counter_event x encoder; + Pbrt.Encoder.key 52 Pbrt.Bytes encoder; + | Gpu_render_stage_event x -> + Pbrt.Encoder.nested encode_pb_gpu_render_stage_event x encoder; + Pbrt.Encoder.key 53 Pbrt.Bytes encoder; + | Streaming_profile_packet x -> + Pbrt.Encoder.nested encode_pb_streaming_profile_packet x encoder; + Pbrt.Encoder.key 54 Pbrt.Bytes encoder; + | Heap_graph x -> + Pbrt.Encoder.nested encode_pb_heap_graph x encoder; + Pbrt.Encoder.key 56 Pbrt.Bytes encoder; + | Graphics_frame_event x -> + Pbrt.Encoder.nested encode_pb_graphics_frame_event x encoder; + Pbrt.Encoder.key 57 Pbrt.Bytes encoder; + | Vulkan_memory_event x -> + Pbrt.Encoder.nested encode_pb_vulkan_memory_event x encoder; + Pbrt.Encoder.key 62 Pbrt.Bytes encoder; + | Gpu_log x -> + Pbrt.Encoder.nested encode_pb_gpu_log x encoder; + Pbrt.Encoder.key 63 Pbrt.Bytes encoder; + | Vulkan_api_event x -> + Pbrt.Encoder.nested encode_pb_vulkan_api_event x encoder; + Pbrt.Encoder.key 65 Pbrt.Bytes encoder; + | Perf_sample x -> + Pbrt.Encoder.nested encode_pb_perf_sample x encoder; + Pbrt.Encoder.key 66 Pbrt.Bytes encoder; + | Cpu_info x -> + Pbrt.Encoder.nested encode_pb_cpu_info x encoder; + Pbrt.Encoder.key 67 Pbrt.Bytes encoder; + | Smaps_packet x -> + Pbrt.Encoder.nested encode_pb_smaps_packet x encoder; + Pbrt.Encoder.key 68 Pbrt.Bytes encoder; + | Service_event x -> + Pbrt.Encoder.nested encode_pb_tracing_service_event x encoder; + Pbrt.Encoder.key 69 Pbrt.Bytes encoder; + | Initial_display_state x -> + Pbrt.Encoder.nested encode_pb_initial_display_state x encoder; + Pbrt.Encoder.key 70 Pbrt.Bytes encoder; + | Gpu_mem_total_event x -> + Pbrt.Encoder.nested encode_pb_gpu_mem_total_event x encoder; + Pbrt.Encoder.key 71 Pbrt.Bytes encoder; + | Memory_tracker_snapshot x -> + Pbrt.Encoder.nested encode_pb_memory_tracker_snapshot x encoder; + Pbrt.Encoder.key 73 Pbrt.Bytes encoder; + | Frame_timeline_event x -> + Pbrt.Encoder.nested encode_pb_frame_timeline_event x encoder; + Pbrt.Encoder.key 76 Pbrt.Bytes encoder; + | Android_energy_estimation_breakdown x -> + Pbrt.Encoder.nested encode_pb_android_energy_estimation_breakdown x encoder; + Pbrt.Encoder.key 77 Pbrt.Bytes encoder; + | Ui_state x -> + Pbrt.Encoder.nested encode_pb_ui_state x encoder; + Pbrt.Encoder.key 78 Pbrt.Bytes encoder; + | Android_camera_frame_event x -> + Pbrt.Encoder.nested encode_pb_android_camera_frame_event x encoder; + Pbrt.Encoder.key 80 Pbrt.Bytes encoder; + | Android_camera_session_stats x -> + Pbrt.Encoder.nested encode_pb_android_camera_session_stats x encoder; + Pbrt.Encoder.key 81 Pbrt.Bytes encoder; + | Translation_table x -> + Pbrt.Encoder.nested encode_pb_translation_table x encoder; + Pbrt.Encoder.key 82 Pbrt.Bytes encoder; + | Android_game_intervention_list x -> + Pbrt.Encoder.nested encode_pb_android_game_intervention_list x encoder; + Pbrt.Encoder.key 83 Pbrt.Bytes encoder; + | Statsd_atom x -> + Pbrt.Encoder.nested encode_pb_statsd_atom x encoder; + Pbrt.Encoder.key 84 Pbrt.Bytes encoder; + | Android_system_property x -> + Pbrt.Encoder.nested encode_pb_android_system_property x encoder; + Pbrt.Encoder.key 86 Pbrt.Bytes encoder; + | Entity_state_residency x -> + Pbrt.Encoder.nested encode_pb_entity_state_residency x encoder; + Pbrt.Encoder.key 91 Pbrt.Bytes encoder; + | Module_symbols x -> + Pbrt.Encoder.nested encode_pb_module_symbols x encoder; + Pbrt.Encoder.key 61 Pbrt.Bytes encoder; + | Deobfuscation_mapping x -> + Pbrt.Encoder.nested encode_pb_deobfuscation_mapping x encoder; + Pbrt.Encoder.key 64 Pbrt.Bytes encoder; + | Track_descriptor x -> + Pbrt.Encoder.nested encode_pb_track_descriptor x encoder; + Pbrt.Encoder.key 60 Pbrt.Bytes encoder; + | Process_descriptor x -> + Pbrt.Encoder.nested encode_pb_process_descriptor x encoder; + Pbrt.Encoder.key 43 Pbrt.Bytes encoder; + | Thread_descriptor x -> + Pbrt.Encoder.nested encode_pb_thread_descriptor x encoder; + Pbrt.Encoder.key 44 Pbrt.Bytes encoder; + | Synchronization_marker x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 36 Pbrt.Bytes encoder; + | Compressed_packets x -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 50 Pbrt.Bytes encoder; + | Extension_descriptor x -> + Pbrt.Encoder.nested encode_pb_extension_descriptor x encoder; + Pbrt.Encoder.key 72 Pbrt.Bytes encoder; + | Network_packet x -> + Pbrt.Encoder.nested encode_pb_network_packet_event x encoder; + Pbrt.Encoder.key 88 Pbrt.Bytes encoder; + | Network_packet_bundle x -> + Pbrt.Encoder.nested encode_pb_network_packet_bundle x encoder; + Pbrt.Encoder.key 92 Pbrt.Bytes encoder; + | Track_event_range_of_interest x -> + Pbrt.Encoder.nested encode_pb_track_event_range_of_interest x encoder; + Pbrt.Encoder.key 90 Pbrt.Bytes encoder; + | Surfaceflinger_layers_snapshot x -> + Pbrt.Encoder.nested encode_pb_layers_snapshot_proto x encoder; + Pbrt.Encoder.key 93 Pbrt.Bytes encoder; + | Surfaceflinger_transactions x -> + Pbrt.Encoder.nested encode_pb_transaction_trace_entry x encoder; + Pbrt.Encoder.key 94 Pbrt.Bytes encoder; + | Shell_transition x -> + Pbrt.Encoder.nested encode_pb_shell_transition x encoder; + Pbrt.Encoder.key 96 Pbrt.Bytes encoder; + | Shell_handler_mappings x -> + Pbrt.Encoder.nested encode_pb_shell_handler_mappings x encoder; + Pbrt.Encoder.key 97 Pbrt.Bytes encoder; + | Protolog_message x -> + Pbrt.Encoder.nested encode_pb_proto_log_message x encoder; + Pbrt.Encoder.key 104 Pbrt.Bytes encoder; + | Protolog_viewer_config x -> + Pbrt.Encoder.nested encode_pb_proto_log_viewer_config x encoder; + Pbrt.Encoder.key 105 Pbrt.Bytes encoder; + | Winscope_extensions -> + Pbrt.Encoder.key 112 Pbrt.Bytes encoder; + Pbrt.Encoder.empty_nested encoder + | Etw_events x -> + Pbrt.Encoder.nested encode_pb_etw_trace_event_bundle x encoder; + Pbrt.Encoder.key 95 Pbrt.Bytes encoder; + | V8_js_code x -> + Pbrt.Encoder.nested encode_pb_v8_js_code x encoder; + Pbrt.Encoder.key 99 Pbrt.Bytes encoder; + | V8_internal_code x -> + Pbrt.Encoder.nested encode_pb_v8_internal_code x encoder; + Pbrt.Encoder.key 100 Pbrt.Bytes encoder; + | V8_wasm_code x -> + Pbrt.Encoder.nested encode_pb_v8_wasm_code x encoder; + Pbrt.Encoder.key 101 Pbrt.Bytes encoder; + | V8_reg_exp_code x -> + Pbrt.Encoder.nested encode_pb_v8_reg_exp_code x encoder; + Pbrt.Encoder.key 102 Pbrt.Bytes encoder; + | V8_code_move x -> + Pbrt.Encoder.nested encode_pb_v8_code_move x encoder; + Pbrt.Encoder.key 103 Pbrt.Bytes encoder; + | Remote_clock_sync x -> + Pbrt.Encoder.nested encode_pb_remote_clock_sync x encoder; + Pbrt.Encoder.key 107 Pbrt.Bytes encoder; + | Pixel_modem_events x -> + Pbrt.Encoder.nested encode_pb_pixel_modem_events x encoder; + Pbrt.Encoder.key 110 Pbrt.Bytes encoder; + | Pixel_modem_token_database x -> + Pbrt.Encoder.nested encode_pb_pixel_modem_token_database x encoder; + Pbrt.Encoder.key 111 Pbrt.Bytes encoder; + | Clone_snapshot_trigger x -> + Pbrt.Encoder.nested encode_pb_trigger x encoder; + Pbrt.Encoder.key 113 Pbrt.Bytes encoder; + | Bluetooth_trace_event x -> + Pbrt.Encoder.nested encode_pb_bluetooth_trace_event x encoder; + Pbrt.Encoder.key 114 Pbrt.Bytes encoder; + | Kernel_wakelock_data x -> + Pbrt.Encoder.nested encode_pb_kernel_wakelock_data x encoder; + Pbrt.Encoder.key 115 Pbrt.Bytes encoder; + | App_wakelock_bundle x -> + Pbrt.Encoder.nested encode_pb_app_wakelock_bundle x encoder; + Pbrt.Encoder.key 116 Pbrt.Bytes encoder; + | Generic_kernel_task_state_event x -> + Pbrt.Encoder.nested encode_pb_generic_kernel_task_state_event x encoder; + Pbrt.Encoder.key 117 Pbrt.Bytes encoder; + | Generic_kernel_cpu_freq_event x -> + Pbrt.Encoder.nested encode_pb_generic_kernel_cpu_frequency_event x encoder; + Pbrt.Encoder.key 118 Pbrt.Bytes encoder; + | Generic_kernel_task_rename_event x -> + Pbrt.Encoder.nested encode_pb_generic_kernel_task_rename_event x encoder; + Pbrt.Encoder.key 120 Pbrt.Bytes encoder; + | Generic_kernel_process_tree x -> + Pbrt.Encoder.nested encode_pb_generic_kernel_process_tree x encoder; + Pbrt.Encoder.key 122 Pbrt.Bytes encoder; + | Cpu_per_uid_data x -> + Pbrt.Encoder.nested encode_pb_cpu_per_uid_data x encoder; + Pbrt.Encoder.key 119 Pbrt.Bytes encoder; + | Evdev_event x -> + Pbrt.Encoder.nested encode_pb_evdev_event x encoder; + Pbrt.Encoder.key 121 Pbrt.Bytes encoder; + | For_testing x -> + Pbrt.Encoder.nested encode_pb_test_event x encoder; + Pbrt.Encoder.key 900 Pbrt.Bytes encoder; + end + +and encode_pb_trace_packet_optional_trusted_uid (v:trace_packet_optional_trusted_uid) encoder = + begin match v with + | Trusted_uid x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + end + +and encode_pb_trace_packet_optional_trusted_packet_sequence_id (v:trace_packet_optional_trusted_packet_sequence_id) encoder = + begin match v with + | Trusted_packet_sequence_id x -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + end + +and encode_pb_trace_packet (v:trace_packet) encoder = + if trace_packet_has_timestamp v then ( + Pbrt.Encoder.int64_as_varint v.timestamp encoder; + Pbrt.Encoder.key 8 Pbrt.Varint encoder; + ); + if trace_packet_has_timestamp_clock_id v then ( + Pbrt.Encoder.int32_as_varint v.timestamp_clock_id encoder; + Pbrt.Encoder.key 58 Pbrt.Varint encoder; + ); + begin match v.data with + | None -> () + | Some (Process_tree x) -> + Pbrt.Encoder.nested encode_pb_process_tree x encoder; + Pbrt.Encoder.key 2 Pbrt.Bytes encoder; + | Some (Process_stats x) -> + Pbrt.Encoder.nested encode_pb_process_stats x encoder; + Pbrt.Encoder.key 9 Pbrt.Bytes encoder; + | Some (Inode_file_map x) -> + Pbrt.Encoder.nested encode_pb_inode_file_map x encoder; + Pbrt.Encoder.key 4 Pbrt.Bytes encoder; + | Some (Chrome_events x) -> + Pbrt.Encoder.nested encode_pb_chrome_event_bundle x encoder; + Pbrt.Encoder.key 5 Pbrt.Bytes encoder; + | Some (Clock_snapshot x) -> + Pbrt.Encoder.nested encode_pb_clock_snapshot x encoder; + Pbrt.Encoder.key 6 Pbrt.Bytes encoder; + | Some (Sys_stats x) -> + Pbrt.Encoder.nested encode_pb_sys_stats x encoder; + Pbrt.Encoder.key 7 Pbrt.Bytes encoder; + | Some (Track_event x) -> + Pbrt.Encoder.nested encode_pb_track_event x encoder; + Pbrt.Encoder.key 11 Pbrt.Bytes encoder; + | Some (Trace_uuid x) -> + Pbrt.Encoder.nested encode_pb_trace_uuid x encoder; + Pbrt.Encoder.key 89 Pbrt.Bytes encoder; + | Some (Trace_config x) -> + Pbrt.Encoder.nested encode_pb_trace_config x encoder; + Pbrt.Encoder.key 33 Pbrt.Bytes encoder; + | Some (Trace_stats x) -> + Pbrt.Encoder.nested encode_pb_trace_stats x encoder; + Pbrt.Encoder.key 35 Pbrt.Bytes encoder; + | Some (Profile_packet x) -> + Pbrt.Encoder.nested encode_pb_profile_packet x encoder; + Pbrt.Encoder.key 37 Pbrt.Bytes encoder; + | Some (Streaming_allocation x) -> + Pbrt.Encoder.nested encode_pb_streaming_allocation x encoder; + Pbrt.Encoder.key 74 Pbrt.Bytes encoder; + | Some (Streaming_free x) -> + Pbrt.Encoder.nested encode_pb_streaming_free x encoder; + Pbrt.Encoder.key 75 Pbrt.Bytes encoder; + | Some (Battery x) -> + Pbrt.Encoder.nested encode_pb_battery_counters x encoder; + Pbrt.Encoder.key 38 Pbrt.Bytes encoder; + | Some (Power_rails x) -> + Pbrt.Encoder.nested encode_pb_power_rails x encoder; + Pbrt.Encoder.key 40 Pbrt.Bytes encoder; + | Some (Android_log x) -> + Pbrt.Encoder.nested encode_pb_android_log_packet x encoder; + Pbrt.Encoder.key 39 Pbrt.Bytes encoder; + | Some (System_info x) -> + Pbrt.Encoder.nested encode_pb_system_info x encoder; + Pbrt.Encoder.key 45 Pbrt.Bytes encoder; + | Some (Trigger x) -> + Pbrt.Encoder.nested encode_pb_trigger x encoder; + Pbrt.Encoder.key 46 Pbrt.Bytes encoder; + | Some (Chrome_trigger x) -> + Pbrt.Encoder.nested encode_pb_chrome_trigger x encoder; + Pbrt.Encoder.key 109 Pbrt.Bytes encoder; + | Some (Packages_list x) -> + Pbrt.Encoder.nested encode_pb_packages_list x encoder; + Pbrt.Encoder.key 47 Pbrt.Bytes encoder; + | Some (Chrome_benchmark_metadata x) -> + Pbrt.Encoder.nested encode_pb_chrome_benchmark_metadata x encoder; + Pbrt.Encoder.key 48 Pbrt.Bytes encoder; + | Some (Perfetto_metatrace x) -> + Pbrt.Encoder.nested encode_pb_perfetto_metatrace x encoder; + Pbrt.Encoder.key 49 Pbrt.Bytes encoder; + | Some (Chrome_metadata x) -> + Pbrt.Encoder.nested encode_pb_chrome_metadata_packet x encoder; + Pbrt.Encoder.key 51 Pbrt.Bytes encoder; + | Some (Gpu_counter_event x) -> + Pbrt.Encoder.nested encode_pb_gpu_counter_event x encoder; + Pbrt.Encoder.key 52 Pbrt.Bytes encoder; + | Some (Gpu_render_stage_event x) -> + Pbrt.Encoder.nested encode_pb_gpu_render_stage_event x encoder; + Pbrt.Encoder.key 53 Pbrt.Bytes encoder; + | Some (Streaming_profile_packet x) -> + Pbrt.Encoder.nested encode_pb_streaming_profile_packet x encoder; + Pbrt.Encoder.key 54 Pbrt.Bytes encoder; + | Some (Heap_graph x) -> + Pbrt.Encoder.nested encode_pb_heap_graph x encoder; + Pbrt.Encoder.key 56 Pbrt.Bytes encoder; + | Some (Graphics_frame_event x) -> + Pbrt.Encoder.nested encode_pb_graphics_frame_event x encoder; + Pbrt.Encoder.key 57 Pbrt.Bytes encoder; + | Some (Vulkan_memory_event x) -> + Pbrt.Encoder.nested encode_pb_vulkan_memory_event x encoder; + Pbrt.Encoder.key 62 Pbrt.Bytes encoder; + | Some (Gpu_log x) -> + Pbrt.Encoder.nested encode_pb_gpu_log x encoder; + Pbrt.Encoder.key 63 Pbrt.Bytes encoder; + | Some (Vulkan_api_event x) -> + Pbrt.Encoder.nested encode_pb_vulkan_api_event x encoder; + Pbrt.Encoder.key 65 Pbrt.Bytes encoder; + | Some (Perf_sample x) -> + Pbrt.Encoder.nested encode_pb_perf_sample x encoder; + Pbrt.Encoder.key 66 Pbrt.Bytes encoder; + | Some (Cpu_info x) -> + Pbrt.Encoder.nested encode_pb_cpu_info x encoder; + Pbrt.Encoder.key 67 Pbrt.Bytes encoder; + | Some (Smaps_packet x) -> + Pbrt.Encoder.nested encode_pb_smaps_packet x encoder; + Pbrt.Encoder.key 68 Pbrt.Bytes encoder; + | Some (Service_event x) -> + Pbrt.Encoder.nested encode_pb_tracing_service_event x encoder; + Pbrt.Encoder.key 69 Pbrt.Bytes encoder; + | Some (Initial_display_state x) -> + Pbrt.Encoder.nested encode_pb_initial_display_state x encoder; + Pbrt.Encoder.key 70 Pbrt.Bytes encoder; + | Some (Gpu_mem_total_event x) -> + Pbrt.Encoder.nested encode_pb_gpu_mem_total_event x encoder; + Pbrt.Encoder.key 71 Pbrt.Bytes encoder; + | Some (Memory_tracker_snapshot x) -> + Pbrt.Encoder.nested encode_pb_memory_tracker_snapshot x encoder; + Pbrt.Encoder.key 73 Pbrt.Bytes encoder; + | Some (Frame_timeline_event x) -> + Pbrt.Encoder.nested encode_pb_frame_timeline_event x encoder; + Pbrt.Encoder.key 76 Pbrt.Bytes encoder; + | Some (Android_energy_estimation_breakdown x) -> + Pbrt.Encoder.nested encode_pb_android_energy_estimation_breakdown x encoder; + Pbrt.Encoder.key 77 Pbrt.Bytes encoder; + | Some (Ui_state x) -> + Pbrt.Encoder.nested encode_pb_ui_state x encoder; + Pbrt.Encoder.key 78 Pbrt.Bytes encoder; + | Some (Android_camera_frame_event x) -> + Pbrt.Encoder.nested encode_pb_android_camera_frame_event x encoder; + Pbrt.Encoder.key 80 Pbrt.Bytes encoder; + | Some (Android_camera_session_stats x) -> + Pbrt.Encoder.nested encode_pb_android_camera_session_stats x encoder; + Pbrt.Encoder.key 81 Pbrt.Bytes encoder; + | Some (Translation_table x) -> + Pbrt.Encoder.nested encode_pb_translation_table x encoder; + Pbrt.Encoder.key 82 Pbrt.Bytes encoder; + | Some (Android_game_intervention_list x) -> + Pbrt.Encoder.nested encode_pb_android_game_intervention_list x encoder; + Pbrt.Encoder.key 83 Pbrt.Bytes encoder; + | Some (Statsd_atom x) -> + Pbrt.Encoder.nested encode_pb_statsd_atom x encoder; + Pbrt.Encoder.key 84 Pbrt.Bytes encoder; + | Some (Android_system_property x) -> + Pbrt.Encoder.nested encode_pb_android_system_property x encoder; + Pbrt.Encoder.key 86 Pbrt.Bytes encoder; + | Some (Entity_state_residency x) -> + Pbrt.Encoder.nested encode_pb_entity_state_residency x encoder; + Pbrt.Encoder.key 91 Pbrt.Bytes encoder; + | Some (Module_symbols x) -> + Pbrt.Encoder.nested encode_pb_module_symbols x encoder; + Pbrt.Encoder.key 61 Pbrt.Bytes encoder; + | Some (Deobfuscation_mapping x) -> + Pbrt.Encoder.nested encode_pb_deobfuscation_mapping x encoder; + Pbrt.Encoder.key 64 Pbrt.Bytes encoder; + | Some (Track_descriptor x) -> + Pbrt.Encoder.nested encode_pb_track_descriptor x encoder; + Pbrt.Encoder.key 60 Pbrt.Bytes encoder; + | Some (Process_descriptor x) -> + Pbrt.Encoder.nested encode_pb_process_descriptor x encoder; + Pbrt.Encoder.key 43 Pbrt.Bytes encoder; + | Some (Thread_descriptor x) -> + Pbrt.Encoder.nested encode_pb_thread_descriptor x encoder; + Pbrt.Encoder.key 44 Pbrt.Bytes encoder; + | Some (Synchronization_marker x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 36 Pbrt.Bytes encoder; + | Some (Compressed_packets x) -> + Pbrt.Encoder.bytes x encoder; + Pbrt.Encoder.key 50 Pbrt.Bytes encoder; + | Some (Extension_descriptor x) -> + Pbrt.Encoder.nested encode_pb_extension_descriptor x encoder; + Pbrt.Encoder.key 72 Pbrt.Bytes encoder; + | Some (Network_packet x) -> + Pbrt.Encoder.nested encode_pb_network_packet_event x encoder; + Pbrt.Encoder.key 88 Pbrt.Bytes encoder; + | Some (Network_packet_bundle x) -> + Pbrt.Encoder.nested encode_pb_network_packet_bundle x encoder; + Pbrt.Encoder.key 92 Pbrt.Bytes encoder; + | Some (Track_event_range_of_interest x) -> + Pbrt.Encoder.nested encode_pb_track_event_range_of_interest x encoder; + Pbrt.Encoder.key 90 Pbrt.Bytes encoder; + | Some (Surfaceflinger_layers_snapshot x) -> + Pbrt.Encoder.nested encode_pb_layers_snapshot_proto x encoder; + Pbrt.Encoder.key 93 Pbrt.Bytes encoder; + | Some (Surfaceflinger_transactions x) -> + Pbrt.Encoder.nested encode_pb_transaction_trace_entry x encoder; + Pbrt.Encoder.key 94 Pbrt.Bytes encoder; + | Some (Shell_transition x) -> + Pbrt.Encoder.nested encode_pb_shell_transition x encoder; + Pbrt.Encoder.key 96 Pbrt.Bytes encoder; + | Some (Shell_handler_mappings x) -> + Pbrt.Encoder.nested encode_pb_shell_handler_mappings x encoder; + Pbrt.Encoder.key 97 Pbrt.Bytes encoder; + | Some (Protolog_message x) -> + Pbrt.Encoder.nested encode_pb_proto_log_message x encoder; + Pbrt.Encoder.key 104 Pbrt.Bytes encoder; + | Some (Protolog_viewer_config x) -> + Pbrt.Encoder.nested encode_pb_proto_log_viewer_config x encoder; + Pbrt.Encoder.key 105 Pbrt.Bytes encoder; + | Some Winscope_extensions -> + Pbrt.Encoder.empty_nested encoder; + Pbrt.Encoder.key 112 Pbrt.Bytes encoder; + | Some (Etw_events x) -> + Pbrt.Encoder.nested encode_pb_etw_trace_event_bundle x encoder; + Pbrt.Encoder.key 95 Pbrt.Bytes encoder; + | Some (V8_js_code x) -> + Pbrt.Encoder.nested encode_pb_v8_js_code x encoder; + Pbrt.Encoder.key 99 Pbrt.Bytes encoder; + | Some (V8_internal_code x) -> + Pbrt.Encoder.nested encode_pb_v8_internal_code x encoder; + Pbrt.Encoder.key 100 Pbrt.Bytes encoder; + | Some (V8_wasm_code x) -> + Pbrt.Encoder.nested encode_pb_v8_wasm_code x encoder; + Pbrt.Encoder.key 101 Pbrt.Bytes encoder; + | Some (V8_reg_exp_code x) -> + Pbrt.Encoder.nested encode_pb_v8_reg_exp_code x encoder; + Pbrt.Encoder.key 102 Pbrt.Bytes encoder; + | Some (V8_code_move x) -> + Pbrt.Encoder.nested encode_pb_v8_code_move x encoder; + Pbrt.Encoder.key 103 Pbrt.Bytes encoder; + | Some (Remote_clock_sync x) -> + Pbrt.Encoder.nested encode_pb_remote_clock_sync x encoder; + Pbrt.Encoder.key 107 Pbrt.Bytes encoder; + | Some (Pixel_modem_events x) -> + Pbrt.Encoder.nested encode_pb_pixel_modem_events x encoder; + Pbrt.Encoder.key 110 Pbrt.Bytes encoder; + | Some (Pixel_modem_token_database x) -> + Pbrt.Encoder.nested encode_pb_pixel_modem_token_database x encoder; + Pbrt.Encoder.key 111 Pbrt.Bytes encoder; + | Some (Clone_snapshot_trigger x) -> + Pbrt.Encoder.nested encode_pb_trigger x encoder; + Pbrt.Encoder.key 113 Pbrt.Bytes encoder; + | Some (Bluetooth_trace_event x) -> + Pbrt.Encoder.nested encode_pb_bluetooth_trace_event x encoder; + Pbrt.Encoder.key 114 Pbrt.Bytes encoder; + | Some (Kernel_wakelock_data x) -> + Pbrt.Encoder.nested encode_pb_kernel_wakelock_data x encoder; + Pbrt.Encoder.key 115 Pbrt.Bytes encoder; + | Some (App_wakelock_bundle x) -> + Pbrt.Encoder.nested encode_pb_app_wakelock_bundle x encoder; + Pbrt.Encoder.key 116 Pbrt.Bytes encoder; + | Some (Generic_kernel_task_state_event x) -> + Pbrt.Encoder.nested encode_pb_generic_kernel_task_state_event x encoder; + Pbrt.Encoder.key 117 Pbrt.Bytes encoder; + | Some (Generic_kernel_cpu_freq_event x) -> + Pbrt.Encoder.nested encode_pb_generic_kernel_cpu_frequency_event x encoder; + Pbrt.Encoder.key 118 Pbrt.Bytes encoder; + | Some (Generic_kernel_task_rename_event x) -> + Pbrt.Encoder.nested encode_pb_generic_kernel_task_rename_event x encoder; + Pbrt.Encoder.key 120 Pbrt.Bytes encoder; + | Some (Generic_kernel_process_tree x) -> + Pbrt.Encoder.nested encode_pb_generic_kernel_process_tree x encoder; + Pbrt.Encoder.key 122 Pbrt.Bytes encoder; + | Some (Cpu_per_uid_data x) -> + Pbrt.Encoder.nested encode_pb_cpu_per_uid_data x encoder; + Pbrt.Encoder.key 119 Pbrt.Bytes encoder; + | Some (Evdev_event x) -> + Pbrt.Encoder.nested encode_pb_evdev_event x encoder; + Pbrt.Encoder.key 121 Pbrt.Bytes encoder; + | Some (For_testing x) -> + Pbrt.Encoder.nested encode_pb_test_event x encoder; + Pbrt.Encoder.key 900 Pbrt.Bytes encoder; + end; + begin match v.optional_trusted_uid with + | None -> () + | Some (Trusted_uid x) -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 3 Pbrt.Varint encoder; + end; + begin match v.optional_trusted_packet_sequence_id with + | None -> () + | Some (Trusted_packet_sequence_id x) -> + Pbrt.Encoder.int32_as_varint x encoder; + Pbrt.Encoder.key 10 Pbrt.Varint encoder; + end; + if trace_packet_has_trusted_pid v then ( + Pbrt.Encoder.int32_as_varint v.trusted_pid encoder; + Pbrt.Encoder.key 79 Pbrt.Varint encoder; + ); + begin match v.interned_data with + | Some x -> + Pbrt.Encoder.nested encode_pb_interned_data x encoder; + Pbrt.Encoder.key 12 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_packet_has_sequence_flags v then ( + Pbrt.Encoder.int32_as_varint v.sequence_flags encoder; + Pbrt.Encoder.key 13 Pbrt.Varint encoder; + ); + if trace_packet_has_incremental_state_cleared v then ( + Pbrt.Encoder.bool v.incremental_state_cleared encoder; + Pbrt.Encoder.key 41 Pbrt.Varint encoder; + ); + begin match v.trace_packet_defaults with + | Some x -> + Pbrt.Encoder.nested encode_pb_trace_packet_defaults x encoder; + Pbrt.Encoder.key 59 Pbrt.Bytes encoder; + | None -> (); + end; + if trace_packet_has_previous_packet_dropped v then ( + Pbrt.Encoder.bool v.previous_packet_dropped encoder; + Pbrt.Encoder.key 42 Pbrt.Varint encoder; + ); + if trace_packet_has_first_packet_on_sequence v then ( + Pbrt.Encoder.bool v.first_packet_on_sequence encoder; + Pbrt.Encoder.key 87 Pbrt.Varint encoder; + ); + if trace_packet_has_machine_id v then ( + Pbrt.Encoder.int32_as_varint v.machine_id encoder; + Pbrt.Encoder.key 98 Pbrt.Varint encoder; + ); + () + +let rec encode_pb_trace (v:trace) encoder = + Pbrt.List_util.rev_iter_with (fun x encoder -> + Pbrt.Encoder.nested encode_pb_trace_packet x encoder; + Pbrt.Encoder.key 1 Pbrt.Bytes encoder; + ) v.packet encoder; + () + +[@@@ocaml.warning "-23-27-30-39"] + +(** {2 Protobuf Decoding} *) diff --git a/src/perfetto/perfetto_trace.mli b/src/perfetto/perfetto_trace.mli new file mode 100644 index 0000000..daa9f97 --- /dev/null +++ b/src/perfetto/perfetto_trace.mli @@ -0,0 +1,26819 @@ + +(** Code for perfetto_trace.proto *) + +(* generated from "perfetto_trace.proto", do not edit *) + + + +(** {2 Types} *) + +type ftrace_descriptor_atrace_category = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable description : string; +} + +type ftrace_descriptor = private { + mutable atrace_categories : ftrace_descriptor_atrace_category list; +} + +type gpu_counter_descriptor_gpu_counter_group = + | Unclassified + | System + | Vertices + | Fragments + | Primitives + | Memory + | Compute + | Ray_tracing + +type gpu_counter_descriptor_measure_unit = + | None + | Bit + | Kilobit + | Megabit + | Gigabit + | Terabit + | Petabit + | Byte + | Kilobyte + | Megabyte + | Gigabyte + | Terabyte + | Petabyte + | Hertz + | Kilohertz + | Megahertz + | Gigahertz + | Terahertz + | Petahertz + | Nanosecond + | Microsecond + | Millisecond + | Second + | Minute + | Hour + | Vertex + | Pixel + | Triangle + | Primitive + | Fragment + | Milliwatt + | Watt + | Kilowatt + | Joule + | Volt + | Ampere + | Celsius + | Fahrenheit + | Kelvin + | Percent + | Instruction + +type gpu_counter_descriptor_gpu_counter_spec_peak_value = + | Int_peak_value of int64 + | Double_peak_value of float + +and gpu_counter_descriptor_gpu_counter_spec = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable counter_id : int32; + mutable name : string; + mutable description : string; + mutable peak_value : gpu_counter_descriptor_gpu_counter_spec_peak_value option; + mutable numerator_units : gpu_counter_descriptor_measure_unit list; + mutable denominator_units : gpu_counter_descriptor_measure_unit list; + mutable select_by_default : bool; + mutable groups : gpu_counter_descriptor_gpu_counter_group list; +} + +type gpu_counter_descriptor_gpu_counter_block = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable block_id : int32; + mutable block_capacity : int32; + mutable name : string; + mutable description : string; + mutable counter_ids : int32 list; +} + +type gpu_counter_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable specs : gpu_counter_descriptor_gpu_counter_spec list; + mutable blocks : gpu_counter_descriptor_gpu_counter_block list; + mutable min_sampling_period_ns : int64; + mutable max_sampling_period_ns : int64; + mutable supports_instrumented_sampling : bool; +} + +type track_event_category = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable description : string; + mutable tags : string list; +} + +type track_event_descriptor = private { + mutable available_categories : track_event_category list; +} + +type data_source_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable name : string; + mutable id : int64; + mutable will_notify_on_stop : bool; + mutable will_notify_on_start : bool; + mutable handles_incremental_state_clear : bool; + mutable no_flush : bool; + mutable gpu_counter_descriptor : gpu_counter_descriptor option; + mutable track_event_descriptor : track_event_descriptor option; + mutable ftrace_descriptor : ftrace_descriptor option; +} + +type tracing_service_state_producer = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable id : int32; + mutable name : string; + mutable pid : int32; + mutable uid : int32; + mutable sdk_version : string; + mutable frozen : bool; +} + +type tracing_service_state_data_source = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable ds_descriptor : data_source_descriptor option; + mutable producer_id : int32; +} + +type tracing_service_state_tracing_session = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 10 fields *) + mutable id : int64; + mutable consumer_uid : int32; + mutable state : string; + mutable unique_session_name : string; + mutable buffer_size_kb : int32 list; + mutable duration_ms : int32; + mutable num_data_sources : int32; + mutable start_realtime_ns : int64; + mutable bugreport_score : int32; + mutable bugreport_filename : string; + mutable is_started : bool; +} + +type tracing_service_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable producers : tracing_service_state_producer list; + mutable data_sources : tracing_service_state_data_source list; + mutable tracing_sessions : tracing_service_state_tracing_session list; + mutable supports_tracing_sessions : bool; + mutable num_sessions : int32; + mutable num_sessions_started : int32; + mutable tracing_service_version : string; +} + +type builtin_clock = + | Builtin_clock_unknown + | Builtin_clock_realtime + | Builtin_clock_realtime_coarse + | Builtin_clock_monotonic + | Builtin_clock_monotonic_coarse + | Builtin_clock_monotonic_raw + | Builtin_clock_boottime + | Builtin_clock_tsc + | Builtin_clock_perf + | Builtin_clock_max_id + +type android_game_intervention_list_config = private { + mutable package_name_filter : string list; +} + +type android_input_event_config_trace_mode = + | Trace_mode_trace_all + | Trace_mode_use_rules + +type android_input_event_config_trace_level = + | Trace_level_none + | Trace_level_redacted + | Trace_level_complete + +type android_input_event_config_trace_rule = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable trace_level : android_input_event_config_trace_level; + mutable match_all_packages : string list; + mutable match_any_packages : string list; + mutable match_secure : bool; + mutable match_ime_connection_active : bool; +} + +type android_input_event_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable mode : android_input_event_config_trace_mode; + mutable rules : android_input_event_config_trace_rule list; + mutable trace_dispatcher_input_events : bool; + mutable trace_dispatcher_window_dispatch : bool; +} + +type android_log_id = + | Lid_default + | Lid_radio + | Lid_events + | Lid_system + | Lid_crash + | Lid_stats + | Lid_security + | Lid_kernel + +type android_log_priority = + | Prio_unspecified + | Prio_unused + | Prio_verbose + | Prio_debug + | Prio_info + | Prio_warn + | Prio_error + | Prio_fatal + +type android_log_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable log_ids : android_log_id list; + mutable min_prio : android_log_priority; + mutable filter_tags : string list; +} + +type android_polled_state_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable poll_ms : int32; +} + +type android_sdk_sysprop_guard_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable surfaceflinger_skia_track_events : bool; + mutable hwui_skia_track_events : bool; + mutable hwui_package_name_filter : string list; +} + +type android_system_property_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable poll_ms : int32; + mutable property_name : string list; +} + +type app_wakelocks_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable write_delay_ms : int32; + mutable filter_duration_below_ms : int32; + mutable drop_owner_pid : bool; +} + +type cpu_per_uid_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable poll_ms : int32; +} + +type kernel_wakelocks_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable poll_ms : int32; +} + +type network_packet_trace_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable poll_ms : int32; + mutable aggregation_threshold : int32; + mutable intern_limit : int32; + mutable drop_local_port : bool; + mutable drop_remote_port : bool; + mutable drop_tcp_flags : bool; +} + +type packages_list_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable package_name_filter : string list; + mutable only_write_on_cpu_use_every_ms : int32; +} + +type pixel_modem_config_event_group = + | Event_group_unknown + | Event_group_low_bandwidth + | Event_group_high_and_low_bandwidth + +type pixel_modem_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable event_group : pixel_modem_config_event_group; + mutable pigweed_hash_allow_list : int64 list; + mutable pigweed_hash_deny_list : int64 list; +} + +type proto_log_level = + | Protolog_level_undefined + | Protolog_level_debug + | Protolog_level_verbose + | Protolog_level_info + | Protolog_level_warn + | Protolog_level_error + | Protolog_level_wtf + +type proto_log_config_tracing_mode = + | Default + | Enable_all + +type proto_log_group = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable group_name : string; + mutable log_from : proto_log_level; + mutable collect_stacktrace : bool; +} + +type proto_log_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable group_overrides : proto_log_group list; + mutable tracing_mode : proto_log_config_tracing_mode; + mutable default_log_from_level : proto_log_level; +} + +type surface_flinger_layers_config_mode = + | Mode_unspecified + | Mode_active + | Mode_generated + | Mode_dump + | Mode_generated_bugreport_only + +type surface_flinger_layers_config_trace_flag = + | Trace_flag_unspecified + | Trace_flag_input + | Trace_flag_composition + | Trace_flag_extra + | Trace_flag_hwc + | Trace_flag_buffers + | Trace_flag_virtual_displays + | Trace_flag_all + +type surface_flinger_layers_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable mode : surface_flinger_layers_config_mode; + mutable trace_flags : surface_flinger_layers_config_trace_flag list; +} + +type surface_flinger_transactions_config_mode = + | Mode_unspecified + | Mode_continuous + | Mode_active + +type surface_flinger_transactions_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable mode : surface_flinger_transactions_config_mode; +} + +type window_manager_config_log_frequency = + | Log_frequency_unspecified + | Log_frequency_frame + | Log_frequency_transaction + | Log_frequency_single_dump + +type window_manager_config_log_level = + | Log_level_unspecified + | Log_level_verbose + | Log_level_debug + | Log_level_critical + +type window_manager_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable log_frequency : window_manager_config_log_frequency; + mutable log_level : window_manager_config_log_level; +} + +type chrome_config_client_priority = + | Unknown + | Background + | User_initiated + +type chrome_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable trace_config : string; + mutable privacy_filtering_enabled : bool; + mutable convert_to_legacy_json : bool; + mutable client_priority : chrome_config_client_priority; + mutable json_agent_label_filter : string; + mutable event_package_name_filter_enabled : bool; +} + +type chromium_histogram_samples_config_histogram_sample = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable histogram_name : string; + mutable min_value : int64; + mutable max_value : int64; +} + +type chromium_histogram_samples_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable histograms : chromium_histogram_samples_config_histogram_sample list; + mutable filter_histogram_names : bool; +} + +type chromium_system_metrics_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable sampling_interval_ms : int32; +} + +type v8_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable log_script_sources : bool; + mutable log_instructions : bool; +} + +type etw_config_kernel_flag = + | Cswitch + | Dispatcher + +type etw_config = private { + mutable kernel_flags : etw_config_kernel_flag list; + mutable scheduler_provider_events : string list; + mutable memory_provider_events : string list; + mutable file_provider_events : string list; +} + +type frozen_ftrace_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable instance_name : string; +} + +type ftrace_config_compact_sched_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable enabled : bool; +} + +type ftrace_config_print_filter_rule_atrace_message = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable type_ : string; + mutable prefix : string; +} + +type ftrace_config_print_filter_rule_match = + | Prefix of string + | Atrace_msg of ftrace_config_print_filter_rule_atrace_message + +and ftrace_config_print_filter_rule = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable match_ : ftrace_config_print_filter_rule_match option; + mutable allow : bool; +} + +type ftrace_config_print_filter = private { + mutable rules : ftrace_config_print_filter_rule list; +} + +type ftrace_config_ksyms_mem_policy = + | Ksyms_unspecified + | Ksyms_cleanup_on_stop + | Ksyms_retain + +type ftrace_config_kprobe_event_kprobe_type = + | Kprobe_type_unknown + | Kprobe_type_kprobe + | Kprobe_type_kretprobe + | Kprobe_type_both + +type ftrace_config_kprobe_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable probe : string; + mutable type_ : ftrace_config_kprobe_event_kprobe_type; +} + +type ftrace_config_tracefs_option_state = + | State_unknown + | State_enabled + | State_disabled + +type ftrace_config_tracefs_option = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable state : ftrace_config_tracefs_option_state; +} + +type ftrace_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 18 fields *) + mutable ftrace_events : string list; + mutable atrace_categories : string list; + mutable atrace_apps : string list; + mutable atrace_categories_prefer_sdk : string list; + mutable atrace_userspace_only : bool; + mutable buffer_size_kb : int32; + mutable buffer_size_lower_bound : bool; + mutable drain_period_ms : int32; + mutable drain_buffer_percent : int32; + mutable compact_sched : ftrace_config_compact_sched_config option; + mutable print_filter : ftrace_config_print_filter option; + mutable symbolize_ksyms : bool; + mutable ksyms_mem_policy : ftrace_config_ksyms_mem_policy; + mutable throttle_rss_stat : bool; + mutable denser_generic_event_encoding : bool; + mutable disable_generic_events : bool; + mutable syscall_events : string list; + mutable enable_function_graph : bool; + mutable function_filters : string list; + mutable function_graph_roots : string list; + mutable function_graph_max_depth : int32; + mutable kprobe_events : ftrace_config_kprobe_event list; + mutable preserve_ftrace_buffer : bool; + mutable use_monotonic_raw_clock : bool; + mutable instance_name : string; + mutable debug_ftrace_abi : bool; + mutable tids_to_trace : int32 list; + mutable tracefs_options : ftrace_config_tracefs_option list; + mutable tracing_cpumask : string; + mutable initialize_ksyms_synchronously_for_testing : bool; +} + +type gpu_counter_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable counter_period_ns : int64; + mutable counter_ids : int32 list; + mutable instrumented_sampling : bool; + mutable fix_gpu_clock : bool; +} + +type gpu_render_stages_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable full_loadstore : bool; + mutable low_overhead : bool; + mutable trace_metrics : string list; +} + +type vulkan_memory_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable track_driver_memory_usage : bool; + mutable track_device_memory_usage : bool; +} + +type inode_file_config_mount_point_mapping_entry = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable mountpoint : string; + mutable scan_roots : string list; +} + +type inode_file_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable scan_interval_ms : int32; + mutable scan_delay_ms : int32; + mutable scan_batch_size : int32; + mutable do_not_scan : bool; + mutable scan_mount_points : string list; + mutable mount_point_mapping : inode_file_config_mount_point_mapping_entry list; +} + +type console_config_output = + | Output_unspecified + | Output_stdout + | Output_stderr + +type console_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable output : console_config_output; + mutable enable_colors : bool; +} + +type interceptor_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable console_config : console_config option; +} + +type android_power_config_battery_counters = + | Battery_counter_unspecified + | Battery_counter_charge + | Battery_counter_capacity_percent + | Battery_counter_current + | Battery_counter_current_avg + | Battery_counter_voltage + +type android_power_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable battery_poll_ms : int32; + mutable battery_counters : android_power_config_battery_counters list; + mutable collect_power_rails : bool; + mutable collect_energy_estimation_breakdown : bool; + mutable collect_entity_state_residency : bool; +} + +type priority_boost_config_boost_policy = + | Policy_unspecified + | Policy_sched_other + | Policy_sched_fifo + +type priority_boost_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable policy : priority_boost_config_boost_policy; + mutable priority : int32; +} + +type process_stats_config_quirks = + | Quirks_unspecified + | Disable_initial_dump + | Disable_on_demand + +type process_stats_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable quirks : process_stats_config_quirks list; + mutable scan_all_processes_on_start : bool; + mutable record_thread_names : bool; + mutable proc_stats_poll_ms : int32; + mutable proc_stats_cache_ttl_ms : int32; + mutable scan_smaps_rollup : bool; + mutable record_process_age : bool; + mutable record_process_runtime : bool; + mutable record_process_dmabuf_rss : bool; + mutable resolve_process_fds : bool; +} + +type heapprofd_config_continuous_dump_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable dump_phase_ms : int32; + mutable dump_interval_ms : int32; +} + +type heapprofd_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 17 fields *) + mutable sampling_interval_bytes : int64; + mutable adaptive_sampling_shmem_threshold : int64; + mutable adaptive_sampling_max_sampling_interval_bytes : int64; + mutable process_cmdline : string list; + mutable pid : int64 list; + mutable target_installed_by : string list; + mutable heaps : string list; + mutable exclude_heaps : string list; + mutable stream_allocations : bool; + mutable heap_sampling_intervals : int64 list; + mutable all_heaps : bool; + mutable all : bool; + mutable min_anonymous_memory_kb : int32; + mutable max_heapprofd_memory_kb : int32; + mutable max_heapprofd_cpu_secs : int64; + mutable skip_symbol_prefix : string list; + mutable continuous_dump_config : heapprofd_config_continuous_dump_config option; + mutable shmem_size_bytes : int64; + mutable block_client : bool; + mutable block_client_timeout_us : int32; + mutable no_startup : bool; + mutable no_running : bool; + mutable dump_at_max : bool; + mutable disable_fork_teardown : bool; + mutable disable_vfork_detection : bool; +} + +type atom_id = + | Atom_unspecified + | Atom_ble_scan_state_changed + | Atom_process_state_changed + | Atom_ble_scan_result_received + | Atom_sensor_state_changed + | Atom_gps_scan_state_changed + | Atom_sync_state_changed + | Atom_scheduled_job_state_changed + | Atom_screen_brightness_changed + | Atom_wakelock_state_changed + | Atom_long_partial_wakelock_state_changed + | Atom_mobile_radio_power_state_changed + | Atom_wifi_radio_power_state_changed + | Atom_activity_manager_sleep_state_changed + | Atom_memory_factor_state_changed + | Atom_excessive_cpu_usage_reported + | Atom_cached_kill_reported + | Atom_process_memory_stat_reported + | Atom_launcher_event + | Atom_battery_saver_mode_state_changed + | Atom_device_idle_mode_state_changed + | Atom_device_idling_mode_state_changed + | Atom_audio_state_changed + | Atom_media_codec_state_changed + | Atom_camera_state_changed + | Atom_flashlight_state_changed + | Atom_uid_process_state_changed + | Atom_process_life_cycle_state_changed + | Atom_screen_state_changed + | Atom_battery_level_changed + | Atom_charging_state_changed + | Atom_plugged_state_changed + | Atom_interactive_state_changed + | Atom_touch_event_reported + | Atom_wakeup_alarm_occurred + | Atom_kernel_wakeup_reported + | Atom_wifi_lock_state_changed + | Atom_wifi_signal_strength_changed + | Atom_wifi_scan_state_changed + | Atom_phone_signal_strength_changed + | Atom_setting_changed + | Atom_activity_foreground_state_changed + | Atom_isolated_uid_changed + | Atom_packet_wakeup_occurred + | Atom_wall_clock_time_shifted + | Atom_anomaly_detected + | Atom_app_breadcrumb_reported + | Atom_app_start_occurred + | Atom_app_start_canceled + | Atom_app_start_fully_drawn + | Atom_lmk_kill_occurred + | Atom_picture_in_picture_state_changed + | Atom_wifi_multicast_lock_state_changed + | Atom_app_start_memory_state_captured + | Atom_shutdown_sequence_reported + | Atom_boot_sequence_reported + | Atom_overlay_state_changed + | Atom_foreground_service_state_changed + | Atom_call_state_changed + | Atom_keyguard_state_changed + | Atom_keyguard_bouncer_state_changed + | Atom_keyguard_bouncer_password_entered + | Atom_app_died + | Atom_resource_configuration_changed + | Atom_bluetooth_enabled_state_changed + | Atom_bluetooth_connection_state_changed + | Atom_gps_signal_quality_changed + | Atom_usb_connector_state_changed + | Atom_speaker_impedance_reported + | Atom_hardware_failed + | Atom_physical_drop_detected + | Atom_charge_cycles_reported + | Atom_mobile_connection_state_changed + | Atom_mobile_radio_technology_changed + | Atom_usb_device_attached + | Atom_app_crash_occurred + | Atom_anr_occurred + | Atom_wtf_occurred + | Atom_low_mem_reported + | Atom_generic_atom + | Atom_vibrator_state_changed + | Atom_deferred_job_stats_reported + | Atom_thermal_throttling + | Atom_biometric_acquired + | Atom_biometric_authenticated + | Atom_biometric_error_occurred + | Atom_ui_event_reported + | Atom_battery_health_snapshot + | Atom_slow_io + | Atom_battery_caused_shutdown + | Atom_phone_service_state_changed + | Atom_phone_state_changed + | Atom_user_restriction_changed + | Atom_settings_ui_changed + | Atom_connectivity_state_changed + | Atom_service_state_changed + | Atom_service_launch_reported + | Atom_flag_flip_update_occurred + | Atom_binary_push_state_changed + | Atom_device_policy_event + | Atom_docs_ui_file_op_canceled + | Atom_docs_ui_file_op_copy_move_mode_reported + | Atom_docs_ui_file_op_failure + | Atom_docs_ui_provider_file_op + | Atom_docs_ui_invalid_scoped_access_request + | Atom_docs_ui_launch_reported + | Atom_docs_ui_root_visited + | Atom_docs_ui_startup_ms + | Atom_docs_ui_user_action_reported + | Atom_wifi_enabled_state_changed + | Atom_wifi_running_state_changed + | Atom_app_compacted + | Atom_network_dns_event_reported + | Atom_docs_ui_picker_launched_from_reported + | Atom_docs_ui_pick_result_reported + | Atom_docs_ui_search_mode_reported + | Atom_docs_ui_search_type_reported + | Atom_data_stall_event + | Atom_rescue_party_reset_reported + | Atom_signed_config_reported + | Atom_gnss_ni_event_reported + | Atom_bluetooth_link_layer_connection_event + | Atom_bluetooth_acl_connection_state_changed + | Atom_bluetooth_sco_connection_state_changed + | Atom_app_downgraded + | Atom_app_optimized_after_downgraded + | Atom_low_storage_state_changed + | Atom_gnss_nfw_notification_reported + | Atom_gnss_configuration_reported + | Atom_usb_port_overheat_event_reported + | Atom_nfc_error_occurred + | Atom_nfc_state_changed + | Atom_nfc_beam_occurred + | Atom_nfc_cardemulation_occurred + | Atom_nfc_tag_occurred + | Atom_nfc_hce_transaction_occurred + | Atom_se_state_changed + | Atom_se_omapi_reported + | Atom_broadcast_dispatch_latency_reported + | Atom_attention_manager_service_result_reported + | Atom_adb_connection_changed + | Atom_speech_dsp_stat_reported + | Atom_usb_contaminant_reported + | Atom_watchdog_rollback_occurred + | Atom_biometric_system_health_issue_detected + | Atom_bubble_ui_changed + | Atom_scheduled_job_constraint_changed + | Atom_bluetooth_active_device_changed + | Atom_bluetooth_a2_dp_playback_state_changed + | Atom_bluetooth_a2_dp_codec_config_changed + | Atom_bluetooth_a2_dp_codec_capability_changed + | Atom_bluetooth_a2_dp_audio_underrun_reported + | Atom_bluetooth_a2_dp_audio_overrun_reported + | Atom_bluetooth_device_rssi_reported + | Atom_bluetooth_device_failed_contact_counter_reported + | Atom_bluetooth_device_tx_power_level_reported + | Atom_bluetooth_hci_timeout_reported + | Atom_bluetooth_quality_report_reported + | Atom_bluetooth_device_info_reported + | Atom_bluetooth_remote_version_info_reported + | Atom_bluetooth_sdp_attribute_reported + | Atom_bluetooth_bond_state_changed + | Atom_bluetooth_classic_pairing_event_reported + | Atom_bluetooth_smp_pairing_event_reported + | Atom_screen_timeout_extension_reported + | Atom_process_start_time + | Atom_permission_grant_request_result_reported + | Atom_bluetooth_socket_connection_state_changed + | Atom_device_identifier_access_denied + | Atom_bubble_developer_error_reported + | Atom_assist_gesture_stage_reported + | Atom_assist_gesture_feedback_reported + | Atom_assist_gesture_progress_reported + | Atom_touch_gesture_classified + | Atom_hidden_api_used + | Atom_style_ui_changed + | Atom_privacy_indicators_interacted + | Atom_app_install_on_external_storage_reported + | Atom_network_stack_reported + | Atom_app_moved_storage_reported + | Atom_biometric_enrolled + | Atom_system_server_watchdog_occurred + | Atom_tomb_stone_occurred + | Atom_bluetooth_class_of_device_reported + | Atom_intelligence_event_reported + | Atom_thermal_throttling_severity_state_changed + | Atom_role_request_result_reported + | Atom_mediametrics_audiopolicy_reported + | Atom_mediametrics_audiorecord_reported + | Atom_mediametrics_audiothread_reported + | Atom_mediametrics_audiotrack_reported + | Atom_mediametrics_codec_reported + | Atom_mediametrics_drm_widevine_reported + | Atom_mediametrics_extractor_reported + | Atom_mediametrics_mediadrm_reported + | Atom_mediametrics_nuplayer_reported + | Atom_mediametrics_recorder_reported + | Atom_mediametrics_drmmanager_reported + | Atom_car_power_state_changed + | Atom_garage_mode_info + | Atom_test_atom_reported + | Atom_content_capture_caller_mismatch_reported + | Atom_content_capture_service_events + | Atom_content_capture_session_events + | Atom_content_capture_flushed + | Atom_location_manager_api_usage_reported + | Atom_review_permissions_fragment_result_reported + | Atom_runtime_permissions_upgrade_result + | Atom_grant_permissions_activity_button_actions + | Atom_location_access_check_notification_action + | Atom_app_permission_fragment_action_reported + | Atom_app_permission_fragment_viewed + | Atom_app_permissions_fragment_viewed + | Atom_permission_apps_fragment_viewed + | Atom_text_selection_event + | Atom_text_linkify_event + | Atom_conversation_actions_event + | Atom_language_detection_event + | Atom_exclusion_rect_state_changed + | Atom_back_gesture_reported_reported + | Atom_update_engine_update_attempt_reported + | Atom_update_engine_successful_update_reported + | Atom_camera_action_event + | Atom_app_compatibility_change_reported + | Atom_perfetto_uploaded + | Atom_vms_client_connection_state_changed + | Atom_media_provider_scan_occurred + | Atom_media_content_deleted + | Atom_media_provider_permission_requested + | Atom_media_provider_schema_changed + | Atom_media_provider_idle_maintenance_finished + | Atom_reboot_escrow_recovery_reported + | Atom_boot_time_event_duration_reported + | Atom_boot_time_event_elapsed_time_reported + | Atom_boot_time_event_utc_time_reported + | Atom_boot_time_event_error_code_reported + | Atom_userspace_reboot_reported + | Atom_notification_reported + | Atom_notification_panel_reported + | Atom_notification_channel_modified + | Atom_integrity_check_result_reported + | Atom_integrity_rules_pushed + | Atom_cb_message_reported + | Atom_cb_message_error + | Atom_wifi_health_stat_reported + | Atom_wifi_failure_stat_reported + | Atom_wifi_connection_result_reported + | Atom_app_freeze_changed + | Atom_snapshot_merge_reported + | Atom_foreground_service_app_op_session_ended + | Atom_display_jank_reported + | Atom_app_standby_bucket_changed + | Atom_sharesheet_started + | Atom_ranking_selected + | Atom_tvsettings_ui_interacted + | Atom_launcher_snapshot + | Atom_package_installer_v2_reported + | Atom_user_lifecycle_journey_reported + | Atom_user_lifecycle_event_occurred + | Atom_accessibility_shortcut_reported + | Atom_accessibility_service_reported + | Atom_docs_ui_drag_and_drop_reported + | Atom_app_usage_event_occurred + | Atom_auto_revoke_notification_clicked + | Atom_auto_revoke_fragment_app_viewed + | Atom_auto_revoked_app_interaction + | Atom_app_permission_groups_fragment_auto_revoke_action + | Atom_evs_usage_stats_reported + | Atom_audio_power_usage_data_reported + | Atom_tv_tuner_state_changed + | Atom_mediaoutput_op_switch_reported + | Atom_cb_message_filtered + | Atom_tv_tuner_dvr_status + | Atom_tv_cas_session_open_status + | Atom_assistant_invocation_reported + | Atom_display_wake_reported + | Atom_car_user_hal_modify_user_request_reported + | Atom_car_user_hal_modify_user_response_reported + | Atom_car_user_hal_post_switch_response_reported + | Atom_car_user_hal_initial_user_info_request_reported + | Atom_car_user_hal_initial_user_info_response_reported + | Atom_car_user_hal_user_association_request_reported + | Atom_car_user_hal_set_user_association_response_reported + | Atom_network_ip_provisioning_reported + | Atom_network_dhcp_renew_reported + | Atom_network_validation_reported + | Atom_network_stack_quirk_reported + | Atom_mediametrics_audiorecorddeviceusage_reported + | Atom_mediametrics_audiothreaddeviceusage_reported + | Atom_mediametrics_audiotrackdeviceusage_reported + | Atom_mediametrics_audiodeviceconnection_reported + | Atom_blob_committed + | Atom_blob_leased + | Atom_blob_opened + | Atom_contacts_provider_status_reported + | Atom_keystore_key_event_reported + | Atom_network_tethering_reported + | Atom_ime_touch_reported + | Atom_ui_interaction_frame_info_reported + | Atom_ui_action_latency_reported + | Atom_wifi_disconnect_reported + | Atom_wifi_connection_state_changed + | Atom_hdmi_cec_active_source_changed + | Atom_hdmi_cec_message_reported + | Atom_airplane_mode + | Atom_modem_restart + | Atom_carrier_id_mismatch_reported + | Atom_carrier_id_table_updated + | Atom_data_stall_recovery_reported + | Atom_mediametrics_mediaparser_reported + | Atom_tls_handshake_reported + | Atom_text_classifier_api_usage_reported + | Atom_car_watchdog_kill_stats_reported + | Atom_mediametrics_playback_reported + | Atom_media_network_info_changed + | Atom_media_playback_state_changed + | Atom_media_playback_error_reported + | Atom_media_playback_track_changed + | Atom_wifi_scan_reported + | Atom_wifi_pno_scan_reported + | Atom_tif_tune_changed + | Atom_auto_rotate_reported + | Atom_perfetto_trigger + | Atom_transcoding_data + | Atom_ims_service_entitlement_updated + | Atom_device_rotated + | Atom_sim_specific_settings_restored + | Atom_text_classifier_download_reported + | Atom_pin_storage_event + | Atom_face_down_reported + | Atom_bluetooth_hal_crash_reason_reported + | Atom_reboot_escrow_preparation_reported + | Atom_reboot_escrow_lskf_capture_reported + | Atom_reboot_escrow_reboot_reported + | Atom_binder_latency_reported + | Atom_mediametrics_aaudiostream_reported + | Atom_media_transcoding_session_ended + | Atom_magnification_usage_reported + | Atom_magnification_mode_with_ime_on_reported + | Atom_app_search_call_stats_reported + | Atom_app_search_put_document_stats_reported + | Atom_device_control_changed + | Atom_device_state_changed + | Atom_inputdevice_registered + | Atom_smartspace_card_reported + | Atom_auth_prompt_authenticate_invoked + | Atom_auth_manager_can_authenticate_invoked + | Atom_auth_enroll_action_invoked + | Atom_auth_deprecated_api_used + | Atom_unattended_reboot_occurred + | Atom_long_reboot_blocking_reported + | Atom_location_time_zone_provider_state_changed + | Atom_fdtrack_event_occurred + | Atom_timeout_auto_extended_reported + | Atom_alarm_batch_delivered + | Atom_alarm_scheduled + | Atom_car_watchdog_io_overuse_stats_reported + | Atom_user_level_hibernation_state_changed + | Atom_app_search_initialize_stats_reported + | Atom_app_search_query_stats_reported + | Atom_app_process_died + | Atom_network_ip_reachability_monitor_reported + | Atom_slow_input_event_reported + | Atom_anr_occurred_processing_started + | Atom_app_search_remove_stats_reported + | Atom_media_codec_reported + | Atom_permission_usage_fragment_interaction + | Atom_permission_details_interaction + | Atom_privacy_sensor_toggle_interaction + | Atom_privacy_toggle_dialog_interaction + | Atom_app_search_optimize_stats_reported + | Atom_non_a11_y_tool_service_warning_report + | Atom_app_compat_state_changed + | Atom_size_compat_restart_button_event_reported + | Atom_splitscreen_ui_changed + | Atom_network_dns_handshake_reported + | Atom_bluetooth_code_path_counter + | Atom_bluetooth_le_batch_scan_report_delay + | Atom_accessibility_floating_menu_ui_changed + | Atom_neuralnetworks_compilation_completed + | Atom_neuralnetworks_execution_completed + | Atom_neuralnetworks_compilation_failed + | Atom_neuralnetworks_execution_failed + | Atom_context_hub_booted + | Atom_context_hub_restarted + | Atom_context_hub_loaded_nanoapp_snapshot_reported + | Atom_chre_code_download_transacted + | Atom_uwb_session_inited + | Atom_uwb_session_closed + | Atom_uwb_first_ranging_received + | Atom_uwb_ranging_measurement_received + | Atom_text_classifier_download_work_scheduled + | Atom_text_classifier_download_work_completed + | Atom_clipboard_cleared + | Atom_vm_creation_requested + | Atom_nearby_device_scan_state_changed + | Atom_application_locales_changed + | Atom_mediametrics_audiotrackstatus_reported + | Atom_fold_state_duration_reported + | Atom_location_time_zone_provider_controller_state_changed + | Atom_display_hbm_state_changed + | Atom_display_hbm_brightness_changed + | Atom_persistent_uri_permissions_flushed + | Atom_early_boot_comp_os_artifacts_check_reported + | Atom_vbmeta_digest_reported + | Atom_apex_info_gathered + | Atom_pvm_info_gathered + | Atom_wear_settings_ui_interacted + | Atom_tracing_service_report_event + | Atom_mediametrics_audiorecordstatus_reported + | Atom_launcher_latency + | Atom_dropbox_entry_dropped + | Atom_wifi_p2_p_connection_reported + | Atom_game_state_changed + | Atom_hotword_detector_create_requested + | Atom_hotword_detection_service_init_result_reported + | Atom_hotword_detection_service_restarted + | Atom_hotword_detector_keyphrase_triggered + | Atom_hotword_detector_events + | Atom_boot_completed_broadcast_completion_latency_reported + | Atom_contacts_indexer_update_stats_reported + | Atom_app_background_restrictions_info + | Atom_mms_sms_provider_get_thread_id_failed + | Atom_mms_sms_database_helper_on_upgrade_failed + | Atom_permission_reminder_notification_interacted + | Atom_recent_permission_decisions_interacted + | Atom_gnss_psds_download_reported + | Atom_le_audio_connection_session_reported + | Atom_le_audio_broadcast_session_reported + | Atom_dream_ui_event_reported + | Atom_task_manager_event_reported + | Atom_cdm_association_action + | Atom_magnification_triple_tap_and_hold_activated_session_reported + | Atom_magnification_follow_typing_focus_activated_session_reported + | Atom_accessibility_text_reading_options_changed + | Atom_wifi_setup_failure_crash_reported + | Atom_uwb_device_error_reported + | Atom_isolated_compilation_scheduled + | Atom_isolated_compilation_ended + | Atom_ons_opportunistic_esim_provisioning_complete + | Atom_system_server_pre_watchdog_occurred + | Atom_telephony_anomaly_detected + | Atom_letterbox_position_changed + | Atom_remote_key_provisioning_attempt + | Atom_remote_key_provisioning_network_info + | Atom_remote_key_provisioning_timing + | Atom_mediaoutput_op_interaction_report + | Atom_sync_exemption_occurred + | Atom_autofill_presentation_event_reported + | Atom_dock_state_changed + | Atom_safety_source_state_collected + | Atom_safety_center_system_event_reported + | Atom_safety_center_interaction_reported + | Atom_settings_provider_setting_changed + | Atom_broadcast_delivery_event_reported + | Atom_service_request_event_reported + | Atom_provider_acquisition_event_reported + | Atom_bluetooth_device_name_reported + | Atom_cb_config_updated + | Atom_cb_module_error_reported + | Atom_cb_service_feature_changed + | Atom_cb_receiver_feature_changed + | Atom_privacy_signal_notification_interaction + | Atom_privacy_signal_issue_card_interaction + | Atom_privacy_signals_job_failure + | Atom_vibration_reported + | Atom_uwb_ranging_start + | Atom_app_compacted_v2 + | Atom_display_brightness_changed + | Atom_activity_action_blocked + | Atom_network_dns_server_support_reported + | Atom_vm_booted + | Atom_vm_exited + | Atom_ambient_brightness_stats_reported + | Atom_mediametrics_spatializercapabilities_reported + | Atom_mediametrics_spatializerdeviceenabled_reported + | Atom_mediametrics_headtrackerdeviceenabled_reported + | Atom_mediametrics_headtrackerdevicesupported_reported + | Atom_hearing_aid_info_reported + | Atom_device_wide_job_constraint_changed + | Atom_ambient_mode_changed + | Atom_anr_latency_reported + | Atom_resource_api_info + | Atom_system_default_network_changed + | Atom_iwlan_setup_data_call_result_reported + | Atom_iwlan_pdn_disconnected_reason_reported + | Atom_airplane_mode_session_reported + | Atom_vm_cpu_status_reported + | Atom_vm_mem_status_reported + | Atom_package_installation_session_reported + | Atom_default_network_rematch_info + | Atom_network_selection_performance + | Atom_network_nsd_reported + | Atom_bluetooth_disconnection_reason_reported + | Atom_bluetooth_local_versions_reported + | Atom_bluetooth_remote_supported_features_reported + | Atom_bluetooth_local_supported_features_reported + | Atom_bluetooth_gatt_app_info + | Atom_brightness_configuration_updated + | Atom_wear_media_output_switcher_launched + | Atom_wear_media_output_switcher_finished + | Atom_wear_media_output_switcher_connection_reported + | Atom_wear_media_output_switcher_device_scan_triggered + | Atom_wear_media_output_switcher_first_device_scan_latency + | Atom_wear_media_output_switcher_connect_device_latency + | Atom_package_manager_snapshot_reported + | Atom_package_manager_apps_filter_cache_build_reported + | Atom_package_manager_apps_filter_cache_update_reported + | Atom_launcher_impression_event + | Atom_wear_media_output_switcher_all_devices_scan_latency + | Atom_ws_watch_face_edited + | Atom_ws_watch_face_favorite_action_reported + | Atom_ws_watch_face_set_action_reported + | Atom_package_uninstallation_reported + | Atom_game_mode_changed + | Atom_game_mode_configuration_changed + | Atom_bedtime_mode_state_changed + | Atom_network_slice_session_ended + | Atom_network_slice_daily_data_usage_reported + | Atom_nfc_tag_type_occurred + | Atom_nfc_aid_conflict_occurred + | Atom_nfc_reader_conflict_occurred + | Atom_ws_tile_list_changed + | Atom_get_type_accessed_without_permission + | Atom_mobile_bundled_app_info_gathered + | Atom_ws_watch_face_complication_set_changed + | Atom_media_drm_created + | Atom_media_drm_errored + | Atom_media_drm_session_opened + | Atom_media_drm_session_closed + | Atom_user_selected_resolution + | Atom_unsafe_intent_event_reported + | Atom_performance_hint_session_reported + | Atom_mediametrics_midi_device_close_reported + | Atom_biometric_touch_reported + | Atom_hotword_audio_egress_event_reported + | Atom_location_enabled_state_changed + | Atom_ime_request_finished + | Atom_usb_compliance_warnings_reported + | Atom_app_supported_locales_changed + | Atom_media_provider_volume_recovery_reported + | Atom_biometric_properties_collected + | Atom_kernel_wakeup_attributed + | Atom_screen_state_changed_v2 + | Atom_ws_backup_action_reported + | Atom_ws_restore_action_reported + | Atom_device_log_access_event_reported + | Atom_media_session_updated + | Atom_wear_oobe_state_changed + | Atom_ws_notification_updated + | Atom_network_validation_failure_stats_daily_reported + | Atom_ws_complication_tapped + | Atom_ws_notification_blocking + | Atom_ws_notification_bridgemode_updated + | Atom_ws_notification_dismissal_actioned + | Atom_ws_notification_actioned + | Atom_ws_notification_latency + | Atom_wifi_bytes_transfer + | Atom_wifi_bytes_transfer_by_fg_bg + | Atom_mobile_bytes_transfer + | Atom_mobile_bytes_transfer_by_fg_bg + | Atom_bluetooth_bytes_transfer + | Atom_kernel_wakelock + | Atom_subsystem_sleep_state + | Atom_cpu_time_per_uid + | Atom_cpu_time_per_uid_freq + | Atom_wifi_activity_info + | Atom_modem_activity_info + | Atom_bluetooth_activity_info + | Atom_process_memory_state + | Atom_system_elapsed_realtime + | Atom_system_uptime + | Atom_cpu_active_time + | Atom_cpu_cluster_time + | Atom_disk_space + | Atom_remaining_battery_capacity + | Atom_full_battery_capacity + | Atom_temperature + | Atom_binder_calls + | Atom_binder_calls_exceptions + | Atom_looper_stats + | Atom_disk_stats + | Atom_directory_usage + | Atom_app_size + | Atom_category_size + | Atom_proc_stats + | Atom_battery_voltage + | Atom_num_fingerprints_enrolled + | Atom_disk_io + | Atom_power_profile + | Atom_proc_stats_pkg_proc + | Atom_process_cpu_time + | Atom_cpu_time_per_thread_freq + | Atom_on_device_power_measurement + | Atom_device_calculated_power_use + | Atom_process_memory_high_water_mark + | Atom_battery_level + | Atom_build_information + | Atom_battery_cycle_count + | Atom_debug_elapsed_clock + | Atom_debug_failing_elapsed_clock + | Atom_num_faces_enrolled + | Atom_role_holder + | Atom_dangerous_permission_state + | Atom_train_info + | Atom_time_zone_data_info + | Atom_external_storage_info + | Atom_gpu_stats_global_info + | Atom_gpu_stats_app_info + | Atom_system_ion_heap_size + | Atom_apps_on_external_storage_info + | Atom_face_settings + | Atom_cooling_device + | Atom_app_ops + | Atom_process_system_ion_heap_size + | Atom_surfaceflinger_stats_global_info + | Atom_surfaceflinger_stats_layer_info + | Atom_process_memory_snapshot + | Atom_vms_client_stats + | Atom_notification_remote_views + | Atom_dangerous_permission_state_sampled + | Atom_graphics_stats + | Atom_runtime_app_op_access + | Atom_ion_heap_size + | Atom_package_notification_preferences + | Atom_package_notification_channel_preferences + | Atom_package_notification_channel_group_preferences + | Atom_gnss_stats + | Atom_attributed_app_ops + | Atom_voice_call_session + | Atom_voice_call_rat_usage + | Atom_sim_slot_state + | Atom_supported_radio_access_family + | Atom_setting_snapshot + | Atom_blob_info + | Atom_data_usage_bytes_transfer + | Atom_bytes_transfer_by_tag_and_metered + | Atom_dnd_mode_rule + | Atom_general_external_storage_access_stats + | Atom_incoming_sms + | Atom_outgoing_sms + | Atom_carrier_id_table_version + | Atom_data_call_session + | Atom_cellular_service_state + | Atom_cellular_data_service_switch + | Atom_system_memory + | Atom_ims_registration_termination + | Atom_ims_registration_stats + | Atom_cpu_time_per_cluster_freq + | Atom_cpu_cycles_per_uid_cluster + | Atom_device_rotated_data + | Atom_cpu_cycles_per_thread_group_cluster + | Atom_media_drm_activity_info + | Atom_oem_managed_bytes_transfer + | Atom_gnss_power_stats + | Atom_time_zone_detector_state + | Atom_keystore2_storage_stats + | Atom_rkp_pool_stats + | Atom_process_dmabuf_memory + | Atom_pending_alarm_info + | Atom_user_level_hibernated_apps + | Atom_launcher_layout_snapshot + | Atom_global_hibernated_apps + | Atom_input_event_latency_sketch + | Atom_battery_usage_stats_before_reset + | Atom_battery_usage_stats_since_reset + | Atom_battery_usage_stats_since_reset_using_power_profile_model + | Atom_installed_incremental_package + | Atom_telephony_network_requests + | Atom_app_search_storage_info + | Atom_vmstat + | Atom_keystore2_key_creation_with_general_info + | Atom_keystore2_key_creation_with_auth_info + | Atom_keystore2_key_creation_with_purpose_and_modes_info + | Atom_keystore2_atom_with_overflow + | Atom_keystore2_key_operation_with_purpose_and_modes_info + | Atom_keystore2_key_operation_with_general_info + | Atom_rkp_error_stats + | Atom_keystore2_crash_stats + | Atom_vendor_apex_info + | Atom_accessibility_shortcut_stats + | Atom_accessibility_floating_menu_stats + | Atom_data_usage_bytes_transfer_v2 + | Atom_media_capabilities + | Atom_car_watchdog_system_io_usage_summary + | Atom_car_watchdog_uid_io_usage_summary + | Atom_ims_registration_feature_tag_stats + | Atom_rcs_client_provisioning_stats + | Atom_rcs_acs_provisioning_stats + | Atom_sip_delegate_stats + | Atom_sip_transport_feature_tag_stats + | Atom_sip_message_response + | Atom_sip_transport_session + | Atom_ims_dedicated_bearer_listener_event + | Atom_ims_dedicated_bearer_event + | Atom_ims_registration_service_desc_stats + | Atom_uce_event_stats + | Atom_presence_notify_event + | Atom_gba_event + | Atom_per_sim_status + | Atom_gpu_work_per_uid + | Atom_persistent_uri_permissions_amount_per_package + | Atom_signed_partition_info + | Atom_pinned_file_sizes_per_package + | Atom_pending_intents_per_package + | Atom_user_info + | Atom_telephony_network_requests_v2 + | Atom_device_telephony_properties + | Atom_remote_key_provisioning_error_counts + | Atom_safety_state + | Atom_incoming_mms + | Atom_outgoing_mms + | Atom_multi_user_info + | Atom_network_bpf_map_info + | Atom_outgoing_short_code_sms + | Atom_connectivity_state_sample + | Atom_network_selection_rematch_reasons_info + | Atom_game_mode_info + | Atom_game_mode_configuration + | Atom_game_mode_listener + | Atom_network_slice_request_count + | Atom_ws_tile_snapshot + | Atom_ws_active_watch_face_complication_set_snapshot + | Atom_process_state + | Atom_process_association + | Atom_adpf_system_component_info + | Atom_notification_memory_use + | Atom_hdr_capabilities + | Atom_ws_favourite_watch_face_list_snapshot + | Atom_accessibility_check_result_reported + | Atom_adaptive_auth_unlock_after_lock_reported + | Atom_thermal_status_called + | Atom_thermal_headroom_called + | Atom_thermal_headroom_thresholds_called + | Atom_adpf_hint_session_tid_cleanup + | Atom_thermal_headroom_thresholds + | Atom_adpf_session_snapshot + | Atom_jsscriptengine_latency_reported + | Atom_ad_services_api_called + | Atom_ad_services_mesurement_reports_uploaded + | Atom_mobile_data_download_file_group_status_reported + | Atom_mobile_data_download_download_result_reported + | Atom_ad_services_settings_usage_reported + | Atom_background_fetch_process_reported + | Atom_update_custom_audience_process_reported + | Atom_run_ad_bidding_process_reported + | Atom_run_ad_scoring_process_reported + | Atom_run_ad_selection_process_reported + | Atom_run_ad_bidding_per_ca_process_reported + | Atom_mobile_data_download_file_group_storage_stats_reported + | Atom_ad_services_measurement_registrations + | Atom_ad_services_get_topics_reported + | Atom_ad_services_epoch_computation_get_top_topics_reported + | Atom_ad_services_epoch_computation_classifier_reported + | Atom_ad_services_back_compat_get_topics_reported + | Atom_ad_services_back_compat_epoch_computation_classifier_reported + | Atom_ad_services_measurement_debug_keys + | Atom_ad_services_error_reported + | Atom_ad_services_background_jobs_execution_reported + | Atom_ad_services_measurement_delayed_source_registration + | Atom_ad_services_measurement_attribution + | Atom_ad_services_measurement_jobs + | Atom_ad_services_measurement_wipeout + | Atom_ad_services_measurement_ad_id_match_for_debug_keys + | Atom_ad_services_enrollment_data_stored + | Atom_ad_services_enrollment_file_downloaded + | Atom_ad_services_enrollment_matched + | Atom_ad_services_consent_migrated + | Atom_ad_services_enrollment_failed + | Atom_ad_services_measurement_click_verification + | Atom_ad_services_encryption_key_fetched + | Atom_ad_services_encryption_key_db_transaction_ended + | Atom_destination_registered_beacons + | Atom_report_interaction_api_called + | Atom_interaction_reporting_table_cleared + | Atom_app_manifest_config_helper_called + | Atom_ad_filtering_process_join_ca_reported + | Atom_ad_filtering_process_ad_selection_reported + | Atom_ad_counter_histogram_updater_reported + | Atom_signature_verification + | Atom_k_anon_immediate_sign_join_status_reported + | Atom_k_anon_background_job_status_reported + | Atom_k_anon_initialize_status_reported + | Atom_k_anon_sign_status_reported + | Atom_k_anon_join_status_reported + | Atom_k_anon_key_attestation_status_reported + | Atom_get_ad_selection_data_api_called + | Atom_get_ad_selection_data_buyer_input_generated + | Atom_background_job_scheduling_reported + | Atom_topics_encryption_epoch_computation_reported + | Atom_topics_encryption_get_topics_reported + | Atom_adservices_shell_command_called + | Atom_update_signals_api_called + | Atom_encoding_job_run + | Atom_encoding_js_fetch + | Atom_encoding_js_execution + | Atom_persist_ad_selection_result_called + | Atom_server_auction_key_fetch_called + | Atom_server_auction_background_key_fetch_enabled + | Atom_ad_services_measurement_process_odp_registration + | Atom_ad_services_measurement_notify_registration_to_odp + | Atom_select_ads_from_outcomes_api_called + | Atom_report_impression_api_called + | Atom_ad_services_enrollment_transaction_stats + | Atom_ad_services_cobalt_logger_event_reported + | Atom_ad_services_cobalt_periodic_job_event_reported + | Atom_update_signals_process_reported + | Atom_topics_schedule_epoch_job_setting_reported + | Atom_ai_wallpapers_button_pressed + | Atom_ai_wallpapers_template_selected + | Atom_ai_wallpapers_term_selected + | Atom_ai_wallpapers_wallpaper_set + | Atom_ai_wallpapers_session_summary + | Atom_apex_installation_requested + | Atom_apex_installation_staged + | Atom_apex_installation_ended + | Atom_app_search_set_schema_stats_reported + | Atom_app_search_schema_migration_stats_reported + | Atom_app_search_usage_search_intent_stats_reported + | Atom_app_search_usage_search_intent_raw_query_stats_reported + | Atom_app_search_apps_indexer_stats_reported + | Atom_art_datum_reported + | Atom_art_device_datum_reported + | Atom_art_datum_delta_reported + | Atom_art_dex2_oat_reported + | Atom_art_device_status + | Atom_background_dexopt_job_ended + | Atom_prereboot_dexopt_job_ended + | Atom_odrefresh_reported + | Atom_odsign_reported + | Atom_autofill_ui_event_reported + | Atom_autofill_fill_request_reported + | Atom_autofill_fill_response_reported + | Atom_autofill_save_event_reported + | Atom_autofill_session_committed + | Atom_autofill_field_classification_event_reported + | Atom_car_recents_event_reported + | Atom_car_calm_mode_event_reported + | Atom_car_wakeup_from_suspend_reported + | Atom_plugin_initialized + | Atom_bluetooth_hashed_device_name_reported + | Atom_bluetooth_l2_cap_coc_client_connection + | Atom_bluetooth_l2_cap_coc_server_connection + | Atom_bluetooth_le_session_connected + | Atom_restricted_bluetooth_device_name_reported + | Atom_bluetooth_profile_connection_attempted + | Atom_bluetooth_content_profile_error_reported + | Atom_bluetooth_rfcomm_connection_attempted + | Atom_remote_device_information_with_metric_id + | Atom_le_app_scan_state_changed + | Atom_le_radio_scan_stopped + | Atom_le_scan_result_received + | Atom_le_scan_abused + | Atom_le_adv_state_changed + | Atom_le_adv_error_reported + | Atom_a2_dp_session_reported + | Atom_bluetooth_cross_layer_event_reported + | Atom_broadcast_audio_session_reported + | Atom_broadcast_audio_sync_reported + | Atom_bluetooth_rfcomm_connection_reported_at_close + | Atom_bluetooth_le_connection + | Atom_broadcast_sent + | Atom_camera_feature_combination_query_event + | Atom_certificate_transparency_log_list_state_changed + | Atom_certificate_transparency_log_list_update_failed + | Atom_daily_keepalive_info_reported + | Atom_network_request_state_changed + | Atom_tethering_active_sessions_reported + | Atom_network_stats_recorder_file_operated + | Atom_core_networking_terrible_error_occurred + | Atom_apf_session_info_reported + | Atom_ip_client_ra_info_reported + | Atom_vpn_connection_state_changed + | Atom_vpn_connection_reported + | Atom_cpu_policy + | Atom_credential_manager_api_called + | Atom_credential_manager_init_phase_reported + | Atom_credential_manager_candidate_phase_reported + | Atom_credential_manager_final_phase_reported + | Atom_credential_manager_total_reported + | Atom_credential_manager_finalnouid_reported + | Atom_credential_manager_get_reported + | Atom_credential_manager_auth_click_reported + | Atom_credential_manager_apiv2_called + | Atom_cronet_engine_created + | Atom_cronet_traffic_reported + | Atom_cronet_engine_builder_initialized + | Atom_cronet_http_flags_initialized + | Atom_cronet_initialized + | Atom_desktop_mode_ui_changed + | Atom_desktop_mode_session_task_update + | Atom_desktop_mode_task_size_updated + | Atom_device_lock_check_in_request_reported + | Atom_device_lock_provisioning_complete_reported + | Atom_device_lock_kiosk_app_request_reported + | Atom_device_lock_check_in_retry_reported + | Atom_device_lock_provision_failure_reported + | Atom_device_lock_lock_unlock_device_failure_reported + | Atom_device_policy_management_mode + | Atom_device_policy_state + | Atom_display_mode_director_vote_changed + | Atom_external_display_state_changed + | Atom_dnd_state_changed + | Atom_dream_setting_changed + | Atom_dream_setting_snapshot + | Atom_express_event_reported + | Atom_express_histogram_sample_reported + | Atom_express_uid_event_reported + | Atom_express_uid_histogram_sample_reported + | Atom_federated_compute_api_called + | Atom_federated_compute_training_event_reported + | Atom_example_iterator_next_latency_reported + | Atom_full_screen_intent_launched + | Atom_bal_allowed + | Atom_in_task_activity_started + | Atom_device_orientation_changed + | Atom_cached_apps_high_watermark + | Atom_stylus_prediction_metrics_reported + | Atom_user_risk_event_reported + | Atom_media_projection_state_changed + | Atom_media_projection_target_changed + | Atom_excessive_binder_proxy_count_reported + | Atom_proxy_bytes_transfer_by_fg_bg + | Atom_mobile_bytes_transfer_by_proc_state + | Atom_biometric_frr_notification + | Atom_sensitive_content_media_projection_session + | Atom_sensitive_notification_app_protection_session + | Atom_sensitive_notification_app_protection_applied + | Atom_sensitive_notification_redaction + | Atom_sensitive_content_app_protection + | Atom_app_restriction_state_changed + | Atom_battery_usage_stats_per_uid + | Atom_postgc_memory_snapshot + | Atom_power_save_temp_allowlist_changed + | Atom_app_op_access_tracked + | Atom_content_or_file_uri_event_reported + | Atom_application_grammatical_inflection_changed + | Atom_system_grammatical_inflection_changed + | Atom_battery_health + | Atom_hdmi_earc_status_reported + | Atom_hdmi_soundbar_mode_status_reported + | Atom_health_connect_api_called + | Atom_health_connect_usage_stats + | Atom_health_connect_storage_stats + | Atom_health_connect_api_invoked + | Atom_exercise_route_api_called + | Atom_health_connect_export_invoked + | Atom_health_connect_import_invoked + | Atom_health_connect_export_import_stats_reported + | Atom_health_connect_ui_impression + | Atom_health_connect_ui_interaction + | Atom_health_connect_app_opened_reported + | Atom_hotword_egress_size_atom_reported + | Atom_ike_session_terminated + | Atom_ike_liveness_check_session_validated + | Atom_negotiated_security_association + | Atom_keyboard_configured + | Atom_keyboard_systems_event_reported + | Atom_inputdevice_usage_reported + | Atom_input_event_latency_reported + | Atom_touchpad_usage + | Atom_kernel_oom_kill_occurred + | Atom_emergency_state_changed + | Atom_chre_significant_motion_state_changed + | Atom_population_density_provider_loading_reported + | Atom_density_based_coarse_locations_usage_reported + | Atom_density_based_coarse_locations_provider_query_reported + | Atom_media_codec_reclaim_request_completed + | Atom_media_codec_started + | Atom_media_codec_stopped + | Atom_media_codec_rendered + | Atom_media_editing_ended_reported + | Atom_mte_state + | Atom_microxr_device_boot_complete_reported + | Atom_nfc_observe_mode_state_changed + | Atom_nfc_field_changed + | Atom_nfc_polling_loop_notification_reported + | Atom_nfc_proprietary_capabilities_reported + | Atom_ondevicepersonalization_api_called + | Atom_component_state_changed_reported + | Atom_pdf_load_reported + | Atom_pdf_api_usage_reported + | Atom_pdf_search_reported + | Atom_pressure_stall_information + | Atom_permission_rationale_dialog_viewed + | Atom_permission_rationale_dialog_action_reported + | Atom_app_data_sharing_updates_notification_interaction + | Atom_app_data_sharing_updates_fragment_viewed + | Atom_app_data_sharing_updates_fragment_action_reported + | Atom_enhanced_confirmation_dialog_result_reported + | Atom_enhanced_confirmation_restriction_cleared + | Atom_photopicker_session_info_reported + | Atom_photopicker_api_info_reported + | Atom_photopicker_ui_event_logged + | Atom_photopicker_media_item_status_reported + | Atom_photopicker_preview_info_logged + | Atom_photopicker_menu_interaction_logged + | Atom_photopicker_banner_interaction_logged + | Atom_photopicker_media_library_info_logged + | Atom_photopicker_page_info_logged + | Atom_photopicker_media_grid_sync_info_reported + | Atom_photopicker_album_sync_info_reported + | Atom_photopicker_search_info_reported + | Atom_search_data_extraction_details_reported + | Atom_embedded_photopicker_info_reported + | Atom_atom_9999 + | Atom_atom_99999 + | Atom_screen_off_reported + | Atom_screen_timeout_override_reported + | Atom_screen_interactive_session_reported + | Atom_screen_dim_reported + | Atom_media_provider_database_rollback_reported + | Atom_backup_setup_status_reported + | Atom_ranging_session_configured + | Atom_ranging_session_started + | Atom_ranging_session_closed + | Atom_ranging_technology_started + | Atom_ranging_technology_stopped + | Atom_rkpd_pool_stats + | Atom_rkpd_client_operation + | Atom_sandbox_api_called + | Atom_sandbox_activity_event_occurred + | Atom_sdk_sandbox_restricted_access_in_session + | Atom_sandbox_sdk_storage + | Atom_selinux_audit_log + | Atom_settings_spa_reported + | Atom_test_extension_atom_reported + | Atom_test_restricted_atom_reported + | Atom_stats_socket_loss_reported + | Atom_lockscreen_shortcut_selected + | Atom_lockscreen_shortcut_triggered + | Atom_launcher_impression_event_v2 + | Atom_display_switch_latency_tracked + | Atom_notification_listener_service + | Atom_nav_handle_touch_points + | Atom_communal_hub_widget_event_reported + | Atom_communal_hub_snapshot + | Atom_emergency_number_dialed + | Atom_call_stats + | Atom_call_audio_route_stats + | Atom_telecom_api_stats + | Atom_telecom_error_stats + | Atom_cellular_radio_power_state_changed + | Atom_emergency_numbers_info + | Atom_data_network_validation + | Atom_data_rat_state_changed + | Atom_connected_channel_changed + | Atom_iwlan_underlying_network_validation_result_reported + | Atom_qualified_rat_list_changed + | Atom_qns_ims_call_drop_stats + | Atom_qns_fallback_restriction_changed + | Atom_qns_rat_preference_mismatch_info + | Atom_qns_handover_time_millis + | Atom_qns_handover_pingpong + | Atom_satellite_controller + | Atom_satellite_session + | Atom_satellite_incoming_datagram + | Atom_satellite_outgoing_datagram + | Atom_satellite_provision + | Atom_satellite_sos_message_recommender + | Atom_carrier_roaming_satellite_session + | Atom_carrier_roaming_satellite_controller_stats + | Atom_controller_stats_per_package + | Atom_satellite_entitlement + | Atom_satellite_config_updater + | Atom_satellite_access_controller + | Atom_cellular_identifier_disclosed + | Atom_threadnetwork_telemetry_data_reported + | Atom_threadnetwork_topo_entry_repeated + | Atom_threadnetwork_device_info_reported + | Atom_boot_integrity_info_reported + | Atom_tv_low_power_standby_policy + | Atom_external_tv_input_event + | Atom_test_uprobestats_atom_reported + | Atom_uwb_activity_info + | Atom_mediator_updated + | Atom_sysproxy_bluetooth_bytes_transfer + | Atom_sysproxy_connection_updated + | Atom_wear_companion_connection_state + | Atom_media_action_reported + | Atom_media_controls_launched + | Atom_media_session_state_changed + | Atom_wear_media_output_switcher_device_scan_api_latency + | Atom_wear_media_output_switcher_sass_device_unavailable + | Atom_wear_media_output_switcher_fastpair_api_timeout + | Atom_wear_mode_state_changed + | Atom_renderer_initialized + | Atom_schema_version_received + | Atom_layout_inspected + | Atom_layout_expression_inspected + | Atom_layout_animations_inspected + | Atom_material_components_inspected + | Atom_tile_requested + | Atom_state_response_received + | Atom_tile_response_received + | Atom_inflation_finished + | Atom_inflation_failed + | Atom_ignored_inflation_failures_reported + | Atom_drawable_rendered + | Atom_wear_time_sync_requested + | Atom_wear_time_update_started + | Atom_wear_time_sync_attempt_completed + | Atom_wear_time_changed + | Atom_wear_adaptive_suspend_stats_reported + | Atom_wear_power_anomaly_service_operational_stats_reported + | Atom_wear_power_anomaly_service_event_stats_reported + | Atom_ws_wear_time_session + | Atom_ws_incoming_call_action_reported + | Atom_ws_call_disconnection_reported + | Atom_ws_call_duration_reported + | Atom_ws_call_user_experience_latency_reported + | Atom_ws_call_interaction_reported + | Atom_ws_on_body_state_changed + | Atom_ws_watch_face_restricted_complications_impacted + | Atom_ws_watch_face_default_restricted_complications_removed + | Atom_ws_complications_impacted_notification_event_reported + | Atom_ws_remote_event_usage_reported + | Atom_ws_bugreport_requested + | Atom_ws_bugreport_triggered + | Atom_ws_bugreport_finished + | Atom_ws_bugreport_result_received + | Atom_ws_standalone_mode_snapshot + | Atom_ws_favorite_watch_face_snapshot + | Atom_ws_photos_watch_face_feature_snapshot + | Atom_ws_watch_face_customization_snapshot + | Atom_wear_power_menu_opened + | Atom_wear_assistant_opened + | Atom_first_overlay_state_changed + | Atom_wifi_aware_ndp_reported + | Atom_wifi_aware_attach_reported + | Atom_wifi_self_recovery_triggered + | Atom_soft_ap_started + | Atom_soft_ap_stopped + | Atom_wifi_lock_released + | Atom_wifi_lock_deactivated + | Atom_wifi_config_saved + | Atom_wifi_aware_resource_using_changed + | Atom_wifi_aware_hal_api_called + | Atom_wifi_local_only_request_received + | Atom_wifi_local_only_request_scan_triggered + | Atom_wifi_thread_task_executed + | Atom_wifi_state_changed + | Atom_pno_scan_started + | Atom_pno_scan_stopped + | Atom_wifi_is_unusable_reported + | Atom_wifi_ap_capabilities_reported + | Atom_soft_ap_state_changed + | Atom_scorer_prediction_result_reported + | Atom_wifi_aware_capabilities + | Atom_wifi_module_info + | Atom_wifi_setting_info + | Atom_wifi_complex_setting_info + | Atom_wifi_configured_network_info + +type statsd_pull_atom_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable pull_atom_id : atom_id list; + mutable raw_pull_atom_id : int32 list; + mutable pull_frequency_ms : int32; + mutable packages : string list; +} + +type statsd_tracing_config = private { + mutable push_atom_id : atom_id list; + mutable raw_push_atom_id : int32 list; + mutable pull_config : statsd_pull_atom_config list; +} + +type meminfo_counters = + | Meminfo_unspecified + | Meminfo_mem_total + | Meminfo_mem_free + | Meminfo_mem_available + | Meminfo_buffers + | Meminfo_cached + | Meminfo_swap_cached + | Meminfo_active + | Meminfo_inactive + | Meminfo_active_anon + | Meminfo_inactive_anon + | Meminfo_active_file + | Meminfo_inactive_file + | Meminfo_unevictable + | Meminfo_mlocked + | Meminfo_swap_total + | Meminfo_swap_free + | Meminfo_dirty + | Meminfo_writeback + | Meminfo_anon_pages + | Meminfo_mapped + | Meminfo_shmem + | Meminfo_slab + | Meminfo_slab_reclaimable + | Meminfo_slab_unreclaimable + | Meminfo_kernel_stack + | Meminfo_page_tables + | Meminfo_commit_limit + | Meminfo_commited_as + | Meminfo_vmalloc_total + | Meminfo_vmalloc_used + | Meminfo_vmalloc_chunk + | Meminfo_cma_total + | Meminfo_cma_free + | Meminfo_gpu + | Meminfo_zram + | Meminfo_misc + | Meminfo_ion_heap + | Meminfo_ion_heap_pool + +type vmstat_counters = + | Vmstat_unspecified + | Vmstat_nr_free_pages + | Vmstat_nr_alloc_batch + | Vmstat_nr_inactive_anon + | Vmstat_nr_active_anon + | Vmstat_nr_inactive_file + | Vmstat_nr_active_file + | Vmstat_nr_unevictable + | Vmstat_nr_mlock + | Vmstat_nr_anon_pages + | Vmstat_nr_mapped + | Vmstat_nr_file_pages + | Vmstat_nr_dirty + | Vmstat_nr_writeback + | Vmstat_nr_slab_reclaimable + | Vmstat_nr_slab_unreclaimable + | Vmstat_nr_page_table_pages + | Vmstat_nr_kernel_stack + | Vmstat_nr_overhead + | Vmstat_nr_unstable + | Vmstat_nr_bounce + | Vmstat_nr_vmscan_write + | Vmstat_nr_vmscan_immediate_reclaim + | Vmstat_nr_writeback_temp + | Vmstat_nr_isolated_anon + | Vmstat_nr_isolated_file + | Vmstat_nr_shmem + | Vmstat_nr_dirtied + | Vmstat_nr_written + | Vmstat_nr_pages_scanned + | Vmstat_workingset_refault + | Vmstat_workingset_activate + | Vmstat_workingset_nodereclaim + | Vmstat_nr_anon_transparent_hugepages + | Vmstat_nr_free_cma + | Vmstat_nr_swapcache + | Vmstat_nr_dirty_threshold + | Vmstat_nr_dirty_background_threshold + | Vmstat_pgpgin + | Vmstat_pgpgout + | Vmstat_pgpgoutclean + | Vmstat_pswpin + | Vmstat_pswpout + | Vmstat_pgalloc_dma + | Vmstat_pgalloc_normal + | Vmstat_pgalloc_movable + | Vmstat_pgfree + | Vmstat_pgactivate + | Vmstat_pgdeactivate + | Vmstat_pgfault + | Vmstat_pgmajfault + | Vmstat_pgrefill_dma + | Vmstat_pgrefill_normal + | Vmstat_pgrefill_movable + | Vmstat_pgsteal_kswapd_dma + | Vmstat_pgsteal_kswapd_normal + | Vmstat_pgsteal_kswapd_movable + | Vmstat_pgsteal_direct_dma + | Vmstat_pgsteal_direct_normal + | Vmstat_pgsteal_direct_movable + | Vmstat_pgscan_kswapd_dma + | Vmstat_pgscan_kswapd_normal + | Vmstat_pgscan_kswapd_movable + | Vmstat_pgscan_direct_dma + | Vmstat_pgscan_direct_normal + | Vmstat_pgscan_direct_movable + | Vmstat_pgscan_direct_throttle + | Vmstat_pginodesteal + | Vmstat_slabs_scanned + | Vmstat_kswapd_inodesteal + | Vmstat_kswapd_low_wmark_hit_quickly + | Vmstat_kswapd_high_wmark_hit_quickly + | Vmstat_pageoutrun + | Vmstat_allocstall + | Vmstat_pgrotated + | Vmstat_drop_pagecache + | Vmstat_drop_slab + | Vmstat_pgmigrate_success + | Vmstat_pgmigrate_fail + | Vmstat_compact_migrate_scanned + | Vmstat_compact_free_scanned + | Vmstat_compact_isolated + | Vmstat_compact_stall + | Vmstat_compact_fail + | Vmstat_compact_success + | Vmstat_compact_daemon_wake + | Vmstat_unevictable_pgs_culled + | Vmstat_unevictable_pgs_scanned + | Vmstat_unevictable_pgs_rescued + | Vmstat_unevictable_pgs_mlocked + | Vmstat_unevictable_pgs_munlocked + | Vmstat_unevictable_pgs_cleared + | Vmstat_unevictable_pgs_stranded + | Vmstat_nr_zspages + | Vmstat_nr_ion_heap + | Vmstat_nr_gpu_heap + | Vmstat_allocstall_dma + | Vmstat_allocstall_movable + | Vmstat_allocstall_normal + | Vmstat_compact_daemon_free_scanned + | Vmstat_compact_daemon_migrate_scanned + | Vmstat_nr_fastrpc + | Vmstat_nr_indirectly_reclaimable + | Vmstat_nr_ion_heap_pool + | Vmstat_nr_kernel_misc_reclaimable + | Vmstat_nr_shadow_call_stack_bytes + | Vmstat_nr_shmem_hugepages + | Vmstat_nr_shmem_pmdmapped + | Vmstat_nr_unreclaimable_pages + | Vmstat_nr_zone_active_anon + | Vmstat_nr_zone_active_file + | Vmstat_nr_zone_inactive_anon + | Vmstat_nr_zone_inactive_file + | Vmstat_nr_zone_unevictable + | Vmstat_nr_zone_write_pending + | Vmstat_oom_kill + | Vmstat_pglazyfree + | Vmstat_pglazyfreed + | Vmstat_pgrefill + | Vmstat_pgscan_direct + | Vmstat_pgscan_kswapd + | Vmstat_pgskip_dma + | Vmstat_pgskip_movable + | Vmstat_pgskip_normal + | Vmstat_pgsteal_direct + | Vmstat_pgsteal_kswapd + | Vmstat_swap_ra + | Vmstat_swap_ra_hit + | Vmstat_workingset_restore + | Vmstat_allocstall_device + | Vmstat_allocstall_dma32 + | Vmstat_balloon_deflate + | Vmstat_balloon_inflate + | Vmstat_balloon_migrate + | Vmstat_cma_alloc_fail + | Vmstat_cma_alloc_success + | Vmstat_nr_file_hugepages + | Vmstat_nr_file_pmdmapped + | Vmstat_nr_foll_pin_acquired + | Vmstat_nr_foll_pin_released + | Vmstat_nr_sec_page_table_pages + | Vmstat_nr_shadow_call_stack + | Vmstat_nr_swapcached + | Vmstat_nr_throttled_written + | Vmstat_pgalloc_device + | Vmstat_pgalloc_dma32 + | Vmstat_pgdemote_direct + | Vmstat_pgdemote_kswapd + | Vmstat_pgreuse + | Vmstat_pgscan_anon + | Vmstat_pgscan_file + | Vmstat_pgskip_device + | Vmstat_pgskip_dma32 + | Vmstat_pgsteal_anon + | Vmstat_pgsteal_file + | Vmstat_thp_collapse_alloc + | Vmstat_thp_collapse_alloc_failed + | Vmstat_thp_deferred_split_page + | Vmstat_thp_fault_alloc + | Vmstat_thp_fault_fallback + | Vmstat_thp_fault_fallback_charge + | Vmstat_thp_file_alloc + | Vmstat_thp_file_fallback + | Vmstat_thp_file_fallback_charge + | Vmstat_thp_file_mapped + | Vmstat_thp_migration_fail + | Vmstat_thp_migration_split + | Vmstat_thp_migration_success + | Vmstat_thp_scan_exceed_none_pte + | Vmstat_thp_scan_exceed_share_pte + | Vmstat_thp_scan_exceed_swap_pte + | Vmstat_thp_split_page + | Vmstat_thp_split_page_failed + | Vmstat_thp_split_pmd + | Vmstat_thp_swpout + | Vmstat_thp_swpout_fallback + | Vmstat_thp_zero_page_alloc + | Vmstat_thp_zero_page_alloc_failed + | Vmstat_vma_lock_abort + | Vmstat_vma_lock_miss + | Vmstat_vma_lock_retry + | Vmstat_vma_lock_success + | Vmstat_workingset_activate_anon + | Vmstat_workingset_activate_file + | Vmstat_workingset_nodes + | Vmstat_workingset_refault_anon + | Vmstat_workingset_refault_file + | Vmstat_workingset_restore_anon + | Vmstat_workingset_restore_file + +type sys_stats_config_stat_counters = + | Stat_unspecified + | Stat_cpu_times + | Stat_irq_counts + | Stat_softirq_counts + | Stat_fork_count + +type sys_stats_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable meminfo_period_ms : int32; + mutable meminfo_counters : meminfo_counters list; + mutable vmstat_period_ms : int32; + mutable vmstat_counters : vmstat_counters list; + mutable stat_period_ms : int32; + mutable stat_counters : sys_stats_config_stat_counters list; + mutable devfreq_period_ms : int32; + mutable cpufreq_period_ms : int32; + mutable buddyinfo_period_ms : int32; + mutable diskstat_period_ms : int32; + mutable psi_period_ms : int32; + mutable thermal_period_ms : int32; + mutable cpuidle_period_ms : int32; + mutable gpufreq_period_ms : int32; +} + +type system_info_config = unit + +type test_config_dummy_fields = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 14 fields *) + mutable field_uint32 : int32; + mutable field_int32 : int32; + mutable field_uint64 : int64; + mutable field_int64 : int64; + mutable field_fixed64 : int64; + mutable field_sfixed64 : int64; + mutable field_fixed32 : int32; + mutable field_sfixed32 : int32; + mutable field_double : float; + mutable field_float : float; + mutable field_sint64 : int64; + mutable field_sint32 : int32; + mutable field_string : string; + mutable field_bytes : bytes; +} + +type test_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable message_count : int32; + mutable max_messages_per_second : int32; + mutable seed : int32; + mutable message_size : int32; + mutable send_batch_on_register : bool; + mutable dummy_fields : test_config_dummy_fields option; +} + +type track_event_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable disabled_categories : string list; + mutable enabled_categories : string list; + mutable disabled_tags : string list; + mutable enabled_tags : string list; + mutable disable_incremental_timestamps : bool; + mutable timestamp_unit_multiplier : int64; + mutable filter_debug_annotations : bool; + mutable enable_thread_time_sampling : bool; + mutable thread_time_subsampling_ns : int64; + mutable filter_dynamic_event_names : bool; +} + +type data_source_config_session_initiator = + | Session_initiator_unspecified + | Session_initiator_trusted_system + +type data_source_config_buffer_exhausted_policy = + | Buffer_exhausted_unspecified + | Buffer_exhausted_drop + | Buffer_exhausted_stall_then_abort + | Buffer_exhausted_stall_then_drop + +type data_source_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable name : string; + mutable target_buffer : int32; + mutable trace_duration_ms : int32; + mutable prefer_suspend_clock_for_duration : bool; + mutable stop_timeout_ms : int32; + mutable enable_extra_guardrails : bool; + mutable session_initiator : data_source_config_session_initiator; + mutable tracing_session_id : int64; + mutable buffer_exhausted_policy : data_source_config_buffer_exhausted_policy; + mutable priority_boost : priority_boost_config option; + mutable ftrace_config : ftrace_config option; + mutable inode_file_config : inode_file_config option; + mutable process_stats_config : process_stats_config option; + mutable sys_stats_config : sys_stats_config option; + mutable heapprofd_config : heapprofd_config option; + mutable android_power_config : android_power_config option; + mutable android_log_config : android_log_config option; + mutable gpu_counter_config : gpu_counter_config option; + mutable android_game_intervention_list_config : android_game_intervention_list_config option; + mutable packages_list_config : packages_list_config option; + mutable vulkan_memory_config : vulkan_memory_config option; + mutable track_event_config : track_event_config option; + mutable android_polled_state_config : android_polled_state_config option; + mutable android_system_property_config : android_system_property_config option; + mutable statsd_tracing_config : statsd_tracing_config option; + mutable system_info_config : unit; + mutable frozen_ftrace_config : frozen_ftrace_config option; + mutable chrome_config : chrome_config option; + mutable v8_config : v8_config option; + mutable interceptor_config : interceptor_config option; + mutable network_packet_trace_config : network_packet_trace_config option; + mutable surfaceflinger_layers_config : surface_flinger_layers_config option; + mutable surfaceflinger_transactions_config : surface_flinger_transactions_config option; + mutable android_sdk_sysprop_guard_config : android_sdk_sysprop_guard_config option; + mutable etw_config : etw_config option; + mutable protolog_config : proto_log_config option; + mutable android_input_event_config : android_input_event_config option; + mutable pixel_modem_config : pixel_modem_config option; + mutable windowmanager_config : window_manager_config option; + mutable chromium_system_metrics : chromium_system_metrics_config option; + mutable kernel_wakelocks_config : kernel_wakelocks_config option; + mutable gpu_renderstages_config : gpu_render_stages_config option; + mutable chromium_histogram_samples : chromium_histogram_samples_config option; + mutable app_wakelocks_config : app_wakelocks_config option; + mutable cpu_per_uid_config : cpu_per_uid_config option; + mutable legacy_config : string; + mutable for_testing : test_config option; +} + +type trace_config_buffer_config_fill_policy = + | Unspecified + | Ring_buffer + | Discard + +type trace_config_buffer_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable size_kb : int32; + mutable fill_policy : trace_config_buffer_config_fill_policy; + mutable transfer_on_clone : bool; + mutable clear_before_clone : bool; +} + +type trace_config_data_source = private { + mutable config : data_source_config option; + mutable producer_name_filter : string list; + mutable producer_name_regex_filter : string list; + mutable machine_name_filter : string list; +} + +type trace_config_builtin_data_source = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable disable_clock_snapshotting : bool; + mutable disable_trace_config : bool; + mutable disable_system_info : bool; + mutable disable_service_events : bool; + mutable primary_trace_clock : builtin_clock; + mutable snapshot_interval_ms : int32; + mutable prefer_suspend_clock_for_snapshot : bool; + mutable disable_chunk_usage_histograms : bool; +} + +type trace_config_lockdown_mode_operation = + | Lockdown_unchanged + | Lockdown_clear + | Lockdown_set + +type trace_config_producer_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable producer_name : string; + mutable shm_size_kb : int32; + mutable page_size_kb : int32; +} + +type trace_config_statsd_metadata = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable triggering_alert_id : int64; + mutable triggering_config_uid : int32; + mutable triggering_config_id : int64; + mutable triggering_subscription_id : int64; +} + +type trace_config_guardrail_overrides = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable max_upload_per_day_bytes : int64; + mutable max_tracing_buffer_size_kb : int32; +} + +type trace_config_trigger_config_trigger_mode = + | Unspecified + | Start_tracing + | Stop_tracing + | Clone_snapshot + +type trace_config_trigger_config_trigger = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable name : string; + mutable producer_name_regex : string; + mutable stop_delay_ms : int32; + mutable max_per_24_h : int32; + mutable skip_probability : float; +} + +type trace_config_trigger_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable trigger_mode : trace_config_trigger_config_trigger_mode; + mutable use_clone_snapshot_if_available : bool; + mutable triggers : trace_config_trigger_config_trigger list; + mutable trigger_timeout_ms : int32; +} + +type trace_config_incremental_state_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable clear_period_ms : int32; +} + +type trace_config_compression_type = + | Compression_type_unspecified + | Compression_type_deflate + +type trace_config_incident_report_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable destination_package : string; + mutable destination_class : string; + mutable privacy_level : int32; + mutable skip_incidentd : bool; + mutable skip_dropbox : bool; +} + +type trace_config_statsd_logging = + | Statsd_logging_unspecified + | Statsd_logging_enabled + | Statsd_logging_disabled + +type trace_config_trace_filter_string_filter_policy = + | Sfp_unspecified + | Sfp_match_redact_groups + | Sfp_atrace_match_redact_groups + | Sfp_match_break + | Sfp_atrace_match_break + | Sfp_atrace_repeated_search_redact_groups + +type trace_config_trace_filter_string_filter_rule = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable policy : trace_config_trace_filter_string_filter_policy; + mutable regex_pattern : string; + mutable atrace_payload_starts_with : string; +} + +type trace_config_trace_filter_string_filter_chain = private { + mutable rules : trace_config_trace_filter_string_filter_rule list; +} + +type trace_config_trace_filter = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable bytecode : bytes; + mutable bytecode_v2 : bytes; + mutable string_filter_chain : trace_config_trace_filter_string_filter_chain option; +} + +type trace_config_android_report_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable reporter_service_package : string; + mutable reporter_service_class : string; + mutable skip_report : bool; + mutable use_pipe_in_framework_for_testing : bool; +} + +type trace_config_cmd_trace_start_delay = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable min_delay_ms : int32; + mutable max_delay_ms : int32; +} + +type trace_config_session_semaphore = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable max_other_session_count : int64; +} + +type trace_config = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 23 fields *) + mutable buffers : trace_config_buffer_config list; + mutable data_sources : trace_config_data_source list; + mutable builtin_data_sources : trace_config_builtin_data_source option; + mutable duration_ms : int32; + mutable prefer_suspend_clock_for_duration : bool; + mutable enable_extra_guardrails : bool; + mutable lockdown_mode : trace_config_lockdown_mode_operation; + mutable producers : trace_config_producer_config list; + mutable statsd_metadata : trace_config_statsd_metadata option; + mutable write_into_file : bool; + mutable output_path : string; + mutable file_write_period_ms : int32; + mutable max_file_size_bytes : int64; + mutable guardrail_overrides : trace_config_guardrail_overrides option; + mutable deferred_start : bool; + mutable flush_period_ms : int32; + mutable flush_timeout_ms : int32; + mutable data_source_stop_timeout_ms : int32; + mutable notify_traceur : bool; + mutable bugreport_score : int32; + mutable bugreport_filename : string; + mutable trigger_config : trace_config_trigger_config option; + mutable activate_triggers : string list; + mutable incremental_state_config : trace_config_incremental_state_config option; + mutable allow_user_build_tracing : bool; + mutable unique_session_name : string; + mutable compression_type : trace_config_compression_type; + mutable incident_report_config : trace_config_incident_report_config option; + mutable statsd_logging : trace_config_statsd_logging; + mutable trace_uuid_msb : int64; + mutable trace_uuid_lsb : int64; + mutable trace_filter : trace_config_trace_filter option; + mutable android_report_config : trace_config_android_report_config option; + mutable cmd_trace_start_delay : trace_config_cmd_trace_start_delay option; + mutable session_semaphores : trace_config_session_semaphore list; + mutable priority_boost : priority_boost_config option; + mutable exclusive_prio : int32; + mutable no_flush_before_write_into_file : bool; +} + +type utsname = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable sysname : string; + mutable version : string; + mutable release : string; + mutable machine : string; +} + +type system_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 14 fields *) + mutable utsname : utsname option; + mutable android_build_fingerprint : string; + mutable android_device_manufacturer : string; + mutable android_soc_model : string; + mutable android_guest_soc_model : string; + mutable android_hardware_revision : string; + mutable android_storage_model : string; + mutable android_ram_model : string; + mutable android_serial_console : string; + mutable tracing_service_version : string; + mutable android_sdk_version : int64; + mutable page_size : int32; + mutable num_cpus : int32; + mutable timezone_off_mins : int32; + mutable hz : int64; +} + +type trace_stats_buffer_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 19 fields *) + mutable buffer_size : int64; + mutable bytes_written : int64; + mutable bytes_overwritten : int64; + mutable bytes_read : int64; + mutable padding_bytes_written : int64; + mutable padding_bytes_cleared : int64; + mutable chunks_written : int64; + mutable chunks_rewritten : int64; + mutable chunks_overwritten : int64; + mutable chunks_discarded : int64; + mutable chunks_read : int64; + mutable chunks_committed_out_of_order : int64; + mutable write_wrap_count : int64; + mutable patches_succeeded : int64; + mutable patches_failed : int64; + mutable readaheads_succeeded : int64; + mutable readaheads_failed : int64; + mutable abi_violations : int64; + mutable trace_writer_packet_loss : int64; +} + +type trace_stats_writer_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable sequence_id : int64; + mutable buffer : int32; + mutable chunk_payload_histogram_counts : int64 list; + mutable chunk_payload_histogram_sum : int64 list; +} + +type trace_stats_filter_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable input_packets : int64; + mutable input_bytes : int64; + mutable output_bytes : int64; + mutable errors : int64; + mutable time_taken_ns : int64; + mutable bytes_discarded_per_buffer : int64 list; +} + +type trace_stats_final_flush_outcome = + | Final_flush_unspecified + | Final_flush_succeeded + | Final_flush_failed + +type trace_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable buffer_stats : trace_stats_buffer_stats list; + mutable chunk_payload_histogram_def : int64 list; + mutable writer_stats : trace_stats_writer_stats list; + mutable producers_connected : int32; + mutable producers_seen : int64; + mutable data_sources_registered : int32; + mutable data_sources_seen : int64; + mutable tracing_sessions : int32; + mutable total_buffers : int32; + mutable chunks_discarded : int64; + mutable patches_discarded : int64; + mutable invalid_packets : int64; + mutable filter_stats : trace_stats_filter_stats option; + mutable flushes_requested : int64; + mutable flushes_succeeded : int64; + mutable flushes_failed : int64; + mutable final_flush_outcome : trace_stats_final_flush_outcome; +} + +type android_game_intervention_list_game_mode_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable mode : int32; + mutable use_angle : bool; + mutable resolution_downscale : float; + mutable fps : float; +} + +type android_game_intervention_list_game_package_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable name : string; + mutable uid : int64; + mutable current_mode : int32; + mutable game_mode_info : android_game_intervention_list_game_mode_info list; +} + +type android_game_intervention_list = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable game_packages : android_game_intervention_list_game_package_info list; + mutable parse_error : bool; + mutable read_error : bool; +} + +type android_log_packet_log_event_arg_value = + | Int_value of int64 + | Float_value of float + | String_value of string + +and android_log_packet_log_event_arg = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable value : android_log_packet_log_event_arg_value option; +} + +type android_log_packet_log_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable log_id : android_log_id; + mutable pid : int32; + mutable tid : int32; + mutable uid : int32; + mutable timestamp : int64; + mutable tag : string; + mutable prio : android_log_priority; + mutable message : string; + mutable args : android_log_packet_log_event_arg list; +} + +type android_log_packet_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable num_total : int64; + mutable num_failed : int64; + mutable num_skipped : int64; +} + +type android_log_packet = private { + mutable events : android_log_packet_log_event list; + mutable stats : android_log_packet_stats option; +} + +type android_system_property_property_value = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable value : string; +} + +type android_system_property = private { + mutable values : android_system_property_property_value list; +} + +type app_wakelock_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable iid : int32; + mutable tag : string; + mutable flags : int32; + mutable owner_pid : int32; + mutable owner_uid : int32; + mutable work_uid : int32; +} + +type app_wakelock_bundle = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable intern_id : int32 list; + mutable encoded_ts : int64 list; + mutable info : app_wakelock_info option; + mutable acquired : bool; +} + +type bluetooth_trace_packet_type = + | Hci_cmd + | Hci_evt + | Hci_acl_rx + | Hci_acl_tx + | Hci_sco_rx + | Hci_sco_tx + | Hci_iso_rx + | Hci_iso_tx + +type bluetooth_trace_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable packet_type : bluetooth_trace_packet_type; + mutable count : int32; + mutable length : int32; + mutable duration : int32; + mutable op_code : int32; + mutable event_code : int32; + mutable subevent_code : int32; + mutable connection_handle : int32; +} + +type android_camera_frame_event_capture_result_status = + | Status_unspecified + | Status_ok + | Status_early_metadata_error + | Status_final_metadata_error + | Status_buffer_error + | Status_flush_error + +type android_camera_frame_event_camera_node_processing_details = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable node_id : int64; + mutable start_processing_ns : int64; + mutable end_processing_ns : int64; + mutable scheduling_latency_ns : int64; +} + +type android_camera_frame_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 15 fields *) + mutable session_id : int64; + mutable camera_id : int32; + mutable frame_number : int64; + mutable request_id : int64; + mutable request_received_ns : int64; + mutable request_processing_started_ns : int64; + mutable start_of_exposure_ns : int64; + mutable start_of_frame_ns : int64; + mutable responses_all_sent_ns : int64; + mutable capture_result_status : android_camera_frame_event_capture_result_status; + mutable skipped_sensor_frames : int32; + mutable capture_intent : int32; + mutable num_streams : int32; + mutable node_processing_details : android_camera_frame_event_camera_node_processing_details list; + mutable vendor_data_version : int32; + mutable vendor_data : bytes; +} + +type android_camera_session_stats_camera_graph_camera_node = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable node_id : int64; + mutable input_ids : int64 list; + mutable output_ids : int64 list; + mutable vendor_data_version : int32; + mutable vendor_data : bytes; +} + +type android_camera_session_stats_camera_graph_camera_edge = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable output_node_id : int64; + mutable output_id : int64; + mutable input_node_id : int64; + mutable input_id : int64; + mutable vendor_data_version : int32; + mutable vendor_data : bytes; +} + +type android_camera_session_stats_camera_graph = private { + mutable nodes : android_camera_session_stats_camera_graph_camera_node list; + mutable edges : android_camera_session_stats_camera_graph_camera_edge list; +} + +type android_camera_session_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable session_id : int64; + mutable graph : android_camera_session_stats_camera_graph option; +} + +type cpu_per_uid_data = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable cluster_count : int32; + mutable uid : int32 list; + mutable total_time_ms : int64 list; +} + +type frame_timeline_event_jank_type = + | Jank_unspecified + | Jank_none + | Jank_sf_scheduling + | Jank_prediction_error + | Jank_display_hal + | Jank_sf_cpu_deadline_missed + | Jank_sf_gpu_deadline_missed + | Jank_app_deadline_missed + | Jank_buffer_stuffing + | Jank_unknown + | Jank_sf_stuffing + | Jank_dropped + | Jank_non_animating + | Jank_app_resynced_jitter + | Jank_display_not_on + +type frame_timeline_event_jank_severity_type = + | Severity_unknown + | Severity_none + | Severity_partial + | Severity_full + +type frame_timeline_event_present_type = + | Present_unspecified + | Present_on_time + | Present_late + | Present_early + | Present_dropped + | Present_unknown + +type frame_timeline_event_prediction_type = + | Prediction_unspecified + | Prediction_valid + | Prediction_expired + | Prediction_unknown + +type frame_timeline_event_expected_surface_frame_start = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable cookie : int64; + mutable token : int64; + mutable display_frame_token : int64; + mutable pid : int32; + mutable layer_name : string; +} + +type frame_timeline_event_actual_surface_frame_start = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 17 fields *) + mutable cookie : int64; + mutable token : int64; + mutable display_frame_token : int64; + mutable pid : int32; + mutable layer_name : string; + mutable present_type : frame_timeline_event_present_type; + mutable on_time_finish : bool; + mutable gpu_composition : bool; + mutable jank_type : int32; + mutable prediction_type : frame_timeline_event_prediction_type; + mutable is_buffer : bool; + mutable jank_severity_type : frame_timeline_event_jank_severity_type; + mutable present_delay_millis : float; + mutable vsync_resynced_jitter_millis : float; + mutable jank_severity_score : float; + mutable jank_type_experimental : int32; + mutable present_type_experimental : frame_timeline_event_present_type; +} + +type frame_timeline_event_expected_display_frame_start = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable cookie : int64; + mutable token : int64; + mutable pid : int32; +} + +type frame_timeline_event_actual_display_frame_start = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable cookie : int64; + mutable token : int64; + mutable pid : int32; + mutable present_type : frame_timeline_event_present_type; + mutable on_time_finish : bool; + mutable gpu_composition : bool; + mutable jank_type : int32; + mutable prediction_type : frame_timeline_event_prediction_type; + mutable jank_severity_type : frame_timeline_event_jank_severity_type; + mutable present_delay_millis : float; + mutable jank_severity_score : float; + mutable jank_type_experimental : int32; + mutable present_type_experimental : frame_timeline_event_present_type; +} + +type frame_timeline_event_frame_end = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable cookie : int64; +} + +type frame_timeline_event = + | Expected_display_frame_start of frame_timeline_event_expected_display_frame_start + | Actual_display_frame_start of frame_timeline_event_actual_display_frame_start + | Expected_surface_frame_start of frame_timeline_event_expected_surface_frame_start + | Actual_surface_frame_start of frame_timeline_event_actual_surface_frame_start + | Frame_end of frame_timeline_event_frame_end + +type gpu_mem_total_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable gpu_id : int32; + mutable pid : int32; + mutable size : int64; +} + +type graphics_frame_event_buffer_event_type = + | Unspecified + | Dequeue + | Queue + | Post + | Acquire_fence + | Latch + | Hwc_composition_queued + | Fallback_composition + | Present_fence + | Release_fence + | Modify + | Detach + | Attach + | Cancel + +type graphics_frame_event_buffer_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable frame_number : int32; + mutable type_ : graphics_frame_event_buffer_event_type; + mutable layer_name : string; + mutable duration_ns : int64; + mutable buffer_id : int32; +} + +type graphics_frame_event = private { + mutable buffer_event : graphics_frame_event_buffer_event option; +} + +type initial_display_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable display_state : int32; + mutable brightness : float; +} + +type kernel_wakelock_data_wakelock_type = + | Wakelock_type_unknown + | Wakelock_type_kernel + | Wakelock_type_native + +type kernel_wakelock_data_wakelock = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable wakelock_id : int32; + mutable wakelock_name : string; + mutable wakelock_type : kernel_wakelock_data_wakelock_type; +} + +type kernel_wakelock_data = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable wakelock : kernel_wakelock_data_wakelock list; + mutable wakelock_id : int32 list; + mutable time_held_millis : int64 list; + mutable error_flags : int64; +} + +type traffic_direction = + | Dir_unspecified + | Dir_ingress + | Dir_egress + +type network_packet_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable direction : traffic_direction; + mutable network_interface : string; + mutable length : int32; + mutable uid : int32; + mutable tag : int32; + mutable ip_proto : int32; + mutable tcp_flags : int32; + mutable local_port : int32; + mutable remote_port : int32; + mutable icmp_type : int32; + mutable icmp_code : int32; +} + +type network_packet_bundle_packet_context = + | Iid of int64 + | Ctx of network_packet_event + +and network_packet_bundle = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable packet_context : network_packet_bundle_packet_context option; + mutable packet_timestamps : int64 list; + mutable packet_lengths : int32 list; + mutable total_packets : int32; + mutable total_duration : int64; + mutable total_length : int64; +} + +type network_packet_context = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable iid : int64; + mutable ctx : network_packet_event option; +} + +type packages_list_package_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable name : string; + mutable uid : int64; + mutable debuggable : bool; + mutable profileable_from_shell : bool; + mutable version_code : int64; +} + +type packages_list = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable packages : packages_list_package_info list; + mutable parse_error : bool; + mutable read_error : bool; +} + +type pixel_modem_events = private { + mutable events : bytes list; + mutable event_time_nanos : int64 list; +} + +type pixel_modem_token_database = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable database : bytes; +} + +type proto_log_message = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable message_id : int64; + mutable str_param_iids : int32 list; + mutable sint64_params : int64 list; + mutable double_params : float list; + mutable boolean_params : int32 list; + mutable stacktrace_iid : int32; +} + +type proto_log_viewer_config_message_data = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable message_id : int64; + mutable message : string; + mutable level : proto_log_level; + mutable group_id : int32; + mutable location : string; +} + +type proto_log_viewer_config_group = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable id : int32; + mutable name : string; + mutable tag : string; +} + +type proto_log_viewer_config = private { + mutable messages : proto_log_viewer_config_message_data list; + mutable groups : proto_log_viewer_config_group list; +} + +type shell_transition_target = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable mode : int32; + mutable layer_id : int32; + mutable window_id : int32; + mutable flags : int32; +} + +type shell_transition = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 16 fields *) + mutable id : int32; + mutable create_time_ns : int64; + mutable send_time_ns : int64; + mutable dispatch_time_ns : int64; + mutable merge_time_ns : int64; + mutable merge_request_time_ns : int64; + mutable shell_abort_time_ns : int64; + mutable wm_abort_time_ns : int64; + mutable finish_time_ns : int64; + mutable start_transaction_id : int64; + mutable finish_transaction_id : int64; + mutable handler : int32; + mutable type_ : int32; + mutable targets : shell_transition_target list; + mutable merge_target : int32; + mutable flags : int32; + mutable starting_window_remove_time_ns : int64; +} + +type shell_handler_mapping = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable id : int32; + mutable name : string; +} + +type shell_handler_mappings = private { + mutable mapping : shell_handler_mapping list; +} + +type rect_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable left : int32; + mutable top : int32; + mutable right : int32; + mutable bottom : int32; +} + +type region_proto = private { + mutable rect : rect_proto list; +} + +type size_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable w : int32; + mutable h : int32; +} + +type transform_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable dsdx : float; + mutable dtdx : float; + mutable dsdy : float; + mutable dtdy : float; + mutable type_ : int32; +} + +type color_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable r : float; + mutable g : float; + mutable b : float; + mutable a : float; +} + +type input_window_info_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable layout_params_flags : int32; + mutable layout_params_type : int32; + mutable frame : rect_proto option; + mutable touchable_region : region_proto option; + mutable surface_inset : int32; + mutable visible : bool; + mutable can_receive_keys : bool; + mutable focusable : bool; + mutable has_wallpaper : bool; + mutable global_scale_factor : float; + mutable window_x_scale : float; + mutable window_y_scale : float; + mutable crop_layer_id : int32; + mutable replace_touchable_region_with_crop : bool; + mutable touchable_region_crop : rect_proto option; + mutable transform : transform_proto option; + mutable input_config : int32; +} + +type blur_region = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 18 fields *) + mutable blur_radius : int32; + mutable corner_radius_tl : int32; + mutable corner_radius_tr : int32; + mutable corner_radius_bl : int32; + mutable corner_radius_br : float; + mutable corner_radius_tlx : float; + mutable corner_radius_tly : float; + mutable corner_radius_trx : float; + mutable corner_radius_try : float; + mutable corner_radius_blx : float; + mutable corner_radius_bly : float; + mutable corner_radius_brx : float; + mutable corner_radius_bry : float; + mutable alpha : float; + mutable left : int32; + mutable top : int32; + mutable right : int32; + mutable bottom : int32; +} + +type color_transform_proto = private { + mutable val_ : float list; +} + +type trusted_overlay = + | Unset + | Disabled + | Enabled + +type box_shadow_settings_box_shadow_params = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable blur_radius : float; + mutable spread_radius : float; + mutable color : int32; + mutable offset_x : float; + mutable offset_y : float; +} + +type box_shadow_settings = private { + mutable box_shadows : box_shadow_settings_box_shadow_params list; +} + +type border_settings = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable stroke_width : float; + mutable color : int32; +} + +type layers_trace_file_proto_magic_number = + | Invalid + | Magic_number_l + | Magic_number_h + +type position_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable x : float; + mutable y : float; +} + +type active_buffer_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable width : int32; + mutable height : int32; + mutable stride : int32; + mutable format : int32; + mutable usage : int64; +} + +type float_rect_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable left : float; + mutable top : float; + mutable right : float; + mutable bottom : float; +} + +type hwc_composition_type = + | Hwc_type_unspecified + | Hwc_type_client + | Hwc_type_device + | Hwc_type_solid_color + | Hwc_type_cursor + | Hwc_type_sideband + | Hwc_type_display_decoration + +type barrier_layer_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable id : int32; + mutable frame_number : int64; +} + +type corner_radii_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable tl : float; + mutable tr : float; + mutable bl : float; + mutable br : float; +} + +type layer_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 32 fields *) + mutable id : int32; + mutable name : string; + mutable children : int32 list; + mutable relatives : int32 list; + mutable type_ : string; + mutable transparent_region : region_proto option; + mutable visible_region : region_proto option; + mutable damage_region : region_proto option; + mutable layer_stack : int32; + mutable z : int32; + mutable position : position_proto option; + mutable requested_position : position_proto option; + mutable size : size_proto option; + mutable crop : rect_proto option; + mutable final_crop : rect_proto option; + mutable is_opaque : bool; + mutable invalidate : bool; + mutable dataspace : string; + mutable pixel_format : string; + mutable color : color_proto option; + mutable requested_color : color_proto option; + mutable flags : int32; + mutable transform : transform_proto option; + mutable requested_transform : transform_proto option; + mutable parent : int32; + mutable z_order_relative_of : int32; + mutable active_buffer : active_buffer_proto option; + mutable queued_frames : int32; + mutable refresh_pending : bool; + mutable hwc_frame : rect_proto option; + mutable hwc_crop : float_rect_proto option; + mutable hwc_transform : int32; + mutable window_type : int32; + mutable app_id : int32; + mutable hwc_composition_type : hwc_composition_type; + mutable is_protected : bool; + mutable curr_frame : int64; + mutable barrier_layer : barrier_layer_proto list; + mutable buffer_transform : transform_proto option; + mutable effective_scaling_mode : int32; + mutable corner_radius : float; + mutable metadata : (int32 * string) list; + mutable effective_transform : transform_proto option; + mutable source_bounds : float_rect_proto option; + mutable bounds : float_rect_proto option; + mutable screen_bounds : float_rect_proto option; + mutable input_window_info : input_window_info_proto option; + mutable corner_radius_crop : float_rect_proto option; + mutable shadow_radius : float; + mutable color_transform : color_transform_proto option; + mutable is_relative_of : bool; + mutable background_blur_radius : int32; + mutable owner_uid : int32; + mutable blur_regions : blur_region list; + mutable is_trusted_overlay : bool; + mutable requested_corner_radius : float; + mutable destination_frame : rect_proto option; + mutable original_id : int32; + mutable trusted_overlay : trusted_overlay; + mutable background_blur_scale : float; + mutable corner_radii : corner_radii_proto option; + mutable requested_corner_radii : corner_radii_proto option; + mutable client_drawn_corner_radii : corner_radii_proto option; + mutable system_content_priority : int32; + mutable box_shadow_settings : box_shadow_settings option; + mutable border_settings : border_settings option; + mutable effective_radii : corner_radii_proto option; +} + +type layers_proto = private { + mutable layers : layer_proto list; +} + +type display_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable id : int64; + mutable name : string; + mutable layer_stack : int32; + mutable size : size_proto option; + mutable layer_stack_space_rect : rect_proto option; + mutable transform : transform_proto option; + mutable is_virtual : bool; + mutable dpi_x : float; + mutable dpi_y : float; +} + +type layers_snapshot_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable elapsed_realtime_nanos : int64; + mutable where : string; + mutable layers : layers_proto option; + mutable hwc_blob : string; + mutable excludes_composition_state : bool; + mutable missed_entries : int32; + mutable displays : display_proto list; + mutable vsync_id : int64; +} + +type layers_trace_file_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable magic_number : int64; + mutable entry : layers_snapshot_proto list; + mutable real_to_elapsed_time_offset_nanos : int64; +} + +type transaction_trace_file_magic_number = + | Invalid + | Magic_number_l + | Magic_number_h + +type layer_state_matrix22 = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable dsdx : float; + mutable dtdx : float; + mutable dtdy : float; + mutable dsdy : float; +} + +type layer_state_color3 = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable r : float; + mutable g : float; + mutable b : float; +} + +type layer_state_buffer_data_pixel_format = + | Pixel_format_unknown + | Pixel_format_custom + | Pixel_format_translucent + | Pixel_format_transparent + | Pixel_format_opaque + | Pixel_format_rgba_8888 + | Pixel_format_rgbx_8888 + | Pixel_format_rgb_888 + | Pixel_format_rgb_565 + | Pixel_format_bgra_8888 + | Pixel_format_rgba_5551 + | Pixel_format_rgba_4444 + | Pixel_format_rgba_fp16 + | Pixel_format_rgba_1010102 + | Pixel_format_r_8 + +type layer_state_buffer_data = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable buffer_id : int64; + mutable width : int32; + mutable height : int32; + mutable frame_number : int64; + mutable flags : int32; + mutable cached_buffer_id : int64; + mutable pixel_format : layer_state_buffer_data_pixel_format; + mutable usage : int64; +} + +type transform = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable dsdx : float; + mutable dtdx : float; + mutable dtdy : float; + mutable dsdy : float; + mutable tx : float; + mutable ty : float; +} + +type layer_state_window_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable layout_params_flags : int32; + mutable layout_params_type : int32; + mutable touchable_region : region_proto option; + mutable surface_inset : int32; + mutable focusable : bool; + mutable has_wallpaper : bool; + mutable global_scale_factor : float; + mutable crop_layer_id : int32; + mutable replace_touchable_region_with_crop : bool; + mutable touchable_region_crop : rect_proto option; + mutable transform : transform option; + mutable input_config : int32; +} + +type layer_state_drop_input_mode = + | None + | All + | Obscured + +type layer_state_corner_radii = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable tl : float; + mutable tr : float; + mutable bl : float; + mutable br : float; +} + +type layer_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 35 fields *) + mutable layer_id : int32; + mutable what : int64; + mutable x : float; + mutable y : float; + mutable z : int32; + mutable w : int32; + mutable h : int32; + mutable layer_stack : int32; + mutable flags : int32; + mutable mask : int32; + mutable matrix : layer_state_matrix22 option; + mutable corner_radius : float; + mutable background_blur_radius : int32; + mutable parent_id : int32; + mutable relative_parent_id : int32; + mutable alpha : float; + mutable color : layer_state_color3 option; + mutable transparent_region : region_proto option; + mutable transform : int32; + mutable transform_to_display_inverse : bool; + mutable crop : rect_proto option; + mutable buffer_data : layer_state_buffer_data option; + mutable api : int32; + mutable has_sideband_stream : bool; + mutable color_transform : color_transform_proto option; + mutable blur_regions : blur_region list; + mutable window_info_handle : layer_state_window_info option; + mutable bg_color_alpha : float; + mutable bg_color_dataspace : int32; + mutable color_space_agnostic : bool; + mutable shadow_radius : float; + mutable frame_rate_selection_priority : int32; + mutable frame_rate : float; + mutable frame_rate_compatibility : int32; + mutable change_frame_rate_strategy : int32; + mutable fixed_transform_hint : int32; + mutable frame_number : int64; + mutable auto_refresh : bool; + mutable is_trusted_overlay : bool; + mutable buffer_crop : rect_proto option; + mutable destination_frame : rect_proto option; + mutable drop_input_mode : layer_state_drop_input_mode; + mutable trusted_overlay : trusted_overlay; + mutable background_blur_scale : float; + mutable corner_radii : layer_state_corner_radii option; + mutable client_drawn_corner_radii : layer_state_corner_radii option; + mutable system_content_priority : int32; + mutable box_shadow_settings : box_shadow_settings option; + mutable border_settings : border_settings option; +} + +type display_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable id : int32; + mutable what : int32; + mutable flags : int32; + mutable layer_stack : int32; + mutable orientation : int32; + mutable layer_stack_space_rect : rect_proto option; + mutable oriented_display_space_rect : rect_proto option; + mutable width : int32; + mutable height : int32; +} + +type transaction_barrier = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable barrier_token : string; + mutable kind : int32; +} + +type transaction_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable pid : int32; + mutable uid : int32; + mutable vsync_id : int64; + mutable input_event_id : int32; + mutable post_time : int64; + mutable transaction_id : int64; + mutable layer_changes : layer_state list; + mutable display_changes : display_state list; + mutable merged_transaction_ids : int64 list; + mutable apply_token : int64; + mutable transaction_barriers : transaction_barrier list; +} + +type layer_creation_args = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable layer_id : int32; + mutable name : string; + mutable flags : int32; + mutable parent_id : int32; + mutable mirror_from_id : int32; + mutable add_to_root : bool; + mutable layer_stack_to_mirror : int32; +} + +type display_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 10 fields *) + mutable layer_stack : int32; + mutable display_id : int32; + mutable logical_width : int32; + mutable logical_height : int32; + mutable transform_inverse : transform option; + mutable transform : transform option; + mutable receives_input : bool; + mutable is_secure : bool; + mutable is_primary : bool; + mutable is_virtual : bool; + mutable rotation_flags : int32; + mutable transform_hint : int32; +} + +type transaction_trace_entry = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable elapsed_realtime_nanos : int64; + mutable vsync_id : int64; + mutable transactions : transaction_state list; + mutable added_layers : layer_creation_args list; + mutable destroyed_layers : int32 list; + mutable added_displays : display_state list; + mutable removed_displays : int32 list; + mutable destroyed_layer_handles : int32 list; + mutable displays_changed : bool; + mutable displays : display_info list; +} + +type transaction_trace_file = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable magic_number : int64; + mutable entry : transaction_trace_entry list; + mutable real_to_elapsed_time_offset_nanos : int64; + mutable version : int32; +} + +type layer_state_changes_lsb = + | E_changes_lsb_none + | E_position_changed + | E_layer_changed + | E_alpha_changed + | E_matrix_changed + | E_transparent_region_changed + | E_flags_changed + | E_layer_stack_changed + | E_release_buffer_listener_changed + | E_shadow_radius_changed + | E_buffer_crop_changed + | E_relative_layer_changed + | E_reparent + | E_color_changed + | E_buffer_transform_changed + | E_transform_to_display_inverse_changed + | E_crop_changed + | E_buffer_changed + | E_acquire_fence_changed + | E_dataspace_changed + | E_hdr_metadata_changed + | E_surface_damage_region_changed + | E_api_changed + | E_sideband_stream_changed + | E_color_transform_changed + | E_has_listener_callbacks_changed + | E_input_info_changed + | E_corner_radius_changed + +type layer_state_changes_msb = + | E_changes_msb_none + | E_destination_frame_changed + | E_cached_buffer_changed + | E_background_color_changed + | E_metadata_changed + | E_color_space_agnostic_changed + | E_frame_rate_selection_priority + | E_frame_rate_changed + | E_background_blur_radius_changed + | E_producer_disconnect + | E_fixed_transform_hint_changed + | E_frame_number_changed + | E_blur_regions_changed + | E_auto_refresh_changed + | E_stretch_changed + | E_trusted_overlay_changed + | E_drop_input_mode_changed + | E_client_drawn_corner_radius_changed + | E_system_content_priority_changed + | E_box_shadow_settings_changed + | E_border_settings_changed + +type layer_state_flags = + | E_flags_none + | E_layer_hidden + | E_layer_opaque + | E_layer_skip_screenshot + | E_layer_secure + | E_enable_backpressure + | E_layer_is_display_decoration + +type layer_state_buffer_data_buffer_data_change = + | Buffer_data_change_none + | Fence_changed + | Frame_number_changed + | Cached_buffer_changed + +type display_state_changes = + | E_changes_none + | E_surface_changed + | E_layer_stack_changed + | E_display_projection_changed + | E_display_size_changed + | E_flags_changed + +type winscope_extensions = unit + +type chrome_benchmark_metadata = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable benchmark_start_time_us : int64; + mutable story_run_time_us : int64; + mutable benchmark_name : string; + mutable benchmark_description : string; + mutable label : string; + mutable story_name : string; + mutable story_tags : string list; + mutable story_run_index : int32; + mutable had_failures : bool; +} + +type chrome_metadata_packet_finch_hash = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : int32; + mutable group : int32; +} + +type background_tracing_metadata_trigger_rule_trigger_type = + | Trigger_unspecified + | Monitor_and_dump_when_specific_histogram_and_value + | Monitor_and_dump_when_trigger_named + +type background_tracing_metadata_trigger_rule_histogram_rule = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable histogram_name_hash : int64; + mutable histogram_min_trigger : int64; + mutable histogram_max_trigger : int64; +} + +type background_tracing_metadata_trigger_rule_named_rule_event_type = + | Unspecified + | Session_restore + | Navigation + | Startup + | Reached_code + | Content_trigger + | Test_rule + +type background_tracing_metadata_trigger_rule_named_rule = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable event_type : background_tracing_metadata_trigger_rule_named_rule_event_type; + mutable content_trigger_name_hash : int64; +} + +type background_tracing_metadata_trigger_rule = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable trigger_type : background_tracing_metadata_trigger_rule_trigger_type; + mutable histogram_rule : background_tracing_metadata_trigger_rule_histogram_rule option; + mutable named_rule : background_tracing_metadata_trigger_rule_named_rule option; + mutable name_hash : int32; +} + +type background_tracing_metadata = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable triggered_rule : background_tracing_metadata_trigger_rule option; + mutable active_rules : background_tracing_metadata_trigger_rule list; + mutable scenario_name_hash : int32; +} + +type chrome_metadata_packet = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable background_tracing_metadata : background_tracing_metadata option; + mutable chrome_version_code : int32; + mutable enabled_categories : string; + mutable field_trial_hashes : chrome_metadata_packet_finch_hash list; +} + +type chrome_traced_value_nested_type = + | Dict + | Array + +type chrome_traced_value = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable nested_type : chrome_traced_value_nested_type; + mutable dict_keys : string list; + mutable dict_values : chrome_traced_value list; + mutable array_values : chrome_traced_value list; + mutable int_value : int32; + mutable double_value : float; + mutable bool_value : bool; + mutable string_value : string; +} + +type chrome_string_table_entry = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable value : string; + mutable index : int32; +} + +type chrome_trace_event_arg_value = + | Bool_value of bool + | Uint_value of int64 + | Int_value of int64 + | Double_value of float + | String_value of string + | Pointer_value of int64 + | Json_value of string + | Traced_value of chrome_traced_value + +and chrome_trace_event_arg = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable value : chrome_trace_event_arg_value option; + mutable name_index : int32; +} + +type chrome_trace_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 15 fields *) + mutable name : string; + mutable timestamp : int64; + mutable phase : int32; + mutable thread_id : int32; + mutable duration : int64; + mutable thread_duration : int64; + mutable scope : string; + mutable id : int64; + mutable flags : int32; + mutable category_group_name : string; + mutable process_id : int32; + mutable thread_timestamp : int64; + mutable bind_id : int64; + mutable args : chrome_trace_event_arg list; + mutable name_index : int32; + mutable category_group_name_index : int32; +} + +type chrome_metadata_value = + | String_value of string + | Bool_value of bool + | Int_value of int64 + | Json_value of string + +and chrome_metadata = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable value : chrome_metadata_value option; +} + +type chrome_legacy_json_trace_trace_type = + | User_trace + | System_trace + +type chrome_legacy_json_trace = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable type_ : chrome_legacy_json_trace_trace_type; + mutable data : string; +} + +type chrome_event_bundle = private { + mutable trace_events : chrome_trace_event list; + mutable metadata : chrome_metadata list; + mutable legacy_ftrace_output : string list; + mutable legacy_json_trace : chrome_legacy_json_trace list; + mutable string_table : chrome_string_table_entry list; +} + +type chrome_trigger = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable trigger_name : string; + mutable trigger_name_hash : int32; + mutable flow_id : int64; +} + +type v8_string = + | Latin1 of bytes + | Utf16_le of bytes + | Utf16_be of bytes + +type interned_v8_string_encoded_string = + | Latin1 of bytes + | Utf16_le of bytes + | Utf16_be of bytes + +and interned_v8_string = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable iid : int64; + mutable encoded_string : interned_v8_string_encoded_string option; +} + +type interned_v8_js_script_type = + | Type_unknown + | Type_normal + | Type_eval + | Type_module + | Type_native + | Type_extension + | Type_inspector + +type interned_v8_js_script = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable iid : int64; + mutable script_id : int32; + mutable type_ : interned_v8_js_script_type; + mutable name : v8_string option; + mutable source : v8_string option; +} + +type interned_v8_wasm_script = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable iid : int64; + mutable script_id : int32; + mutable url : string; + mutable wire_bytes : bytes; +} + +type interned_v8_js_function_kind = + | Kind_unknown + | Kind_normal_function + | Kind_module + | Kind_async_module + | Kind_base_constructor + | Kind_default_base_constructor + | Kind_default_derived_constructor + | Kind_derived_constructor + | Kind_getter_function + | Kind_static_getter_function + | Kind_setter_function + | Kind_static_setter_function + | Kind_arrow_function + | Kind_async_arrow_function + | Kind_async_function + | Kind_async_concise_method + | Kind_static_async_concise_method + | Kind_async_concise_generator_method + | Kind_static_async_concise_generator_method + | Kind_async_generator_function + | Kind_generator_function + | Kind_concise_generator_method + | Kind_static_concise_generator_method + | Kind_concise_method + | Kind_static_concise_method + | Kind_class_members_initializer_function + | Kind_class_static_initializer_function + | Kind_invalid + +type interned_v8_js_function = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable iid : int64; + mutable v8_js_function_name_iid : int64; + mutable v8_js_script_iid : int64; + mutable is_toplevel : bool; + mutable kind : interned_v8_js_function_kind; + mutable byte_offset : int32; + mutable line : int32; + mutable column : int32; +} + +type interned_v8_isolate_code_range = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable base_address : int64; + mutable size : int64; + mutable embedded_blob_code_copy_start_address : int64; + mutable is_process_wide : bool; +} + +type interned_v8_isolate = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable iid : int64; + mutable pid : int32; + mutable isolate_id : int32; + mutable code_range : interned_v8_isolate_code_range option; + mutable embedded_blob_code_start_address : int64; + mutable embedded_blob_code_size : int64; +} + +type v8_js_code_tier = + | Tier_unknown + | Tier_ignition + | Tier_sparkplug + | Tier_maglev + | Tier_turboshaft + | Tier_turbofan + +type v8_js_code_instructions = + | Machine_code of bytes + | Bytecode of bytes + +and v8_js_code = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable v8_isolate_iid : int64; + mutable tid : int32; + mutable v8_js_function_iid : int64; + mutable tier : v8_js_code_tier; + mutable instruction_start : int64; + mutable instruction_size_bytes : int64; + mutable instructions : v8_js_code_instructions option; +} + +type v8_internal_code_type = + | Type_unknown + | Type_bytecode_handler + | Type_for_testing + | Type_builtin + | Type_wasm_function + | Type_wasm_to_capi_function + | Type_wasm_to_js_function + | Type_js_to_wasm_function + | Type_js_to_js_function + | Type_c_wasm_entry + +type v8_internal_code = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable v8_isolate_iid : int64; + mutable tid : int32; + mutable name : string; + mutable type_ : v8_internal_code_type; + mutable builtin_id : int32; + mutable instruction_start : int64; + mutable instruction_size_bytes : int64; + mutable machine_code : bytes; +} + +type v8_wasm_code_tier = + | Tier_unknown + | Tier_liftoff + | Tier_turbofan + +type v8_wasm_code = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable v8_isolate_iid : int64; + mutable tid : int32; + mutable v8_wasm_script_iid : int64; + mutable function_name : string; + mutable tier : v8_wasm_code_tier; + mutable code_offset_in_module : int32; + mutable instruction_start : int64; + mutable instruction_size_bytes : int64; + mutable machine_code : bytes; +} + +type v8_reg_exp_code = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable v8_isolate_iid : int64; + mutable tid : int32; + mutable pattern : v8_string option; + mutable instruction_start : int64; + mutable instruction_size_bytes : int64; + mutable machine_code : bytes; +} + +type v8_code_move_to_instructions = + | To_machine_code of bytes + | To_bytecode of bytes + +and v8_code_move = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable isolate_iid : int64; + mutable tid : int32; + mutable from_instruction_start_address : int64; + mutable to_instruction_start_address : int64; + mutable instruction_size_bytes : int64; + mutable to_instructions : v8_code_move_to_instructions option; +} + +type v8_code_defaults = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable tid : int32; +} + +type clock_snapshot_clock_builtin_clocks = + | Unknown + | Realtime + | Realtime_coarse + | Monotonic + | Monotonic_coarse + | Monotonic_raw + | Boottime + | Builtin_clock_max_id + +type clock_snapshot_clock = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable clock_id : int32; + mutable timestamp : int64; + mutable is_incremental : bool; + mutable unit_multiplier_ns : int64; +} + +type clock_snapshot = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable clocks : clock_snapshot_clock list; + mutable primary_trace_clock : builtin_clock; +} + +type cswitch_etw_event_old_thread_wait_reason = + | Executive + | Free_page + | Page_in + | Pool_allocation + | Delay_execution + | Suspend + | User_request + | Wr_executive + | Wr_free_page + | Wr_page_in + | Wr_pool_allocation + | Wr_delay_execution + | Wr_suspended + | Wr_user_request + | Wr_event_pair + | Wr_queue + | Wr_lpc_receiver + | Wr_lpc_reply + | Wr_virtual_memory + | Wr_page_out + | Wr_rendez_vous + | Wr_keyed_event + | Wr_terminated + | Wr_process_in_swap + | Wr_cpu_rate_control + | Wr_callout_stack + | Wr_kernel + | Wr_resource + | Wr_push_lock + | Wr_mutex + | Wr_quantum_end + | Wr_dispatch_int + | Wr_preempted + | Wr_yield_execution + | Wr_fast_mutex + | Wr_guard_mutex + | Wr_rundown + | Maximum_wait_reason + +type cswitch_etw_event_old_thread_wait_mode = + | Kernel_mode + | User_mode + +type cswitch_etw_event_old_thread_state = + | Initialized + | Ready + | Running + | Standby + | Terminated + | Waiting + | Transition + | Deferred_ready + +type cswitch_etw_event_old_thread_wait_reason_enum_or_int = + | Old_thread_wait_reason of cswitch_etw_event_old_thread_wait_reason + | Old_thread_wait_reason_int of int32 + +and cswitch_etw_event_old_thread_wait_mode_enum_or_int = + | Old_thread_wait_mode of cswitch_etw_event_old_thread_wait_mode + | Old_thread_wait_mode_int of int32 + +and cswitch_etw_event_old_thread_state_enum_or_int = + | Old_thread_state of cswitch_etw_event_old_thread_state + | Old_thread_state_int of int32 + +and cswitch_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable new_thread_id : int32; + mutable old_thread_id : int32; + mutable new_thread_priority : int32; + mutable old_thread_priority : int32; + mutable previous_c_state : int32; + mutable old_thread_wait_reason_enum_or_int : cswitch_etw_event_old_thread_wait_reason_enum_or_int option; + mutable old_thread_wait_mode_enum_or_int : cswitch_etw_event_old_thread_wait_mode_enum_or_int option; + mutable old_thread_state_enum_or_int : cswitch_etw_event_old_thread_state_enum_or_int option; + mutable old_thread_wait_ideal_processor : int32; + mutable new_thread_wait_time : int32; +} + +type ready_thread_etw_event_adjust_reason = + | Ignore_the_increment + | Apply_increment + | Apply_increment_boost + +type ready_thread_etw_event_trace_flag = + | Trace_flag_unspecified + | Thread_readied + | Kernel_stack_swapped_out + | Process_address_swapped_out + +type ready_thread_etw_event_adjust_reason_enum_or_int = + | Adjust_reason of ready_thread_etw_event_adjust_reason + | Adjust_reason_int of int32 + +and ready_thread_etw_event_flag_enum_or_int = + | Flag of ready_thread_etw_event_trace_flag + | Flag_int of int32 + +and ready_thread_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable t_thread_id : int32; + mutable adjust_reason_enum_or_int : ready_thread_etw_event_adjust_reason_enum_or_int option; + mutable adjust_increment : int32; + mutable flag_enum_or_int : ready_thread_etw_event_flag_enum_or_int option; +} + +type mem_info_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable priority_levels : int32; + mutable zero_page_count : int64; + mutable free_page_count : int64; + mutable modified_page_count : int64; + mutable modified_no_write_page_count : int64; + mutable bad_page_count : int64; + mutable standby_page_counts : int64 list; + mutable repurposed_page_counts : int64 list; + mutable modified_page_count_page_file : int64; + mutable paged_pool_page_count : int64; + mutable non_paged_pool_page_count : int64; + mutable mdl_page_count : int64; + mutable commit_page_count : int64; +} + +type file_io_create_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable irp_ptr : int64; + mutable file_object : int64; + mutable ttid : int32; + mutable create_options : int32; + mutable file_attributes : int32; + mutable share_access : int32; + mutable open_path : string; +} + +type file_io_dir_enum_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable irp_ptr : int64; + mutable file_object : int64; + mutable file_key : int64; + mutable ttid : int32; + mutable length : int32; + mutable info_class : int32; + mutable file_index : int32; + mutable file_name : string; +} + +type file_io_info_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable irp_ptr : int64; + mutable file_object : int64; + mutable file_key : int64; + mutable extra_info : int64; + mutable ttid : int32; + mutable info_class : int32; +} + +type file_io_read_write_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable offset : int64; + mutable irp_ptr : int64; + mutable file_object : int64; + mutable file_key : int64; + mutable ttid : int32; + mutable io_size : int32; + mutable io_flags : int32; +} + +type file_io_simple_op_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable irp_ptr : int64; + mutable file_object : int64; + mutable file_key : int64; + mutable ttid : int32; +} + +type file_io_op_end_etw_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable irp_ptr : int64; + mutable extra_info : int64; + mutable nt_status : int32; +} + +type etw_trace_event_event = + | C_switch of cswitch_etw_event + | Ready_thread of ready_thread_etw_event + | Mem_info of mem_info_etw_event + | File_io_create of file_io_create_etw_event + | File_io_dir_enum of file_io_dir_enum_etw_event + | File_io_info of file_io_info_etw_event + | File_io_read_write of file_io_read_write_etw_event + | File_io_simple_op of file_io_simple_op_etw_event + | File_io_op_end of file_io_op_end_etw_event + +and etw_trace_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable timestamp : int64; + mutable cpu : int32; + mutable thread_id : int32; + mutable event : etw_trace_event_event option; +} + +type etw_trace_event_bundle = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable cpu : int32; + mutable event : etw_trace_event list; +} + +type evdev_event_input_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable kernel_timestamp : int64; + mutable type_ : int32; + mutable code : int32; + mutable value : int32; +} + +type evdev_event_event = + | Input_event of evdev_event_input_event + +and evdev_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable device_id : int32; + mutable event : evdev_event_event option; +} + +type field_descriptor_proto_label = + | Label_optional + | Label_required + | Label_repeated + +type field_descriptor_proto_type = + | Type_double + | Type_float + | Type_int64 + | Type_uint64 + | Type_int32 + | Type_fixed64 + | Type_fixed32 + | Type_bool + | Type_string + | Type_group + | Type_message + | Type_bytes + | Type_uint32 + | Type_enum + | Type_sfixed32 + | Type_sfixed64 + | Type_sint32 + | Type_sint64 + +type uninterpreted_option_name_part = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name_part : string; + mutable is_extension : bool; +} + +type uninterpreted_option = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable name : uninterpreted_option_name_part list; + mutable identifier_value : string; + mutable positive_int_value : int64; + mutable negative_int_value : int64; + mutable double_value : float; + mutable string_value : bytes; + mutable aggregate_value : string; +} + +type field_options = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable packed : bool; + mutable uninterpreted_option : uninterpreted_option list; +} + +type field_descriptor_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable name : string; + mutable number : int32; + mutable label : field_descriptor_proto_label; + mutable type_ : field_descriptor_proto_type; + mutable type_name : string; + mutable extendee : string; + mutable default_value : string; + mutable options : field_options option; + mutable oneof_index : int32; +} + +type enum_value_descriptor_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable number : int32; +} + +type enum_descriptor_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable value : enum_value_descriptor_proto list; + mutable reserved_name : string list; +} + +type oneof_options = unit + +type oneof_descriptor_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable options : unit; +} + +type descriptor_proto_reserved_range = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable start : int32; + mutable end_ : int32; +} + +type descriptor_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; + mutable field : field_descriptor_proto list; + mutable extension : field_descriptor_proto list; + mutable nested_type : descriptor_proto list; + mutable enum_type : enum_descriptor_proto list; + mutable oneof_decl : oneof_descriptor_proto list; + mutable reserved_range : descriptor_proto_reserved_range list; + mutable reserved_name : string list; +} + +type file_descriptor_proto = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable package : string; + mutable dependency : string list; + mutable public_dependency : int32 list; + mutable weak_dependency : int32 list; + mutable message_type : descriptor_proto list; + mutable enum_type : enum_descriptor_proto list; + mutable extension : field_descriptor_proto list; +} + +type file_descriptor_set = private { + mutable file : file_descriptor_proto list; +} + +type extension_descriptor = private { + mutable extension_set : file_descriptor_set option; +} + +type inode_file_map_entry_type = + | Unknown + | File + | Directory + +type inode_file_map_entry = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable inode_number : int64; + mutable paths : string list; + mutable type_ : inode_file_map_entry_type; +} + +type inode_file_map = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable block_device_id : int64; + mutable mount_points : string list; + mutable entries : inode_file_map_entry list; +} + +type generic_kernel_cpu_frequency_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable cpu : int32; + mutable freq_hz : int64; +} + +type generic_kernel_task_state_event_task_state_enum = + | Task_state_unknown + | Task_state_created + | Task_state_runnable + | Task_state_running + | Task_state_interruptible_sleep + | Task_state_uninterruptible_sleep + | Task_state_stopped + | Task_state_dead + | Task_state_destroyed + +type generic_kernel_task_state_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable cpu : int32; + mutable comm : string; + mutable tid : int64; + mutable state : generic_kernel_task_state_event_task_state_enum; + mutable prio : int32; +} + +type generic_kernel_task_rename_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable tid : int64; + mutable comm : string; +} + +type generic_kernel_process_tree_thread = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable tid : int64; + mutable pid : int64; + mutable comm : string; + mutable is_main_thread : bool; +} + +type generic_kernel_process_tree_process = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable pid : int64; + mutable ppid : int64; + mutable cmdline : string; +} + +type generic_kernel_process_tree = private { + mutable processes : generic_kernel_process_tree_process list; + mutable threads : generic_kernel_process_tree_thread list; +} + +type gpu_counter_event_gpu_counter_value = + | Int_value of int64 + | Double_value of float + +and gpu_counter_event_gpu_counter = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable counter_id : int32; + mutable value : gpu_counter_event_gpu_counter_value option; +} + +type gpu_counter_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable counter_descriptor : gpu_counter_descriptor option; + mutable counters : gpu_counter_event_gpu_counter list; + mutable gpu_id : int32; +} + +type gpu_log_severity = + | Log_severity_unspecified + | Log_severity_verbose + | Log_severity_debug + | Log_severity_info + | Log_severity_warning + | Log_severity_error + +type gpu_log = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable severity : gpu_log_severity; + mutable tag : string; + mutable log_message : string; +} + +type gpu_render_stage_event_extra_data = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable value : string; +} + +type gpu_render_stage_event_specifications_context_spec = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable context : int64; + mutable pid : int32; +} + +type gpu_render_stage_event_specifications_description = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable name : string; + mutable description : string; +} + +type gpu_render_stage_event_specifications = private { + mutable context_spec : gpu_render_stage_event_specifications_context_spec option; + mutable hw_queue : gpu_render_stage_event_specifications_description list; + mutable stage : gpu_render_stage_event_specifications_description list; +} + +type gpu_render_stage_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable event_id : int64; + mutable duration : int64; + mutable hw_queue_iid : int64; + mutable stage_iid : int64; + mutable gpu_id : int32; + mutable context : int64; + mutable render_target_handle : int64; + mutable submission_id : int32; + mutable extra_data : gpu_render_stage_event_extra_data list; + mutable render_pass_handle : int64; + mutable render_pass_instance_id : int64; + mutable render_subpass_index_mask : int64 list; + mutable command_buffer_handle : int64; + mutable specifications : gpu_render_stage_event_specifications option; + mutable hw_queue_id : int32; + mutable stage_id : int32; +} + +type interned_graphics_context_api = + | Undefined + | Open_gl + | Vulkan + | Open_cl + +type interned_graphics_context = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable iid : int64; + mutable pid : int32; + mutable api : interned_graphics_context_api; +} + +type interned_gpu_render_stage_specification_render_stage_category = + | Other + | Graphics + | Compute + +type interned_gpu_render_stage_specification = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable iid : int64; + mutable name : string; + mutable description : string; + mutable category : interned_gpu_render_stage_specification_render_stage_category; +} + +type vulkan_api_event_vk_debug_utils_object_name = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable pid : int32; + mutable vk_device : int64; + mutable object_type : int32; + mutable object_ : int64; + mutable object_name : string; +} + +type vulkan_api_event_vk_queue_submit = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable duration_ns : int64; + mutable pid : int32; + mutable tid : int32; + mutable vk_queue : int64; + mutable vk_command_buffers : int64 list; + mutable submission_id : int32; +} + +type vulkan_api_event = + | Vk_debug_utils_object_name of vulkan_api_event_vk_debug_utils_object_name + | Vk_queue_submit of vulkan_api_event_vk_queue_submit + +type vulkan_memory_event_annotation_value = + | Int_value of int64 + | Double_value of float + | String_iid of int64 + +and vulkan_memory_event_annotation = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable key_iid : int64; + mutable value : vulkan_memory_event_annotation_value option; +} + +type vulkan_memory_event_source = + | Source_unspecified + | Source_driver + | Source_device + | Source_device_memory + | Source_buffer + | Source_image + +type vulkan_memory_event_operation = + | Op_unspecified + | Op_create + | Op_destroy + | Op_bind + | Op_destroy_bound + | Op_annotations + +type vulkan_memory_event_allocation_scope = + | Scope_unspecified + | Scope_command + | Scope_object + | Scope_cache + | Scope_device + | Scope_instance + +type vulkan_memory_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable source : vulkan_memory_event_source; + mutable operation : vulkan_memory_event_operation; + mutable timestamp : int64; + mutable pid : int32; + mutable memory_address : int64; + mutable memory_size : int64; + mutable caller_iid : int64; + mutable allocation_scope : vulkan_memory_event_allocation_scope; + mutable annotations : vulkan_memory_event_annotation list; + mutable device : int64; + mutable device_memory : int64; + mutable memory_type : int32; + mutable heap : int32; + mutable object_handle : int64; +} + +type interned_string = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable str : bytes; +} + +type line = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable function_name : string; + mutable source_file_name : string; + mutable line_number : int32; +} + +type address_symbols = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable address : int64; + mutable lines : line list; +} + +type module_symbols = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable path : string; + mutable build_id : string; + mutable address_symbols : address_symbols list; +} + +type mapping = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable iid : int64; + mutable build_id : int64; + mutable exact_offset : int64; + mutable start_offset : int64; + mutable start : int64; + mutable end_ : int64; + mutable load_bias : int64; + mutable path_string_ids : int64 list; +} + +type frame = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable iid : int64; + mutable function_name_id : int64; + mutable mapping_id : int64; + mutable rel_pc : int64; + mutable source_path_iid : int64; + mutable line_number : int32; +} + +type callstack = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable iid : int64; + mutable frame_ids : int64 list; +} + +type histogram_name = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type chrome_histogram_sample = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable name_hash : int64; + mutable name : string; + mutable sample : int64; + mutable name_iid : int64; +} + +type debug_annotation_nested_value_nested_type = + | Unspecified + | Dict + | Array + +type debug_annotation_nested_value = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable nested_type : debug_annotation_nested_value_nested_type; + mutable dict_keys : string list; + mutable dict_values : debug_annotation_nested_value list; + mutable array_values : debug_annotation_nested_value list; + mutable int_value : int64; + mutable double_value : float; + mutable bool_value : bool; + mutable string_value : string; +} + +type debug_annotation_name_field = + | Name_iid of int64 + | Name of string + +and debug_annotation_value = + | Bool_value of bool + | Uint_value of int64 + | Int_value of int64 + | Double_value of float + | Pointer_value of int64 + | Nested_value of debug_annotation_nested_value + | Legacy_json_value of string + | String_value of string + | String_value_iid of int64 + +and debug_annotation_proto_type_descriptor = + | Proto_type_name of string + | Proto_type_name_iid of int64 + +and debug_annotation = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name_field : debug_annotation_name_field option; + mutable value : debug_annotation_value option; + mutable proto_type_descriptor : debug_annotation_proto_type_descriptor option; + mutable proto_value : bytes; + mutable dict_entries : debug_annotation list; + mutable array_values : debug_annotation list; +} + +type debug_annotation_name = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type debug_annotation_value_type_name = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type log_message_priority = + | Prio_unspecified + | Prio_unused + | Prio_verbose + | Prio_debug + | Prio_info + | Prio_warn + | Prio_error + | Prio_fatal + +type log_message = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable source_location_iid : int64; + mutable body_iid : int64; + mutable prio : log_message_priority; +} + +type log_message_body = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable body : string; +} + +type unsymbolized_source_location = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable iid : int64; + mutable mapping_id : int64; + mutable rel_pc : int64; +} + +type source_location = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable iid : int64; + mutable file_name : string; + mutable function_name : string; + mutable line_number : int32; +} + +type chrome_active_processes = private { + mutable pid : int32 list; +} + +type chrome_application_state_info_chrome_application_state = + | Application_state_unknown + | Application_state_has_running_activities + | Application_state_has_paused_activities + | Application_state_has_stopped_activities + | Application_state_has_destroyed_activities + +type chrome_application_state_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable application_state : chrome_application_state_info_chrome_application_state; +} + +type chrome_compositor_scheduler_action = + | Cc_scheduler_action_unspecified + | Cc_scheduler_action_none + | Cc_scheduler_action_send_begin_main_frame + | Cc_scheduler_action_commit + | Cc_scheduler_action_activate_sync_tree + | Cc_scheduler_action_draw_if_possible + | Cc_scheduler_action_draw_forced + | Cc_scheduler_action_draw_abort + | Cc_scheduler_action_begin_layer_tree_frame_sink_creation + | Cc_scheduler_action_prepare_tiles + | Cc_scheduler_action_invalidate_layer_tree_frame_sink + | Cc_scheduler_action_perform_impl_side_invalidation + | Cc_scheduler_action_notify_begin_main_frame_not_expected_until + | Cc_scheduler_action_notify_begin_main_frame_not_expected_soon + +type chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode = + | Deadline_mode_unspecified + | Deadline_mode_none + | Deadline_mode_immediate + | Deadline_mode_regular + | Deadline_mode_late + | Deadline_mode_blocked + +type chrome_compositor_state_machine_major_state_begin_impl_frame_state = + | Begin_impl_frame_unspecified + | Begin_impl_frame_idle + | Begin_impl_frame_inside_begin_frame + | Begin_impl_frame_inside_deadline + +type chrome_compositor_state_machine_major_state_begin_main_frame_state = + | Begin_main_frame_unspecified + | Begin_main_frame_idle + | Begin_main_frame_sent + | Begin_main_frame_ready_to_commit + +type chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state = + | Layer_tree_frame_unspecified + | Layer_tree_frame_none + | Layer_tree_frame_active + | Layer_tree_frame_creating + | Layer_tree_frame_waiting_for_first_commit + | Layer_tree_frame_waiting_for_first_activation + +type chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state = + | Forced_redraw_unspecified + | Forced_redraw_idle + | Forced_redraw_waiting_for_commit + | Forced_redraw_waiting_for_activation + | Forced_redraw_waiting_for_draw + +type chrome_compositor_state_machine_major_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable next_action : chrome_compositor_scheduler_action; + mutable begin_impl_frame_state : chrome_compositor_state_machine_major_state_begin_impl_frame_state; + mutable begin_main_frame_state : chrome_compositor_state_machine_major_state_begin_main_frame_state; + mutable layer_tree_frame_sink_state : chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state; + mutable forced_redraw_state : chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state; +} + +type chrome_compositor_state_machine_minor_state_tree_priority = + | Tree_priority_unspecified + | Tree_priority_same_priority_for_both_trees + | Tree_priority_smoothness_takes_priority + | Tree_priority_new_content_takes_priority + +type chrome_compositor_state_machine_minor_state_scroll_handler_state = + | Scroll_handler_unspecified + | Scroll_affects_scroll_handler + | Scroll_does_not_affect_scroll_handler + +type chrome_compositor_state_machine_minor_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 45 fields *) + mutable commit_count : int32; + mutable current_frame_number : int32; + mutable last_frame_number_submit_performed : int32; + mutable last_frame_number_draw_performed : int32; + mutable last_frame_number_begin_main_frame_sent : int32; + mutable did_draw : bool; + mutable did_send_begin_main_frame_for_current_frame : bool; + mutable did_notify_begin_main_frame_not_expected_until : bool; + mutable did_notify_begin_main_frame_not_expected_soon : bool; + mutable wants_begin_main_frame_not_expected : bool; + mutable did_commit_during_frame : bool; + mutable did_invalidate_layer_tree_frame_sink : bool; + mutable did_perform_impl_side_invalidaion : bool; + mutable did_prepare_tiles : bool; + mutable consecutive_checkerboard_animations : int32; + mutable pending_submit_frames : int32; + mutable submit_frames_with_current_layer_tree_frame_sink : int32; + mutable needs_redraw : bool; + mutable needs_prepare_tiles : bool; + mutable needs_begin_main_frame : bool; + mutable needs_one_begin_impl_frame : bool; + mutable visible : bool; + mutable begin_frame_source_paused : bool; + mutable can_draw : bool; + mutable resourceless_draw : bool; + mutable has_pending_tree : bool; + mutable pending_tree_is_ready_for_activation : bool; + mutable active_tree_needs_first_draw : bool; + mutable active_tree_is_ready_to_draw : bool; + mutable did_create_and_initialize_first_layer_tree_frame_sink : bool; + mutable tree_priority : chrome_compositor_state_machine_minor_state_tree_priority; + mutable scroll_handler_state : chrome_compositor_state_machine_minor_state_scroll_handler_state; + mutable critical_begin_main_frame_to_activate_is_fast : bool; + mutable main_thread_missed_last_deadline : bool; + mutable video_needs_begin_frames : bool; + mutable defer_begin_main_frame : bool; + mutable last_commit_had_no_updates : bool; + mutable did_draw_in_last_frame : bool; + mutable did_submit_in_last_frame : bool; + mutable needs_impl_side_invalidation : bool; + mutable current_pending_tree_is_impl_side : bool; + mutable previous_pending_tree_was_impl_side : bool; + mutable processing_animation_worklets_for_active_tree : bool; + mutable processing_animation_worklets_for_pending_tree : bool; + mutable processing_paint_worklets_for_pending_tree : bool; +} + +type chrome_compositor_state_machine = private { + mutable major_state : chrome_compositor_state_machine_major_state option; + mutable minor_state : chrome_compositor_state_machine_minor_state option; +} + +type begin_impl_frame_args_state = + | Begin_frame_finished + | Begin_frame_using + +type begin_frame_args_begin_frame_args_type = + | Begin_frame_args_type_unspecified + | Begin_frame_args_type_invalid + | Begin_frame_args_type_normal + | Begin_frame_args_type_missed + +type begin_frame_args_created_from = + | Source_location_iid of int64 + | Source_location of source_location + +and begin_frame_args = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable type_ : begin_frame_args_begin_frame_args_type; + mutable source_id : int64; + mutable sequence_number : int64; + mutable frame_time_us : int64; + mutable deadline_us : int64; + mutable interval_delta_us : int64; + mutable on_critical_path : bool; + mutable animate_only : bool; + mutable created_from : begin_frame_args_created_from option; + mutable frames_throttled_since_last : int64; +} + +type begin_impl_frame_args_timestamps_in_us = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable interval_delta : int64; + mutable now_to_deadline_delta : int64; + mutable frame_time_to_now_delta : int64; + mutable frame_time_to_deadline_delta : int64; + mutable now : int64; + mutable frame_time : int64; + mutable deadline : int64; +} + +type begin_impl_frame_args_args = + | Current_args of begin_frame_args + | Last_args of begin_frame_args + +and begin_impl_frame_args = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable updated_at_us : int64; + mutable finished_at_us : int64; + mutable state : begin_impl_frame_args_state; + mutable args : begin_impl_frame_args_args option; + mutable timestamps_in_us : begin_impl_frame_args_timestamps_in_us option; +} + +type begin_frame_observer_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable dropped_begin_frame_args : int64; + mutable last_begin_frame_args : begin_frame_args option; +} + +type begin_frame_source_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable source_id : int32; + mutable paused : bool; + mutable num_observers : int32; + mutable last_begin_frame_args : begin_frame_args option; +} + +type compositor_timing_history = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable begin_main_frame_queue_critical_estimate_delta_us : int64; + mutable begin_main_frame_queue_not_critical_estimate_delta_us : int64; + mutable begin_main_frame_start_to_ready_to_commit_estimate_delta_us : int64; + mutable commit_to_ready_to_activate_estimate_delta_us : int64; + mutable prepare_tiles_estimate_delta_us : int64; + mutable activate_estimate_delta_us : int64; + mutable draw_estimate_delta_us : int64; +} + +type chrome_compositor_scheduler_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 11 fields *) + mutable state_machine : chrome_compositor_state_machine option; + mutable observing_begin_frame_source : bool; + mutable begin_impl_frame_deadline_task : bool; + mutable pending_begin_frame_task : bool; + mutable skipped_last_frame_missed_exceeded_deadline : bool; + mutable inside_action : chrome_compositor_scheduler_action; + mutable deadline_mode : chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode; + mutable deadline_us : int64; + mutable deadline_scheduled_at_us : int64; + mutable now_us : int64; + mutable now_to_deadline_delta_us : int64; + mutable now_to_deadline_scheduled_at_delta_us : int64; + mutable begin_impl_frame_args : begin_impl_frame_args option; + mutable begin_frame_observer_state : begin_frame_observer_state option; + mutable begin_frame_source_state : begin_frame_source_state option; + mutable compositor_timing_history : compositor_timing_history option; +} + +type chrome_content_settings_event_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable number_of_exceptions : int32; +} + +type chrome_frame_reporter_state = + | State_no_update_desired + | State_presented_all + | State_presented_partial + | State_dropped + +type chrome_frame_reporter_frame_drop_reason = + | Reason_unspecified + | Reason_display_compositor + | Reason_main_thread + | Reason_client_compositor + +type chrome_frame_reporter_scroll_state = + | Scroll_none + | Scroll_main_thread + | Scroll_compositor_thread + | Scroll_raster + | Scroll_unknown + +type chrome_frame_reporter_frame_type = + | Forked + | Backfill + +type chrome_frame_reporter = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 17 fields *) + mutable state : chrome_frame_reporter_state; + mutable reason : chrome_frame_reporter_frame_drop_reason; + mutable frame_source : int64; + mutable frame_sequence : int64; + mutable affects_smoothness : bool; + mutable scroll_state : chrome_frame_reporter_scroll_state; + mutable has_main_animation : bool; + mutable has_compositor_animation : bool; + mutable has_smooth_input_main : bool; + mutable has_missing_content : bool; + mutable layer_tree_host_id : int64; + mutable has_high_latency : bool; + mutable frame_type : chrome_frame_reporter_frame_type; + mutable high_latency_contribution_stage : string list; + mutable checkerboarded_needs_raster : bool; + mutable checkerboarded_needs_record : bool; + mutable surface_frame_trace_id : int64; + mutable display_trace_id : int64; +} + +type chrome_keyed_service = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable name : string; +} + +type chrome_latency_info_step = + | Step_unspecified + | Step_send_input_event_ui + | Step_handle_input_event_impl + | Step_did_handle_input_and_overscroll + | Step_handle_input_event_main + | Step_main_thread_scroll_update + | Step_handle_input_event_main_commit + | Step_handled_input_event_main_or_impl + | Step_handled_input_event_impl + | Step_swap_buffers + | Step_draw_and_swap + | Step_finished_swap_buffers + +type chrome_latency_info_latency_component_type = + | Component_unspecified + | Component_input_event_latency_begin_rwh + | Component_input_event_latency_scroll_update_original + | Component_input_event_latency_first_scroll_update_original + | Component_input_event_latency_original + | Component_input_event_latency_ui + | Component_input_event_latency_renderer_main + | Component_input_event_latency_rendering_scheduled_main + | Component_input_event_latency_rendering_scheduled_impl + | Component_input_event_latency_scroll_update_last_event + | Component_input_event_latency_ack_rwh + | Component_input_event_latency_renderer_swap + | Component_display_compositor_received_frame + | Component_input_event_gpu_swap_buffer + | Component_input_event_latency_frame_swap + +type chrome_latency_info_component_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable component_type : chrome_latency_info_latency_component_type; + mutable time_us : int64; +} + +type chrome_latency_info_input_type = + | Unspecified_or_other + | Touch_moved + | Gesture_scroll_begin + | Gesture_scroll_update + | Gesture_scroll_end + | Gesture_tap + | Gesture_tap_cancel + +type chrome_latency_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable trace_id : int64; + mutable step : chrome_latency_info_step; + mutable frame_tree_node_id : int32; + mutable component_info : chrome_latency_info_component_info list; + mutable is_coalesced : bool; + mutable gesture_scroll_id : int64; + mutable touch_id : int64; + mutable input_type : chrome_latency_info_input_type; +} + +type chrome_legacy_ipc_message_class = + | Class_unspecified + | Class_automation + | Class_frame + | Class_page + | Class_view + | Class_widget + | Class_input + | Class_test + | Class_worker + | Class_nacl + | Class_gpu_channel + | Class_media + | Class_ppapi + | Class_chrome + | Class_drag + | Class_print + | Class_extension + | Class_text_input_client + | Class_blink_test + | Class_accessibility + | Class_prerender + | Class_chromoting + | Class_browser_plugin + | Class_android_web_view + | Class_nacl_host + | Class_encrypted_media + | Class_cast + | Class_gin_java_bridge + | Class_chrome_utility_printing + | Class_ozone_gpu + | Class_web_test + | Class_network_hints + | Class_extensions_guest_view + | Class_guest_view + | Class_media_player_delegate + | Class_extension_worker + | Class_subresource_filter + | Class_unfreezable_frame + +type chrome_legacy_ipc = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable message_class : chrome_legacy_ipc_message_class; + mutable message_line : int32; +} + +type chrome_message_pump = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable sent_messages_in_queue : bool; + mutable io_handler_location_iid : int64; +} + +type chrome_mojo_event_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable watcher_notify_interface_tag : string; + mutable ipc_hash : int32; + mutable mojo_interface_tag : string; + mutable mojo_interface_method_iid : int64; + mutable is_reply : bool; + mutable payload_size : int64; + mutable data_num_bytes : int64; +} + +type chrome_railmode = + | Rail_mode_none + | Rail_mode_response + | Rail_mode_animation + | Rail_mode_idle + | Rail_mode_load + +type chrome_renderer_scheduler_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable rail_mode : chrome_railmode; + mutable is_backgrounded : bool; + mutable is_hidden : bool; +} + +type chrome_user_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable action : string; + mutable action_hash : int64; +} + +type chrome_window_handle_event_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable dpi : int32; + mutable message_id : int32; + mutable hwnd_ptr : int64; +} + +type screenshot = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable jpg_image : bytes; +} + +type task_execution = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable posted_from_iid : int64; +} + +type track_event_type = + | Type_unspecified + | Type_slice_begin + | Type_slice_end + | Type_instant + | Type_counter + +type track_event_callstack_frame = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable function_name : string; + mutable source_file : string; + mutable line_number : int32; +} + +type track_event_callstack = private { + mutable frames : track_event_callstack_frame list; +} + +type track_event_legacy_event_flow_direction = + | Flow_unspecified + | Flow_in + | Flow_out + | Flow_inout + +type track_event_legacy_event_instant_event_scope = + | Scope_unspecified + | Scope_global + | Scope_process + | Scope_thread + +type track_event_legacy_event_id = + | Unscoped_id of int64 + | Local_id of int64 + | Global_id of int64 + +and track_event_legacy_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 13 fields *) + mutable name_iid : int64; + mutable phase : int32; + mutable duration_us : int64; + mutable thread_duration_us : int64; + mutable thread_instruction_delta : int64; + mutable id : track_event_legacy_event_id option; + mutable id_scope : string; + mutable use_async_tts : bool; + mutable bind_id : int64; + mutable bind_to_enclosing : bool; + mutable flow_direction : track_event_legacy_event_flow_direction; + mutable instant_event_scope : track_event_legacy_event_instant_event_scope; + mutable pid_override : int32; + mutable tid_override : int32; +} + +type track_event_name_field = + | Name_iid of int64 + | Name of string + +and track_event_counter_value_field = + | Counter_value of int64 + | Double_counter_value of float + +and track_event_correlation_id_field = + | Correlation_id of int64 + | Correlation_id_str of string + | Correlation_id_str_iid of int64 + +and track_event_callstack_field = + | Callstack of track_event_callstack + | Callstack_iid of int64 + +and track_event_source_location_field = + | Source_location of source_location + | Source_location_iid of int64 + +and track_event_timestamp = + | Timestamp_delta_us of int64 + | Timestamp_absolute_us of int64 + +and track_event_thread_time = + | Thread_time_delta_us of int64 + | Thread_time_absolute_us of int64 + +and track_event_thread_instruction_count = + | Thread_instruction_count_delta of int64 + | Thread_instruction_count_absolute of int64 + +and track_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable category_iids : int64 list; + mutable categories : string list; + mutable name_field : track_event_name_field option; + mutable type_ : track_event_type; + mutable track_uuid : int64; + mutable counter_value_field : track_event_counter_value_field option; + mutable extra_counter_track_uuids : int64 list; + mutable extra_counter_values : int64 list; + mutable extra_double_counter_track_uuids : int64 list; + mutable extra_double_counter_values : float list; + mutable flow_ids_old : int64 list; + mutable flow_ids : int64 list; + mutable terminating_flow_ids_old : int64 list; + mutable terminating_flow_ids : int64 list; + mutable correlation_id_field : track_event_correlation_id_field option; + mutable callstack_field : track_event_callstack_field option; + mutable debug_annotations : debug_annotation list; + mutable task_execution : task_execution option; + mutable log_message : log_message option; + mutable cc_scheduler_state : chrome_compositor_scheduler_state option; + mutable chrome_user_event : chrome_user_event option; + mutable chrome_keyed_service : chrome_keyed_service option; + mutable chrome_legacy_ipc : chrome_legacy_ipc option; + mutable chrome_histogram_sample : chrome_histogram_sample option; + mutable chrome_latency_info : chrome_latency_info option; + mutable chrome_frame_reporter : chrome_frame_reporter option; + mutable chrome_application_state_info : chrome_application_state_info option; + mutable chrome_renderer_scheduler_state : chrome_renderer_scheduler_state option; + mutable chrome_window_handle_event_info : chrome_window_handle_event_info option; + mutable chrome_content_settings_event_info : chrome_content_settings_event_info option; + mutable chrome_active_processes : chrome_active_processes option; + mutable screenshot : screenshot option; + mutable source_location_field : track_event_source_location_field option; + mutable chrome_message_pump : chrome_message_pump option; + mutable chrome_mojo_event_info : chrome_mojo_event_info option; + mutable timestamp : track_event_timestamp option; + mutable thread_time : track_event_thread_time option; + mutable thread_instruction_count : track_event_thread_instruction_count option; + mutable legacy_event : track_event_legacy_event option; +} + +type track_event_defaults = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable track_uuid : int64; + mutable extra_counter_track_uuids : int64 list; + mutable extra_double_counter_track_uuids : int64 list; +} + +type event_category = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type event_name = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable name : string; +} + +type interned_data = private { + mutable event_categories : event_category list; + mutable event_names : event_name list; + mutable debug_annotation_names : debug_annotation_name list; + mutable debug_annotation_value_type_names : debug_annotation_value_type_name list; + mutable source_locations : source_location list; + mutable unsymbolized_source_locations : unsymbolized_source_location list; + mutable log_message_body : log_message_body list; + mutable histogram_names : histogram_name list; + mutable build_ids : interned_string list; + mutable mapping_paths : interned_string list; + mutable source_paths : interned_string list; + mutable function_names : interned_string list; + mutable mappings : mapping list; + mutable frames : frame list; + mutable callstacks : callstack list; + mutable vulkan_memory_keys : interned_string list; + mutable graphics_contexts : interned_graphics_context list; + mutable gpu_specifications : interned_gpu_render_stage_specification list; + mutable kernel_symbols : interned_string list; + mutable debug_annotation_string_values : interned_string list; + mutable packet_context : network_packet_context list; + mutable v8_js_function_name : interned_v8_string list; + mutable v8_js_function : interned_v8_js_function list; + mutable v8_js_script : interned_v8_js_script list; + mutable v8_wasm_script : interned_v8_wasm_script list; + mutable v8_isolate : interned_v8_isolate list; + mutable protolog_string_args : interned_string list; + mutable protolog_stacktrace : interned_string list; + mutable viewcapture_package_name : interned_string list; + mutable viewcapture_window_name : interned_string list; + mutable viewcapture_view_id : interned_string list; + mutable viewcapture_class_name : interned_string list; + mutable app_wakelock_info : app_wakelock_info list; + mutable correlation_id_str : interned_string list; +} + +type memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units = + | Unspecified + | Bytes + | Count + +type memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable name : string; + mutable units : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units; + mutable value_uint64 : int64; + mutable value_string : string; +} + +type memory_tracker_snapshot_process_snapshot_memory_node = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable id : int64; + mutable absolute_name : string; + mutable weak : bool; + mutable size_bytes : int64; + mutable entries : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry list; +} + +type memory_tracker_snapshot_process_snapshot_memory_edge = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable source_id : int64; + mutable target_id : int64; + mutable importance : int32; + mutable overridable : bool; +} + +type memory_tracker_snapshot_process_snapshot = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable pid : int32; + mutable allocator_dumps : memory_tracker_snapshot_process_snapshot_memory_node list; + mutable memory_edges : memory_tracker_snapshot_process_snapshot_memory_edge list; +} + +type memory_tracker_snapshot_level_of_detail = + | Detail_full + | Detail_light + | Detail_background + +type memory_tracker_snapshot = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable global_dump_id : int64; + mutable level_of_detail : memory_tracker_snapshot_level_of_detail; + mutable process_memory_dumps : memory_tracker_snapshot_process_snapshot list; +} + +type perfetto_metatrace_arg_key_or_interned_key = + | Key of string + | Key_iid of int64 + +and perfetto_metatrace_arg_value_or_interned_value = + | Value of string + | Value_iid of int64 + +and perfetto_metatrace_arg = private { + mutable key_or_interned_key : perfetto_metatrace_arg_key_or_interned_key option; + mutable value_or_interned_value : perfetto_metatrace_arg_value_or_interned_value option; +} + +type perfetto_metatrace_interned_string = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable iid : int64; + mutable value : string; +} + +type perfetto_metatrace_record_type = + | Event_id of int32 + | Counter_id of int32 + | Event_name of string + | Event_name_iid of int64 + | Counter_name of string + +and perfetto_metatrace = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable record_type : perfetto_metatrace_record_type option; + mutable event_duration_ns : int64; + mutable counter_value : int32; + mutable thread_id : int32; + mutable has_overruns : bool; + mutable args : perfetto_metatrace_arg list; + mutable interned_strings : perfetto_metatrace_interned_string list; +} + +type tracing_service_event_data_sources_data_source = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable producer_name : string; + mutable data_source_name : string; +} + +type tracing_service_event_data_sources = private { + mutable data_source : tracing_service_event_data_sources_data_source list; +} + +type tracing_service_event = + | Tracing_started of bool + | All_data_sources_started of bool + | Flush_started of bool + | All_data_sources_flushed of bool + | Read_tracing_buffers_completed of bool + | Tracing_disabled of bool + | Seized_for_bugreport of bool + | Slow_starting_data_sources of tracing_service_event_data_sources + | Last_flush_slow_data_sources of tracing_service_event_data_sources + | Clone_started of bool + | Buffer_cloned of int32 + +type android_energy_consumer = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable energy_consumer_id : int32; + mutable ordinal : int32; + mutable type_ : string; + mutable name : string; +} + +type android_energy_consumer_descriptor = private { + mutable energy_consumers : android_energy_consumer list; +} + +type android_energy_estimation_breakdown_energy_uid_breakdown = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable uid : int32; + mutable energy_uws : int64; +} + +type android_energy_estimation_breakdown = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable energy_consumer_descriptor : android_energy_consumer_descriptor option; + mutable energy_consumer_id : int32; + mutable energy_uws : int64; + mutable per_uid_breakdown : android_energy_estimation_breakdown_energy_uid_breakdown list; +} + +type entity_state_residency_power_entity_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable entity_index : int32; + mutable state_index : int32; + mutable entity_name : string; + mutable state_name : string; +} + +type entity_state_residency_state_residency = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable entity_index : int32; + mutable state_index : int32; + mutable total_time_in_state_ms : int64; + mutable total_state_entry_count : int64; + mutable last_entry_timestamp_ms : int64; +} + +type entity_state_residency = private { + mutable power_entity_state : entity_state_residency_power_entity_state list; + mutable residency : entity_state_residency_state_residency list; +} + +type battery_counters = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable charge_counter_uah : int64; + mutable capacity_percent : float; + mutable current_ua : int64; + mutable current_avg_ua : int64; + mutable name : string; + mutable energy_counter_uwh : int64; + mutable voltage_uv : int64; +} + +type power_rails_rail_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable index : int32; + mutable rail_name : string; + mutable subsys_name : string; + mutable sampling_rate : int32; +} + +type power_rails_energy_data = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable index : int32; + mutable timestamp_ms : int64; + mutable energy : int64; +} + +type power_rails = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable rail_descriptor : power_rails_rail_descriptor list; + mutable energy_data : power_rails_energy_data list; + mutable session_uuid : int64; +} + +type obfuscated_member = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable obfuscated_name : string; + mutable deobfuscated_name : string; +} + +type obfuscated_class = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable obfuscated_name : string; + mutable deobfuscated_name : string; + mutable obfuscated_members : obfuscated_member list; + mutable obfuscated_methods : obfuscated_member list; +} + +type deobfuscation_mapping = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable package_name : string; + mutable version_code : int64; + mutable obfuscated_classes : obfuscated_class list; +} + +type heap_graph_root_type = + | Root_unknown + | Root_jni_global + | Root_jni_local + | Root_java_frame + | Root_native_stack + | Root_sticky_class + | Root_thread_block + | Root_monitor_used + | Root_thread_object + | Root_interned_string + | Root_finalizing + | Root_debugger + | Root_reference_cleanup + | Root_vm_internal + | Root_jni_monitor + +type heap_graph_root = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable object_ids : int64 list; + mutable root_type : heap_graph_root_type; +} + +type heap_graph_type_kind = + | Kind_unknown + | Kind_normal + | Kind_noreferences + | Kind_string + | Kind_array + | Kind_class + | Kind_classloader + | Kind_dexcache + | Kind_soft_reference + | Kind_weak_reference + | Kind_finalizer_reference + | Kind_phantom_reference + +type heap_graph_type = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable id : int64; + mutable location_id : int64; + mutable class_name : string; + mutable object_size : int64; + mutable superclass_id : int64; + mutable reference_field_id : int64 list; + mutable kind : heap_graph_type_kind; + mutable classloader_id : int64; +} + +type heap_graph_object_heap_type = + | Heap_type_unknown + | Heap_type_app + | Heap_type_zygote + | Heap_type_boot_image + +type heap_graph_object_identifier = + | Id of int64 + | Id_delta of int64 + +and heap_graph_object = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable identifier : heap_graph_object_identifier option; + mutable type_id : int64; + mutable self_size : int64; + mutable reference_field_id_base : int64; + mutable reference_field_id : int64 list; + mutable reference_object_id : int64 list; + mutable native_allocation_registry_size_field : int64; + mutable heap_type_delta : heap_graph_object_heap_type; + mutable runtime_internal_object_id : int64 list; +} + +type heap_graph = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable pid : int32; + mutable objects : heap_graph_object list; + mutable roots : heap_graph_root list; + mutable types : heap_graph_type list; + mutable field_names : interned_string list; + mutable location_names : interned_string list; + mutable continued : bool; + mutable index : int64; +} + +type profile_packet_heap_sample = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable callstack_id : int64; + mutable self_allocated : int64; + mutable self_freed : int64; + mutable self_max : int64; + mutable self_max_count : int64; + mutable timestamp : int64; + mutable alloc_count : int64; + mutable free_count : int64; +} + +type profile_packet_histogram_bucket = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable upper_limit : int64; + mutable max_bucket : bool; + mutable count : int64; +} + +type profile_packet_histogram = private { + mutable buckets : profile_packet_histogram_bucket list; +} + +type profile_packet_process_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable unwinding_errors : int64; + mutable heap_samples : int64; + mutable map_reparses : int64; + mutable unwinding_time_us : profile_packet_histogram option; + mutable total_unwinding_time_us : int64; + mutable client_spinlock_blocked_us : int64; +} + +type profile_packet_process_heap_samples_client_error = + | Client_error_none + | Client_error_hit_timeout + | Client_error_invalid_stack_bounds + +type profile_packet_process_heap_samples = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 12 fields *) + mutable pid : int64; + mutable from_startup : bool; + mutable rejected_concurrent : bool; + mutable disconnected : bool; + mutable buffer_overran : bool; + mutable client_error : profile_packet_process_heap_samples_client_error; + mutable buffer_corrupted : bool; + mutable hit_guardrail : bool; + mutable heap_name : string; + mutable sampling_interval_bytes : int64; + mutable orig_sampling_interval_bytes : int64; + mutable timestamp : int64; + mutable stats : profile_packet_process_stats option; + mutable samples : profile_packet_heap_sample list; +} + +type profile_packet = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable strings : interned_string list; + mutable mappings : mapping list; + mutable frames : frame list; + mutable callstacks : callstack list; + mutable process_dumps : profile_packet_process_heap_samples list; + mutable continued : bool; + mutable index : int64; +} + +type streaming_allocation = private { + mutable address : int64 list; + mutable size : int64 list; + mutable sample_size : int64 list; + mutable clock_monotonic_coarse_timestamp : int64 list; + mutable heap_id : int32 list; + mutable sequence_number : int64 list; +} + +type streaming_free = private { + mutable address : int64 list; + mutable heap_id : int32 list; + mutable sequence_number : int64 list; +} + +type streaming_profile_packet = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable callstack_iid : int64 list; + mutable timestamp_delta_us : int64 list; + mutable process_priority : int32; +} + +type profiling_cpu_mode = + | Mode_unknown + | Mode_kernel + | Mode_user + | Mode_hypervisor + | Mode_guest_kernel + | Mode_guest_user + +type profiling_stack_unwind_error = + | Unwind_error_unknown + | Unwind_error_none + | Unwind_error_memory_invalid + | Unwind_error_unwind_info + | Unwind_error_unsupported + | Unwind_error_invalid_map + | Unwind_error_max_frames_exceeded + | Unwind_error_repeated_frame + | Unwind_error_invalid_elf + | Unwind_error_system_call + | Unwind_error_thread_timeout + | Unwind_error_thread_does_not_exist + | Unwind_error_bad_arch + | Unwind_error_maps_parse + | Unwind_error_invalid_parameter + | Unwind_error_ptrace_call + +type profiling = unit + +type perf_sample_sample_skip_reason = + | Profiler_skip_unknown + | Profiler_skip_read_stage + | Profiler_skip_unwind_stage + | Profiler_skip_unwind_enqueue + | Profiler_skip_not_in_scope + +type perf_sample_producer_event_data_source_stop_reason = + | Profiler_stop_unknown + | Profiler_stop_guardrail + +type perf_sample_producer_event = + | Source_stop_reason of perf_sample_producer_event_data_source_stop_reason + +type perf_sample_optional_unwind_error = + | Unwind_error of profiling_stack_unwind_error + +and perf_sample_optional_sample_skipped_reason = + | Sample_skipped_reason of perf_sample_sample_skip_reason + +and perf_sample = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable cpu : int32; + mutable pid : int32; + mutable tid : int32; + mutable cpu_mode : profiling_cpu_mode; + mutable timebase_count : int64; + mutable follower_counts : int64 list; + mutable callstack_iid : int64; + mutable optional_unwind_error : perf_sample_optional_unwind_error option; + mutable kernel_records_lost : int64; + mutable optional_sample_skipped_reason : perf_sample_optional_sample_skipped_reason option; + mutable producer_event : perf_sample_producer_event option; +} + +type smaps_entry = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 15 fields *) + mutable path : string; + mutable size_kb : int64; + mutable private_dirty_kb : int64; + mutable swap_kb : int64; + mutable file_name : string; + mutable start_address : int64; + mutable module_timestamp : int64; + mutable module_debugid : string; + mutable module_debug_path : string; + mutable protection_flags : int32; + mutable private_clean_resident_kb : int64; + mutable shared_dirty_resident_kb : int64; + mutable shared_clean_resident_kb : int64; + mutable locked_kb : int64; + mutable proportional_resident_kb : int64; +} + +type smaps_packet = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable pid : int32; + mutable entries : smaps_entry list; +} + +type process_stats_thread = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable tid : int32; +} + +type process_stats_fdinfo = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable fd : int64; + mutable path : string; +} + +type process_stats_process = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 22 fields *) + mutable pid : int32; + mutable threads : process_stats_thread list; + mutable vm_size_kb : int64; + mutable vm_rss_kb : int64; + mutable rss_anon_kb : int64; + mutable rss_file_kb : int64; + mutable rss_shmem_kb : int64; + mutable vm_swap_kb : int64; + mutable vm_locked_kb : int64; + mutable vm_hwm_kb : int64; + mutable oom_score_adj : int64; + mutable is_peak_rss_resettable : bool; + mutable chrome_private_footprint_kb : int32; + mutable chrome_peak_resident_set_kb : int32; + mutable fds : process_stats_fdinfo list; + mutable smr_rss_kb : int64; + mutable smr_pss_kb : int64; + mutable smr_pss_anon_kb : int64; + mutable smr_pss_file_kb : int64; + mutable smr_pss_shmem_kb : int64; + mutable smr_swap_pss_kb : int64; + mutable runtime_user_mode : int64; + mutable runtime_kernel_mode : int64; + mutable dmabuf_rss_kb : int64; +} + +type process_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable processes : process_stats_process list; + mutable collection_end_timestamp : int64; +} + +type process_tree_thread = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable tid : int32; + mutable tgid : int32; + mutable name : string; + mutable nstid : int32 list; +} + +type process_tree_process = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable pid : int32; + mutable ppid : int32; + mutable cmdline : string list; + mutable cmdline_is_comm : bool; + mutable uid : int32; + mutable nspid : int32 list; + mutable process_start_from_boot : int64; + mutable is_kthread : bool; +} + +type process_tree = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable processes : process_tree_process list; + mutable threads : process_tree_thread list; + mutable collection_end_timestamp : int64; +} + +type remote_clock_sync_synced_clocks = private { + mutable client_clocks : clock_snapshot option; + mutable host_clocks : clock_snapshot option; +} + +type remote_clock_sync = private { + mutable synced_clocks : remote_clock_sync_synced_clocks list; +} + +type atom = unit + +type statsd_atom = private { + mutable atom : unit list; + mutable timestamp_nanos : int64 list; +} + +type sys_stats_meminfo_value = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable key : meminfo_counters; + mutable value : int64; +} + +type sys_stats_vmstat_value = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable key : vmstat_counters; + mutable value : int64; +} + +type sys_stats_cpu_times = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable cpu_id : int32; + mutable user_ns : int64; + mutable user_nice_ns : int64; + mutable system_mode_ns : int64; + mutable idle_ns : int64; + mutable io_wait_ns : int64; + mutable irq_ns : int64; + mutable softirq_ns : int64; + mutable steal_ns : int64; +} + +type sys_stats_interrupt_count = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable irq : int32; + mutable count : int64; +} + +type sys_stats_devfreq_value = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable key : string; + mutable value : int64; +} + +type sys_stats_buddy_info = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable node : string; + mutable zone : string; + mutable order_pages : int32 list; +} + +type sys_stats_disk_stat = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 9 fields *) + mutable device_name : string; + mutable read_sectors : int64; + mutable read_time_ms : int64; + mutable write_sectors : int64; + mutable write_time_ms : int64; + mutable discard_sectors : int64; + mutable discard_time_ms : int64; + mutable flush_count : int64; + mutable flush_time_ms : int64; +} + +type sys_stats_psi_sample_psi_resource = + | Psi_resource_unspecified + | Psi_resource_cpu_some + | Psi_resource_cpu_full + | Psi_resource_io_some + | Psi_resource_io_full + | Psi_resource_memory_some + | Psi_resource_memory_full + +type sys_stats_psi_sample = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable resource : sys_stats_psi_sample_psi_resource; + mutable total_ns : int64; +} + +type sys_stats_thermal_zone = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable name : string; + mutable temp : int64; + mutable type_ : string; +} + +type sys_stats_cpu_idle_state_entry = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable state : string; + mutable duration_us : int64; +} + +type sys_stats_cpu_idle_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable cpu_id : int32; + mutable cpuidle_state_entry : sys_stats_cpu_idle_state_entry list; +} + +type sys_stats = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable meminfo : sys_stats_meminfo_value list; + mutable vmstat : sys_stats_vmstat_value list; + mutable cpu_stat : sys_stats_cpu_times list; + mutable num_forks : int64; + mutable num_irq_total : int64; + mutable num_irq : sys_stats_interrupt_count list; + mutable num_softirq_total : int64; + mutable num_softirq : sys_stats_interrupt_count list; + mutable collection_end_timestamp : int64; + mutable devfreq : sys_stats_devfreq_value list; + mutable cpufreq_khz : int32 list; + mutable buddy_info : sys_stats_buddy_info list; + mutable disk_stat : sys_stats_disk_stat list; + mutable psi : sys_stats_psi_sample list; + mutable thermal_zone : sys_stats_thermal_zone list; + mutable cpuidle_state : sys_stats_cpu_idle_state list; + mutable gpufreq_mhz : int64 list; +} + +type cpu_info_arm_cpu_identifier = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable implementer : int32; + mutable architecture : int32; + mutable variant : int32; + mutable part : int32; + mutable revision : int32; +} + +type cpu_info_cpu_identifier = + | Arm_identifier of cpu_info_arm_cpu_identifier + +and cpu_info_cpu = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable processor : string; + mutable frequencies : int32 list; + mutable capacity : int32; + mutable identifier : cpu_info_cpu_identifier option; + mutable features : int64; +} + +type cpu_info = private { + mutable cpus : cpu_info_cpu list; +} + +type test_event_test_payload = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable str : string list; + mutable nested : test_event_test_payload list; + mutable single_string : string; + mutable single_int : int32; + mutable repeated_ints : int32 list; + mutable remaining_nesting_depth : int32; + mutable debug_annotations : debug_annotation list; +} + +type test_event = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable str : string; + mutable seq_value : int32; + mutable counter : int64; + mutable is_last : bool; + mutable payload : test_event_test_payload option; +} + +type trace_packet_defaults = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable timestamp_clock_id : int32; + mutable track_event_defaults : track_event_defaults option; + mutable v8_code_defaults : v8_code_defaults option; +} + +type trace_uuid = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable msb : int64; + mutable lsb : int64; +} + +type process_descriptor_chrome_process_type = + | Process_unspecified + | Process_browser + | Process_renderer + | Process_utility + | Process_zygote + | Process_sandbox_helper + | Process_gpu + | Process_ppapi_plugin + | Process_ppapi_broker + +type process_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable pid : int32; + mutable cmdline : string list; + mutable process_name : string; + mutable process_priority : int32; + mutable start_timestamp_ns : int64; + mutable chrome_process_type : process_descriptor_chrome_process_type; + mutable legacy_sort_index : int32; + mutable process_labels : string list; +} + +type track_event_range_of_interest = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 1 fields *) + mutable start_us : int64; +} + +type thread_descriptor_chrome_thread_type = + | Chrome_thread_unspecified + | Chrome_thread_main + | Chrome_thread_io + | Chrome_thread_pool_bg_worker + | Chrome_thread_pool_fg_worker + | Chrome_thread_pool_fb_blocking + | Chrome_thread_pool_bg_blocking + | Chrome_thread_pool_service + | Chrome_thread_compositor + | Chrome_thread_viz_compositor + | Chrome_thread_compositor_worker + | Chrome_thread_service_worker + | Chrome_thread_memory_infra + | Chrome_thread_sampling_profiler + +type thread_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable pid : int32; + mutable tid : int32; + mutable thread_name : string; + mutable chrome_thread_type : thread_descriptor_chrome_thread_type; + mutable reference_timestamp_us : int64; + mutable reference_thread_time_us : int64; + mutable reference_thread_instruction_count : int64; + mutable legacy_sort_index : int32; +} + +type chrome_process_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 5 fields *) + mutable process_type : int32; + mutable process_priority : int32; + mutable legacy_sort_index : int32; + mutable host_app_package_name : string; + mutable crash_trace_id : int64; +} + +type chrome_thread_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 3 fields *) + mutable thread_type : int32; + mutable legacy_sort_index : int32; + mutable is_sandboxed_tid : bool; +} + +type counter_descriptor_builtin_counter_type = + | Counter_unspecified + | Counter_thread_time_ns + | Counter_thread_instruction_count + +type counter_descriptor_unit = + | Unit_unspecified + | Unit_time_ns + | Unit_count + | Unit_size_bytes + +type counter_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 6 fields *) + mutable type_ : counter_descriptor_builtin_counter_type; + mutable categories : string list; + mutable unit_ : counter_descriptor_unit; + mutable unit_name : string; + mutable unit_multiplier : int64; + mutable is_incremental : bool; + mutable y_axis_share_key : string; +} + +type track_descriptor_child_tracks_ordering = + | Unknown + | Lexicographic + | Chronological + | Explicit + +type track_descriptor_sibling_merge_behavior = + | Sibling_merge_behavior_unspecified + | Sibling_merge_behavior_by_track_name + | Sibling_merge_behavior_none + | Sibling_merge_behavior_by_sibling_merge_key + +type track_descriptor_static_or_dynamic_name = + | Name of string + | Static_name of string + | Atrace_name of string + +and track_descriptor_sibling_merge_key_field = + | Sibling_merge_key of string + | Sibling_merge_key_int of int64 + +and track_descriptor = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 7 fields *) + mutable uuid : int64; + mutable parent_uuid : int64; + mutable static_or_dynamic_name : track_descriptor_static_or_dynamic_name option; + mutable description : string; + mutable process : process_descriptor option; + mutable chrome_process : chrome_process_descriptor option; + mutable thread : thread_descriptor option; + mutable chrome_thread : chrome_thread_descriptor option; + mutable counter : counter_descriptor option; + mutable disallow_merging_with_system_tracks : bool; + mutable child_ordering : track_descriptor_child_tracks_ordering; + mutable sibling_order_rank : int32; + mutable sibling_merge_behavior : track_descriptor_sibling_merge_behavior; + mutable sibling_merge_key_field : track_descriptor_sibling_merge_key_field option; +} + +type chrome_historgram_translation_table = private { + mutable hash_to_name : (int64 * string) list; +} + +type chrome_user_event_translation_table = private { + mutable action_hash_to_name : (int64 * string) list; +} + +type chrome_performance_mark_translation_table = private { + mutable site_hash_to_name : (int32 * string) list; + mutable mark_hash_to_name : (int32 * string) list; +} + +type slice_name_translation_table = private { + mutable raw_to_deobfuscated_name : (string * string) list; +} + +type process_track_name_translation_table = private { + mutable raw_to_deobfuscated_name : (string * string) list; +} + +type chrome_study_translation_table = private { + mutable hash_to_name : (int64 * string) list; +} + +type translation_table = + | Chrome_histogram of chrome_historgram_translation_table + | Chrome_user_event of chrome_user_event_translation_table + | Chrome_performance_mark of chrome_performance_mark_translation_table + | Slice_name of slice_name_translation_table + | Process_track_name of process_track_name_translation_table + | Chrome_study of chrome_study_translation_table + +type trigger = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 4 fields *) + mutable trigger_name : string; + mutable producer_name : string; + mutable trusted_producer_uid : int32; + mutable stop_delay_ms : int64; +} + +type ui_state_highlight_process = + | Pid of int32 + | Cmdline of string + +type ui_state = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 2 fields *) + mutable timeline_start_ts : int64; + mutable timeline_end_ts : int64; + mutable highlight_process : ui_state_highlight_process option; +} + +type trace_packet_sequence_flags = + | Seq_unspecified + | Seq_incremental_state_cleared + | Seq_needs_incremental_state + +type trace_packet_data = + | Process_tree of process_tree + | Process_stats of process_stats + | Inode_file_map of inode_file_map + | Chrome_events of chrome_event_bundle + | Clock_snapshot of clock_snapshot + | Sys_stats of sys_stats + | Track_event of track_event + | Trace_uuid of trace_uuid + | Trace_config of trace_config + | Trace_stats of trace_stats + | Profile_packet of profile_packet + | Streaming_allocation of streaming_allocation + | Streaming_free of streaming_free + | Battery of battery_counters + | Power_rails of power_rails + | Android_log of android_log_packet + | System_info of system_info + | Trigger of trigger + | Chrome_trigger of chrome_trigger + | Packages_list of packages_list + | Chrome_benchmark_metadata of chrome_benchmark_metadata + | Perfetto_metatrace of perfetto_metatrace + | Chrome_metadata of chrome_metadata_packet + | Gpu_counter_event of gpu_counter_event + | Gpu_render_stage_event of gpu_render_stage_event + | Streaming_profile_packet of streaming_profile_packet + | Heap_graph of heap_graph + | Graphics_frame_event of graphics_frame_event + | Vulkan_memory_event of vulkan_memory_event + | Gpu_log of gpu_log + | Vulkan_api_event of vulkan_api_event + | Perf_sample of perf_sample + | Cpu_info of cpu_info + | Smaps_packet of smaps_packet + | Service_event of tracing_service_event + | Initial_display_state of initial_display_state + | Gpu_mem_total_event of gpu_mem_total_event + | Memory_tracker_snapshot of memory_tracker_snapshot + | Frame_timeline_event of frame_timeline_event + | Android_energy_estimation_breakdown of android_energy_estimation_breakdown + | Ui_state of ui_state + | Android_camera_frame_event of android_camera_frame_event + | Android_camera_session_stats of android_camera_session_stats + | Translation_table of translation_table + | Android_game_intervention_list of android_game_intervention_list + | Statsd_atom of statsd_atom + | Android_system_property of android_system_property + | Entity_state_residency of entity_state_residency + | Module_symbols of module_symbols + | Deobfuscation_mapping of deobfuscation_mapping + | Track_descriptor of track_descriptor + | Process_descriptor of process_descriptor + | Thread_descriptor of thread_descriptor + | Synchronization_marker of bytes + | Compressed_packets of bytes + | Extension_descriptor of extension_descriptor + | Network_packet of network_packet_event + | Network_packet_bundle of network_packet_bundle + | Track_event_range_of_interest of track_event_range_of_interest + | Surfaceflinger_layers_snapshot of layers_snapshot_proto + | Surfaceflinger_transactions of transaction_trace_entry + | Shell_transition of shell_transition + | Shell_handler_mappings of shell_handler_mappings + | Protolog_message of proto_log_message + | Protolog_viewer_config of proto_log_viewer_config + | Winscope_extensions + | Etw_events of etw_trace_event_bundle + | V8_js_code of v8_js_code + | V8_internal_code of v8_internal_code + | V8_wasm_code of v8_wasm_code + | V8_reg_exp_code of v8_reg_exp_code + | V8_code_move of v8_code_move + | Remote_clock_sync of remote_clock_sync + | Pixel_modem_events of pixel_modem_events + | Pixel_modem_token_database of pixel_modem_token_database + | Clone_snapshot_trigger of trigger + | Bluetooth_trace_event of bluetooth_trace_event + | Kernel_wakelock_data of kernel_wakelock_data + | App_wakelock_bundle of app_wakelock_bundle + | Generic_kernel_task_state_event of generic_kernel_task_state_event + | Generic_kernel_cpu_freq_event of generic_kernel_cpu_frequency_event + | Generic_kernel_task_rename_event of generic_kernel_task_rename_event + | Generic_kernel_process_tree of generic_kernel_process_tree + | Cpu_per_uid_data of cpu_per_uid_data + | Evdev_event of evdev_event + | For_testing of test_event + +and trace_packet_optional_trusted_uid = + | Trusted_uid of int32 + +and trace_packet_optional_trusted_packet_sequence_id = + | Trusted_packet_sequence_id of int32 + +and trace_packet = private { + mutable _presence: Pbrt.Bitfield.t; (** presence for 8 fields *) + mutable timestamp : int64; + mutable timestamp_clock_id : int32; + mutable data : trace_packet_data option; + mutable optional_trusted_uid : trace_packet_optional_trusted_uid option; + mutable optional_trusted_packet_sequence_id : trace_packet_optional_trusted_packet_sequence_id option; + mutable trusted_pid : int32; + mutable interned_data : interned_data option; + mutable sequence_flags : int32; + mutable incremental_state_cleared : bool; + mutable trace_packet_defaults : trace_packet_defaults option; + mutable previous_packet_dropped : bool; + mutable first_packet_on_sequence : bool; + mutable machine_id : int32; +} + +type trace = private { + mutable packet : trace_packet list; +} + + +(** {2 Basic values} *) + +val default_ftrace_descriptor_atrace_category : unit -> ftrace_descriptor_atrace_category +(** [default_ftrace_descriptor_atrace_category ()] is a new empty value for type [ftrace_descriptor_atrace_category] *) + +val default_ftrace_descriptor : unit -> ftrace_descriptor +(** [default_ftrace_descriptor ()] is a new empty value for type [ftrace_descriptor] *) + +val default_gpu_counter_descriptor_gpu_counter_group : unit -> gpu_counter_descriptor_gpu_counter_group +(** [default_gpu_counter_descriptor_gpu_counter_group ()] is a new empty value for type [gpu_counter_descriptor_gpu_counter_group] *) + +val default_gpu_counter_descriptor_measure_unit : unit -> gpu_counter_descriptor_measure_unit +(** [default_gpu_counter_descriptor_measure_unit ()] is a new empty value for type [gpu_counter_descriptor_measure_unit] *) + +val default_gpu_counter_descriptor_gpu_counter_spec_peak_value : unit -> gpu_counter_descriptor_gpu_counter_spec_peak_value +(** [default_gpu_counter_descriptor_gpu_counter_spec_peak_value ()] is a new empty value for type [gpu_counter_descriptor_gpu_counter_spec_peak_value] *) + +val default_gpu_counter_descriptor_gpu_counter_spec : unit -> gpu_counter_descriptor_gpu_counter_spec +(** [default_gpu_counter_descriptor_gpu_counter_spec ()] is a new empty value for type [gpu_counter_descriptor_gpu_counter_spec] *) + +val default_gpu_counter_descriptor_gpu_counter_block : unit -> gpu_counter_descriptor_gpu_counter_block +(** [default_gpu_counter_descriptor_gpu_counter_block ()] is a new empty value for type [gpu_counter_descriptor_gpu_counter_block] *) + +val default_gpu_counter_descriptor : unit -> gpu_counter_descriptor +(** [default_gpu_counter_descriptor ()] is a new empty value for type [gpu_counter_descriptor] *) + +val default_track_event_category : unit -> track_event_category +(** [default_track_event_category ()] is a new empty value for type [track_event_category] *) + +val default_track_event_descriptor : unit -> track_event_descriptor +(** [default_track_event_descriptor ()] is a new empty value for type [track_event_descriptor] *) + +val default_data_source_descriptor : unit -> data_source_descriptor +(** [default_data_source_descriptor ()] is a new empty value for type [data_source_descriptor] *) + +val default_tracing_service_state_producer : unit -> tracing_service_state_producer +(** [default_tracing_service_state_producer ()] is a new empty value for type [tracing_service_state_producer] *) + +val default_tracing_service_state_data_source : unit -> tracing_service_state_data_source +(** [default_tracing_service_state_data_source ()] is a new empty value for type [tracing_service_state_data_source] *) + +val default_tracing_service_state_tracing_session : unit -> tracing_service_state_tracing_session +(** [default_tracing_service_state_tracing_session ()] is a new empty value for type [tracing_service_state_tracing_session] *) + +val default_tracing_service_state : unit -> tracing_service_state +(** [default_tracing_service_state ()] is a new empty value for type [tracing_service_state] *) + +val default_builtin_clock : unit -> builtin_clock +(** [default_builtin_clock ()] is a new empty value for type [builtin_clock] *) + +val default_android_game_intervention_list_config : unit -> android_game_intervention_list_config +(** [default_android_game_intervention_list_config ()] is a new empty value for type [android_game_intervention_list_config] *) + +val default_android_input_event_config_trace_mode : unit -> android_input_event_config_trace_mode +(** [default_android_input_event_config_trace_mode ()] is a new empty value for type [android_input_event_config_trace_mode] *) + +val default_android_input_event_config_trace_level : unit -> android_input_event_config_trace_level +(** [default_android_input_event_config_trace_level ()] is a new empty value for type [android_input_event_config_trace_level] *) + +val default_android_input_event_config_trace_rule : unit -> android_input_event_config_trace_rule +(** [default_android_input_event_config_trace_rule ()] is a new empty value for type [android_input_event_config_trace_rule] *) + +val default_android_input_event_config : unit -> android_input_event_config +(** [default_android_input_event_config ()] is a new empty value for type [android_input_event_config] *) + +val default_android_log_id : unit -> android_log_id +(** [default_android_log_id ()] is a new empty value for type [android_log_id] *) + +val default_android_log_priority : unit -> android_log_priority +(** [default_android_log_priority ()] is a new empty value for type [android_log_priority] *) + +val default_android_log_config : unit -> android_log_config +(** [default_android_log_config ()] is a new empty value for type [android_log_config] *) + +val default_android_polled_state_config : unit -> android_polled_state_config +(** [default_android_polled_state_config ()] is a new empty value for type [android_polled_state_config] *) + +val default_android_sdk_sysprop_guard_config : unit -> android_sdk_sysprop_guard_config +(** [default_android_sdk_sysprop_guard_config ()] is a new empty value for type [android_sdk_sysprop_guard_config] *) + +val default_android_system_property_config : unit -> android_system_property_config +(** [default_android_system_property_config ()] is a new empty value for type [android_system_property_config] *) + +val default_app_wakelocks_config : unit -> app_wakelocks_config +(** [default_app_wakelocks_config ()] is a new empty value for type [app_wakelocks_config] *) + +val default_cpu_per_uid_config : unit -> cpu_per_uid_config +(** [default_cpu_per_uid_config ()] is a new empty value for type [cpu_per_uid_config] *) + +val default_kernel_wakelocks_config : unit -> kernel_wakelocks_config +(** [default_kernel_wakelocks_config ()] is a new empty value for type [kernel_wakelocks_config] *) + +val default_network_packet_trace_config : unit -> network_packet_trace_config +(** [default_network_packet_trace_config ()] is a new empty value for type [network_packet_trace_config] *) + +val default_packages_list_config : unit -> packages_list_config +(** [default_packages_list_config ()] is a new empty value for type [packages_list_config] *) + +val default_pixel_modem_config_event_group : unit -> pixel_modem_config_event_group +(** [default_pixel_modem_config_event_group ()] is a new empty value for type [pixel_modem_config_event_group] *) + +val default_pixel_modem_config : unit -> pixel_modem_config +(** [default_pixel_modem_config ()] is a new empty value for type [pixel_modem_config] *) + +val default_proto_log_level : unit -> proto_log_level +(** [default_proto_log_level ()] is a new empty value for type [proto_log_level] *) + +val default_proto_log_config_tracing_mode : unit -> proto_log_config_tracing_mode +(** [default_proto_log_config_tracing_mode ()] is a new empty value for type [proto_log_config_tracing_mode] *) + +val default_proto_log_group : unit -> proto_log_group +(** [default_proto_log_group ()] is a new empty value for type [proto_log_group] *) + +val default_proto_log_config : unit -> proto_log_config +(** [default_proto_log_config ()] is a new empty value for type [proto_log_config] *) + +val default_surface_flinger_layers_config_mode : unit -> surface_flinger_layers_config_mode +(** [default_surface_flinger_layers_config_mode ()] is a new empty value for type [surface_flinger_layers_config_mode] *) + +val default_surface_flinger_layers_config_trace_flag : unit -> surface_flinger_layers_config_trace_flag +(** [default_surface_flinger_layers_config_trace_flag ()] is a new empty value for type [surface_flinger_layers_config_trace_flag] *) + +val default_surface_flinger_layers_config : unit -> surface_flinger_layers_config +(** [default_surface_flinger_layers_config ()] is a new empty value for type [surface_flinger_layers_config] *) + +val default_surface_flinger_transactions_config_mode : unit -> surface_flinger_transactions_config_mode +(** [default_surface_flinger_transactions_config_mode ()] is a new empty value for type [surface_flinger_transactions_config_mode] *) + +val default_surface_flinger_transactions_config : unit -> surface_flinger_transactions_config +(** [default_surface_flinger_transactions_config ()] is a new empty value for type [surface_flinger_transactions_config] *) + +val default_window_manager_config_log_frequency : unit -> window_manager_config_log_frequency +(** [default_window_manager_config_log_frequency ()] is a new empty value for type [window_manager_config_log_frequency] *) + +val default_window_manager_config_log_level : unit -> window_manager_config_log_level +(** [default_window_manager_config_log_level ()] is a new empty value for type [window_manager_config_log_level] *) + +val default_window_manager_config : unit -> window_manager_config +(** [default_window_manager_config ()] is a new empty value for type [window_manager_config] *) + +val default_chrome_config_client_priority : unit -> chrome_config_client_priority +(** [default_chrome_config_client_priority ()] is a new empty value for type [chrome_config_client_priority] *) + +val default_chrome_config : unit -> chrome_config +(** [default_chrome_config ()] is a new empty value for type [chrome_config] *) + +val default_chromium_histogram_samples_config_histogram_sample : unit -> chromium_histogram_samples_config_histogram_sample +(** [default_chromium_histogram_samples_config_histogram_sample ()] is a new empty value for type [chromium_histogram_samples_config_histogram_sample] *) + +val default_chromium_histogram_samples_config : unit -> chromium_histogram_samples_config +(** [default_chromium_histogram_samples_config ()] is a new empty value for type [chromium_histogram_samples_config] *) + +val default_chromium_system_metrics_config : unit -> chromium_system_metrics_config +(** [default_chromium_system_metrics_config ()] is a new empty value for type [chromium_system_metrics_config] *) + +val default_v8_config : unit -> v8_config +(** [default_v8_config ()] is a new empty value for type [v8_config] *) + +val default_etw_config_kernel_flag : unit -> etw_config_kernel_flag +(** [default_etw_config_kernel_flag ()] is a new empty value for type [etw_config_kernel_flag] *) + +val default_etw_config : unit -> etw_config +(** [default_etw_config ()] is a new empty value for type [etw_config] *) + +val default_frozen_ftrace_config : unit -> frozen_ftrace_config +(** [default_frozen_ftrace_config ()] is a new empty value for type [frozen_ftrace_config] *) + +val default_ftrace_config_compact_sched_config : unit -> ftrace_config_compact_sched_config +(** [default_ftrace_config_compact_sched_config ()] is a new empty value for type [ftrace_config_compact_sched_config] *) + +val default_ftrace_config_print_filter_rule_atrace_message : unit -> ftrace_config_print_filter_rule_atrace_message +(** [default_ftrace_config_print_filter_rule_atrace_message ()] is a new empty value for type [ftrace_config_print_filter_rule_atrace_message] *) + +val default_ftrace_config_print_filter_rule_match : unit -> ftrace_config_print_filter_rule_match +(** [default_ftrace_config_print_filter_rule_match ()] is a new empty value for type [ftrace_config_print_filter_rule_match] *) + +val default_ftrace_config_print_filter_rule : unit -> ftrace_config_print_filter_rule +(** [default_ftrace_config_print_filter_rule ()] is a new empty value for type [ftrace_config_print_filter_rule] *) + +val default_ftrace_config_print_filter : unit -> ftrace_config_print_filter +(** [default_ftrace_config_print_filter ()] is a new empty value for type [ftrace_config_print_filter] *) + +val default_ftrace_config_ksyms_mem_policy : unit -> ftrace_config_ksyms_mem_policy +(** [default_ftrace_config_ksyms_mem_policy ()] is a new empty value for type [ftrace_config_ksyms_mem_policy] *) + +val default_ftrace_config_kprobe_event_kprobe_type : unit -> ftrace_config_kprobe_event_kprobe_type +(** [default_ftrace_config_kprobe_event_kprobe_type ()] is a new empty value for type [ftrace_config_kprobe_event_kprobe_type] *) + +val default_ftrace_config_kprobe_event : unit -> ftrace_config_kprobe_event +(** [default_ftrace_config_kprobe_event ()] is a new empty value for type [ftrace_config_kprobe_event] *) + +val default_ftrace_config_tracefs_option_state : unit -> ftrace_config_tracefs_option_state +(** [default_ftrace_config_tracefs_option_state ()] is a new empty value for type [ftrace_config_tracefs_option_state] *) + +val default_ftrace_config_tracefs_option : unit -> ftrace_config_tracefs_option +(** [default_ftrace_config_tracefs_option ()] is a new empty value for type [ftrace_config_tracefs_option] *) + +val default_ftrace_config : unit -> ftrace_config +(** [default_ftrace_config ()] is a new empty value for type [ftrace_config] *) + +val default_gpu_counter_config : unit -> gpu_counter_config +(** [default_gpu_counter_config ()] is a new empty value for type [gpu_counter_config] *) + +val default_gpu_render_stages_config : unit -> gpu_render_stages_config +(** [default_gpu_render_stages_config ()] is a new empty value for type [gpu_render_stages_config] *) + +val default_vulkan_memory_config : unit -> vulkan_memory_config +(** [default_vulkan_memory_config ()] is a new empty value for type [vulkan_memory_config] *) + +val default_inode_file_config_mount_point_mapping_entry : unit -> inode_file_config_mount_point_mapping_entry +(** [default_inode_file_config_mount_point_mapping_entry ()] is a new empty value for type [inode_file_config_mount_point_mapping_entry] *) + +val default_inode_file_config : unit -> inode_file_config +(** [default_inode_file_config ()] is a new empty value for type [inode_file_config] *) + +val default_console_config_output : unit -> console_config_output +(** [default_console_config_output ()] is a new empty value for type [console_config_output] *) + +val default_console_config : unit -> console_config +(** [default_console_config ()] is a new empty value for type [console_config] *) + +val default_interceptor_config : unit -> interceptor_config +(** [default_interceptor_config ()] is a new empty value for type [interceptor_config] *) + +val default_android_power_config_battery_counters : unit -> android_power_config_battery_counters +(** [default_android_power_config_battery_counters ()] is a new empty value for type [android_power_config_battery_counters] *) + +val default_android_power_config : unit -> android_power_config +(** [default_android_power_config ()] is a new empty value for type [android_power_config] *) + +val default_priority_boost_config_boost_policy : unit -> priority_boost_config_boost_policy +(** [default_priority_boost_config_boost_policy ()] is a new empty value for type [priority_boost_config_boost_policy] *) + +val default_priority_boost_config : unit -> priority_boost_config +(** [default_priority_boost_config ()] is a new empty value for type [priority_boost_config] *) + +val default_process_stats_config_quirks : unit -> process_stats_config_quirks +(** [default_process_stats_config_quirks ()] is a new empty value for type [process_stats_config_quirks] *) + +val default_process_stats_config : unit -> process_stats_config +(** [default_process_stats_config ()] is a new empty value for type [process_stats_config] *) + +val default_heapprofd_config_continuous_dump_config : unit -> heapprofd_config_continuous_dump_config +(** [default_heapprofd_config_continuous_dump_config ()] is a new empty value for type [heapprofd_config_continuous_dump_config] *) + +val default_heapprofd_config : unit -> heapprofd_config +(** [default_heapprofd_config ()] is a new empty value for type [heapprofd_config] *) + +val default_atom_id : unit -> atom_id +(** [default_atom_id ()] is a new empty value for type [atom_id] *) + +val default_statsd_pull_atom_config : unit -> statsd_pull_atom_config +(** [default_statsd_pull_atom_config ()] is a new empty value for type [statsd_pull_atom_config] *) + +val default_statsd_tracing_config : unit -> statsd_tracing_config +(** [default_statsd_tracing_config ()] is a new empty value for type [statsd_tracing_config] *) + +val default_meminfo_counters : unit -> meminfo_counters +(** [default_meminfo_counters ()] is a new empty value for type [meminfo_counters] *) + +val default_vmstat_counters : unit -> vmstat_counters +(** [default_vmstat_counters ()] is a new empty value for type [vmstat_counters] *) + +val default_sys_stats_config_stat_counters : unit -> sys_stats_config_stat_counters +(** [default_sys_stats_config_stat_counters ()] is a new empty value for type [sys_stats_config_stat_counters] *) + +val default_sys_stats_config : unit -> sys_stats_config +(** [default_sys_stats_config ()] is a new empty value for type [sys_stats_config] *) + +val default_system_info_config : unit +(** [default_system_info_config] is the default value for type [system_info_config] *) + +val default_test_config_dummy_fields : unit -> test_config_dummy_fields +(** [default_test_config_dummy_fields ()] is a new empty value for type [test_config_dummy_fields] *) + +val default_test_config : unit -> test_config +(** [default_test_config ()] is a new empty value for type [test_config] *) + +val default_track_event_config : unit -> track_event_config +(** [default_track_event_config ()] is a new empty value for type [track_event_config] *) + +val default_data_source_config_session_initiator : unit -> data_source_config_session_initiator +(** [default_data_source_config_session_initiator ()] is a new empty value for type [data_source_config_session_initiator] *) + +val default_data_source_config_buffer_exhausted_policy : unit -> data_source_config_buffer_exhausted_policy +(** [default_data_source_config_buffer_exhausted_policy ()] is a new empty value for type [data_source_config_buffer_exhausted_policy] *) + +val default_data_source_config : unit -> data_source_config +(** [default_data_source_config ()] is a new empty value for type [data_source_config] *) + +val default_trace_config_buffer_config_fill_policy : unit -> trace_config_buffer_config_fill_policy +(** [default_trace_config_buffer_config_fill_policy ()] is a new empty value for type [trace_config_buffer_config_fill_policy] *) + +val default_trace_config_buffer_config : unit -> trace_config_buffer_config +(** [default_trace_config_buffer_config ()] is a new empty value for type [trace_config_buffer_config] *) + +val default_trace_config_data_source : unit -> trace_config_data_source +(** [default_trace_config_data_source ()] is a new empty value for type [trace_config_data_source] *) + +val default_trace_config_builtin_data_source : unit -> trace_config_builtin_data_source +(** [default_trace_config_builtin_data_source ()] is a new empty value for type [trace_config_builtin_data_source] *) + +val default_trace_config_lockdown_mode_operation : unit -> trace_config_lockdown_mode_operation +(** [default_trace_config_lockdown_mode_operation ()] is a new empty value for type [trace_config_lockdown_mode_operation] *) + +val default_trace_config_producer_config : unit -> trace_config_producer_config +(** [default_trace_config_producer_config ()] is a new empty value for type [trace_config_producer_config] *) + +val default_trace_config_statsd_metadata : unit -> trace_config_statsd_metadata +(** [default_trace_config_statsd_metadata ()] is a new empty value for type [trace_config_statsd_metadata] *) + +val default_trace_config_guardrail_overrides : unit -> trace_config_guardrail_overrides +(** [default_trace_config_guardrail_overrides ()] is a new empty value for type [trace_config_guardrail_overrides] *) + +val default_trace_config_trigger_config_trigger_mode : unit -> trace_config_trigger_config_trigger_mode +(** [default_trace_config_trigger_config_trigger_mode ()] is a new empty value for type [trace_config_trigger_config_trigger_mode] *) + +val default_trace_config_trigger_config_trigger : unit -> trace_config_trigger_config_trigger +(** [default_trace_config_trigger_config_trigger ()] is a new empty value for type [trace_config_trigger_config_trigger] *) + +val default_trace_config_trigger_config : unit -> trace_config_trigger_config +(** [default_trace_config_trigger_config ()] is a new empty value for type [trace_config_trigger_config] *) + +val default_trace_config_incremental_state_config : unit -> trace_config_incremental_state_config +(** [default_trace_config_incremental_state_config ()] is a new empty value for type [trace_config_incremental_state_config] *) + +val default_trace_config_compression_type : unit -> trace_config_compression_type +(** [default_trace_config_compression_type ()] is a new empty value for type [trace_config_compression_type] *) + +val default_trace_config_incident_report_config : unit -> trace_config_incident_report_config +(** [default_trace_config_incident_report_config ()] is a new empty value for type [trace_config_incident_report_config] *) + +val default_trace_config_statsd_logging : unit -> trace_config_statsd_logging +(** [default_trace_config_statsd_logging ()] is a new empty value for type [trace_config_statsd_logging] *) + +val default_trace_config_trace_filter_string_filter_policy : unit -> trace_config_trace_filter_string_filter_policy +(** [default_trace_config_trace_filter_string_filter_policy ()] is a new empty value for type [trace_config_trace_filter_string_filter_policy] *) + +val default_trace_config_trace_filter_string_filter_rule : unit -> trace_config_trace_filter_string_filter_rule +(** [default_trace_config_trace_filter_string_filter_rule ()] is a new empty value for type [trace_config_trace_filter_string_filter_rule] *) + +val default_trace_config_trace_filter_string_filter_chain : unit -> trace_config_trace_filter_string_filter_chain +(** [default_trace_config_trace_filter_string_filter_chain ()] is a new empty value for type [trace_config_trace_filter_string_filter_chain] *) + +val default_trace_config_trace_filter : unit -> trace_config_trace_filter +(** [default_trace_config_trace_filter ()] is a new empty value for type [trace_config_trace_filter] *) + +val default_trace_config_android_report_config : unit -> trace_config_android_report_config +(** [default_trace_config_android_report_config ()] is a new empty value for type [trace_config_android_report_config] *) + +val default_trace_config_cmd_trace_start_delay : unit -> trace_config_cmd_trace_start_delay +(** [default_trace_config_cmd_trace_start_delay ()] is a new empty value for type [trace_config_cmd_trace_start_delay] *) + +val default_trace_config_session_semaphore : unit -> trace_config_session_semaphore +(** [default_trace_config_session_semaphore ()] is a new empty value for type [trace_config_session_semaphore] *) + +val default_trace_config : unit -> trace_config +(** [default_trace_config ()] is a new empty value for type [trace_config] *) + +val default_utsname : unit -> utsname +(** [default_utsname ()] is a new empty value for type [utsname] *) + +val default_system_info : unit -> system_info +(** [default_system_info ()] is a new empty value for type [system_info] *) + +val default_trace_stats_buffer_stats : unit -> trace_stats_buffer_stats +(** [default_trace_stats_buffer_stats ()] is a new empty value for type [trace_stats_buffer_stats] *) + +val default_trace_stats_writer_stats : unit -> trace_stats_writer_stats +(** [default_trace_stats_writer_stats ()] is a new empty value for type [trace_stats_writer_stats] *) + +val default_trace_stats_filter_stats : unit -> trace_stats_filter_stats +(** [default_trace_stats_filter_stats ()] is a new empty value for type [trace_stats_filter_stats] *) + +val default_trace_stats_final_flush_outcome : unit -> trace_stats_final_flush_outcome +(** [default_trace_stats_final_flush_outcome ()] is a new empty value for type [trace_stats_final_flush_outcome] *) + +val default_trace_stats : unit -> trace_stats +(** [default_trace_stats ()] is a new empty value for type [trace_stats] *) + +val default_android_game_intervention_list_game_mode_info : unit -> android_game_intervention_list_game_mode_info +(** [default_android_game_intervention_list_game_mode_info ()] is a new empty value for type [android_game_intervention_list_game_mode_info] *) + +val default_android_game_intervention_list_game_package_info : unit -> android_game_intervention_list_game_package_info +(** [default_android_game_intervention_list_game_package_info ()] is a new empty value for type [android_game_intervention_list_game_package_info] *) + +val default_android_game_intervention_list : unit -> android_game_intervention_list +(** [default_android_game_intervention_list ()] is a new empty value for type [android_game_intervention_list] *) + +val default_android_log_packet_log_event_arg_value : unit -> android_log_packet_log_event_arg_value +(** [default_android_log_packet_log_event_arg_value ()] is a new empty value for type [android_log_packet_log_event_arg_value] *) + +val default_android_log_packet_log_event_arg : unit -> android_log_packet_log_event_arg +(** [default_android_log_packet_log_event_arg ()] is a new empty value for type [android_log_packet_log_event_arg] *) + +val default_android_log_packet_log_event : unit -> android_log_packet_log_event +(** [default_android_log_packet_log_event ()] is a new empty value for type [android_log_packet_log_event] *) + +val default_android_log_packet_stats : unit -> android_log_packet_stats +(** [default_android_log_packet_stats ()] is a new empty value for type [android_log_packet_stats] *) + +val default_android_log_packet : unit -> android_log_packet +(** [default_android_log_packet ()] is a new empty value for type [android_log_packet] *) + +val default_android_system_property_property_value : unit -> android_system_property_property_value +(** [default_android_system_property_property_value ()] is a new empty value for type [android_system_property_property_value] *) + +val default_android_system_property : unit -> android_system_property +(** [default_android_system_property ()] is a new empty value for type [android_system_property] *) + +val default_app_wakelock_info : unit -> app_wakelock_info +(** [default_app_wakelock_info ()] is a new empty value for type [app_wakelock_info] *) + +val default_app_wakelock_bundle : unit -> app_wakelock_bundle +(** [default_app_wakelock_bundle ()] is a new empty value for type [app_wakelock_bundle] *) + +val default_bluetooth_trace_packet_type : unit -> bluetooth_trace_packet_type +(** [default_bluetooth_trace_packet_type ()] is a new empty value for type [bluetooth_trace_packet_type] *) + +val default_bluetooth_trace_event : unit -> bluetooth_trace_event +(** [default_bluetooth_trace_event ()] is a new empty value for type [bluetooth_trace_event] *) + +val default_android_camera_frame_event_capture_result_status : unit -> android_camera_frame_event_capture_result_status +(** [default_android_camera_frame_event_capture_result_status ()] is a new empty value for type [android_camera_frame_event_capture_result_status] *) + +val default_android_camera_frame_event_camera_node_processing_details : unit -> android_camera_frame_event_camera_node_processing_details +(** [default_android_camera_frame_event_camera_node_processing_details ()] is a new empty value for type [android_camera_frame_event_camera_node_processing_details] *) + +val default_android_camera_frame_event : unit -> android_camera_frame_event +(** [default_android_camera_frame_event ()] is a new empty value for type [android_camera_frame_event] *) + +val default_android_camera_session_stats_camera_graph_camera_node : unit -> android_camera_session_stats_camera_graph_camera_node +(** [default_android_camera_session_stats_camera_graph_camera_node ()] is a new empty value for type [android_camera_session_stats_camera_graph_camera_node] *) + +val default_android_camera_session_stats_camera_graph_camera_edge : unit -> android_camera_session_stats_camera_graph_camera_edge +(** [default_android_camera_session_stats_camera_graph_camera_edge ()] is a new empty value for type [android_camera_session_stats_camera_graph_camera_edge] *) + +val default_android_camera_session_stats_camera_graph : unit -> android_camera_session_stats_camera_graph +(** [default_android_camera_session_stats_camera_graph ()] is a new empty value for type [android_camera_session_stats_camera_graph] *) + +val default_android_camera_session_stats : unit -> android_camera_session_stats +(** [default_android_camera_session_stats ()] is a new empty value for type [android_camera_session_stats] *) + +val default_cpu_per_uid_data : unit -> cpu_per_uid_data +(** [default_cpu_per_uid_data ()] is a new empty value for type [cpu_per_uid_data] *) + +val default_frame_timeline_event_jank_type : unit -> frame_timeline_event_jank_type +(** [default_frame_timeline_event_jank_type ()] is a new empty value for type [frame_timeline_event_jank_type] *) + +val default_frame_timeline_event_jank_severity_type : unit -> frame_timeline_event_jank_severity_type +(** [default_frame_timeline_event_jank_severity_type ()] is a new empty value for type [frame_timeline_event_jank_severity_type] *) + +val default_frame_timeline_event_present_type : unit -> frame_timeline_event_present_type +(** [default_frame_timeline_event_present_type ()] is a new empty value for type [frame_timeline_event_present_type] *) + +val default_frame_timeline_event_prediction_type : unit -> frame_timeline_event_prediction_type +(** [default_frame_timeline_event_prediction_type ()] is a new empty value for type [frame_timeline_event_prediction_type] *) + +val default_frame_timeline_event_expected_surface_frame_start : unit -> frame_timeline_event_expected_surface_frame_start +(** [default_frame_timeline_event_expected_surface_frame_start ()] is a new empty value for type [frame_timeline_event_expected_surface_frame_start] *) + +val default_frame_timeline_event_actual_surface_frame_start : unit -> frame_timeline_event_actual_surface_frame_start +(** [default_frame_timeline_event_actual_surface_frame_start ()] is a new empty value for type [frame_timeline_event_actual_surface_frame_start] *) + +val default_frame_timeline_event_expected_display_frame_start : unit -> frame_timeline_event_expected_display_frame_start +(** [default_frame_timeline_event_expected_display_frame_start ()] is a new empty value for type [frame_timeline_event_expected_display_frame_start] *) + +val default_frame_timeline_event_actual_display_frame_start : unit -> frame_timeline_event_actual_display_frame_start +(** [default_frame_timeline_event_actual_display_frame_start ()] is a new empty value for type [frame_timeline_event_actual_display_frame_start] *) + +val default_frame_timeline_event_frame_end : unit -> frame_timeline_event_frame_end +(** [default_frame_timeline_event_frame_end ()] is a new empty value for type [frame_timeline_event_frame_end] *) + +val default_frame_timeline_event : unit -> frame_timeline_event +(** [default_frame_timeline_event ()] is a new empty value for type [frame_timeline_event] *) + +val default_gpu_mem_total_event : unit -> gpu_mem_total_event +(** [default_gpu_mem_total_event ()] is a new empty value for type [gpu_mem_total_event] *) + +val default_graphics_frame_event_buffer_event_type : unit -> graphics_frame_event_buffer_event_type +(** [default_graphics_frame_event_buffer_event_type ()] is a new empty value for type [graphics_frame_event_buffer_event_type] *) + +val default_graphics_frame_event_buffer_event : unit -> graphics_frame_event_buffer_event +(** [default_graphics_frame_event_buffer_event ()] is a new empty value for type [graphics_frame_event_buffer_event] *) + +val default_graphics_frame_event : unit -> graphics_frame_event +(** [default_graphics_frame_event ()] is a new empty value for type [graphics_frame_event] *) + +val default_initial_display_state : unit -> initial_display_state +(** [default_initial_display_state ()] is a new empty value for type [initial_display_state] *) + +val default_kernel_wakelock_data_wakelock_type : unit -> kernel_wakelock_data_wakelock_type +(** [default_kernel_wakelock_data_wakelock_type ()] is a new empty value for type [kernel_wakelock_data_wakelock_type] *) + +val default_kernel_wakelock_data_wakelock : unit -> kernel_wakelock_data_wakelock +(** [default_kernel_wakelock_data_wakelock ()] is a new empty value for type [kernel_wakelock_data_wakelock] *) + +val default_kernel_wakelock_data : unit -> kernel_wakelock_data +(** [default_kernel_wakelock_data ()] is a new empty value for type [kernel_wakelock_data] *) + +val default_traffic_direction : unit -> traffic_direction +(** [default_traffic_direction ()] is a new empty value for type [traffic_direction] *) + +val default_network_packet_event : unit -> network_packet_event +(** [default_network_packet_event ()] is a new empty value for type [network_packet_event] *) + +val default_network_packet_bundle_packet_context : unit -> network_packet_bundle_packet_context +(** [default_network_packet_bundle_packet_context ()] is a new empty value for type [network_packet_bundle_packet_context] *) + +val default_network_packet_bundle : unit -> network_packet_bundle +(** [default_network_packet_bundle ()] is a new empty value for type [network_packet_bundle] *) + +val default_network_packet_context : unit -> network_packet_context +(** [default_network_packet_context ()] is a new empty value for type [network_packet_context] *) + +val default_packages_list_package_info : unit -> packages_list_package_info +(** [default_packages_list_package_info ()] is a new empty value for type [packages_list_package_info] *) + +val default_packages_list : unit -> packages_list +(** [default_packages_list ()] is a new empty value for type [packages_list] *) + +val default_pixel_modem_events : unit -> pixel_modem_events +(** [default_pixel_modem_events ()] is a new empty value for type [pixel_modem_events] *) + +val default_pixel_modem_token_database : unit -> pixel_modem_token_database +(** [default_pixel_modem_token_database ()] is a new empty value for type [pixel_modem_token_database] *) + +val default_proto_log_message : unit -> proto_log_message +(** [default_proto_log_message ()] is a new empty value for type [proto_log_message] *) + +val default_proto_log_viewer_config_message_data : unit -> proto_log_viewer_config_message_data +(** [default_proto_log_viewer_config_message_data ()] is a new empty value for type [proto_log_viewer_config_message_data] *) + +val default_proto_log_viewer_config_group : unit -> proto_log_viewer_config_group +(** [default_proto_log_viewer_config_group ()] is a new empty value for type [proto_log_viewer_config_group] *) + +val default_proto_log_viewer_config : unit -> proto_log_viewer_config +(** [default_proto_log_viewer_config ()] is a new empty value for type [proto_log_viewer_config] *) + +val default_shell_transition_target : unit -> shell_transition_target +(** [default_shell_transition_target ()] is a new empty value for type [shell_transition_target] *) + +val default_shell_transition : unit -> shell_transition +(** [default_shell_transition ()] is a new empty value for type [shell_transition] *) + +val default_shell_handler_mapping : unit -> shell_handler_mapping +(** [default_shell_handler_mapping ()] is a new empty value for type [shell_handler_mapping] *) + +val default_shell_handler_mappings : unit -> shell_handler_mappings +(** [default_shell_handler_mappings ()] is a new empty value for type [shell_handler_mappings] *) + +val default_rect_proto : unit -> rect_proto +(** [default_rect_proto ()] is a new empty value for type [rect_proto] *) + +val default_region_proto : unit -> region_proto +(** [default_region_proto ()] is a new empty value for type [region_proto] *) + +val default_size_proto : unit -> size_proto +(** [default_size_proto ()] is a new empty value for type [size_proto] *) + +val default_transform_proto : unit -> transform_proto +(** [default_transform_proto ()] is a new empty value for type [transform_proto] *) + +val default_color_proto : unit -> color_proto +(** [default_color_proto ()] is a new empty value for type [color_proto] *) + +val default_input_window_info_proto : unit -> input_window_info_proto +(** [default_input_window_info_proto ()] is a new empty value for type [input_window_info_proto] *) + +val default_blur_region : unit -> blur_region +(** [default_blur_region ()] is a new empty value for type [blur_region] *) + +val default_color_transform_proto : unit -> color_transform_proto +(** [default_color_transform_proto ()] is a new empty value for type [color_transform_proto] *) + +val default_trusted_overlay : unit -> trusted_overlay +(** [default_trusted_overlay ()] is a new empty value for type [trusted_overlay] *) + +val default_box_shadow_settings_box_shadow_params : unit -> box_shadow_settings_box_shadow_params +(** [default_box_shadow_settings_box_shadow_params ()] is a new empty value for type [box_shadow_settings_box_shadow_params] *) + +val default_box_shadow_settings : unit -> box_shadow_settings +(** [default_box_shadow_settings ()] is a new empty value for type [box_shadow_settings] *) + +val default_border_settings : unit -> border_settings +(** [default_border_settings ()] is a new empty value for type [border_settings] *) + +val default_layers_trace_file_proto_magic_number : unit -> layers_trace_file_proto_magic_number +(** [default_layers_trace_file_proto_magic_number ()] is a new empty value for type [layers_trace_file_proto_magic_number] *) + +val default_position_proto : unit -> position_proto +(** [default_position_proto ()] is a new empty value for type [position_proto] *) + +val default_active_buffer_proto : unit -> active_buffer_proto +(** [default_active_buffer_proto ()] is a new empty value for type [active_buffer_proto] *) + +val default_float_rect_proto : unit -> float_rect_proto +(** [default_float_rect_proto ()] is a new empty value for type [float_rect_proto] *) + +val default_hwc_composition_type : unit -> hwc_composition_type +(** [default_hwc_composition_type ()] is a new empty value for type [hwc_composition_type] *) + +val default_barrier_layer_proto : unit -> barrier_layer_proto +(** [default_barrier_layer_proto ()] is a new empty value for type [barrier_layer_proto] *) + +val default_corner_radii_proto : unit -> corner_radii_proto +(** [default_corner_radii_proto ()] is a new empty value for type [corner_radii_proto] *) + +val default_layer_proto : unit -> layer_proto +(** [default_layer_proto ()] is a new empty value for type [layer_proto] *) + +val default_layers_proto : unit -> layers_proto +(** [default_layers_proto ()] is a new empty value for type [layers_proto] *) + +val default_display_proto : unit -> display_proto +(** [default_display_proto ()] is a new empty value for type [display_proto] *) + +val default_layers_snapshot_proto : unit -> layers_snapshot_proto +(** [default_layers_snapshot_proto ()] is a new empty value for type [layers_snapshot_proto] *) + +val default_layers_trace_file_proto : unit -> layers_trace_file_proto +(** [default_layers_trace_file_proto ()] is a new empty value for type [layers_trace_file_proto] *) + +val default_transaction_trace_file_magic_number : unit -> transaction_trace_file_magic_number +(** [default_transaction_trace_file_magic_number ()] is a new empty value for type [transaction_trace_file_magic_number] *) + +val default_layer_state_matrix22 : unit -> layer_state_matrix22 +(** [default_layer_state_matrix22 ()] is a new empty value for type [layer_state_matrix22] *) + +val default_layer_state_color3 : unit -> layer_state_color3 +(** [default_layer_state_color3 ()] is a new empty value for type [layer_state_color3] *) + +val default_layer_state_buffer_data_pixel_format : unit -> layer_state_buffer_data_pixel_format +(** [default_layer_state_buffer_data_pixel_format ()] is a new empty value for type [layer_state_buffer_data_pixel_format] *) + +val default_layer_state_buffer_data : unit -> layer_state_buffer_data +(** [default_layer_state_buffer_data ()] is a new empty value for type [layer_state_buffer_data] *) + +val default_transform : unit -> transform +(** [default_transform ()] is a new empty value for type [transform] *) + +val default_layer_state_window_info : unit -> layer_state_window_info +(** [default_layer_state_window_info ()] is a new empty value for type [layer_state_window_info] *) + +val default_layer_state_drop_input_mode : unit -> layer_state_drop_input_mode +(** [default_layer_state_drop_input_mode ()] is a new empty value for type [layer_state_drop_input_mode] *) + +val default_layer_state_corner_radii : unit -> layer_state_corner_radii +(** [default_layer_state_corner_radii ()] is a new empty value for type [layer_state_corner_radii] *) + +val default_layer_state : unit -> layer_state +(** [default_layer_state ()] is a new empty value for type [layer_state] *) + +val default_display_state : unit -> display_state +(** [default_display_state ()] is a new empty value for type [display_state] *) + +val default_transaction_barrier : unit -> transaction_barrier +(** [default_transaction_barrier ()] is a new empty value for type [transaction_barrier] *) + +val default_transaction_state : unit -> transaction_state +(** [default_transaction_state ()] is a new empty value for type [transaction_state] *) + +val default_layer_creation_args : unit -> layer_creation_args +(** [default_layer_creation_args ()] is a new empty value for type [layer_creation_args] *) + +val default_display_info : unit -> display_info +(** [default_display_info ()] is a new empty value for type [display_info] *) + +val default_transaction_trace_entry : unit -> transaction_trace_entry +(** [default_transaction_trace_entry ()] is a new empty value for type [transaction_trace_entry] *) + +val default_transaction_trace_file : unit -> transaction_trace_file +(** [default_transaction_trace_file ()] is a new empty value for type [transaction_trace_file] *) + +val default_layer_state_changes_lsb : unit -> layer_state_changes_lsb +(** [default_layer_state_changes_lsb ()] is a new empty value for type [layer_state_changes_lsb] *) + +val default_layer_state_changes_msb : unit -> layer_state_changes_msb +(** [default_layer_state_changes_msb ()] is a new empty value for type [layer_state_changes_msb] *) + +val default_layer_state_flags : unit -> layer_state_flags +(** [default_layer_state_flags ()] is a new empty value for type [layer_state_flags] *) + +val default_layer_state_buffer_data_buffer_data_change : unit -> layer_state_buffer_data_buffer_data_change +(** [default_layer_state_buffer_data_buffer_data_change ()] is a new empty value for type [layer_state_buffer_data_buffer_data_change] *) + +val default_display_state_changes : unit -> display_state_changes +(** [default_display_state_changes ()] is a new empty value for type [display_state_changes] *) + +val default_winscope_extensions : unit +(** [default_winscope_extensions] is the default value for type [winscope_extensions] *) + +val default_chrome_benchmark_metadata : unit -> chrome_benchmark_metadata +(** [default_chrome_benchmark_metadata ()] is a new empty value for type [chrome_benchmark_metadata] *) + +val default_chrome_metadata_packet_finch_hash : unit -> chrome_metadata_packet_finch_hash +(** [default_chrome_metadata_packet_finch_hash ()] is a new empty value for type [chrome_metadata_packet_finch_hash] *) + +val default_background_tracing_metadata_trigger_rule_trigger_type : unit -> background_tracing_metadata_trigger_rule_trigger_type +(** [default_background_tracing_metadata_trigger_rule_trigger_type ()] is a new empty value for type [background_tracing_metadata_trigger_rule_trigger_type] *) + +val default_background_tracing_metadata_trigger_rule_histogram_rule : unit -> background_tracing_metadata_trigger_rule_histogram_rule +(** [default_background_tracing_metadata_trigger_rule_histogram_rule ()] is a new empty value for type [background_tracing_metadata_trigger_rule_histogram_rule] *) + +val default_background_tracing_metadata_trigger_rule_named_rule_event_type : unit -> background_tracing_metadata_trigger_rule_named_rule_event_type +(** [default_background_tracing_metadata_trigger_rule_named_rule_event_type ()] is a new empty value for type [background_tracing_metadata_trigger_rule_named_rule_event_type] *) + +val default_background_tracing_metadata_trigger_rule_named_rule : unit -> background_tracing_metadata_trigger_rule_named_rule +(** [default_background_tracing_metadata_trigger_rule_named_rule ()] is a new empty value for type [background_tracing_metadata_trigger_rule_named_rule] *) + +val default_background_tracing_metadata_trigger_rule : unit -> background_tracing_metadata_trigger_rule +(** [default_background_tracing_metadata_trigger_rule ()] is a new empty value for type [background_tracing_metadata_trigger_rule] *) + +val default_background_tracing_metadata : unit -> background_tracing_metadata +(** [default_background_tracing_metadata ()] is a new empty value for type [background_tracing_metadata] *) + +val default_chrome_metadata_packet : unit -> chrome_metadata_packet +(** [default_chrome_metadata_packet ()] is a new empty value for type [chrome_metadata_packet] *) + +val default_chrome_traced_value_nested_type : unit -> chrome_traced_value_nested_type +(** [default_chrome_traced_value_nested_type ()] is a new empty value for type [chrome_traced_value_nested_type] *) + +val default_chrome_traced_value : unit -> chrome_traced_value +(** [default_chrome_traced_value ()] is a new empty value for type [chrome_traced_value] *) + +val default_chrome_string_table_entry : unit -> chrome_string_table_entry +(** [default_chrome_string_table_entry ()] is a new empty value for type [chrome_string_table_entry] *) + +val default_chrome_trace_event_arg_value : unit -> chrome_trace_event_arg_value +(** [default_chrome_trace_event_arg_value ()] is a new empty value for type [chrome_trace_event_arg_value] *) + +val default_chrome_trace_event_arg : unit -> chrome_trace_event_arg +(** [default_chrome_trace_event_arg ()] is a new empty value for type [chrome_trace_event_arg] *) + +val default_chrome_trace_event : unit -> chrome_trace_event +(** [default_chrome_trace_event ()] is a new empty value for type [chrome_trace_event] *) + +val default_chrome_metadata_value : unit -> chrome_metadata_value +(** [default_chrome_metadata_value ()] is a new empty value for type [chrome_metadata_value] *) + +val default_chrome_metadata : unit -> chrome_metadata +(** [default_chrome_metadata ()] is a new empty value for type [chrome_metadata] *) + +val default_chrome_legacy_json_trace_trace_type : unit -> chrome_legacy_json_trace_trace_type +(** [default_chrome_legacy_json_trace_trace_type ()] is a new empty value for type [chrome_legacy_json_trace_trace_type] *) + +val default_chrome_legacy_json_trace : unit -> chrome_legacy_json_trace +(** [default_chrome_legacy_json_trace ()] is a new empty value for type [chrome_legacy_json_trace] *) + +val default_chrome_event_bundle : unit -> chrome_event_bundle +(** [default_chrome_event_bundle ()] is a new empty value for type [chrome_event_bundle] *) + +val default_chrome_trigger : unit -> chrome_trigger +(** [default_chrome_trigger ()] is a new empty value for type [chrome_trigger] *) + +val default_v8_string : unit -> v8_string +(** [default_v8_string ()] is a new empty value for type [v8_string] *) + +val default_interned_v8_string_encoded_string : unit -> interned_v8_string_encoded_string +(** [default_interned_v8_string_encoded_string ()] is a new empty value for type [interned_v8_string_encoded_string] *) + +val default_interned_v8_string : unit -> interned_v8_string +(** [default_interned_v8_string ()] is a new empty value for type [interned_v8_string] *) + +val default_interned_v8_js_script_type : unit -> interned_v8_js_script_type +(** [default_interned_v8_js_script_type ()] is a new empty value for type [interned_v8_js_script_type] *) + +val default_interned_v8_js_script : unit -> interned_v8_js_script +(** [default_interned_v8_js_script ()] is a new empty value for type [interned_v8_js_script] *) + +val default_interned_v8_wasm_script : unit -> interned_v8_wasm_script +(** [default_interned_v8_wasm_script ()] is a new empty value for type [interned_v8_wasm_script] *) + +val default_interned_v8_js_function_kind : unit -> interned_v8_js_function_kind +(** [default_interned_v8_js_function_kind ()] is a new empty value for type [interned_v8_js_function_kind] *) + +val default_interned_v8_js_function : unit -> interned_v8_js_function +(** [default_interned_v8_js_function ()] is a new empty value for type [interned_v8_js_function] *) + +val default_interned_v8_isolate_code_range : unit -> interned_v8_isolate_code_range +(** [default_interned_v8_isolate_code_range ()] is a new empty value for type [interned_v8_isolate_code_range] *) + +val default_interned_v8_isolate : unit -> interned_v8_isolate +(** [default_interned_v8_isolate ()] is a new empty value for type [interned_v8_isolate] *) + +val default_v8_js_code_tier : unit -> v8_js_code_tier +(** [default_v8_js_code_tier ()] is a new empty value for type [v8_js_code_tier] *) + +val default_v8_js_code_instructions : unit -> v8_js_code_instructions +(** [default_v8_js_code_instructions ()] is a new empty value for type [v8_js_code_instructions] *) + +val default_v8_js_code : unit -> v8_js_code +(** [default_v8_js_code ()] is a new empty value for type [v8_js_code] *) + +val default_v8_internal_code_type : unit -> v8_internal_code_type +(** [default_v8_internal_code_type ()] is a new empty value for type [v8_internal_code_type] *) + +val default_v8_internal_code : unit -> v8_internal_code +(** [default_v8_internal_code ()] is a new empty value for type [v8_internal_code] *) + +val default_v8_wasm_code_tier : unit -> v8_wasm_code_tier +(** [default_v8_wasm_code_tier ()] is a new empty value for type [v8_wasm_code_tier] *) + +val default_v8_wasm_code : unit -> v8_wasm_code +(** [default_v8_wasm_code ()] is a new empty value for type [v8_wasm_code] *) + +val default_v8_reg_exp_code : unit -> v8_reg_exp_code +(** [default_v8_reg_exp_code ()] is a new empty value for type [v8_reg_exp_code] *) + +val default_v8_code_move_to_instructions : unit -> v8_code_move_to_instructions +(** [default_v8_code_move_to_instructions ()] is a new empty value for type [v8_code_move_to_instructions] *) + +val default_v8_code_move : unit -> v8_code_move +(** [default_v8_code_move ()] is a new empty value for type [v8_code_move] *) + +val default_v8_code_defaults : unit -> v8_code_defaults +(** [default_v8_code_defaults ()] is a new empty value for type [v8_code_defaults] *) + +val default_clock_snapshot_clock_builtin_clocks : unit -> clock_snapshot_clock_builtin_clocks +(** [default_clock_snapshot_clock_builtin_clocks ()] is a new empty value for type [clock_snapshot_clock_builtin_clocks] *) + +val default_clock_snapshot_clock : unit -> clock_snapshot_clock +(** [default_clock_snapshot_clock ()] is a new empty value for type [clock_snapshot_clock] *) + +val default_clock_snapshot : unit -> clock_snapshot +(** [default_clock_snapshot ()] is a new empty value for type [clock_snapshot] *) + +val default_cswitch_etw_event_old_thread_wait_reason : unit -> cswitch_etw_event_old_thread_wait_reason +(** [default_cswitch_etw_event_old_thread_wait_reason ()] is a new empty value for type [cswitch_etw_event_old_thread_wait_reason] *) + +val default_cswitch_etw_event_old_thread_wait_mode : unit -> cswitch_etw_event_old_thread_wait_mode +(** [default_cswitch_etw_event_old_thread_wait_mode ()] is a new empty value for type [cswitch_etw_event_old_thread_wait_mode] *) + +val default_cswitch_etw_event_old_thread_state : unit -> cswitch_etw_event_old_thread_state +(** [default_cswitch_etw_event_old_thread_state ()] is a new empty value for type [cswitch_etw_event_old_thread_state] *) + +val default_cswitch_etw_event_old_thread_wait_reason_enum_or_int : unit -> cswitch_etw_event_old_thread_wait_reason_enum_or_int +(** [default_cswitch_etw_event_old_thread_wait_reason_enum_or_int ()] is a new empty value for type [cswitch_etw_event_old_thread_wait_reason_enum_or_int] *) + +val default_cswitch_etw_event_old_thread_wait_mode_enum_or_int : unit -> cswitch_etw_event_old_thread_wait_mode_enum_or_int +(** [default_cswitch_etw_event_old_thread_wait_mode_enum_or_int ()] is a new empty value for type [cswitch_etw_event_old_thread_wait_mode_enum_or_int] *) + +val default_cswitch_etw_event_old_thread_state_enum_or_int : unit -> cswitch_etw_event_old_thread_state_enum_or_int +(** [default_cswitch_etw_event_old_thread_state_enum_or_int ()] is a new empty value for type [cswitch_etw_event_old_thread_state_enum_or_int] *) + +val default_cswitch_etw_event : unit -> cswitch_etw_event +(** [default_cswitch_etw_event ()] is a new empty value for type [cswitch_etw_event] *) + +val default_ready_thread_etw_event_adjust_reason : unit -> ready_thread_etw_event_adjust_reason +(** [default_ready_thread_etw_event_adjust_reason ()] is a new empty value for type [ready_thread_etw_event_adjust_reason] *) + +val default_ready_thread_etw_event_trace_flag : unit -> ready_thread_etw_event_trace_flag +(** [default_ready_thread_etw_event_trace_flag ()] is a new empty value for type [ready_thread_etw_event_trace_flag] *) + +val default_ready_thread_etw_event_adjust_reason_enum_or_int : unit -> ready_thread_etw_event_adjust_reason_enum_or_int +(** [default_ready_thread_etw_event_adjust_reason_enum_or_int ()] is a new empty value for type [ready_thread_etw_event_adjust_reason_enum_or_int] *) + +val default_ready_thread_etw_event_flag_enum_or_int : unit -> ready_thread_etw_event_flag_enum_or_int +(** [default_ready_thread_etw_event_flag_enum_or_int ()] is a new empty value for type [ready_thread_etw_event_flag_enum_or_int] *) + +val default_ready_thread_etw_event : unit -> ready_thread_etw_event +(** [default_ready_thread_etw_event ()] is a new empty value for type [ready_thread_etw_event] *) + +val default_mem_info_etw_event : unit -> mem_info_etw_event +(** [default_mem_info_etw_event ()] is a new empty value for type [mem_info_etw_event] *) + +val default_file_io_create_etw_event : unit -> file_io_create_etw_event +(** [default_file_io_create_etw_event ()] is a new empty value for type [file_io_create_etw_event] *) + +val default_file_io_dir_enum_etw_event : unit -> file_io_dir_enum_etw_event +(** [default_file_io_dir_enum_etw_event ()] is a new empty value for type [file_io_dir_enum_etw_event] *) + +val default_file_io_info_etw_event : unit -> file_io_info_etw_event +(** [default_file_io_info_etw_event ()] is a new empty value for type [file_io_info_etw_event] *) + +val default_file_io_read_write_etw_event : unit -> file_io_read_write_etw_event +(** [default_file_io_read_write_etw_event ()] is a new empty value for type [file_io_read_write_etw_event] *) + +val default_file_io_simple_op_etw_event : unit -> file_io_simple_op_etw_event +(** [default_file_io_simple_op_etw_event ()] is a new empty value for type [file_io_simple_op_etw_event] *) + +val default_file_io_op_end_etw_event : unit -> file_io_op_end_etw_event +(** [default_file_io_op_end_etw_event ()] is a new empty value for type [file_io_op_end_etw_event] *) + +val default_etw_trace_event_event : unit -> etw_trace_event_event +(** [default_etw_trace_event_event ()] is a new empty value for type [etw_trace_event_event] *) + +val default_etw_trace_event : unit -> etw_trace_event +(** [default_etw_trace_event ()] is a new empty value for type [etw_trace_event] *) + +val default_etw_trace_event_bundle : unit -> etw_trace_event_bundle +(** [default_etw_trace_event_bundle ()] is a new empty value for type [etw_trace_event_bundle] *) + +val default_evdev_event_input_event : unit -> evdev_event_input_event +(** [default_evdev_event_input_event ()] is a new empty value for type [evdev_event_input_event] *) + +val default_evdev_event_event : unit -> evdev_event_event +(** [default_evdev_event_event ()] is a new empty value for type [evdev_event_event] *) + +val default_evdev_event : unit -> evdev_event +(** [default_evdev_event ()] is a new empty value for type [evdev_event] *) + +val default_field_descriptor_proto_label : unit -> field_descriptor_proto_label +(** [default_field_descriptor_proto_label ()] is a new empty value for type [field_descriptor_proto_label] *) + +val default_field_descriptor_proto_type : unit -> field_descriptor_proto_type +(** [default_field_descriptor_proto_type ()] is a new empty value for type [field_descriptor_proto_type] *) + +val default_uninterpreted_option_name_part : unit -> uninterpreted_option_name_part +(** [default_uninterpreted_option_name_part ()] is a new empty value for type [uninterpreted_option_name_part] *) + +val default_uninterpreted_option : unit -> uninterpreted_option +(** [default_uninterpreted_option ()] is a new empty value for type [uninterpreted_option] *) + +val default_field_options : unit -> field_options +(** [default_field_options ()] is a new empty value for type [field_options] *) + +val default_field_descriptor_proto : unit -> field_descriptor_proto +(** [default_field_descriptor_proto ()] is a new empty value for type [field_descriptor_proto] *) + +val default_enum_value_descriptor_proto : unit -> enum_value_descriptor_proto +(** [default_enum_value_descriptor_proto ()] is a new empty value for type [enum_value_descriptor_proto] *) + +val default_enum_descriptor_proto : unit -> enum_descriptor_proto +(** [default_enum_descriptor_proto ()] is a new empty value for type [enum_descriptor_proto] *) + +val default_oneof_options : unit +(** [default_oneof_options] is the default value for type [oneof_options] *) + +val default_oneof_descriptor_proto : unit -> oneof_descriptor_proto +(** [default_oneof_descriptor_proto ()] is a new empty value for type [oneof_descriptor_proto] *) + +val default_descriptor_proto_reserved_range : unit -> descriptor_proto_reserved_range +(** [default_descriptor_proto_reserved_range ()] is a new empty value for type [descriptor_proto_reserved_range] *) + +val default_descriptor_proto : unit -> descriptor_proto +(** [default_descriptor_proto ()] is a new empty value for type [descriptor_proto] *) + +val default_file_descriptor_proto : unit -> file_descriptor_proto +(** [default_file_descriptor_proto ()] is a new empty value for type [file_descriptor_proto] *) + +val default_file_descriptor_set : unit -> file_descriptor_set +(** [default_file_descriptor_set ()] is a new empty value for type [file_descriptor_set] *) + +val default_extension_descriptor : unit -> extension_descriptor +(** [default_extension_descriptor ()] is a new empty value for type [extension_descriptor] *) + +val default_inode_file_map_entry_type : unit -> inode_file_map_entry_type +(** [default_inode_file_map_entry_type ()] is a new empty value for type [inode_file_map_entry_type] *) + +val default_inode_file_map_entry : unit -> inode_file_map_entry +(** [default_inode_file_map_entry ()] is a new empty value for type [inode_file_map_entry] *) + +val default_inode_file_map : unit -> inode_file_map +(** [default_inode_file_map ()] is a new empty value for type [inode_file_map] *) + +val default_generic_kernel_cpu_frequency_event : unit -> generic_kernel_cpu_frequency_event +(** [default_generic_kernel_cpu_frequency_event ()] is a new empty value for type [generic_kernel_cpu_frequency_event] *) + +val default_generic_kernel_task_state_event_task_state_enum : unit -> generic_kernel_task_state_event_task_state_enum +(** [default_generic_kernel_task_state_event_task_state_enum ()] is a new empty value for type [generic_kernel_task_state_event_task_state_enum] *) + +val default_generic_kernel_task_state_event : unit -> generic_kernel_task_state_event +(** [default_generic_kernel_task_state_event ()] is a new empty value for type [generic_kernel_task_state_event] *) + +val default_generic_kernel_task_rename_event : unit -> generic_kernel_task_rename_event +(** [default_generic_kernel_task_rename_event ()] is a new empty value for type [generic_kernel_task_rename_event] *) + +val default_generic_kernel_process_tree_thread : unit -> generic_kernel_process_tree_thread +(** [default_generic_kernel_process_tree_thread ()] is a new empty value for type [generic_kernel_process_tree_thread] *) + +val default_generic_kernel_process_tree_process : unit -> generic_kernel_process_tree_process +(** [default_generic_kernel_process_tree_process ()] is a new empty value for type [generic_kernel_process_tree_process] *) + +val default_generic_kernel_process_tree : unit -> generic_kernel_process_tree +(** [default_generic_kernel_process_tree ()] is a new empty value for type [generic_kernel_process_tree] *) + +val default_gpu_counter_event_gpu_counter_value : unit -> gpu_counter_event_gpu_counter_value +(** [default_gpu_counter_event_gpu_counter_value ()] is a new empty value for type [gpu_counter_event_gpu_counter_value] *) + +val default_gpu_counter_event_gpu_counter : unit -> gpu_counter_event_gpu_counter +(** [default_gpu_counter_event_gpu_counter ()] is a new empty value for type [gpu_counter_event_gpu_counter] *) + +val default_gpu_counter_event : unit -> gpu_counter_event +(** [default_gpu_counter_event ()] is a new empty value for type [gpu_counter_event] *) + +val default_gpu_log_severity : unit -> gpu_log_severity +(** [default_gpu_log_severity ()] is a new empty value for type [gpu_log_severity] *) + +val default_gpu_log : unit -> gpu_log +(** [default_gpu_log ()] is a new empty value for type [gpu_log] *) + +val default_gpu_render_stage_event_extra_data : unit -> gpu_render_stage_event_extra_data +(** [default_gpu_render_stage_event_extra_data ()] is a new empty value for type [gpu_render_stage_event_extra_data] *) + +val default_gpu_render_stage_event_specifications_context_spec : unit -> gpu_render_stage_event_specifications_context_spec +(** [default_gpu_render_stage_event_specifications_context_spec ()] is a new empty value for type [gpu_render_stage_event_specifications_context_spec] *) + +val default_gpu_render_stage_event_specifications_description : unit -> gpu_render_stage_event_specifications_description +(** [default_gpu_render_stage_event_specifications_description ()] is a new empty value for type [gpu_render_stage_event_specifications_description] *) + +val default_gpu_render_stage_event_specifications : unit -> gpu_render_stage_event_specifications +(** [default_gpu_render_stage_event_specifications ()] is a new empty value for type [gpu_render_stage_event_specifications] *) + +val default_gpu_render_stage_event : unit -> gpu_render_stage_event +(** [default_gpu_render_stage_event ()] is a new empty value for type [gpu_render_stage_event] *) + +val default_interned_graphics_context_api : unit -> interned_graphics_context_api +(** [default_interned_graphics_context_api ()] is a new empty value for type [interned_graphics_context_api] *) + +val default_interned_graphics_context : unit -> interned_graphics_context +(** [default_interned_graphics_context ()] is a new empty value for type [interned_graphics_context] *) + +val default_interned_gpu_render_stage_specification_render_stage_category : unit -> interned_gpu_render_stage_specification_render_stage_category +(** [default_interned_gpu_render_stage_specification_render_stage_category ()] is a new empty value for type [interned_gpu_render_stage_specification_render_stage_category] *) + +val default_interned_gpu_render_stage_specification : unit -> interned_gpu_render_stage_specification +(** [default_interned_gpu_render_stage_specification ()] is a new empty value for type [interned_gpu_render_stage_specification] *) + +val default_vulkan_api_event_vk_debug_utils_object_name : unit -> vulkan_api_event_vk_debug_utils_object_name +(** [default_vulkan_api_event_vk_debug_utils_object_name ()] is a new empty value for type [vulkan_api_event_vk_debug_utils_object_name] *) + +val default_vulkan_api_event_vk_queue_submit : unit -> vulkan_api_event_vk_queue_submit +(** [default_vulkan_api_event_vk_queue_submit ()] is a new empty value for type [vulkan_api_event_vk_queue_submit] *) + +val default_vulkan_api_event : unit -> vulkan_api_event +(** [default_vulkan_api_event ()] is a new empty value for type [vulkan_api_event] *) + +val default_vulkan_memory_event_annotation_value : unit -> vulkan_memory_event_annotation_value +(** [default_vulkan_memory_event_annotation_value ()] is a new empty value for type [vulkan_memory_event_annotation_value] *) + +val default_vulkan_memory_event_annotation : unit -> vulkan_memory_event_annotation +(** [default_vulkan_memory_event_annotation ()] is a new empty value for type [vulkan_memory_event_annotation] *) + +val default_vulkan_memory_event_source : unit -> vulkan_memory_event_source +(** [default_vulkan_memory_event_source ()] is a new empty value for type [vulkan_memory_event_source] *) + +val default_vulkan_memory_event_operation : unit -> vulkan_memory_event_operation +(** [default_vulkan_memory_event_operation ()] is a new empty value for type [vulkan_memory_event_operation] *) + +val default_vulkan_memory_event_allocation_scope : unit -> vulkan_memory_event_allocation_scope +(** [default_vulkan_memory_event_allocation_scope ()] is a new empty value for type [vulkan_memory_event_allocation_scope] *) + +val default_vulkan_memory_event : unit -> vulkan_memory_event +(** [default_vulkan_memory_event ()] is a new empty value for type [vulkan_memory_event] *) + +val default_interned_string : unit -> interned_string +(** [default_interned_string ()] is a new empty value for type [interned_string] *) + +val default_line : unit -> line +(** [default_line ()] is a new empty value for type [line] *) + +val default_address_symbols : unit -> address_symbols +(** [default_address_symbols ()] is a new empty value for type [address_symbols] *) + +val default_module_symbols : unit -> module_symbols +(** [default_module_symbols ()] is a new empty value for type [module_symbols] *) + +val default_mapping : unit -> mapping +(** [default_mapping ()] is a new empty value for type [mapping] *) + +val default_frame : unit -> frame +(** [default_frame ()] is a new empty value for type [frame] *) + +val default_callstack : unit -> callstack +(** [default_callstack ()] is a new empty value for type [callstack] *) + +val default_histogram_name : unit -> histogram_name +(** [default_histogram_name ()] is a new empty value for type [histogram_name] *) + +val default_chrome_histogram_sample : unit -> chrome_histogram_sample +(** [default_chrome_histogram_sample ()] is a new empty value for type [chrome_histogram_sample] *) + +val default_debug_annotation_nested_value_nested_type : unit -> debug_annotation_nested_value_nested_type +(** [default_debug_annotation_nested_value_nested_type ()] is a new empty value for type [debug_annotation_nested_value_nested_type] *) + +val default_debug_annotation_nested_value : unit -> debug_annotation_nested_value +(** [default_debug_annotation_nested_value ()] is a new empty value for type [debug_annotation_nested_value] *) + +val default_debug_annotation_name_field : unit -> debug_annotation_name_field +(** [default_debug_annotation_name_field ()] is a new empty value for type [debug_annotation_name_field] *) + +val default_debug_annotation_value : unit -> debug_annotation_value +(** [default_debug_annotation_value ()] is a new empty value for type [debug_annotation_value] *) + +val default_debug_annotation_proto_type_descriptor : unit -> debug_annotation_proto_type_descriptor +(** [default_debug_annotation_proto_type_descriptor ()] is a new empty value for type [debug_annotation_proto_type_descriptor] *) + +val default_debug_annotation : unit -> debug_annotation +(** [default_debug_annotation ()] is a new empty value for type [debug_annotation] *) + +val default_debug_annotation_name : unit -> debug_annotation_name +(** [default_debug_annotation_name ()] is a new empty value for type [debug_annotation_name] *) + +val default_debug_annotation_value_type_name : unit -> debug_annotation_value_type_name +(** [default_debug_annotation_value_type_name ()] is a new empty value for type [debug_annotation_value_type_name] *) + +val default_log_message_priority : unit -> log_message_priority +(** [default_log_message_priority ()] is a new empty value for type [log_message_priority] *) + +val default_log_message : unit -> log_message +(** [default_log_message ()] is a new empty value for type [log_message] *) + +val default_log_message_body : unit -> log_message_body +(** [default_log_message_body ()] is a new empty value for type [log_message_body] *) + +val default_unsymbolized_source_location : unit -> unsymbolized_source_location +(** [default_unsymbolized_source_location ()] is a new empty value for type [unsymbolized_source_location] *) + +val default_source_location : unit -> source_location +(** [default_source_location ()] is a new empty value for type [source_location] *) + +val default_chrome_active_processes : unit -> chrome_active_processes +(** [default_chrome_active_processes ()] is a new empty value for type [chrome_active_processes] *) + +val default_chrome_application_state_info_chrome_application_state : unit -> chrome_application_state_info_chrome_application_state +(** [default_chrome_application_state_info_chrome_application_state ()] is a new empty value for type [chrome_application_state_info_chrome_application_state] *) + +val default_chrome_application_state_info : unit -> chrome_application_state_info +(** [default_chrome_application_state_info ()] is a new empty value for type [chrome_application_state_info] *) + +val default_chrome_compositor_scheduler_action : unit -> chrome_compositor_scheduler_action +(** [default_chrome_compositor_scheduler_action ()] is a new empty value for type [chrome_compositor_scheduler_action] *) + +val default_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode : unit -> chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode +(** [default_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode ()] is a new empty value for type [chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode] *) + +val default_chrome_compositor_state_machine_major_state_begin_impl_frame_state : unit -> chrome_compositor_state_machine_major_state_begin_impl_frame_state +(** [default_chrome_compositor_state_machine_major_state_begin_impl_frame_state ()] is a new empty value for type [chrome_compositor_state_machine_major_state_begin_impl_frame_state] *) + +val default_chrome_compositor_state_machine_major_state_begin_main_frame_state : unit -> chrome_compositor_state_machine_major_state_begin_main_frame_state +(** [default_chrome_compositor_state_machine_major_state_begin_main_frame_state ()] is a new empty value for type [chrome_compositor_state_machine_major_state_begin_main_frame_state] *) + +val default_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state : unit -> chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state +(** [default_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state ()] is a new empty value for type [chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state] *) + +val default_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state : unit -> chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state +(** [default_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state ()] is a new empty value for type [chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state] *) + +val default_chrome_compositor_state_machine_major_state : unit -> chrome_compositor_state_machine_major_state +(** [default_chrome_compositor_state_machine_major_state ()] is a new empty value for type [chrome_compositor_state_machine_major_state] *) + +val default_chrome_compositor_state_machine_minor_state_tree_priority : unit -> chrome_compositor_state_machine_minor_state_tree_priority +(** [default_chrome_compositor_state_machine_minor_state_tree_priority ()] is a new empty value for type [chrome_compositor_state_machine_minor_state_tree_priority] *) + +val default_chrome_compositor_state_machine_minor_state_scroll_handler_state : unit -> chrome_compositor_state_machine_minor_state_scroll_handler_state +(** [default_chrome_compositor_state_machine_minor_state_scroll_handler_state ()] is a new empty value for type [chrome_compositor_state_machine_minor_state_scroll_handler_state] *) + +val default_chrome_compositor_state_machine_minor_state : unit -> chrome_compositor_state_machine_minor_state +(** [default_chrome_compositor_state_machine_minor_state ()] is a new empty value for type [chrome_compositor_state_machine_minor_state] *) + +val default_chrome_compositor_state_machine : unit -> chrome_compositor_state_machine +(** [default_chrome_compositor_state_machine ()] is a new empty value for type [chrome_compositor_state_machine] *) + +val default_begin_impl_frame_args_state : unit -> begin_impl_frame_args_state +(** [default_begin_impl_frame_args_state ()] is a new empty value for type [begin_impl_frame_args_state] *) + +val default_begin_frame_args_begin_frame_args_type : unit -> begin_frame_args_begin_frame_args_type +(** [default_begin_frame_args_begin_frame_args_type ()] is a new empty value for type [begin_frame_args_begin_frame_args_type] *) + +val default_begin_frame_args_created_from : unit -> begin_frame_args_created_from +(** [default_begin_frame_args_created_from ()] is a new empty value for type [begin_frame_args_created_from] *) + +val default_begin_frame_args : unit -> begin_frame_args +(** [default_begin_frame_args ()] is a new empty value for type [begin_frame_args] *) + +val default_begin_impl_frame_args_timestamps_in_us : unit -> begin_impl_frame_args_timestamps_in_us +(** [default_begin_impl_frame_args_timestamps_in_us ()] is a new empty value for type [begin_impl_frame_args_timestamps_in_us] *) + +val default_begin_impl_frame_args_args : unit -> begin_impl_frame_args_args +(** [default_begin_impl_frame_args_args ()] is a new empty value for type [begin_impl_frame_args_args] *) + +val default_begin_impl_frame_args : unit -> begin_impl_frame_args +(** [default_begin_impl_frame_args ()] is a new empty value for type [begin_impl_frame_args] *) + +val default_begin_frame_observer_state : unit -> begin_frame_observer_state +(** [default_begin_frame_observer_state ()] is a new empty value for type [begin_frame_observer_state] *) + +val default_begin_frame_source_state : unit -> begin_frame_source_state +(** [default_begin_frame_source_state ()] is a new empty value for type [begin_frame_source_state] *) + +val default_compositor_timing_history : unit -> compositor_timing_history +(** [default_compositor_timing_history ()] is a new empty value for type [compositor_timing_history] *) + +val default_chrome_compositor_scheduler_state : unit -> chrome_compositor_scheduler_state +(** [default_chrome_compositor_scheduler_state ()] is a new empty value for type [chrome_compositor_scheduler_state] *) + +val default_chrome_content_settings_event_info : unit -> chrome_content_settings_event_info +(** [default_chrome_content_settings_event_info ()] is a new empty value for type [chrome_content_settings_event_info] *) + +val default_chrome_frame_reporter_state : unit -> chrome_frame_reporter_state +(** [default_chrome_frame_reporter_state ()] is a new empty value for type [chrome_frame_reporter_state] *) + +val default_chrome_frame_reporter_frame_drop_reason : unit -> chrome_frame_reporter_frame_drop_reason +(** [default_chrome_frame_reporter_frame_drop_reason ()] is a new empty value for type [chrome_frame_reporter_frame_drop_reason] *) + +val default_chrome_frame_reporter_scroll_state : unit -> chrome_frame_reporter_scroll_state +(** [default_chrome_frame_reporter_scroll_state ()] is a new empty value for type [chrome_frame_reporter_scroll_state] *) + +val default_chrome_frame_reporter_frame_type : unit -> chrome_frame_reporter_frame_type +(** [default_chrome_frame_reporter_frame_type ()] is a new empty value for type [chrome_frame_reporter_frame_type] *) + +val default_chrome_frame_reporter : unit -> chrome_frame_reporter +(** [default_chrome_frame_reporter ()] is a new empty value for type [chrome_frame_reporter] *) + +val default_chrome_keyed_service : unit -> chrome_keyed_service +(** [default_chrome_keyed_service ()] is a new empty value for type [chrome_keyed_service] *) + +val default_chrome_latency_info_step : unit -> chrome_latency_info_step +(** [default_chrome_latency_info_step ()] is a new empty value for type [chrome_latency_info_step] *) + +val default_chrome_latency_info_latency_component_type : unit -> chrome_latency_info_latency_component_type +(** [default_chrome_latency_info_latency_component_type ()] is a new empty value for type [chrome_latency_info_latency_component_type] *) + +val default_chrome_latency_info_component_info : unit -> chrome_latency_info_component_info +(** [default_chrome_latency_info_component_info ()] is a new empty value for type [chrome_latency_info_component_info] *) + +val default_chrome_latency_info_input_type : unit -> chrome_latency_info_input_type +(** [default_chrome_latency_info_input_type ()] is a new empty value for type [chrome_latency_info_input_type] *) + +val default_chrome_latency_info : unit -> chrome_latency_info +(** [default_chrome_latency_info ()] is a new empty value for type [chrome_latency_info] *) + +val default_chrome_legacy_ipc_message_class : unit -> chrome_legacy_ipc_message_class +(** [default_chrome_legacy_ipc_message_class ()] is a new empty value for type [chrome_legacy_ipc_message_class] *) + +val default_chrome_legacy_ipc : unit -> chrome_legacy_ipc +(** [default_chrome_legacy_ipc ()] is a new empty value for type [chrome_legacy_ipc] *) + +val default_chrome_message_pump : unit -> chrome_message_pump +(** [default_chrome_message_pump ()] is a new empty value for type [chrome_message_pump] *) + +val default_chrome_mojo_event_info : unit -> chrome_mojo_event_info +(** [default_chrome_mojo_event_info ()] is a new empty value for type [chrome_mojo_event_info] *) + +val default_chrome_railmode : unit -> chrome_railmode +(** [default_chrome_railmode ()] is a new empty value for type [chrome_railmode] *) + +val default_chrome_renderer_scheduler_state : unit -> chrome_renderer_scheduler_state +(** [default_chrome_renderer_scheduler_state ()] is a new empty value for type [chrome_renderer_scheduler_state] *) + +val default_chrome_user_event : unit -> chrome_user_event +(** [default_chrome_user_event ()] is a new empty value for type [chrome_user_event] *) + +val default_chrome_window_handle_event_info : unit -> chrome_window_handle_event_info +(** [default_chrome_window_handle_event_info ()] is a new empty value for type [chrome_window_handle_event_info] *) + +val default_screenshot : unit -> screenshot +(** [default_screenshot ()] is a new empty value for type [screenshot] *) + +val default_task_execution : unit -> task_execution +(** [default_task_execution ()] is a new empty value for type [task_execution] *) + +val default_track_event_type : unit -> track_event_type +(** [default_track_event_type ()] is a new empty value for type [track_event_type] *) + +val default_track_event_callstack_frame : unit -> track_event_callstack_frame +(** [default_track_event_callstack_frame ()] is a new empty value for type [track_event_callstack_frame] *) + +val default_track_event_callstack : unit -> track_event_callstack +(** [default_track_event_callstack ()] is a new empty value for type [track_event_callstack] *) + +val default_track_event_legacy_event_flow_direction : unit -> track_event_legacy_event_flow_direction +(** [default_track_event_legacy_event_flow_direction ()] is a new empty value for type [track_event_legacy_event_flow_direction] *) + +val default_track_event_legacy_event_instant_event_scope : unit -> track_event_legacy_event_instant_event_scope +(** [default_track_event_legacy_event_instant_event_scope ()] is a new empty value for type [track_event_legacy_event_instant_event_scope] *) + +val default_track_event_legacy_event_id : unit -> track_event_legacy_event_id +(** [default_track_event_legacy_event_id ()] is a new empty value for type [track_event_legacy_event_id] *) + +val default_track_event_legacy_event : unit -> track_event_legacy_event +(** [default_track_event_legacy_event ()] is a new empty value for type [track_event_legacy_event] *) + +val default_track_event_name_field : unit -> track_event_name_field +(** [default_track_event_name_field ()] is a new empty value for type [track_event_name_field] *) + +val default_track_event_counter_value_field : unit -> track_event_counter_value_field +(** [default_track_event_counter_value_field ()] is a new empty value for type [track_event_counter_value_field] *) + +val default_track_event_correlation_id_field : unit -> track_event_correlation_id_field +(** [default_track_event_correlation_id_field ()] is a new empty value for type [track_event_correlation_id_field] *) + +val default_track_event_callstack_field : unit -> track_event_callstack_field +(** [default_track_event_callstack_field ()] is a new empty value for type [track_event_callstack_field] *) + +val default_track_event_source_location_field : unit -> track_event_source_location_field +(** [default_track_event_source_location_field ()] is a new empty value for type [track_event_source_location_field] *) + +val default_track_event_timestamp : unit -> track_event_timestamp +(** [default_track_event_timestamp ()] is a new empty value for type [track_event_timestamp] *) + +val default_track_event_thread_time : unit -> track_event_thread_time +(** [default_track_event_thread_time ()] is a new empty value for type [track_event_thread_time] *) + +val default_track_event_thread_instruction_count : unit -> track_event_thread_instruction_count +(** [default_track_event_thread_instruction_count ()] is a new empty value for type [track_event_thread_instruction_count] *) + +val default_track_event : unit -> track_event +(** [default_track_event ()] is a new empty value for type [track_event] *) + +val default_track_event_defaults : unit -> track_event_defaults +(** [default_track_event_defaults ()] is a new empty value for type [track_event_defaults] *) + +val default_event_category : unit -> event_category +(** [default_event_category ()] is a new empty value for type [event_category] *) + +val default_event_name : unit -> event_name +(** [default_event_name ()] is a new empty value for type [event_name] *) + +val default_interned_data : unit -> interned_data +(** [default_interned_data ()] is a new empty value for type [interned_data] *) + +val default_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units : unit -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units +(** [default_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units ()] is a new empty value for type [memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units] *) + +val default_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry : unit -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry +(** [default_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry ()] is a new empty value for type [memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry] *) + +val default_memory_tracker_snapshot_process_snapshot_memory_node : unit -> memory_tracker_snapshot_process_snapshot_memory_node +(** [default_memory_tracker_snapshot_process_snapshot_memory_node ()] is a new empty value for type [memory_tracker_snapshot_process_snapshot_memory_node] *) + +val default_memory_tracker_snapshot_process_snapshot_memory_edge : unit -> memory_tracker_snapshot_process_snapshot_memory_edge +(** [default_memory_tracker_snapshot_process_snapshot_memory_edge ()] is a new empty value for type [memory_tracker_snapshot_process_snapshot_memory_edge] *) + +val default_memory_tracker_snapshot_process_snapshot : unit -> memory_tracker_snapshot_process_snapshot +(** [default_memory_tracker_snapshot_process_snapshot ()] is a new empty value for type [memory_tracker_snapshot_process_snapshot] *) + +val default_memory_tracker_snapshot_level_of_detail : unit -> memory_tracker_snapshot_level_of_detail +(** [default_memory_tracker_snapshot_level_of_detail ()] is a new empty value for type [memory_tracker_snapshot_level_of_detail] *) + +val default_memory_tracker_snapshot : unit -> memory_tracker_snapshot +(** [default_memory_tracker_snapshot ()] is a new empty value for type [memory_tracker_snapshot] *) + +val default_perfetto_metatrace_arg_key_or_interned_key : unit -> perfetto_metatrace_arg_key_or_interned_key +(** [default_perfetto_metatrace_arg_key_or_interned_key ()] is a new empty value for type [perfetto_metatrace_arg_key_or_interned_key] *) + +val default_perfetto_metatrace_arg_value_or_interned_value : unit -> perfetto_metatrace_arg_value_or_interned_value +(** [default_perfetto_metatrace_arg_value_or_interned_value ()] is a new empty value for type [perfetto_metatrace_arg_value_or_interned_value] *) + +val default_perfetto_metatrace_arg : unit -> perfetto_metatrace_arg +(** [default_perfetto_metatrace_arg ()] is a new empty value for type [perfetto_metatrace_arg] *) + +val default_perfetto_metatrace_interned_string : unit -> perfetto_metatrace_interned_string +(** [default_perfetto_metatrace_interned_string ()] is a new empty value for type [perfetto_metatrace_interned_string] *) + +val default_perfetto_metatrace_record_type : unit -> perfetto_metatrace_record_type +(** [default_perfetto_metatrace_record_type ()] is a new empty value for type [perfetto_metatrace_record_type] *) + +val default_perfetto_metatrace : unit -> perfetto_metatrace +(** [default_perfetto_metatrace ()] is a new empty value for type [perfetto_metatrace] *) + +val default_tracing_service_event_data_sources_data_source : unit -> tracing_service_event_data_sources_data_source +(** [default_tracing_service_event_data_sources_data_source ()] is a new empty value for type [tracing_service_event_data_sources_data_source] *) + +val default_tracing_service_event_data_sources : unit -> tracing_service_event_data_sources +(** [default_tracing_service_event_data_sources ()] is a new empty value for type [tracing_service_event_data_sources] *) + +val default_tracing_service_event : unit -> tracing_service_event +(** [default_tracing_service_event ()] is a new empty value for type [tracing_service_event] *) + +val default_android_energy_consumer : unit -> android_energy_consumer +(** [default_android_energy_consumer ()] is a new empty value for type [android_energy_consumer] *) + +val default_android_energy_consumer_descriptor : unit -> android_energy_consumer_descriptor +(** [default_android_energy_consumer_descriptor ()] is a new empty value for type [android_energy_consumer_descriptor] *) + +val default_android_energy_estimation_breakdown_energy_uid_breakdown : unit -> android_energy_estimation_breakdown_energy_uid_breakdown +(** [default_android_energy_estimation_breakdown_energy_uid_breakdown ()] is a new empty value for type [android_energy_estimation_breakdown_energy_uid_breakdown] *) + +val default_android_energy_estimation_breakdown : unit -> android_energy_estimation_breakdown +(** [default_android_energy_estimation_breakdown ()] is a new empty value for type [android_energy_estimation_breakdown] *) + +val default_entity_state_residency_power_entity_state : unit -> entity_state_residency_power_entity_state +(** [default_entity_state_residency_power_entity_state ()] is a new empty value for type [entity_state_residency_power_entity_state] *) + +val default_entity_state_residency_state_residency : unit -> entity_state_residency_state_residency +(** [default_entity_state_residency_state_residency ()] is a new empty value for type [entity_state_residency_state_residency] *) + +val default_entity_state_residency : unit -> entity_state_residency +(** [default_entity_state_residency ()] is a new empty value for type [entity_state_residency] *) + +val default_battery_counters : unit -> battery_counters +(** [default_battery_counters ()] is a new empty value for type [battery_counters] *) + +val default_power_rails_rail_descriptor : unit -> power_rails_rail_descriptor +(** [default_power_rails_rail_descriptor ()] is a new empty value for type [power_rails_rail_descriptor] *) + +val default_power_rails_energy_data : unit -> power_rails_energy_data +(** [default_power_rails_energy_data ()] is a new empty value for type [power_rails_energy_data] *) + +val default_power_rails : unit -> power_rails +(** [default_power_rails ()] is a new empty value for type [power_rails] *) + +val default_obfuscated_member : unit -> obfuscated_member +(** [default_obfuscated_member ()] is a new empty value for type [obfuscated_member] *) + +val default_obfuscated_class : unit -> obfuscated_class +(** [default_obfuscated_class ()] is a new empty value for type [obfuscated_class] *) + +val default_deobfuscation_mapping : unit -> deobfuscation_mapping +(** [default_deobfuscation_mapping ()] is a new empty value for type [deobfuscation_mapping] *) + +val default_heap_graph_root_type : unit -> heap_graph_root_type +(** [default_heap_graph_root_type ()] is a new empty value for type [heap_graph_root_type] *) + +val default_heap_graph_root : unit -> heap_graph_root +(** [default_heap_graph_root ()] is a new empty value for type [heap_graph_root] *) + +val default_heap_graph_type_kind : unit -> heap_graph_type_kind +(** [default_heap_graph_type_kind ()] is a new empty value for type [heap_graph_type_kind] *) + +val default_heap_graph_type : unit -> heap_graph_type +(** [default_heap_graph_type ()] is a new empty value for type [heap_graph_type] *) + +val default_heap_graph_object_heap_type : unit -> heap_graph_object_heap_type +(** [default_heap_graph_object_heap_type ()] is a new empty value for type [heap_graph_object_heap_type] *) + +val default_heap_graph_object_identifier : unit -> heap_graph_object_identifier +(** [default_heap_graph_object_identifier ()] is a new empty value for type [heap_graph_object_identifier] *) + +val default_heap_graph_object : unit -> heap_graph_object +(** [default_heap_graph_object ()] is a new empty value for type [heap_graph_object] *) + +val default_heap_graph : unit -> heap_graph +(** [default_heap_graph ()] is a new empty value for type [heap_graph] *) + +val default_profile_packet_heap_sample : unit -> profile_packet_heap_sample +(** [default_profile_packet_heap_sample ()] is a new empty value for type [profile_packet_heap_sample] *) + +val default_profile_packet_histogram_bucket : unit -> profile_packet_histogram_bucket +(** [default_profile_packet_histogram_bucket ()] is a new empty value for type [profile_packet_histogram_bucket] *) + +val default_profile_packet_histogram : unit -> profile_packet_histogram +(** [default_profile_packet_histogram ()] is a new empty value for type [profile_packet_histogram] *) + +val default_profile_packet_process_stats : unit -> profile_packet_process_stats +(** [default_profile_packet_process_stats ()] is a new empty value for type [profile_packet_process_stats] *) + +val default_profile_packet_process_heap_samples_client_error : unit -> profile_packet_process_heap_samples_client_error +(** [default_profile_packet_process_heap_samples_client_error ()] is a new empty value for type [profile_packet_process_heap_samples_client_error] *) + +val default_profile_packet_process_heap_samples : unit -> profile_packet_process_heap_samples +(** [default_profile_packet_process_heap_samples ()] is a new empty value for type [profile_packet_process_heap_samples] *) + +val default_profile_packet : unit -> profile_packet +(** [default_profile_packet ()] is a new empty value for type [profile_packet] *) + +val default_streaming_allocation : unit -> streaming_allocation +(** [default_streaming_allocation ()] is a new empty value for type [streaming_allocation] *) + +val default_streaming_free : unit -> streaming_free +(** [default_streaming_free ()] is a new empty value for type [streaming_free] *) + +val default_streaming_profile_packet : unit -> streaming_profile_packet +(** [default_streaming_profile_packet ()] is a new empty value for type [streaming_profile_packet] *) + +val default_profiling_cpu_mode : unit -> profiling_cpu_mode +(** [default_profiling_cpu_mode ()] is a new empty value for type [profiling_cpu_mode] *) + +val default_profiling_stack_unwind_error : unit -> profiling_stack_unwind_error +(** [default_profiling_stack_unwind_error ()] is a new empty value for type [profiling_stack_unwind_error] *) + +val default_profiling : unit +(** [default_profiling] is the default value for type [profiling] *) + +val default_perf_sample_sample_skip_reason : unit -> perf_sample_sample_skip_reason +(** [default_perf_sample_sample_skip_reason ()] is a new empty value for type [perf_sample_sample_skip_reason] *) + +val default_perf_sample_producer_event_data_source_stop_reason : unit -> perf_sample_producer_event_data_source_stop_reason +(** [default_perf_sample_producer_event_data_source_stop_reason ()] is a new empty value for type [perf_sample_producer_event_data_source_stop_reason] *) + +val default_perf_sample_producer_event : unit -> perf_sample_producer_event +(** [default_perf_sample_producer_event ()] is a new empty value for type [perf_sample_producer_event] *) + +val default_perf_sample_optional_unwind_error : unit -> perf_sample_optional_unwind_error +(** [default_perf_sample_optional_unwind_error ()] is a new empty value for type [perf_sample_optional_unwind_error] *) + +val default_perf_sample_optional_sample_skipped_reason : unit -> perf_sample_optional_sample_skipped_reason +(** [default_perf_sample_optional_sample_skipped_reason ()] is a new empty value for type [perf_sample_optional_sample_skipped_reason] *) + +val default_perf_sample : unit -> perf_sample +(** [default_perf_sample ()] is a new empty value for type [perf_sample] *) + +val default_smaps_entry : unit -> smaps_entry +(** [default_smaps_entry ()] is a new empty value for type [smaps_entry] *) + +val default_smaps_packet : unit -> smaps_packet +(** [default_smaps_packet ()] is a new empty value for type [smaps_packet] *) + +val default_process_stats_thread : unit -> process_stats_thread +(** [default_process_stats_thread ()] is a new empty value for type [process_stats_thread] *) + +val default_process_stats_fdinfo : unit -> process_stats_fdinfo +(** [default_process_stats_fdinfo ()] is a new empty value for type [process_stats_fdinfo] *) + +val default_process_stats_process : unit -> process_stats_process +(** [default_process_stats_process ()] is a new empty value for type [process_stats_process] *) + +val default_process_stats : unit -> process_stats +(** [default_process_stats ()] is a new empty value for type [process_stats] *) + +val default_process_tree_thread : unit -> process_tree_thread +(** [default_process_tree_thread ()] is a new empty value for type [process_tree_thread] *) + +val default_process_tree_process : unit -> process_tree_process +(** [default_process_tree_process ()] is a new empty value for type [process_tree_process] *) + +val default_process_tree : unit -> process_tree +(** [default_process_tree ()] is a new empty value for type [process_tree] *) + +val default_remote_clock_sync_synced_clocks : unit -> remote_clock_sync_synced_clocks +(** [default_remote_clock_sync_synced_clocks ()] is a new empty value for type [remote_clock_sync_synced_clocks] *) + +val default_remote_clock_sync : unit -> remote_clock_sync +(** [default_remote_clock_sync ()] is a new empty value for type [remote_clock_sync] *) + +val default_atom : unit +(** [default_atom] is the default value for type [atom] *) + +val default_statsd_atom : unit -> statsd_atom +(** [default_statsd_atom ()] is a new empty value for type [statsd_atom] *) + +val default_sys_stats_meminfo_value : unit -> sys_stats_meminfo_value +(** [default_sys_stats_meminfo_value ()] is a new empty value for type [sys_stats_meminfo_value] *) + +val default_sys_stats_vmstat_value : unit -> sys_stats_vmstat_value +(** [default_sys_stats_vmstat_value ()] is a new empty value for type [sys_stats_vmstat_value] *) + +val default_sys_stats_cpu_times : unit -> sys_stats_cpu_times +(** [default_sys_stats_cpu_times ()] is a new empty value for type [sys_stats_cpu_times] *) + +val default_sys_stats_interrupt_count : unit -> sys_stats_interrupt_count +(** [default_sys_stats_interrupt_count ()] is a new empty value for type [sys_stats_interrupt_count] *) + +val default_sys_stats_devfreq_value : unit -> sys_stats_devfreq_value +(** [default_sys_stats_devfreq_value ()] is a new empty value for type [sys_stats_devfreq_value] *) + +val default_sys_stats_buddy_info : unit -> sys_stats_buddy_info +(** [default_sys_stats_buddy_info ()] is a new empty value for type [sys_stats_buddy_info] *) + +val default_sys_stats_disk_stat : unit -> sys_stats_disk_stat +(** [default_sys_stats_disk_stat ()] is a new empty value for type [sys_stats_disk_stat] *) + +val default_sys_stats_psi_sample_psi_resource : unit -> sys_stats_psi_sample_psi_resource +(** [default_sys_stats_psi_sample_psi_resource ()] is a new empty value for type [sys_stats_psi_sample_psi_resource] *) + +val default_sys_stats_psi_sample : unit -> sys_stats_psi_sample +(** [default_sys_stats_psi_sample ()] is a new empty value for type [sys_stats_psi_sample] *) + +val default_sys_stats_thermal_zone : unit -> sys_stats_thermal_zone +(** [default_sys_stats_thermal_zone ()] is a new empty value for type [sys_stats_thermal_zone] *) + +val default_sys_stats_cpu_idle_state_entry : unit -> sys_stats_cpu_idle_state_entry +(** [default_sys_stats_cpu_idle_state_entry ()] is a new empty value for type [sys_stats_cpu_idle_state_entry] *) + +val default_sys_stats_cpu_idle_state : unit -> sys_stats_cpu_idle_state +(** [default_sys_stats_cpu_idle_state ()] is a new empty value for type [sys_stats_cpu_idle_state] *) + +val default_sys_stats : unit -> sys_stats +(** [default_sys_stats ()] is a new empty value for type [sys_stats] *) + +val default_cpu_info_arm_cpu_identifier : unit -> cpu_info_arm_cpu_identifier +(** [default_cpu_info_arm_cpu_identifier ()] is a new empty value for type [cpu_info_arm_cpu_identifier] *) + +val default_cpu_info_cpu_identifier : unit -> cpu_info_cpu_identifier +(** [default_cpu_info_cpu_identifier ()] is a new empty value for type [cpu_info_cpu_identifier] *) + +val default_cpu_info_cpu : unit -> cpu_info_cpu +(** [default_cpu_info_cpu ()] is a new empty value for type [cpu_info_cpu] *) + +val default_cpu_info : unit -> cpu_info +(** [default_cpu_info ()] is a new empty value for type [cpu_info] *) + +val default_test_event_test_payload : unit -> test_event_test_payload +(** [default_test_event_test_payload ()] is a new empty value for type [test_event_test_payload] *) + +val default_test_event : unit -> test_event +(** [default_test_event ()] is a new empty value for type [test_event] *) + +val default_trace_packet_defaults : unit -> trace_packet_defaults +(** [default_trace_packet_defaults ()] is a new empty value for type [trace_packet_defaults] *) + +val default_trace_uuid : unit -> trace_uuid +(** [default_trace_uuid ()] is a new empty value for type [trace_uuid] *) + +val default_process_descriptor_chrome_process_type : unit -> process_descriptor_chrome_process_type +(** [default_process_descriptor_chrome_process_type ()] is a new empty value for type [process_descriptor_chrome_process_type] *) + +val default_process_descriptor : unit -> process_descriptor +(** [default_process_descriptor ()] is a new empty value for type [process_descriptor] *) + +val default_track_event_range_of_interest : unit -> track_event_range_of_interest +(** [default_track_event_range_of_interest ()] is a new empty value for type [track_event_range_of_interest] *) + +val default_thread_descriptor_chrome_thread_type : unit -> thread_descriptor_chrome_thread_type +(** [default_thread_descriptor_chrome_thread_type ()] is a new empty value for type [thread_descriptor_chrome_thread_type] *) + +val default_thread_descriptor : unit -> thread_descriptor +(** [default_thread_descriptor ()] is a new empty value for type [thread_descriptor] *) + +val default_chrome_process_descriptor : unit -> chrome_process_descriptor +(** [default_chrome_process_descriptor ()] is a new empty value for type [chrome_process_descriptor] *) + +val default_chrome_thread_descriptor : unit -> chrome_thread_descriptor +(** [default_chrome_thread_descriptor ()] is a new empty value for type [chrome_thread_descriptor] *) + +val default_counter_descriptor_builtin_counter_type : unit -> counter_descriptor_builtin_counter_type +(** [default_counter_descriptor_builtin_counter_type ()] is a new empty value for type [counter_descriptor_builtin_counter_type] *) + +val default_counter_descriptor_unit : unit -> counter_descriptor_unit +(** [default_counter_descriptor_unit ()] is a new empty value for type [counter_descriptor_unit] *) + +val default_counter_descriptor : unit -> counter_descriptor +(** [default_counter_descriptor ()] is a new empty value for type [counter_descriptor] *) + +val default_track_descriptor_child_tracks_ordering : unit -> track_descriptor_child_tracks_ordering +(** [default_track_descriptor_child_tracks_ordering ()] is a new empty value for type [track_descriptor_child_tracks_ordering] *) + +val default_track_descriptor_sibling_merge_behavior : unit -> track_descriptor_sibling_merge_behavior +(** [default_track_descriptor_sibling_merge_behavior ()] is a new empty value for type [track_descriptor_sibling_merge_behavior] *) + +val default_track_descriptor_static_or_dynamic_name : unit -> track_descriptor_static_or_dynamic_name +(** [default_track_descriptor_static_or_dynamic_name ()] is a new empty value for type [track_descriptor_static_or_dynamic_name] *) + +val default_track_descriptor_sibling_merge_key_field : unit -> track_descriptor_sibling_merge_key_field +(** [default_track_descriptor_sibling_merge_key_field ()] is a new empty value for type [track_descriptor_sibling_merge_key_field] *) + +val default_track_descriptor : unit -> track_descriptor +(** [default_track_descriptor ()] is a new empty value for type [track_descriptor] *) + +val default_chrome_historgram_translation_table : unit -> chrome_historgram_translation_table +(** [default_chrome_historgram_translation_table ()] is a new empty value for type [chrome_historgram_translation_table] *) + +val default_chrome_user_event_translation_table : unit -> chrome_user_event_translation_table +(** [default_chrome_user_event_translation_table ()] is a new empty value for type [chrome_user_event_translation_table] *) + +val default_chrome_performance_mark_translation_table : unit -> chrome_performance_mark_translation_table +(** [default_chrome_performance_mark_translation_table ()] is a new empty value for type [chrome_performance_mark_translation_table] *) + +val default_slice_name_translation_table : unit -> slice_name_translation_table +(** [default_slice_name_translation_table ()] is a new empty value for type [slice_name_translation_table] *) + +val default_process_track_name_translation_table : unit -> process_track_name_translation_table +(** [default_process_track_name_translation_table ()] is a new empty value for type [process_track_name_translation_table] *) + +val default_chrome_study_translation_table : unit -> chrome_study_translation_table +(** [default_chrome_study_translation_table ()] is a new empty value for type [chrome_study_translation_table] *) + +val default_translation_table : unit -> translation_table +(** [default_translation_table ()] is a new empty value for type [translation_table] *) + +val default_trigger : unit -> trigger +(** [default_trigger ()] is a new empty value for type [trigger] *) + +val default_ui_state_highlight_process : unit -> ui_state_highlight_process +(** [default_ui_state_highlight_process ()] is a new empty value for type [ui_state_highlight_process] *) + +val default_ui_state : unit -> ui_state +(** [default_ui_state ()] is a new empty value for type [ui_state] *) + +val default_trace_packet_sequence_flags : unit -> trace_packet_sequence_flags +(** [default_trace_packet_sequence_flags ()] is a new empty value for type [trace_packet_sequence_flags] *) + +val default_trace_packet_data : unit -> trace_packet_data +(** [default_trace_packet_data ()] is a new empty value for type [trace_packet_data] *) + +val default_trace_packet_optional_trusted_uid : unit -> trace_packet_optional_trusted_uid +(** [default_trace_packet_optional_trusted_uid ()] is a new empty value for type [trace_packet_optional_trusted_uid] *) + +val default_trace_packet_optional_trusted_packet_sequence_id : unit -> trace_packet_optional_trusted_packet_sequence_id +(** [default_trace_packet_optional_trusted_packet_sequence_id ()] is a new empty value for type [trace_packet_optional_trusted_packet_sequence_id] *) + +val default_trace_packet : unit -> trace_packet +(** [default_trace_packet ()] is a new empty value for type [trace_packet] *) + +val default_trace : unit -> trace +(** [default_trace ()] is a new empty value for type [trace] *) + + +(** {2 Make functions} *) + +val make_ftrace_descriptor_atrace_category : + ?name:string -> + ?description:string -> + unit -> + ftrace_descriptor_atrace_category +(** [make_ftrace_descriptor_atrace_category … ()] is a builder for type [ftrace_descriptor_atrace_category] *) + +val copy_ftrace_descriptor_atrace_category : ftrace_descriptor_atrace_category -> ftrace_descriptor_atrace_category + +val ftrace_descriptor_atrace_category_has_name : ftrace_descriptor_atrace_category -> bool + (** presence of field "name" in [ftrace_descriptor_atrace_category] *) + +val ftrace_descriptor_atrace_category_set_name : ftrace_descriptor_atrace_category -> string -> unit + (** set field name in ftrace_descriptor_atrace_category *) + +val ftrace_descriptor_atrace_category_has_description : ftrace_descriptor_atrace_category -> bool + (** presence of field "description" in [ftrace_descriptor_atrace_category] *) + +val ftrace_descriptor_atrace_category_set_description : ftrace_descriptor_atrace_category -> string -> unit + (** set field description in ftrace_descriptor_atrace_category *) + +val make_ftrace_descriptor : + ?atrace_categories:ftrace_descriptor_atrace_category list -> + unit -> + ftrace_descriptor +(** [make_ftrace_descriptor … ()] is a builder for type [ftrace_descriptor] *) + +val copy_ftrace_descriptor : ftrace_descriptor -> ftrace_descriptor + +val ftrace_descriptor_set_atrace_categories : ftrace_descriptor -> ftrace_descriptor_atrace_category list -> unit + (** set field atrace_categories in ftrace_descriptor *) + +val make_gpu_counter_descriptor_gpu_counter_spec : + ?counter_id:int32 -> + ?name:string -> + ?description:string -> + ?peak_value:gpu_counter_descriptor_gpu_counter_spec_peak_value -> + ?numerator_units:gpu_counter_descriptor_measure_unit list -> + ?denominator_units:gpu_counter_descriptor_measure_unit list -> + ?select_by_default:bool -> + ?groups:gpu_counter_descriptor_gpu_counter_group list -> + unit -> + gpu_counter_descriptor_gpu_counter_spec +(** [make_gpu_counter_descriptor_gpu_counter_spec … ()] is a builder for type [gpu_counter_descriptor_gpu_counter_spec] *) + +val copy_gpu_counter_descriptor_gpu_counter_spec : gpu_counter_descriptor_gpu_counter_spec -> gpu_counter_descriptor_gpu_counter_spec + +val gpu_counter_descriptor_gpu_counter_spec_has_counter_id : gpu_counter_descriptor_gpu_counter_spec -> bool + (** presence of field "counter_id" in [gpu_counter_descriptor_gpu_counter_spec] *) + +val gpu_counter_descriptor_gpu_counter_spec_set_counter_id : gpu_counter_descriptor_gpu_counter_spec -> int32 -> unit + (** set field counter_id in gpu_counter_descriptor_gpu_counter_spec *) + +val gpu_counter_descriptor_gpu_counter_spec_has_name : gpu_counter_descriptor_gpu_counter_spec -> bool + (** presence of field "name" in [gpu_counter_descriptor_gpu_counter_spec] *) + +val gpu_counter_descriptor_gpu_counter_spec_set_name : gpu_counter_descriptor_gpu_counter_spec -> string -> unit + (** set field name in gpu_counter_descriptor_gpu_counter_spec *) + +val gpu_counter_descriptor_gpu_counter_spec_has_description : gpu_counter_descriptor_gpu_counter_spec -> bool + (** presence of field "description" in [gpu_counter_descriptor_gpu_counter_spec] *) + +val gpu_counter_descriptor_gpu_counter_spec_set_description : gpu_counter_descriptor_gpu_counter_spec -> string -> unit + (** set field description in gpu_counter_descriptor_gpu_counter_spec *) + +val gpu_counter_descriptor_gpu_counter_spec_set_peak_value : gpu_counter_descriptor_gpu_counter_spec -> gpu_counter_descriptor_gpu_counter_spec_peak_value -> unit + (** set field peak_value in gpu_counter_descriptor_gpu_counter_spec *) + +val gpu_counter_descriptor_gpu_counter_spec_set_numerator_units : gpu_counter_descriptor_gpu_counter_spec -> gpu_counter_descriptor_measure_unit list -> unit + (** set field numerator_units in gpu_counter_descriptor_gpu_counter_spec *) + +val gpu_counter_descriptor_gpu_counter_spec_set_denominator_units : gpu_counter_descriptor_gpu_counter_spec -> gpu_counter_descriptor_measure_unit list -> unit + (** set field denominator_units in gpu_counter_descriptor_gpu_counter_spec *) + +val gpu_counter_descriptor_gpu_counter_spec_has_select_by_default : gpu_counter_descriptor_gpu_counter_spec -> bool + (** presence of field "select_by_default" in [gpu_counter_descriptor_gpu_counter_spec] *) + +val gpu_counter_descriptor_gpu_counter_spec_set_select_by_default : gpu_counter_descriptor_gpu_counter_spec -> bool -> unit + (** set field select_by_default in gpu_counter_descriptor_gpu_counter_spec *) + +val gpu_counter_descriptor_gpu_counter_spec_set_groups : gpu_counter_descriptor_gpu_counter_spec -> gpu_counter_descriptor_gpu_counter_group list -> unit + (** set field groups in gpu_counter_descriptor_gpu_counter_spec *) + +val make_gpu_counter_descriptor_gpu_counter_block : + ?block_id:int32 -> + ?block_capacity:int32 -> + ?name:string -> + ?description:string -> + ?counter_ids:int32 list -> + unit -> + gpu_counter_descriptor_gpu_counter_block +(** [make_gpu_counter_descriptor_gpu_counter_block … ()] is a builder for type [gpu_counter_descriptor_gpu_counter_block] *) + +val copy_gpu_counter_descriptor_gpu_counter_block : gpu_counter_descriptor_gpu_counter_block -> gpu_counter_descriptor_gpu_counter_block + +val gpu_counter_descriptor_gpu_counter_block_has_block_id : gpu_counter_descriptor_gpu_counter_block -> bool + (** presence of field "block_id" in [gpu_counter_descriptor_gpu_counter_block] *) + +val gpu_counter_descriptor_gpu_counter_block_set_block_id : gpu_counter_descriptor_gpu_counter_block -> int32 -> unit + (** set field block_id in gpu_counter_descriptor_gpu_counter_block *) + +val gpu_counter_descriptor_gpu_counter_block_has_block_capacity : gpu_counter_descriptor_gpu_counter_block -> bool + (** presence of field "block_capacity" in [gpu_counter_descriptor_gpu_counter_block] *) + +val gpu_counter_descriptor_gpu_counter_block_set_block_capacity : gpu_counter_descriptor_gpu_counter_block -> int32 -> unit + (** set field block_capacity in gpu_counter_descriptor_gpu_counter_block *) + +val gpu_counter_descriptor_gpu_counter_block_has_name : gpu_counter_descriptor_gpu_counter_block -> bool + (** presence of field "name" in [gpu_counter_descriptor_gpu_counter_block] *) + +val gpu_counter_descriptor_gpu_counter_block_set_name : gpu_counter_descriptor_gpu_counter_block -> string -> unit + (** set field name in gpu_counter_descriptor_gpu_counter_block *) + +val gpu_counter_descriptor_gpu_counter_block_has_description : gpu_counter_descriptor_gpu_counter_block -> bool + (** presence of field "description" in [gpu_counter_descriptor_gpu_counter_block] *) + +val gpu_counter_descriptor_gpu_counter_block_set_description : gpu_counter_descriptor_gpu_counter_block -> string -> unit + (** set field description in gpu_counter_descriptor_gpu_counter_block *) + +val gpu_counter_descriptor_gpu_counter_block_set_counter_ids : gpu_counter_descriptor_gpu_counter_block -> int32 list -> unit + (** set field counter_ids in gpu_counter_descriptor_gpu_counter_block *) + +val make_gpu_counter_descriptor : + ?specs:gpu_counter_descriptor_gpu_counter_spec list -> + ?blocks:gpu_counter_descriptor_gpu_counter_block list -> + ?min_sampling_period_ns:int64 -> + ?max_sampling_period_ns:int64 -> + ?supports_instrumented_sampling:bool -> + unit -> + gpu_counter_descriptor +(** [make_gpu_counter_descriptor … ()] is a builder for type [gpu_counter_descriptor] *) + +val copy_gpu_counter_descriptor : gpu_counter_descriptor -> gpu_counter_descriptor + +val gpu_counter_descriptor_set_specs : gpu_counter_descriptor -> gpu_counter_descriptor_gpu_counter_spec list -> unit + (** set field specs in gpu_counter_descriptor *) + +val gpu_counter_descriptor_set_blocks : gpu_counter_descriptor -> gpu_counter_descriptor_gpu_counter_block list -> unit + (** set field blocks in gpu_counter_descriptor *) + +val gpu_counter_descriptor_has_min_sampling_period_ns : gpu_counter_descriptor -> bool + (** presence of field "min_sampling_period_ns" in [gpu_counter_descriptor] *) + +val gpu_counter_descriptor_set_min_sampling_period_ns : gpu_counter_descriptor -> int64 -> unit + (** set field min_sampling_period_ns in gpu_counter_descriptor *) + +val gpu_counter_descriptor_has_max_sampling_period_ns : gpu_counter_descriptor -> bool + (** presence of field "max_sampling_period_ns" in [gpu_counter_descriptor] *) + +val gpu_counter_descriptor_set_max_sampling_period_ns : gpu_counter_descriptor -> int64 -> unit + (** set field max_sampling_period_ns in gpu_counter_descriptor *) + +val gpu_counter_descriptor_has_supports_instrumented_sampling : gpu_counter_descriptor -> bool + (** presence of field "supports_instrumented_sampling" in [gpu_counter_descriptor] *) + +val gpu_counter_descriptor_set_supports_instrumented_sampling : gpu_counter_descriptor -> bool -> unit + (** set field supports_instrumented_sampling in gpu_counter_descriptor *) + +val make_track_event_category : + ?name:string -> + ?description:string -> + ?tags:string list -> + unit -> + track_event_category +(** [make_track_event_category … ()] is a builder for type [track_event_category] *) + +val copy_track_event_category : track_event_category -> track_event_category + +val track_event_category_has_name : track_event_category -> bool + (** presence of field "name" in [track_event_category] *) + +val track_event_category_set_name : track_event_category -> string -> unit + (** set field name in track_event_category *) + +val track_event_category_has_description : track_event_category -> bool + (** presence of field "description" in [track_event_category] *) + +val track_event_category_set_description : track_event_category -> string -> unit + (** set field description in track_event_category *) + +val track_event_category_set_tags : track_event_category -> string list -> unit + (** set field tags in track_event_category *) + +val make_track_event_descriptor : + ?available_categories:track_event_category list -> + unit -> + track_event_descriptor +(** [make_track_event_descriptor … ()] is a builder for type [track_event_descriptor] *) + +val copy_track_event_descriptor : track_event_descriptor -> track_event_descriptor + +val track_event_descriptor_set_available_categories : track_event_descriptor -> track_event_category list -> unit + (** set field available_categories in track_event_descriptor *) + +val make_data_source_descriptor : + ?name:string -> + ?id:int64 -> + ?will_notify_on_stop:bool -> + ?will_notify_on_start:bool -> + ?handles_incremental_state_clear:bool -> + ?no_flush:bool -> + ?gpu_counter_descriptor:gpu_counter_descriptor -> + ?track_event_descriptor:track_event_descriptor -> + ?ftrace_descriptor:ftrace_descriptor -> + unit -> + data_source_descriptor +(** [make_data_source_descriptor … ()] is a builder for type [data_source_descriptor] *) + +val copy_data_source_descriptor : data_source_descriptor -> data_source_descriptor + +val data_source_descriptor_has_name : data_source_descriptor -> bool + (** presence of field "name" in [data_source_descriptor] *) + +val data_source_descriptor_set_name : data_source_descriptor -> string -> unit + (** set field name in data_source_descriptor *) + +val data_source_descriptor_has_id : data_source_descriptor -> bool + (** presence of field "id" in [data_source_descriptor] *) + +val data_source_descriptor_set_id : data_source_descriptor -> int64 -> unit + (** set field id in data_source_descriptor *) + +val data_source_descriptor_has_will_notify_on_stop : data_source_descriptor -> bool + (** presence of field "will_notify_on_stop" in [data_source_descriptor] *) + +val data_source_descriptor_set_will_notify_on_stop : data_source_descriptor -> bool -> unit + (** set field will_notify_on_stop in data_source_descriptor *) + +val data_source_descriptor_has_will_notify_on_start : data_source_descriptor -> bool + (** presence of field "will_notify_on_start" in [data_source_descriptor] *) + +val data_source_descriptor_set_will_notify_on_start : data_source_descriptor -> bool -> unit + (** set field will_notify_on_start in data_source_descriptor *) + +val data_source_descriptor_has_handles_incremental_state_clear : data_source_descriptor -> bool + (** presence of field "handles_incremental_state_clear" in [data_source_descriptor] *) + +val data_source_descriptor_set_handles_incremental_state_clear : data_source_descriptor -> bool -> unit + (** set field handles_incremental_state_clear in data_source_descriptor *) + +val data_source_descriptor_has_no_flush : data_source_descriptor -> bool + (** presence of field "no_flush" in [data_source_descriptor] *) + +val data_source_descriptor_set_no_flush : data_source_descriptor -> bool -> unit + (** set field no_flush in data_source_descriptor *) + +val data_source_descriptor_set_gpu_counter_descriptor : data_source_descriptor -> gpu_counter_descriptor -> unit + (** set field gpu_counter_descriptor in data_source_descriptor *) + +val data_source_descriptor_set_track_event_descriptor : data_source_descriptor -> track_event_descriptor -> unit + (** set field track_event_descriptor in data_source_descriptor *) + +val data_source_descriptor_set_ftrace_descriptor : data_source_descriptor -> ftrace_descriptor -> unit + (** set field ftrace_descriptor in data_source_descriptor *) + +val make_tracing_service_state_producer : + ?id:int32 -> + ?name:string -> + ?pid:int32 -> + ?uid:int32 -> + ?sdk_version:string -> + ?frozen:bool -> + unit -> + tracing_service_state_producer +(** [make_tracing_service_state_producer … ()] is a builder for type [tracing_service_state_producer] *) + +val copy_tracing_service_state_producer : tracing_service_state_producer -> tracing_service_state_producer + +val tracing_service_state_producer_has_id : tracing_service_state_producer -> bool + (** presence of field "id" in [tracing_service_state_producer] *) + +val tracing_service_state_producer_set_id : tracing_service_state_producer -> int32 -> unit + (** set field id in tracing_service_state_producer *) + +val tracing_service_state_producer_has_name : tracing_service_state_producer -> bool + (** presence of field "name" in [tracing_service_state_producer] *) + +val tracing_service_state_producer_set_name : tracing_service_state_producer -> string -> unit + (** set field name in tracing_service_state_producer *) + +val tracing_service_state_producer_has_pid : tracing_service_state_producer -> bool + (** presence of field "pid" in [tracing_service_state_producer] *) + +val tracing_service_state_producer_set_pid : tracing_service_state_producer -> int32 -> unit + (** set field pid in tracing_service_state_producer *) + +val tracing_service_state_producer_has_uid : tracing_service_state_producer -> bool + (** presence of field "uid" in [tracing_service_state_producer] *) + +val tracing_service_state_producer_set_uid : tracing_service_state_producer -> int32 -> unit + (** set field uid in tracing_service_state_producer *) + +val tracing_service_state_producer_has_sdk_version : tracing_service_state_producer -> bool + (** presence of field "sdk_version" in [tracing_service_state_producer] *) + +val tracing_service_state_producer_set_sdk_version : tracing_service_state_producer -> string -> unit + (** set field sdk_version in tracing_service_state_producer *) + +val tracing_service_state_producer_has_frozen : tracing_service_state_producer -> bool + (** presence of field "frozen" in [tracing_service_state_producer] *) + +val tracing_service_state_producer_set_frozen : tracing_service_state_producer -> bool -> unit + (** set field frozen in tracing_service_state_producer *) + +val make_tracing_service_state_data_source : + ?ds_descriptor:data_source_descriptor -> + ?producer_id:int32 -> + unit -> + tracing_service_state_data_source +(** [make_tracing_service_state_data_source … ()] is a builder for type [tracing_service_state_data_source] *) + +val copy_tracing_service_state_data_source : tracing_service_state_data_source -> tracing_service_state_data_source + +val tracing_service_state_data_source_set_ds_descriptor : tracing_service_state_data_source -> data_source_descriptor -> unit + (** set field ds_descriptor in tracing_service_state_data_source *) + +val tracing_service_state_data_source_has_producer_id : tracing_service_state_data_source -> bool + (** presence of field "producer_id" in [tracing_service_state_data_source] *) + +val tracing_service_state_data_source_set_producer_id : tracing_service_state_data_source -> int32 -> unit + (** set field producer_id in tracing_service_state_data_source *) + +val make_tracing_service_state_tracing_session : + ?id:int64 -> + ?consumer_uid:int32 -> + ?state:string -> + ?unique_session_name:string -> + ?buffer_size_kb:int32 list -> + ?duration_ms:int32 -> + ?num_data_sources:int32 -> + ?start_realtime_ns:int64 -> + ?bugreport_score:int32 -> + ?bugreport_filename:string -> + ?is_started:bool -> + unit -> + tracing_service_state_tracing_session +(** [make_tracing_service_state_tracing_session … ()] is a builder for type [tracing_service_state_tracing_session] *) + +val copy_tracing_service_state_tracing_session : tracing_service_state_tracing_session -> tracing_service_state_tracing_session + +val tracing_service_state_tracing_session_has_id : tracing_service_state_tracing_session -> bool + (** presence of field "id" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_id : tracing_service_state_tracing_session -> int64 -> unit + (** set field id in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_consumer_uid : tracing_service_state_tracing_session -> bool + (** presence of field "consumer_uid" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_consumer_uid : tracing_service_state_tracing_session -> int32 -> unit + (** set field consumer_uid in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_state : tracing_service_state_tracing_session -> bool + (** presence of field "state" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_state : tracing_service_state_tracing_session -> string -> unit + (** set field state in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_unique_session_name : tracing_service_state_tracing_session -> bool + (** presence of field "unique_session_name" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_unique_session_name : tracing_service_state_tracing_session -> string -> unit + (** set field unique_session_name in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_set_buffer_size_kb : tracing_service_state_tracing_session -> int32 list -> unit + (** set field buffer_size_kb in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_duration_ms : tracing_service_state_tracing_session -> bool + (** presence of field "duration_ms" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_duration_ms : tracing_service_state_tracing_session -> int32 -> unit + (** set field duration_ms in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_num_data_sources : tracing_service_state_tracing_session -> bool + (** presence of field "num_data_sources" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_num_data_sources : tracing_service_state_tracing_session -> int32 -> unit + (** set field num_data_sources in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_start_realtime_ns : tracing_service_state_tracing_session -> bool + (** presence of field "start_realtime_ns" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_start_realtime_ns : tracing_service_state_tracing_session -> int64 -> unit + (** set field start_realtime_ns in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_bugreport_score : tracing_service_state_tracing_session -> bool + (** presence of field "bugreport_score" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_bugreport_score : tracing_service_state_tracing_session -> int32 -> unit + (** set field bugreport_score in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_bugreport_filename : tracing_service_state_tracing_session -> bool + (** presence of field "bugreport_filename" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_bugreport_filename : tracing_service_state_tracing_session -> string -> unit + (** set field bugreport_filename in tracing_service_state_tracing_session *) + +val tracing_service_state_tracing_session_has_is_started : tracing_service_state_tracing_session -> bool + (** presence of field "is_started" in [tracing_service_state_tracing_session] *) + +val tracing_service_state_tracing_session_set_is_started : tracing_service_state_tracing_session -> bool -> unit + (** set field is_started in tracing_service_state_tracing_session *) + +val make_tracing_service_state : + ?producers:tracing_service_state_producer list -> + ?data_sources:tracing_service_state_data_source list -> + ?tracing_sessions:tracing_service_state_tracing_session list -> + ?supports_tracing_sessions:bool -> + ?num_sessions:int32 -> + ?num_sessions_started:int32 -> + ?tracing_service_version:string -> + unit -> + tracing_service_state +(** [make_tracing_service_state … ()] is a builder for type [tracing_service_state] *) + +val copy_tracing_service_state : tracing_service_state -> tracing_service_state + +val tracing_service_state_set_producers : tracing_service_state -> tracing_service_state_producer list -> unit + (** set field producers in tracing_service_state *) + +val tracing_service_state_set_data_sources : tracing_service_state -> tracing_service_state_data_source list -> unit + (** set field data_sources in tracing_service_state *) + +val tracing_service_state_set_tracing_sessions : tracing_service_state -> tracing_service_state_tracing_session list -> unit + (** set field tracing_sessions in tracing_service_state *) + +val tracing_service_state_has_supports_tracing_sessions : tracing_service_state -> bool + (** presence of field "supports_tracing_sessions" in [tracing_service_state] *) + +val tracing_service_state_set_supports_tracing_sessions : tracing_service_state -> bool -> unit + (** set field supports_tracing_sessions in tracing_service_state *) + +val tracing_service_state_has_num_sessions : tracing_service_state -> bool + (** presence of field "num_sessions" in [tracing_service_state] *) + +val tracing_service_state_set_num_sessions : tracing_service_state -> int32 -> unit + (** set field num_sessions in tracing_service_state *) + +val tracing_service_state_has_num_sessions_started : tracing_service_state -> bool + (** presence of field "num_sessions_started" in [tracing_service_state] *) + +val tracing_service_state_set_num_sessions_started : tracing_service_state -> int32 -> unit + (** set field num_sessions_started in tracing_service_state *) + +val tracing_service_state_has_tracing_service_version : tracing_service_state -> bool + (** presence of field "tracing_service_version" in [tracing_service_state] *) + +val tracing_service_state_set_tracing_service_version : tracing_service_state -> string -> unit + (** set field tracing_service_version in tracing_service_state *) + +val make_android_game_intervention_list_config : + ?package_name_filter:string list -> + unit -> + android_game_intervention_list_config +(** [make_android_game_intervention_list_config … ()] is a builder for type [android_game_intervention_list_config] *) + +val copy_android_game_intervention_list_config : android_game_intervention_list_config -> android_game_intervention_list_config + +val android_game_intervention_list_config_set_package_name_filter : android_game_intervention_list_config -> string list -> unit + (** set field package_name_filter in android_game_intervention_list_config *) + +val make_android_input_event_config_trace_rule : + ?trace_level:android_input_event_config_trace_level -> + ?match_all_packages:string list -> + ?match_any_packages:string list -> + ?match_secure:bool -> + ?match_ime_connection_active:bool -> + unit -> + android_input_event_config_trace_rule +(** [make_android_input_event_config_trace_rule … ()] is a builder for type [android_input_event_config_trace_rule] *) + +val copy_android_input_event_config_trace_rule : android_input_event_config_trace_rule -> android_input_event_config_trace_rule + +val android_input_event_config_trace_rule_has_trace_level : android_input_event_config_trace_rule -> bool + (** presence of field "trace_level" in [android_input_event_config_trace_rule] *) + +val android_input_event_config_trace_rule_set_trace_level : android_input_event_config_trace_rule -> android_input_event_config_trace_level -> unit + (** set field trace_level in android_input_event_config_trace_rule *) + +val android_input_event_config_trace_rule_set_match_all_packages : android_input_event_config_trace_rule -> string list -> unit + (** set field match_all_packages in android_input_event_config_trace_rule *) + +val android_input_event_config_trace_rule_set_match_any_packages : android_input_event_config_trace_rule -> string list -> unit + (** set field match_any_packages in android_input_event_config_trace_rule *) + +val android_input_event_config_trace_rule_has_match_secure : android_input_event_config_trace_rule -> bool + (** presence of field "match_secure" in [android_input_event_config_trace_rule] *) + +val android_input_event_config_trace_rule_set_match_secure : android_input_event_config_trace_rule -> bool -> unit + (** set field match_secure in android_input_event_config_trace_rule *) + +val android_input_event_config_trace_rule_has_match_ime_connection_active : android_input_event_config_trace_rule -> bool + (** presence of field "match_ime_connection_active" in [android_input_event_config_trace_rule] *) + +val android_input_event_config_trace_rule_set_match_ime_connection_active : android_input_event_config_trace_rule -> bool -> unit + (** set field match_ime_connection_active in android_input_event_config_trace_rule *) + +val make_android_input_event_config : + ?mode:android_input_event_config_trace_mode -> + ?rules:android_input_event_config_trace_rule list -> + ?trace_dispatcher_input_events:bool -> + ?trace_dispatcher_window_dispatch:bool -> + unit -> + android_input_event_config +(** [make_android_input_event_config … ()] is a builder for type [android_input_event_config] *) + +val copy_android_input_event_config : android_input_event_config -> android_input_event_config + +val android_input_event_config_has_mode : android_input_event_config -> bool + (** presence of field "mode" in [android_input_event_config] *) + +val android_input_event_config_set_mode : android_input_event_config -> android_input_event_config_trace_mode -> unit + (** set field mode in android_input_event_config *) + +val android_input_event_config_set_rules : android_input_event_config -> android_input_event_config_trace_rule list -> unit + (** set field rules in android_input_event_config *) + +val android_input_event_config_has_trace_dispatcher_input_events : android_input_event_config -> bool + (** presence of field "trace_dispatcher_input_events" in [android_input_event_config] *) + +val android_input_event_config_set_trace_dispatcher_input_events : android_input_event_config -> bool -> unit + (** set field trace_dispatcher_input_events in android_input_event_config *) + +val android_input_event_config_has_trace_dispatcher_window_dispatch : android_input_event_config -> bool + (** presence of field "trace_dispatcher_window_dispatch" in [android_input_event_config] *) + +val android_input_event_config_set_trace_dispatcher_window_dispatch : android_input_event_config -> bool -> unit + (** set field trace_dispatcher_window_dispatch in android_input_event_config *) + +val make_android_log_config : + ?log_ids:android_log_id list -> + ?min_prio:android_log_priority -> + ?filter_tags:string list -> + unit -> + android_log_config +(** [make_android_log_config … ()] is a builder for type [android_log_config] *) + +val copy_android_log_config : android_log_config -> android_log_config + +val android_log_config_set_log_ids : android_log_config -> android_log_id list -> unit + (** set field log_ids in android_log_config *) + +val android_log_config_has_min_prio : android_log_config -> bool + (** presence of field "min_prio" in [android_log_config] *) + +val android_log_config_set_min_prio : android_log_config -> android_log_priority -> unit + (** set field min_prio in android_log_config *) + +val android_log_config_set_filter_tags : android_log_config -> string list -> unit + (** set field filter_tags in android_log_config *) + +val make_android_polled_state_config : + ?poll_ms:int32 -> + unit -> + android_polled_state_config +(** [make_android_polled_state_config … ()] is a builder for type [android_polled_state_config] *) + +val copy_android_polled_state_config : android_polled_state_config -> android_polled_state_config + +val android_polled_state_config_has_poll_ms : android_polled_state_config -> bool + (** presence of field "poll_ms" in [android_polled_state_config] *) + +val android_polled_state_config_set_poll_ms : android_polled_state_config -> int32 -> unit + (** set field poll_ms in android_polled_state_config *) + +val make_android_sdk_sysprop_guard_config : + ?surfaceflinger_skia_track_events:bool -> + ?hwui_skia_track_events:bool -> + ?hwui_package_name_filter:string list -> + unit -> + android_sdk_sysprop_guard_config +(** [make_android_sdk_sysprop_guard_config … ()] is a builder for type [android_sdk_sysprop_guard_config] *) + +val copy_android_sdk_sysprop_guard_config : android_sdk_sysprop_guard_config -> android_sdk_sysprop_guard_config + +val android_sdk_sysprop_guard_config_has_surfaceflinger_skia_track_events : android_sdk_sysprop_guard_config -> bool + (** presence of field "surfaceflinger_skia_track_events" in [android_sdk_sysprop_guard_config] *) + +val android_sdk_sysprop_guard_config_set_surfaceflinger_skia_track_events : android_sdk_sysprop_guard_config -> bool -> unit + (** set field surfaceflinger_skia_track_events in android_sdk_sysprop_guard_config *) + +val android_sdk_sysprop_guard_config_has_hwui_skia_track_events : android_sdk_sysprop_guard_config -> bool + (** presence of field "hwui_skia_track_events" in [android_sdk_sysprop_guard_config] *) + +val android_sdk_sysprop_guard_config_set_hwui_skia_track_events : android_sdk_sysprop_guard_config -> bool -> unit + (** set field hwui_skia_track_events in android_sdk_sysprop_guard_config *) + +val android_sdk_sysprop_guard_config_set_hwui_package_name_filter : android_sdk_sysprop_guard_config -> string list -> unit + (** set field hwui_package_name_filter in android_sdk_sysprop_guard_config *) + +val make_android_system_property_config : + ?poll_ms:int32 -> + ?property_name:string list -> + unit -> + android_system_property_config +(** [make_android_system_property_config … ()] is a builder for type [android_system_property_config] *) + +val copy_android_system_property_config : android_system_property_config -> android_system_property_config + +val android_system_property_config_has_poll_ms : android_system_property_config -> bool + (** presence of field "poll_ms" in [android_system_property_config] *) + +val android_system_property_config_set_poll_ms : android_system_property_config -> int32 -> unit + (** set field poll_ms in android_system_property_config *) + +val android_system_property_config_set_property_name : android_system_property_config -> string list -> unit + (** set field property_name in android_system_property_config *) + +val make_app_wakelocks_config : + ?write_delay_ms:int32 -> + ?filter_duration_below_ms:int32 -> + ?drop_owner_pid:bool -> + unit -> + app_wakelocks_config +(** [make_app_wakelocks_config … ()] is a builder for type [app_wakelocks_config] *) + +val copy_app_wakelocks_config : app_wakelocks_config -> app_wakelocks_config + +val app_wakelocks_config_has_write_delay_ms : app_wakelocks_config -> bool + (** presence of field "write_delay_ms" in [app_wakelocks_config] *) + +val app_wakelocks_config_set_write_delay_ms : app_wakelocks_config -> int32 -> unit + (** set field write_delay_ms in app_wakelocks_config *) + +val app_wakelocks_config_has_filter_duration_below_ms : app_wakelocks_config -> bool + (** presence of field "filter_duration_below_ms" in [app_wakelocks_config] *) + +val app_wakelocks_config_set_filter_duration_below_ms : app_wakelocks_config -> int32 -> unit + (** set field filter_duration_below_ms in app_wakelocks_config *) + +val app_wakelocks_config_has_drop_owner_pid : app_wakelocks_config -> bool + (** presence of field "drop_owner_pid" in [app_wakelocks_config] *) + +val app_wakelocks_config_set_drop_owner_pid : app_wakelocks_config -> bool -> unit + (** set field drop_owner_pid in app_wakelocks_config *) + +val make_cpu_per_uid_config : + ?poll_ms:int32 -> + unit -> + cpu_per_uid_config +(** [make_cpu_per_uid_config … ()] is a builder for type [cpu_per_uid_config] *) + +val copy_cpu_per_uid_config : cpu_per_uid_config -> cpu_per_uid_config + +val cpu_per_uid_config_has_poll_ms : cpu_per_uid_config -> bool + (** presence of field "poll_ms" in [cpu_per_uid_config] *) + +val cpu_per_uid_config_set_poll_ms : cpu_per_uid_config -> int32 -> unit + (** set field poll_ms in cpu_per_uid_config *) + +val make_kernel_wakelocks_config : + ?poll_ms:int32 -> + unit -> + kernel_wakelocks_config +(** [make_kernel_wakelocks_config … ()] is a builder for type [kernel_wakelocks_config] *) + +val copy_kernel_wakelocks_config : kernel_wakelocks_config -> kernel_wakelocks_config + +val kernel_wakelocks_config_has_poll_ms : kernel_wakelocks_config -> bool + (** presence of field "poll_ms" in [kernel_wakelocks_config] *) + +val kernel_wakelocks_config_set_poll_ms : kernel_wakelocks_config -> int32 -> unit + (** set field poll_ms in kernel_wakelocks_config *) + +val make_network_packet_trace_config : + ?poll_ms:int32 -> + ?aggregation_threshold:int32 -> + ?intern_limit:int32 -> + ?drop_local_port:bool -> + ?drop_remote_port:bool -> + ?drop_tcp_flags:bool -> + unit -> + network_packet_trace_config +(** [make_network_packet_trace_config … ()] is a builder for type [network_packet_trace_config] *) + +val copy_network_packet_trace_config : network_packet_trace_config -> network_packet_trace_config + +val network_packet_trace_config_has_poll_ms : network_packet_trace_config -> bool + (** presence of field "poll_ms" in [network_packet_trace_config] *) + +val network_packet_trace_config_set_poll_ms : network_packet_trace_config -> int32 -> unit + (** set field poll_ms in network_packet_trace_config *) + +val network_packet_trace_config_has_aggregation_threshold : network_packet_trace_config -> bool + (** presence of field "aggregation_threshold" in [network_packet_trace_config] *) + +val network_packet_trace_config_set_aggregation_threshold : network_packet_trace_config -> int32 -> unit + (** set field aggregation_threshold in network_packet_trace_config *) + +val network_packet_trace_config_has_intern_limit : network_packet_trace_config -> bool + (** presence of field "intern_limit" in [network_packet_trace_config] *) + +val network_packet_trace_config_set_intern_limit : network_packet_trace_config -> int32 -> unit + (** set field intern_limit in network_packet_trace_config *) + +val network_packet_trace_config_has_drop_local_port : network_packet_trace_config -> bool + (** presence of field "drop_local_port" in [network_packet_trace_config] *) + +val network_packet_trace_config_set_drop_local_port : network_packet_trace_config -> bool -> unit + (** set field drop_local_port in network_packet_trace_config *) + +val network_packet_trace_config_has_drop_remote_port : network_packet_trace_config -> bool + (** presence of field "drop_remote_port" in [network_packet_trace_config] *) + +val network_packet_trace_config_set_drop_remote_port : network_packet_trace_config -> bool -> unit + (** set field drop_remote_port in network_packet_trace_config *) + +val network_packet_trace_config_has_drop_tcp_flags : network_packet_trace_config -> bool + (** presence of field "drop_tcp_flags" in [network_packet_trace_config] *) + +val network_packet_trace_config_set_drop_tcp_flags : network_packet_trace_config -> bool -> unit + (** set field drop_tcp_flags in network_packet_trace_config *) + +val make_packages_list_config : + ?package_name_filter:string list -> + ?only_write_on_cpu_use_every_ms:int32 -> + unit -> + packages_list_config +(** [make_packages_list_config … ()] is a builder for type [packages_list_config] *) + +val copy_packages_list_config : packages_list_config -> packages_list_config + +val packages_list_config_set_package_name_filter : packages_list_config -> string list -> unit + (** set field package_name_filter in packages_list_config *) + +val packages_list_config_has_only_write_on_cpu_use_every_ms : packages_list_config -> bool + (** presence of field "only_write_on_cpu_use_every_ms" in [packages_list_config] *) + +val packages_list_config_set_only_write_on_cpu_use_every_ms : packages_list_config -> int32 -> unit + (** set field only_write_on_cpu_use_every_ms in packages_list_config *) + +val make_pixel_modem_config : + ?event_group:pixel_modem_config_event_group -> + ?pigweed_hash_allow_list:int64 list -> + ?pigweed_hash_deny_list:int64 list -> + unit -> + pixel_modem_config +(** [make_pixel_modem_config … ()] is a builder for type [pixel_modem_config] *) + +val copy_pixel_modem_config : pixel_modem_config -> pixel_modem_config + +val pixel_modem_config_has_event_group : pixel_modem_config -> bool + (** presence of field "event_group" in [pixel_modem_config] *) + +val pixel_modem_config_set_event_group : pixel_modem_config -> pixel_modem_config_event_group -> unit + (** set field event_group in pixel_modem_config *) + +val pixel_modem_config_set_pigweed_hash_allow_list : pixel_modem_config -> int64 list -> unit + (** set field pigweed_hash_allow_list in pixel_modem_config *) + +val pixel_modem_config_set_pigweed_hash_deny_list : pixel_modem_config -> int64 list -> unit + (** set field pigweed_hash_deny_list in pixel_modem_config *) + +val make_proto_log_group : + ?group_name:string -> + ?log_from:proto_log_level -> + ?collect_stacktrace:bool -> + unit -> + proto_log_group +(** [make_proto_log_group … ()] is a builder for type [proto_log_group] *) + +val copy_proto_log_group : proto_log_group -> proto_log_group + +val proto_log_group_has_group_name : proto_log_group -> bool + (** presence of field "group_name" in [proto_log_group] *) + +val proto_log_group_set_group_name : proto_log_group -> string -> unit + (** set field group_name in proto_log_group *) + +val proto_log_group_has_log_from : proto_log_group -> bool + (** presence of field "log_from" in [proto_log_group] *) + +val proto_log_group_set_log_from : proto_log_group -> proto_log_level -> unit + (** set field log_from in proto_log_group *) + +val proto_log_group_has_collect_stacktrace : proto_log_group -> bool + (** presence of field "collect_stacktrace" in [proto_log_group] *) + +val proto_log_group_set_collect_stacktrace : proto_log_group -> bool -> unit + (** set field collect_stacktrace in proto_log_group *) + +val make_proto_log_config : + ?group_overrides:proto_log_group list -> + ?tracing_mode:proto_log_config_tracing_mode -> + ?default_log_from_level:proto_log_level -> + unit -> + proto_log_config +(** [make_proto_log_config … ()] is a builder for type [proto_log_config] *) + +val copy_proto_log_config : proto_log_config -> proto_log_config + +val proto_log_config_set_group_overrides : proto_log_config -> proto_log_group list -> unit + (** set field group_overrides in proto_log_config *) + +val proto_log_config_has_tracing_mode : proto_log_config -> bool + (** presence of field "tracing_mode" in [proto_log_config] *) + +val proto_log_config_set_tracing_mode : proto_log_config -> proto_log_config_tracing_mode -> unit + (** set field tracing_mode in proto_log_config *) + +val proto_log_config_has_default_log_from_level : proto_log_config -> bool + (** presence of field "default_log_from_level" in [proto_log_config] *) + +val proto_log_config_set_default_log_from_level : proto_log_config -> proto_log_level -> unit + (** set field default_log_from_level in proto_log_config *) + +val make_surface_flinger_layers_config : + ?mode:surface_flinger_layers_config_mode -> + ?trace_flags:surface_flinger_layers_config_trace_flag list -> + unit -> + surface_flinger_layers_config +(** [make_surface_flinger_layers_config … ()] is a builder for type [surface_flinger_layers_config] *) + +val copy_surface_flinger_layers_config : surface_flinger_layers_config -> surface_flinger_layers_config + +val surface_flinger_layers_config_has_mode : surface_flinger_layers_config -> bool + (** presence of field "mode" in [surface_flinger_layers_config] *) + +val surface_flinger_layers_config_set_mode : surface_flinger_layers_config -> surface_flinger_layers_config_mode -> unit + (** set field mode in surface_flinger_layers_config *) + +val surface_flinger_layers_config_set_trace_flags : surface_flinger_layers_config -> surface_flinger_layers_config_trace_flag list -> unit + (** set field trace_flags in surface_flinger_layers_config *) + +val make_surface_flinger_transactions_config : + ?mode:surface_flinger_transactions_config_mode -> + unit -> + surface_flinger_transactions_config +(** [make_surface_flinger_transactions_config … ()] is a builder for type [surface_flinger_transactions_config] *) + +val copy_surface_flinger_transactions_config : surface_flinger_transactions_config -> surface_flinger_transactions_config + +val surface_flinger_transactions_config_has_mode : surface_flinger_transactions_config -> bool + (** presence of field "mode" in [surface_flinger_transactions_config] *) + +val surface_flinger_transactions_config_set_mode : surface_flinger_transactions_config -> surface_flinger_transactions_config_mode -> unit + (** set field mode in surface_flinger_transactions_config *) + +val make_window_manager_config : + ?log_frequency:window_manager_config_log_frequency -> + ?log_level:window_manager_config_log_level -> + unit -> + window_manager_config +(** [make_window_manager_config … ()] is a builder for type [window_manager_config] *) + +val copy_window_manager_config : window_manager_config -> window_manager_config + +val window_manager_config_has_log_frequency : window_manager_config -> bool + (** presence of field "log_frequency" in [window_manager_config] *) + +val window_manager_config_set_log_frequency : window_manager_config -> window_manager_config_log_frequency -> unit + (** set field log_frequency in window_manager_config *) + +val window_manager_config_has_log_level : window_manager_config -> bool + (** presence of field "log_level" in [window_manager_config] *) + +val window_manager_config_set_log_level : window_manager_config -> window_manager_config_log_level -> unit + (** set field log_level in window_manager_config *) + +val make_chrome_config : + ?trace_config:string -> + ?privacy_filtering_enabled:bool -> + ?convert_to_legacy_json:bool -> + ?client_priority:chrome_config_client_priority -> + ?json_agent_label_filter:string -> + ?event_package_name_filter_enabled:bool -> + unit -> + chrome_config +(** [make_chrome_config … ()] is a builder for type [chrome_config] *) + +val copy_chrome_config : chrome_config -> chrome_config + +val chrome_config_has_trace_config : chrome_config -> bool + (** presence of field "trace_config" in [chrome_config] *) + +val chrome_config_set_trace_config : chrome_config -> string -> unit + (** set field trace_config in chrome_config *) + +val chrome_config_has_privacy_filtering_enabled : chrome_config -> bool + (** presence of field "privacy_filtering_enabled" in [chrome_config] *) + +val chrome_config_set_privacy_filtering_enabled : chrome_config -> bool -> unit + (** set field privacy_filtering_enabled in chrome_config *) + +val chrome_config_has_convert_to_legacy_json : chrome_config -> bool + (** presence of field "convert_to_legacy_json" in [chrome_config] *) + +val chrome_config_set_convert_to_legacy_json : chrome_config -> bool -> unit + (** set field convert_to_legacy_json in chrome_config *) + +val chrome_config_has_client_priority : chrome_config -> bool + (** presence of field "client_priority" in [chrome_config] *) + +val chrome_config_set_client_priority : chrome_config -> chrome_config_client_priority -> unit + (** set field client_priority in chrome_config *) + +val chrome_config_has_json_agent_label_filter : chrome_config -> bool + (** presence of field "json_agent_label_filter" in [chrome_config] *) + +val chrome_config_set_json_agent_label_filter : chrome_config -> string -> unit + (** set field json_agent_label_filter in chrome_config *) + +val chrome_config_has_event_package_name_filter_enabled : chrome_config -> bool + (** presence of field "event_package_name_filter_enabled" in [chrome_config] *) + +val chrome_config_set_event_package_name_filter_enabled : chrome_config -> bool -> unit + (** set field event_package_name_filter_enabled in chrome_config *) + +val make_chromium_histogram_samples_config_histogram_sample : + ?histogram_name:string -> + ?min_value:int64 -> + ?max_value:int64 -> + unit -> + chromium_histogram_samples_config_histogram_sample +(** [make_chromium_histogram_samples_config_histogram_sample … ()] is a builder for type [chromium_histogram_samples_config_histogram_sample] *) + +val copy_chromium_histogram_samples_config_histogram_sample : chromium_histogram_samples_config_histogram_sample -> chromium_histogram_samples_config_histogram_sample + +val chromium_histogram_samples_config_histogram_sample_has_histogram_name : chromium_histogram_samples_config_histogram_sample -> bool + (** presence of field "histogram_name" in [chromium_histogram_samples_config_histogram_sample] *) + +val chromium_histogram_samples_config_histogram_sample_set_histogram_name : chromium_histogram_samples_config_histogram_sample -> string -> unit + (** set field histogram_name in chromium_histogram_samples_config_histogram_sample *) + +val chromium_histogram_samples_config_histogram_sample_has_min_value : chromium_histogram_samples_config_histogram_sample -> bool + (** presence of field "min_value" in [chromium_histogram_samples_config_histogram_sample] *) + +val chromium_histogram_samples_config_histogram_sample_set_min_value : chromium_histogram_samples_config_histogram_sample -> int64 -> unit + (** set field min_value in chromium_histogram_samples_config_histogram_sample *) + +val chromium_histogram_samples_config_histogram_sample_has_max_value : chromium_histogram_samples_config_histogram_sample -> bool + (** presence of field "max_value" in [chromium_histogram_samples_config_histogram_sample] *) + +val chromium_histogram_samples_config_histogram_sample_set_max_value : chromium_histogram_samples_config_histogram_sample -> int64 -> unit + (** set field max_value in chromium_histogram_samples_config_histogram_sample *) + +val make_chromium_histogram_samples_config : + ?histograms:chromium_histogram_samples_config_histogram_sample list -> + ?filter_histogram_names:bool -> + unit -> + chromium_histogram_samples_config +(** [make_chromium_histogram_samples_config … ()] is a builder for type [chromium_histogram_samples_config] *) + +val copy_chromium_histogram_samples_config : chromium_histogram_samples_config -> chromium_histogram_samples_config + +val chromium_histogram_samples_config_set_histograms : chromium_histogram_samples_config -> chromium_histogram_samples_config_histogram_sample list -> unit + (** set field histograms in chromium_histogram_samples_config *) + +val chromium_histogram_samples_config_has_filter_histogram_names : chromium_histogram_samples_config -> bool + (** presence of field "filter_histogram_names" in [chromium_histogram_samples_config] *) + +val chromium_histogram_samples_config_set_filter_histogram_names : chromium_histogram_samples_config -> bool -> unit + (** set field filter_histogram_names in chromium_histogram_samples_config *) + +val make_chromium_system_metrics_config : + ?sampling_interval_ms:int32 -> + unit -> + chromium_system_metrics_config +(** [make_chromium_system_metrics_config … ()] is a builder for type [chromium_system_metrics_config] *) + +val copy_chromium_system_metrics_config : chromium_system_metrics_config -> chromium_system_metrics_config + +val chromium_system_metrics_config_has_sampling_interval_ms : chromium_system_metrics_config -> bool + (** presence of field "sampling_interval_ms" in [chromium_system_metrics_config] *) + +val chromium_system_metrics_config_set_sampling_interval_ms : chromium_system_metrics_config -> int32 -> unit + (** set field sampling_interval_ms in chromium_system_metrics_config *) + +val make_v8_config : + ?log_script_sources:bool -> + ?log_instructions:bool -> + unit -> + v8_config +(** [make_v8_config … ()] is a builder for type [v8_config] *) + +val copy_v8_config : v8_config -> v8_config + +val v8_config_has_log_script_sources : v8_config -> bool + (** presence of field "log_script_sources" in [v8_config] *) + +val v8_config_set_log_script_sources : v8_config -> bool -> unit + (** set field log_script_sources in v8_config *) + +val v8_config_has_log_instructions : v8_config -> bool + (** presence of field "log_instructions" in [v8_config] *) + +val v8_config_set_log_instructions : v8_config -> bool -> unit + (** set field log_instructions in v8_config *) + +val make_etw_config : + ?kernel_flags:etw_config_kernel_flag list -> + ?scheduler_provider_events:string list -> + ?memory_provider_events:string list -> + ?file_provider_events:string list -> + unit -> + etw_config +(** [make_etw_config … ()] is a builder for type [etw_config] *) + +val copy_etw_config : etw_config -> etw_config + +val etw_config_set_kernel_flags : etw_config -> etw_config_kernel_flag list -> unit + (** set field kernel_flags in etw_config *) + +val etw_config_set_scheduler_provider_events : etw_config -> string list -> unit + (** set field scheduler_provider_events in etw_config *) + +val etw_config_set_memory_provider_events : etw_config -> string list -> unit + (** set field memory_provider_events in etw_config *) + +val etw_config_set_file_provider_events : etw_config -> string list -> unit + (** set field file_provider_events in etw_config *) + +val make_frozen_ftrace_config : + ?instance_name:string -> + unit -> + frozen_ftrace_config +(** [make_frozen_ftrace_config … ()] is a builder for type [frozen_ftrace_config] *) + +val copy_frozen_ftrace_config : frozen_ftrace_config -> frozen_ftrace_config + +val frozen_ftrace_config_has_instance_name : frozen_ftrace_config -> bool + (** presence of field "instance_name" in [frozen_ftrace_config] *) + +val frozen_ftrace_config_set_instance_name : frozen_ftrace_config -> string -> unit + (** set field instance_name in frozen_ftrace_config *) + +val make_ftrace_config_compact_sched_config : + ?enabled:bool -> + unit -> + ftrace_config_compact_sched_config +(** [make_ftrace_config_compact_sched_config … ()] is a builder for type [ftrace_config_compact_sched_config] *) + +val copy_ftrace_config_compact_sched_config : ftrace_config_compact_sched_config -> ftrace_config_compact_sched_config + +val ftrace_config_compact_sched_config_has_enabled : ftrace_config_compact_sched_config -> bool + (** presence of field "enabled" in [ftrace_config_compact_sched_config] *) + +val ftrace_config_compact_sched_config_set_enabled : ftrace_config_compact_sched_config -> bool -> unit + (** set field enabled in ftrace_config_compact_sched_config *) + +val make_ftrace_config_print_filter_rule_atrace_message : + ?type_:string -> + ?prefix:string -> + unit -> + ftrace_config_print_filter_rule_atrace_message +(** [make_ftrace_config_print_filter_rule_atrace_message … ()] is a builder for type [ftrace_config_print_filter_rule_atrace_message] *) + +val copy_ftrace_config_print_filter_rule_atrace_message : ftrace_config_print_filter_rule_atrace_message -> ftrace_config_print_filter_rule_atrace_message + +val ftrace_config_print_filter_rule_atrace_message_has_type_ : ftrace_config_print_filter_rule_atrace_message -> bool + (** presence of field "type_" in [ftrace_config_print_filter_rule_atrace_message] *) + +val ftrace_config_print_filter_rule_atrace_message_set_type_ : ftrace_config_print_filter_rule_atrace_message -> string -> unit + (** set field type_ in ftrace_config_print_filter_rule_atrace_message *) + +val ftrace_config_print_filter_rule_atrace_message_has_prefix : ftrace_config_print_filter_rule_atrace_message -> bool + (** presence of field "prefix" in [ftrace_config_print_filter_rule_atrace_message] *) + +val ftrace_config_print_filter_rule_atrace_message_set_prefix : ftrace_config_print_filter_rule_atrace_message -> string -> unit + (** set field prefix in ftrace_config_print_filter_rule_atrace_message *) + +val make_ftrace_config_print_filter_rule : + ?match_:ftrace_config_print_filter_rule_match -> + ?allow:bool -> + unit -> + ftrace_config_print_filter_rule +(** [make_ftrace_config_print_filter_rule … ()] is a builder for type [ftrace_config_print_filter_rule] *) + +val copy_ftrace_config_print_filter_rule : ftrace_config_print_filter_rule -> ftrace_config_print_filter_rule + +val ftrace_config_print_filter_rule_set_match_ : ftrace_config_print_filter_rule -> ftrace_config_print_filter_rule_match -> unit + (** set field match_ in ftrace_config_print_filter_rule *) + +val ftrace_config_print_filter_rule_has_allow : ftrace_config_print_filter_rule -> bool + (** presence of field "allow" in [ftrace_config_print_filter_rule] *) + +val ftrace_config_print_filter_rule_set_allow : ftrace_config_print_filter_rule -> bool -> unit + (** set field allow in ftrace_config_print_filter_rule *) + +val make_ftrace_config_print_filter : + ?rules:ftrace_config_print_filter_rule list -> + unit -> + ftrace_config_print_filter +(** [make_ftrace_config_print_filter … ()] is a builder for type [ftrace_config_print_filter] *) + +val copy_ftrace_config_print_filter : ftrace_config_print_filter -> ftrace_config_print_filter + +val ftrace_config_print_filter_set_rules : ftrace_config_print_filter -> ftrace_config_print_filter_rule list -> unit + (** set field rules in ftrace_config_print_filter *) + +val make_ftrace_config_kprobe_event : + ?probe:string -> + ?type_:ftrace_config_kprobe_event_kprobe_type -> + unit -> + ftrace_config_kprobe_event +(** [make_ftrace_config_kprobe_event … ()] is a builder for type [ftrace_config_kprobe_event] *) + +val copy_ftrace_config_kprobe_event : ftrace_config_kprobe_event -> ftrace_config_kprobe_event + +val ftrace_config_kprobe_event_has_probe : ftrace_config_kprobe_event -> bool + (** presence of field "probe" in [ftrace_config_kprobe_event] *) + +val ftrace_config_kprobe_event_set_probe : ftrace_config_kprobe_event -> string -> unit + (** set field probe in ftrace_config_kprobe_event *) + +val ftrace_config_kprobe_event_has_type_ : ftrace_config_kprobe_event -> bool + (** presence of field "type_" in [ftrace_config_kprobe_event] *) + +val ftrace_config_kprobe_event_set_type_ : ftrace_config_kprobe_event -> ftrace_config_kprobe_event_kprobe_type -> unit + (** set field type_ in ftrace_config_kprobe_event *) + +val make_ftrace_config_tracefs_option : + ?name:string -> + ?state:ftrace_config_tracefs_option_state -> + unit -> + ftrace_config_tracefs_option +(** [make_ftrace_config_tracefs_option … ()] is a builder for type [ftrace_config_tracefs_option] *) + +val copy_ftrace_config_tracefs_option : ftrace_config_tracefs_option -> ftrace_config_tracefs_option + +val ftrace_config_tracefs_option_has_name : ftrace_config_tracefs_option -> bool + (** presence of field "name" in [ftrace_config_tracefs_option] *) + +val ftrace_config_tracefs_option_set_name : ftrace_config_tracefs_option -> string -> unit + (** set field name in ftrace_config_tracefs_option *) + +val ftrace_config_tracefs_option_has_state : ftrace_config_tracefs_option -> bool + (** presence of field "state" in [ftrace_config_tracefs_option] *) + +val ftrace_config_tracefs_option_set_state : ftrace_config_tracefs_option -> ftrace_config_tracefs_option_state -> unit + (** set field state in ftrace_config_tracefs_option *) + +val make_ftrace_config : + ?ftrace_events:string list -> + ?atrace_categories:string list -> + ?atrace_apps:string list -> + ?atrace_categories_prefer_sdk:string list -> + ?atrace_userspace_only:bool -> + ?buffer_size_kb:int32 -> + ?buffer_size_lower_bound:bool -> + ?drain_period_ms:int32 -> + ?drain_buffer_percent:int32 -> + ?compact_sched:ftrace_config_compact_sched_config -> + ?print_filter:ftrace_config_print_filter -> + ?symbolize_ksyms:bool -> + ?ksyms_mem_policy:ftrace_config_ksyms_mem_policy -> + ?throttle_rss_stat:bool -> + ?denser_generic_event_encoding:bool -> + ?disable_generic_events:bool -> + ?syscall_events:string list -> + ?enable_function_graph:bool -> + ?function_filters:string list -> + ?function_graph_roots:string list -> + ?function_graph_max_depth:int32 -> + ?kprobe_events:ftrace_config_kprobe_event list -> + ?preserve_ftrace_buffer:bool -> + ?use_monotonic_raw_clock:bool -> + ?instance_name:string -> + ?debug_ftrace_abi:bool -> + ?tids_to_trace:int32 list -> + ?tracefs_options:ftrace_config_tracefs_option list -> + ?tracing_cpumask:string -> + ?initialize_ksyms_synchronously_for_testing:bool -> + unit -> + ftrace_config +(** [make_ftrace_config … ()] is a builder for type [ftrace_config] *) + +val copy_ftrace_config : ftrace_config -> ftrace_config + +val ftrace_config_set_ftrace_events : ftrace_config -> string list -> unit + (** set field ftrace_events in ftrace_config *) + +val ftrace_config_set_atrace_categories : ftrace_config -> string list -> unit + (** set field atrace_categories in ftrace_config *) + +val ftrace_config_set_atrace_apps : ftrace_config -> string list -> unit + (** set field atrace_apps in ftrace_config *) + +val ftrace_config_set_atrace_categories_prefer_sdk : ftrace_config -> string list -> unit + (** set field atrace_categories_prefer_sdk in ftrace_config *) + +val ftrace_config_has_atrace_userspace_only : ftrace_config -> bool + (** presence of field "atrace_userspace_only" in [ftrace_config] *) + +val ftrace_config_set_atrace_userspace_only : ftrace_config -> bool -> unit + (** set field atrace_userspace_only in ftrace_config *) + +val ftrace_config_has_buffer_size_kb : ftrace_config -> bool + (** presence of field "buffer_size_kb" in [ftrace_config] *) + +val ftrace_config_set_buffer_size_kb : ftrace_config -> int32 -> unit + (** set field buffer_size_kb in ftrace_config *) + +val ftrace_config_has_buffer_size_lower_bound : ftrace_config -> bool + (** presence of field "buffer_size_lower_bound" in [ftrace_config] *) + +val ftrace_config_set_buffer_size_lower_bound : ftrace_config -> bool -> unit + (** set field buffer_size_lower_bound in ftrace_config *) + +val ftrace_config_has_drain_period_ms : ftrace_config -> bool + (** presence of field "drain_period_ms" in [ftrace_config] *) + +val ftrace_config_set_drain_period_ms : ftrace_config -> int32 -> unit + (** set field drain_period_ms in ftrace_config *) + +val ftrace_config_has_drain_buffer_percent : ftrace_config -> bool + (** presence of field "drain_buffer_percent" in [ftrace_config] *) + +val ftrace_config_set_drain_buffer_percent : ftrace_config -> int32 -> unit + (** set field drain_buffer_percent in ftrace_config *) + +val ftrace_config_set_compact_sched : ftrace_config -> ftrace_config_compact_sched_config -> unit + (** set field compact_sched in ftrace_config *) + +val ftrace_config_set_print_filter : ftrace_config -> ftrace_config_print_filter -> unit + (** set field print_filter in ftrace_config *) + +val ftrace_config_has_symbolize_ksyms : ftrace_config -> bool + (** presence of field "symbolize_ksyms" in [ftrace_config] *) + +val ftrace_config_set_symbolize_ksyms : ftrace_config -> bool -> unit + (** set field symbolize_ksyms in ftrace_config *) + +val ftrace_config_has_ksyms_mem_policy : ftrace_config -> bool + (** presence of field "ksyms_mem_policy" in [ftrace_config] *) + +val ftrace_config_set_ksyms_mem_policy : ftrace_config -> ftrace_config_ksyms_mem_policy -> unit + (** set field ksyms_mem_policy in ftrace_config *) + +val ftrace_config_has_throttle_rss_stat : ftrace_config -> bool + (** presence of field "throttle_rss_stat" in [ftrace_config] *) + +val ftrace_config_set_throttle_rss_stat : ftrace_config -> bool -> unit + (** set field throttle_rss_stat in ftrace_config *) + +val ftrace_config_has_denser_generic_event_encoding : ftrace_config -> bool + (** presence of field "denser_generic_event_encoding" in [ftrace_config] *) + +val ftrace_config_set_denser_generic_event_encoding : ftrace_config -> bool -> unit + (** set field denser_generic_event_encoding in ftrace_config *) + +val ftrace_config_has_disable_generic_events : ftrace_config -> bool + (** presence of field "disable_generic_events" in [ftrace_config] *) + +val ftrace_config_set_disable_generic_events : ftrace_config -> bool -> unit + (** set field disable_generic_events in ftrace_config *) + +val ftrace_config_set_syscall_events : ftrace_config -> string list -> unit + (** set field syscall_events in ftrace_config *) + +val ftrace_config_has_enable_function_graph : ftrace_config -> bool + (** presence of field "enable_function_graph" in [ftrace_config] *) + +val ftrace_config_set_enable_function_graph : ftrace_config -> bool -> unit + (** set field enable_function_graph in ftrace_config *) + +val ftrace_config_set_function_filters : ftrace_config -> string list -> unit + (** set field function_filters in ftrace_config *) + +val ftrace_config_set_function_graph_roots : ftrace_config -> string list -> unit + (** set field function_graph_roots in ftrace_config *) + +val ftrace_config_has_function_graph_max_depth : ftrace_config -> bool + (** presence of field "function_graph_max_depth" in [ftrace_config] *) + +val ftrace_config_set_function_graph_max_depth : ftrace_config -> int32 -> unit + (** set field function_graph_max_depth in ftrace_config *) + +val ftrace_config_set_kprobe_events : ftrace_config -> ftrace_config_kprobe_event list -> unit + (** set field kprobe_events in ftrace_config *) + +val ftrace_config_has_preserve_ftrace_buffer : ftrace_config -> bool + (** presence of field "preserve_ftrace_buffer" in [ftrace_config] *) + +val ftrace_config_set_preserve_ftrace_buffer : ftrace_config -> bool -> unit + (** set field preserve_ftrace_buffer in ftrace_config *) + +val ftrace_config_has_use_monotonic_raw_clock : ftrace_config -> bool + (** presence of field "use_monotonic_raw_clock" in [ftrace_config] *) + +val ftrace_config_set_use_monotonic_raw_clock : ftrace_config -> bool -> unit + (** set field use_monotonic_raw_clock in ftrace_config *) + +val ftrace_config_has_instance_name : ftrace_config -> bool + (** presence of field "instance_name" in [ftrace_config] *) + +val ftrace_config_set_instance_name : ftrace_config -> string -> unit + (** set field instance_name in ftrace_config *) + +val ftrace_config_has_debug_ftrace_abi : ftrace_config -> bool + (** presence of field "debug_ftrace_abi" in [ftrace_config] *) + +val ftrace_config_set_debug_ftrace_abi : ftrace_config -> bool -> unit + (** set field debug_ftrace_abi in ftrace_config *) + +val ftrace_config_set_tids_to_trace : ftrace_config -> int32 list -> unit + (** set field tids_to_trace in ftrace_config *) + +val ftrace_config_set_tracefs_options : ftrace_config -> ftrace_config_tracefs_option list -> unit + (** set field tracefs_options in ftrace_config *) + +val ftrace_config_has_tracing_cpumask : ftrace_config -> bool + (** presence of field "tracing_cpumask" in [ftrace_config] *) + +val ftrace_config_set_tracing_cpumask : ftrace_config -> string -> unit + (** set field tracing_cpumask in ftrace_config *) + +val ftrace_config_has_initialize_ksyms_synchronously_for_testing : ftrace_config -> bool + (** presence of field "initialize_ksyms_synchronously_for_testing" in [ftrace_config] *) + +val ftrace_config_set_initialize_ksyms_synchronously_for_testing : ftrace_config -> bool -> unit + (** set field initialize_ksyms_synchronously_for_testing in ftrace_config *) + +val make_gpu_counter_config : + ?counter_period_ns:int64 -> + ?counter_ids:int32 list -> + ?instrumented_sampling:bool -> + ?fix_gpu_clock:bool -> + unit -> + gpu_counter_config +(** [make_gpu_counter_config … ()] is a builder for type [gpu_counter_config] *) + +val copy_gpu_counter_config : gpu_counter_config -> gpu_counter_config + +val gpu_counter_config_has_counter_period_ns : gpu_counter_config -> bool + (** presence of field "counter_period_ns" in [gpu_counter_config] *) + +val gpu_counter_config_set_counter_period_ns : gpu_counter_config -> int64 -> unit + (** set field counter_period_ns in gpu_counter_config *) + +val gpu_counter_config_set_counter_ids : gpu_counter_config -> int32 list -> unit + (** set field counter_ids in gpu_counter_config *) + +val gpu_counter_config_has_instrumented_sampling : gpu_counter_config -> bool + (** presence of field "instrumented_sampling" in [gpu_counter_config] *) + +val gpu_counter_config_set_instrumented_sampling : gpu_counter_config -> bool -> unit + (** set field instrumented_sampling in gpu_counter_config *) + +val gpu_counter_config_has_fix_gpu_clock : gpu_counter_config -> bool + (** presence of field "fix_gpu_clock" in [gpu_counter_config] *) + +val gpu_counter_config_set_fix_gpu_clock : gpu_counter_config -> bool -> unit + (** set field fix_gpu_clock in gpu_counter_config *) + +val make_gpu_render_stages_config : + ?full_loadstore:bool -> + ?low_overhead:bool -> + ?trace_metrics:string list -> + unit -> + gpu_render_stages_config +(** [make_gpu_render_stages_config … ()] is a builder for type [gpu_render_stages_config] *) + +val copy_gpu_render_stages_config : gpu_render_stages_config -> gpu_render_stages_config + +val gpu_render_stages_config_has_full_loadstore : gpu_render_stages_config -> bool + (** presence of field "full_loadstore" in [gpu_render_stages_config] *) + +val gpu_render_stages_config_set_full_loadstore : gpu_render_stages_config -> bool -> unit + (** set field full_loadstore in gpu_render_stages_config *) + +val gpu_render_stages_config_has_low_overhead : gpu_render_stages_config -> bool + (** presence of field "low_overhead" in [gpu_render_stages_config] *) + +val gpu_render_stages_config_set_low_overhead : gpu_render_stages_config -> bool -> unit + (** set field low_overhead in gpu_render_stages_config *) + +val gpu_render_stages_config_set_trace_metrics : gpu_render_stages_config -> string list -> unit + (** set field trace_metrics in gpu_render_stages_config *) + +val make_vulkan_memory_config : + ?track_driver_memory_usage:bool -> + ?track_device_memory_usage:bool -> + unit -> + vulkan_memory_config +(** [make_vulkan_memory_config … ()] is a builder for type [vulkan_memory_config] *) + +val copy_vulkan_memory_config : vulkan_memory_config -> vulkan_memory_config + +val vulkan_memory_config_has_track_driver_memory_usage : vulkan_memory_config -> bool + (** presence of field "track_driver_memory_usage" in [vulkan_memory_config] *) + +val vulkan_memory_config_set_track_driver_memory_usage : vulkan_memory_config -> bool -> unit + (** set field track_driver_memory_usage in vulkan_memory_config *) + +val vulkan_memory_config_has_track_device_memory_usage : vulkan_memory_config -> bool + (** presence of field "track_device_memory_usage" in [vulkan_memory_config] *) + +val vulkan_memory_config_set_track_device_memory_usage : vulkan_memory_config -> bool -> unit + (** set field track_device_memory_usage in vulkan_memory_config *) + +val make_inode_file_config_mount_point_mapping_entry : + ?mountpoint:string -> + ?scan_roots:string list -> + unit -> + inode_file_config_mount_point_mapping_entry +(** [make_inode_file_config_mount_point_mapping_entry … ()] is a builder for type [inode_file_config_mount_point_mapping_entry] *) + +val copy_inode_file_config_mount_point_mapping_entry : inode_file_config_mount_point_mapping_entry -> inode_file_config_mount_point_mapping_entry + +val inode_file_config_mount_point_mapping_entry_has_mountpoint : inode_file_config_mount_point_mapping_entry -> bool + (** presence of field "mountpoint" in [inode_file_config_mount_point_mapping_entry] *) + +val inode_file_config_mount_point_mapping_entry_set_mountpoint : inode_file_config_mount_point_mapping_entry -> string -> unit + (** set field mountpoint in inode_file_config_mount_point_mapping_entry *) + +val inode_file_config_mount_point_mapping_entry_set_scan_roots : inode_file_config_mount_point_mapping_entry -> string list -> unit + (** set field scan_roots in inode_file_config_mount_point_mapping_entry *) + +val make_inode_file_config : + ?scan_interval_ms:int32 -> + ?scan_delay_ms:int32 -> + ?scan_batch_size:int32 -> + ?do_not_scan:bool -> + ?scan_mount_points:string list -> + ?mount_point_mapping:inode_file_config_mount_point_mapping_entry list -> + unit -> + inode_file_config +(** [make_inode_file_config … ()] is a builder for type [inode_file_config] *) + +val copy_inode_file_config : inode_file_config -> inode_file_config + +val inode_file_config_has_scan_interval_ms : inode_file_config -> bool + (** presence of field "scan_interval_ms" in [inode_file_config] *) + +val inode_file_config_set_scan_interval_ms : inode_file_config -> int32 -> unit + (** set field scan_interval_ms in inode_file_config *) + +val inode_file_config_has_scan_delay_ms : inode_file_config -> bool + (** presence of field "scan_delay_ms" in [inode_file_config] *) + +val inode_file_config_set_scan_delay_ms : inode_file_config -> int32 -> unit + (** set field scan_delay_ms in inode_file_config *) + +val inode_file_config_has_scan_batch_size : inode_file_config -> bool + (** presence of field "scan_batch_size" in [inode_file_config] *) + +val inode_file_config_set_scan_batch_size : inode_file_config -> int32 -> unit + (** set field scan_batch_size in inode_file_config *) + +val inode_file_config_has_do_not_scan : inode_file_config -> bool + (** presence of field "do_not_scan" in [inode_file_config] *) + +val inode_file_config_set_do_not_scan : inode_file_config -> bool -> unit + (** set field do_not_scan in inode_file_config *) + +val inode_file_config_set_scan_mount_points : inode_file_config -> string list -> unit + (** set field scan_mount_points in inode_file_config *) + +val inode_file_config_set_mount_point_mapping : inode_file_config -> inode_file_config_mount_point_mapping_entry list -> unit + (** set field mount_point_mapping in inode_file_config *) + +val make_console_config : + ?output:console_config_output -> + ?enable_colors:bool -> + unit -> + console_config +(** [make_console_config … ()] is a builder for type [console_config] *) + +val copy_console_config : console_config -> console_config + +val console_config_has_output : console_config -> bool + (** presence of field "output" in [console_config] *) + +val console_config_set_output : console_config -> console_config_output -> unit + (** set field output in console_config *) + +val console_config_has_enable_colors : console_config -> bool + (** presence of field "enable_colors" in [console_config] *) + +val console_config_set_enable_colors : console_config -> bool -> unit + (** set field enable_colors in console_config *) + +val make_interceptor_config : + ?name:string -> + ?console_config:console_config -> + unit -> + interceptor_config +(** [make_interceptor_config … ()] is a builder for type [interceptor_config] *) + +val copy_interceptor_config : interceptor_config -> interceptor_config + +val interceptor_config_has_name : interceptor_config -> bool + (** presence of field "name" in [interceptor_config] *) + +val interceptor_config_set_name : interceptor_config -> string -> unit + (** set field name in interceptor_config *) + +val interceptor_config_set_console_config : interceptor_config -> console_config -> unit + (** set field console_config in interceptor_config *) + +val make_android_power_config : + ?battery_poll_ms:int32 -> + ?battery_counters:android_power_config_battery_counters list -> + ?collect_power_rails:bool -> + ?collect_energy_estimation_breakdown:bool -> + ?collect_entity_state_residency:bool -> + unit -> + android_power_config +(** [make_android_power_config … ()] is a builder for type [android_power_config] *) + +val copy_android_power_config : android_power_config -> android_power_config + +val android_power_config_has_battery_poll_ms : android_power_config -> bool + (** presence of field "battery_poll_ms" in [android_power_config] *) + +val android_power_config_set_battery_poll_ms : android_power_config -> int32 -> unit + (** set field battery_poll_ms in android_power_config *) + +val android_power_config_set_battery_counters : android_power_config -> android_power_config_battery_counters list -> unit + (** set field battery_counters in android_power_config *) + +val android_power_config_has_collect_power_rails : android_power_config -> bool + (** presence of field "collect_power_rails" in [android_power_config] *) + +val android_power_config_set_collect_power_rails : android_power_config -> bool -> unit + (** set field collect_power_rails in android_power_config *) + +val android_power_config_has_collect_energy_estimation_breakdown : android_power_config -> bool + (** presence of field "collect_energy_estimation_breakdown" in [android_power_config] *) + +val android_power_config_set_collect_energy_estimation_breakdown : android_power_config -> bool -> unit + (** set field collect_energy_estimation_breakdown in android_power_config *) + +val android_power_config_has_collect_entity_state_residency : android_power_config -> bool + (** presence of field "collect_entity_state_residency" in [android_power_config] *) + +val android_power_config_set_collect_entity_state_residency : android_power_config -> bool -> unit + (** set field collect_entity_state_residency in android_power_config *) + +val make_priority_boost_config : + ?policy:priority_boost_config_boost_policy -> + ?priority:int32 -> + unit -> + priority_boost_config +(** [make_priority_boost_config … ()] is a builder for type [priority_boost_config] *) + +val copy_priority_boost_config : priority_boost_config -> priority_boost_config + +val priority_boost_config_has_policy : priority_boost_config -> bool + (** presence of field "policy" in [priority_boost_config] *) + +val priority_boost_config_set_policy : priority_boost_config -> priority_boost_config_boost_policy -> unit + (** set field policy in priority_boost_config *) + +val priority_boost_config_has_priority : priority_boost_config -> bool + (** presence of field "priority" in [priority_boost_config] *) + +val priority_boost_config_set_priority : priority_boost_config -> int32 -> unit + (** set field priority in priority_boost_config *) + +val make_process_stats_config : + ?quirks:process_stats_config_quirks list -> + ?scan_all_processes_on_start:bool -> + ?record_thread_names:bool -> + ?proc_stats_poll_ms:int32 -> + ?proc_stats_cache_ttl_ms:int32 -> + ?scan_smaps_rollup:bool -> + ?record_process_age:bool -> + ?record_process_runtime:bool -> + ?record_process_dmabuf_rss:bool -> + ?resolve_process_fds:bool -> + unit -> + process_stats_config +(** [make_process_stats_config … ()] is a builder for type [process_stats_config] *) + +val copy_process_stats_config : process_stats_config -> process_stats_config + +val process_stats_config_set_quirks : process_stats_config -> process_stats_config_quirks list -> unit + (** set field quirks in process_stats_config *) + +val process_stats_config_has_scan_all_processes_on_start : process_stats_config -> bool + (** presence of field "scan_all_processes_on_start" in [process_stats_config] *) + +val process_stats_config_set_scan_all_processes_on_start : process_stats_config -> bool -> unit + (** set field scan_all_processes_on_start in process_stats_config *) + +val process_stats_config_has_record_thread_names : process_stats_config -> bool + (** presence of field "record_thread_names" in [process_stats_config] *) + +val process_stats_config_set_record_thread_names : process_stats_config -> bool -> unit + (** set field record_thread_names in process_stats_config *) + +val process_stats_config_has_proc_stats_poll_ms : process_stats_config -> bool + (** presence of field "proc_stats_poll_ms" in [process_stats_config] *) + +val process_stats_config_set_proc_stats_poll_ms : process_stats_config -> int32 -> unit + (** set field proc_stats_poll_ms in process_stats_config *) + +val process_stats_config_has_proc_stats_cache_ttl_ms : process_stats_config -> bool + (** presence of field "proc_stats_cache_ttl_ms" in [process_stats_config] *) + +val process_stats_config_set_proc_stats_cache_ttl_ms : process_stats_config -> int32 -> unit + (** set field proc_stats_cache_ttl_ms in process_stats_config *) + +val process_stats_config_has_scan_smaps_rollup : process_stats_config -> bool + (** presence of field "scan_smaps_rollup" in [process_stats_config] *) + +val process_stats_config_set_scan_smaps_rollup : process_stats_config -> bool -> unit + (** set field scan_smaps_rollup in process_stats_config *) + +val process_stats_config_has_record_process_age : process_stats_config -> bool + (** presence of field "record_process_age" in [process_stats_config] *) + +val process_stats_config_set_record_process_age : process_stats_config -> bool -> unit + (** set field record_process_age in process_stats_config *) + +val process_stats_config_has_record_process_runtime : process_stats_config -> bool + (** presence of field "record_process_runtime" in [process_stats_config] *) + +val process_stats_config_set_record_process_runtime : process_stats_config -> bool -> unit + (** set field record_process_runtime in process_stats_config *) + +val process_stats_config_has_record_process_dmabuf_rss : process_stats_config -> bool + (** presence of field "record_process_dmabuf_rss" in [process_stats_config] *) + +val process_stats_config_set_record_process_dmabuf_rss : process_stats_config -> bool -> unit + (** set field record_process_dmabuf_rss in process_stats_config *) + +val process_stats_config_has_resolve_process_fds : process_stats_config -> bool + (** presence of field "resolve_process_fds" in [process_stats_config] *) + +val process_stats_config_set_resolve_process_fds : process_stats_config -> bool -> unit + (** set field resolve_process_fds in process_stats_config *) + +val make_heapprofd_config_continuous_dump_config : + ?dump_phase_ms:int32 -> + ?dump_interval_ms:int32 -> + unit -> + heapprofd_config_continuous_dump_config +(** [make_heapprofd_config_continuous_dump_config … ()] is a builder for type [heapprofd_config_continuous_dump_config] *) + +val copy_heapprofd_config_continuous_dump_config : heapprofd_config_continuous_dump_config -> heapprofd_config_continuous_dump_config + +val heapprofd_config_continuous_dump_config_has_dump_phase_ms : heapprofd_config_continuous_dump_config -> bool + (** presence of field "dump_phase_ms" in [heapprofd_config_continuous_dump_config] *) + +val heapprofd_config_continuous_dump_config_set_dump_phase_ms : heapprofd_config_continuous_dump_config -> int32 -> unit + (** set field dump_phase_ms in heapprofd_config_continuous_dump_config *) + +val heapprofd_config_continuous_dump_config_has_dump_interval_ms : heapprofd_config_continuous_dump_config -> bool + (** presence of field "dump_interval_ms" in [heapprofd_config_continuous_dump_config] *) + +val heapprofd_config_continuous_dump_config_set_dump_interval_ms : heapprofd_config_continuous_dump_config -> int32 -> unit + (** set field dump_interval_ms in heapprofd_config_continuous_dump_config *) + +val make_heapprofd_config : + ?sampling_interval_bytes:int64 -> + ?adaptive_sampling_shmem_threshold:int64 -> + ?adaptive_sampling_max_sampling_interval_bytes:int64 -> + ?process_cmdline:string list -> + ?pid:int64 list -> + ?target_installed_by:string list -> + ?heaps:string list -> + ?exclude_heaps:string list -> + ?stream_allocations:bool -> + ?heap_sampling_intervals:int64 list -> + ?all_heaps:bool -> + ?all:bool -> + ?min_anonymous_memory_kb:int32 -> + ?max_heapprofd_memory_kb:int32 -> + ?max_heapprofd_cpu_secs:int64 -> + ?skip_symbol_prefix:string list -> + ?continuous_dump_config:heapprofd_config_continuous_dump_config -> + ?shmem_size_bytes:int64 -> + ?block_client:bool -> + ?block_client_timeout_us:int32 -> + ?no_startup:bool -> + ?no_running:bool -> + ?dump_at_max:bool -> + ?disable_fork_teardown:bool -> + ?disable_vfork_detection:bool -> + unit -> + heapprofd_config +(** [make_heapprofd_config … ()] is a builder for type [heapprofd_config] *) + +val copy_heapprofd_config : heapprofd_config -> heapprofd_config + +val heapprofd_config_has_sampling_interval_bytes : heapprofd_config -> bool + (** presence of field "sampling_interval_bytes" in [heapprofd_config] *) + +val heapprofd_config_set_sampling_interval_bytes : heapprofd_config -> int64 -> unit + (** set field sampling_interval_bytes in heapprofd_config *) + +val heapprofd_config_has_adaptive_sampling_shmem_threshold : heapprofd_config -> bool + (** presence of field "adaptive_sampling_shmem_threshold" in [heapprofd_config] *) + +val heapprofd_config_set_adaptive_sampling_shmem_threshold : heapprofd_config -> int64 -> unit + (** set field adaptive_sampling_shmem_threshold in heapprofd_config *) + +val heapprofd_config_has_adaptive_sampling_max_sampling_interval_bytes : heapprofd_config -> bool + (** presence of field "adaptive_sampling_max_sampling_interval_bytes" in [heapprofd_config] *) + +val heapprofd_config_set_adaptive_sampling_max_sampling_interval_bytes : heapprofd_config -> int64 -> unit + (** set field adaptive_sampling_max_sampling_interval_bytes in heapprofd_config *) + +val heapprofd_config_set_process_cmdline : heapprofd_config -> string list -> unit + (** set field process_cmdline in heapprofd_config *) + +val heapprofd_config_set_pid : heapprofd_config -> int64 list -> unit + (** set field pid in heapprofd_config *) + +val heapprofd_config_set_target_installed_by : heapprofd_config -> string list -> unit + (** set field target_installed_by in heapprofd_config *) + +val heapprofd_config_set_heaps : heapprofd_config -> string list -> unit + (** set field heaps in heapprofd_config *) + +val heapprofd_config_set_exclude_heaps : heapprofd_config -> string list -> unit + (** set field exclude_heaps in heapprofd_config *) + +val heapprofd_config_has_stream_allocations : heapprofd_config -> bool + (** presence of field "stream_allocations" in [heapprofd_config] *) + +val heapprofd_config_set_stream_allocations : heapprofd_config -> bool -> unit + (** set field stream_allocations in heapprofd_config *) + +val heapprofd_config_set_heap_sampling_intervals : heapprofd_config -> int64 list -> unit + (** set field heap_sampling_intervals in heapprofd_config *) + +val heapprofd_config_has_all_heaps : heapprofd_config -> bool + (** presence of field "all_heaps" in [heapprofd_config] *) + +val heapprofd_config_set_all_heaps : heapprofd_config -> bool -> unit + (** set field all_heaps in heapprofd_config *) + +val heapprofd_config_has_all : heapprofd_config -> bool + (** presence of field "all" in [heapprofd_config] *) + +val heapprofd_config_set_all : heapprofd_config -> bool -> unit + (** set field all in heapprofd_config *) + +val heapprofd_config_has_min_anonymous_memory_kb : heapprofd_config -> bool + (** presence of field "min_anonymous_memory_kb" in [heapprofd_config] *) + +val heapprofd_config_set_min_anonymous_memory_kb : heapprofd_config -> int32 -> unit + (** set field min_anonymous_memory_kb in heapprofd_config *) + +val heapprofd_config_has_max_heapprofd_memory_kb : heapprofd_config -> bool + (** presence of field "max_heapprofd_memory_kb" in [heapprofd_config] *) + +val heapprofd_config_set_max_heapprofd_memory_kb : heapprofd_config -> int32 -> unit + (** set field max_heapprofd_memory_kb in heapprofd_config *) + +val heapprofd_config_has_max_heapprofd_cpu_secs : heapprofd_config -> bool + (** presence of field "max_heapprofd_cpu_secs" in [heapprofd_config] *) + +val heapprofd_config_set_max_heapprofd_cpu_secs : heapprofd_config -> int64 -> unit + (** set field max_heapprofd_cpu_secs in heapprofd_config *) + +val heapprofd_config_set_skip_symbol_prefix : heapprofd_config -> string list -> unit + (** set field skip_symbol_prefix in heapprofd_config *) + +val heapprofd_config_set_continuous_dump_config : heapprofd_config -> heapprofd_config_continuous_dump_config -> unit + (** set field continuous_dump_config in heapprofd_config *) + +val heapprofd_config_has_shmem_size_bytes : heapprofd_config -> bool + (** presence of field "shmem_size_bytes" in [heapprofd_config] *) + +val heapprofd_config_set_shmem_size_bytes : heapprofd_config -> int64 -> unit + (** set field shmem_size_bytes in heapprofd_config *) + +val heapprofd_config_has_block_client : heapprofd_config -> bool + (** presence of field "block_client" in [heapprofd_config] *) + +val heapprofd_config_set_block_client : heapprofd_config -> bool -> unit + (** set field block_client in heapprofd_config *) + +val heapprofd_config_has_block_client_timeout_us : heapprofd_config -> bool + (** presence of field "block_client_timeout_us" in [heapprofd_config] *) + +val heapprofd_config_set_block_client_timeout_us : heapprofd_config -> int32 -> unit + (** set field block_client_timeout_us in heapprofd_config *) + +val heapprofd_config_has_no_startup : heapprofd_config -> bool + (** presence of field "no_startup" in [heapprofd_config] *) + +val heapprofd_config_set_no_startup : heapprofd_config -> bool -> unit + (** set field no_startup in heapprofd_config *) + +val heapprofd_config_has_no_running : heapprofd_config -> bool + (** presence of field "no_running" in [heapprofd_config] *) + +val heapprofd_config_set_no_running : heapprofd_config -> bool -> unit + (** set field no_running in heapprofd_config *) + +val heapprofd_config_has_dump_at_max : heapprofd_config -> bool + (** presence of field "dump_at_max" in [heapprofd_config] *) + +val heapprofd_config_set_dump_at_max : heapprofd_config -> bool -> unit + (** set field dump_at_max in heapprofd_config *) + +val heapprofd_config_has_disable_fork_teardown : heapprofd_config -> bool + (** presence of field "disable_fork_teardown" in [heapprofd_config] *) + +val heapprofd_config_set_disable_fork_teardown : heapprofd_config -> bool -> unit + (** set field disable_fork_teardown in heapprofd_config *) + +val heapprofd_config_has_disable_vfork_detection : heapprofd_config -> bool + (** presence of field "disable_vfork_detection" in [heapprofd_config] *) + +val heapprofd_config_set_disable_vfork_detection : heapprofd_config -> bool -> unit + (** set field disable_vfork_detection in heapprofd_config *) + +val make_statsd_pull_atom_config : + ?pull_atom_id:atom_id list -> + ?raw_pull_atom_id:int32 list -> + ?pull_frequency_ms:int32 -> + ?packages:string list -> + unit -> + statsd_pull_atom_config +(** [make_statsd_pull_atom_config … ()] is a builder for type [statsd_pull_atom_config] *) + +val copy_statsd_pull_atom_config : statsd_pull_atom_config -> statsd_pull_atom_config + +val statsd_pull_atom_config_set_pull_atom_id : statsd_pull_atom_config -> atom_id list -> unit + (** set field pull_atom_id in statsd_pull_atom_config *) + +val statsd_pull_atom_config_set_raw_pull_atom_id : statsd_pull_atom_config -> int32 list -> unit + (** set field raw_pull_atom_id in statsd_pull_atom_config *) + +val statsd_pull_atom_config_has_pull_frequency_ms : statsd_pull_atom_config -> bool + (** presence of field "pull_frequency_ms" in [statsd_pull_atom_config] *) + +val statsd_pull_atom_config_set_pull_frequency_ms : statsd_pull_atom_config -> int32 -> unit + (** set field pull_frequency_ms in statsd_pull_atom_config *) + +val statsd_pull_atom_config_set_packages : statsd_pull_atom_config -> string list -> unit + (** set field packages in statsd_pull_atom_config *) + +val make_statsd_tracing_config : + ?push_atom_id:atom_id list -> + ?raw_push_atom_id:int32 list -> + ?pull_config:statsd_pull_atom_config list -> + unit -> + statsd_tracing_config +(** [make_statsd_tracing_config … ()] is a builder for type [statsd_tracing_config] *) + +val copy_statsd_tracing_config : statsd_tracing_config -> statsd_tracing_config + +val statsd_tracing_config_set_push_atom_id : statsd_tracing_config -> atom_id list -> unit + (** set field push_atom_id in statsd_tracing_config *) + +val statsd_tracing_config_set_raw_push_atom_id : statsd_tracing_config -> int32 list -> unit + (** set field raw_push_atom_id in statsd_tracing_config *) + +val statsd_tracing_config_set_pull_config : statsd_tracing_config -> statsd_pull_atom_config list -> unit + (** set field pull_config in statsd_tracing_config *) + +val make_sys_stats_config : + ?meminfo_period_ms:int32 -> + ?meminfo_counters:meminfo_counters list -> + ?vmstat_period_ms:int32 -> + ?vmstat_counters:vmstat_counters list -> + ?stat_period_ms:int32 -> + ?stat_counters:sys_stats_config_stat_counters list -> + ?devfreq_period_ms:int32 -> + ?cpufreq_period_ms:int32 -> + ?buddyinfo_period_ms:int32 -> + ?diskstat_period_ms:int32 -> + ?psi_period_ms:int32 -> + ?thermal_period_ms:int32 -> + ?cpuidle_period_ms:int32 -> + ?gpufreq_period_ms:int32 -> + unit -> + sys_stats_config +(** [make_sys_stats_config … ()] is a builder for type [sys_stats_config] *) + +val copy_sys_stats_config : sys_stats_config -> sys_stats_config + +val sys_stats_config_has_meminfo_period_ms : sys_stats_config -> bool + (** presence of field "meminfo_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_meminfo_period_ms : sys_stats_config -> int32 -> unit + (** set field meminfo_period_ms in sys_stats_config *) + +val sys_stats_config_set_meminfo_counters : sys_stats_config -> meminfo_counters list -> unit + (** set field meminfo_counters in sys_stats_config *) + +val sys_stats_config_has_vmstat_period_ms : sys_stats_config -> bool + (** presence of field "vmstat_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_vmstat_period_ms : sys_stats_config -> int32 -> unit + (** set field vmstat_period_ms in sys_stats_config *) + +val sys_stats_config_set_vmstat_counters : sys_stats_config -> vmstat_counters list -> unit + (** set field vmstat_counters in sys_stats_config *) + +val sys_stats_config_has_stat_period_ms : sys_stats_config -> bool + (** presence of field "stat_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_stat_period_ms : sys_stats_config -> int32 -> unit + (** set field stat_period_ms in sys_stats_config *) + +val sys_stats_config_set_stat_counters : sys_stats_config -> sys_stats_config_stat_counters list -> unit + (** set field stat_counters in sys_stats_config *) + +val sys_stats_config_has_devfreq_period_ms : sys_stats_config -> bool + (** presence of field "devfreq_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_devfreq_period_ms : sys_stats_config -> int32 -> unit + (** set field devfreq_period_ms in sys_stats_config *) + +val sys_stats_config_has_cpufreq_period_ms : sys_stats_config -> bool + (** presence of field "cpufreq_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_cpufreq_period_ms : sys_stats_config -> int32 -> unit + (** set field cpufreq_period_ms in sys_stats_config *) + +val sys_stats_config_has_buddyinfo_period_ms : sys_stats_config -> bool + (** presence of field "buddyinfo_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_buddyinfo_period_ms : sys_stats_config -> int32 -> unit + (** set field buddyinfo_period_ms in sys_stats_config *) + +val sys_stats_config_has_diskstat_period_ms : sys_stats_config -> bool + (** presence of field "diskstat_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_diskstat_period_ms : sys_stats_config -> int32 -> unit + (** set field diskstat_period_ms in sys_stats_config *) + +val sys_stats_config_has_psi_period_ms : sys_stats_config -> bool + (** presence of field "psi_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_psi_period_ms : sys_stats_config -> int32 -> unit + (** set field psi_period_ms in sys_stats_config *) + +val sys_stats_config_has_thermal_period_ms : sys_stats_config -> bool + (** presence of field "thermal_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_thermal_period_ms : sys_stats_config -> int32 -> unit + (** set field thermal_period_ms in sys_stats_config *) + +val sys_stats_config_has_cpuidle_period_ms : sys_stats_config -> bool + (** presence of field "cpuidle_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_cpuidle_period_ms : sys_stats_config -> int32 -> unit + (** set field cpuidle_period_ms in sys_stats_config *) + +val sys_stats_config_has_gpufreq_period_ms : sys_stats_config -> bool + (** presence of field "gpufreq_period_ms" in [sys_stats_config] *) + +val sys_stats_config_set_gpufreq_period_ms : sys_stats_config -> int32 -> unit + (** set field gpufreq_period_ms in sys_stats_config *) + +val make_test_config_dummy_fields : + ?field_uint32:int32 -> + ?field_int32:int32 -> + ?field_uint64:int64 -> + ?field_int64:int64 -> + ?field_fixed64:int64 -> + ?field_sfixed64:int64 -> + ?field_fixed32:int32 -> + ?field_sfixed32:int32 -> + ?field_double:float -> + ?field_float:float -> + ?field_sint64:int64 -> + ?field_sint32:int32 -> + ?field_string:string -> + ?field_bytes:bytes -> + unit -> + test_config_dummy_fields +(** [make_test_config_dummy_fields … ()] is a builder for type [test_config_dummy_fields] *) + +val copy_test_config_dummy_fields : test_config_dummy_fields -> test_config_dummy_fields + +val test_config_dummy_fields_has_field_uint32 : test_config_dummy_fields -> bool + (** presence of field "field_uint32" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_uint32 : test_config_dummy_fields -> int32 -> unit + (** set field field_uint32 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_int32 : test_config_dummy_fields -> bool + (** presence of field "field_int32" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_int32 : test_config_dummy_fields -> int32 -> unit + (** set field field_int32 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_uint64 : test_config_dummy_fields -> bool + (** presence of field "field_uint64" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_uint64 : test_config_dummy_fields -> int64 -> unit + (** set field field_uint64 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_int64 : test_config_dummy_fields -> bool + (** presence of field "field_int64" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_int64 : test_config_dummy_fields -> int64 -> unit + (** set field field_int64 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_fixed64 : test_config_dummy_fields -> bool + (** presence of field "field_fixed64" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_fixed64 : test_config_dummy_fields -> int64 -> unit + (** set field field_fixed64 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_sfixed64 : test_config_dummy_fields -> bool + (** presence of field "field_sfixed64" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_sfixed64 : test_config_dummy_fields -> int64 -> unit + (** set field field_sfixed64 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_fixed32 : test_config_dummy_fields -> bool + (** presence of field "field_fixed32" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_fixed32 : test_config_dummy_fields -> int32 -> unit + (** set field field_fixed32 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_sfixed32 : test_config_dummy_fields -> bool + (** presence of field "field_sfixed32" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_sfixed32 : test_config_dummy_fields -> int32 -> unit + (** set field field_sfixed32 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_double : test_config_dummy_fields -> bool + (** presence of field "field_double" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_double : test_config_dummy_fields -> float -> unit + (** set field field_double in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_float : test_config_dummy_fields -> bool + (** presence of field "field_float" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_float : test_config_dummy_fields -> float -> unit + (** set field field_float in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_sint64 : test_config_dummy_fields -> bool + (** presence of field "field_sint64" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_sint64 : test_config_dummy_fields -> int64 -> unit + (** set field field_sint64 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_sint32 : test_config_dummy_fields -> bool + (** presence of field "field_sint32" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_sint32 : test_config_dummy_fields -> int32 -> unit + (** set field field_sint32 in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_string : test_config_dummy_fields -> bool + (** presence of field "field_string" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_string : test_config_dummy_fields -> string -> unit + (** set field field_string in test_config_dummy_fields *) + +val test_config_dummy_fields_has_field_bytes : test_config_dummy_fields -> bool + (** presence of field "field_bytes" in [test_config_dummy_fields] *) + +val test_config_dummy_fields_set_field_bytes : test_config_dummy_fields -> bytes -> unit + (** set field field_bytes in test_config_dummy_fields *) + +val make_test_config : + ?message_count:int32 -> + ?max_messages_per_second:int32 -> + ?seed:int32 -> + ?message_size:int32 -> + ?send_batch_on_register:bool -> + ?dummy_fields:test_config_dummy_fields -> + unit -> + test_config +(** [make_test_config … ()] is a builder for type [test_config] *) + +val copy_test_config : test_config -> test_config + +val test_config_has_message_count : test_config -> bool + (** presence of field "message_count" in [test_config] *) + +val test_config_set_message_count : test_config -> int32 -> unit + (** set field message_count in test_config *) + +val test_config_has_max_messages_per_second : test_config -> bool + (** presence of field "max_messages_per_second" in [test_config] *) + +val test_config_set_max_messages_per_second : test_config -> int32 -> unit + (** set field max_messages_per_second in test_config *) + +val test_config_has_seed : test_config -> bool + (** presence of field "seed" in [test_config] *) + +val test_config_set_seed : test_config -> int32 -> unit + (** set field seed in test_config *) + +val test_config_has_message_size : test_config -> bool + (** presence of field "message_size" in [test_config] *) + +val test_config_set_message_size : test_config -> int32 -> unit + (** set field message_size in test_config *) + +val test_config_has_send_batch_on_register : test_config -> bool + (** presence of field "send_batch_on_register" in [test_config] *) + +val test_config_set_send_batch_on_register : test_config -> bool -> unit + (** set field send_batch_on_register in test_config *) + +val test_config_set_dummy_fields : test_config -> test_config_dummy_fields -> unit + (** set field dummy_fields in test_config *) + +val make_track_event_config : + ?disabled_categories:string list -> + ?enabled_categories:string list -> + ?disabled_tags:string list -> + ?enabled_tags:string list -> + ?disable_incremental_timestamps:bool -> + ?timestamp_unit_multiplier:int64 -> + ?filter_debug_annotations:bool -> + ?enable_thread_time_sampling:bool -> + ?thread_time_subsampling_ns:int64 -> + ?filter_dynamic_event_names:bool -> + unit -> + track_event_config +(** [make_track_event_config … ()] is a builder for type [track_event_config] *) + +val copy_track_event_config : track_event_config -> track_event_config + +val track_event_config_set_disabled_categories : track_event_config -> string list -> unit + (** set field disabled_categories in track_event_config *) + +val track_event_config_set_enabled_categories : track_event_config -> string list -> unit + (** set field enabled_categories in track_event_config *) + +val track_event_config_set_disabled_tags : track_event_config -> string list -> unit + (** set field disabled_tags in track_event_config *) + +val track_event_config_set_enabled_tags : track_event_config -> string list -> unit + (** set field enabled_tags in track_event_config *) + +val track_event_config_has_disable_incremental_timestamps : track_event_config -> bool + (** presence of field "disable_incremental_timestamps" in [track_event_config] *) + +val track_event_config_set_disable_incremental_timestamps : track_event_config -> bool -> unit + (** set field disable_incremental_timestamps in track_event_config *) + +val track_event_config_has_timestamp_unit_multiplier : track_event_config -> bool + (** presence of field "timestamp_unit_multiplier" in [track_event_config] *) + +val track_event_config_set_timestamp_unit_multiplier : track_event_config -> int64 -> unit + (** set field timestamp_unit_multiplier in track_event_config *) + +val track_event_config_has_filter_debug_annotations : track_event_config -> bool + (** presence of field "filter_debug_annotations" in [track_event_config] *) + +val track_event_config_set_filter_debug_annotations : track_event_config -> bool -> unit + (** set field filter_debug_annotations in track_event_config *) + +val track_event_config_has_enable_thread_time_sampling : track_event_config -> bool + (** presence of field "enable_thread_time_sampling" in [track_event_config] *) + +val track_event_config_set_enable_thread_time_sampling : track_event_config -> bool -> unit + (** set field enable_thread_time_sampling in track_event_config *) + +val track_event_config_has_thread_time_subsampling_ns : track_event_config -> bool + (** presence of field "thread_time_subsampling_ns" in [track_event_config] *) + +val track_event_config_set_thread_time_subsampling_ns : track_event_config -> int64 -> unit + (** set field thread_time_subsampling_ns in track_event_config *) + +val track_event_config_has_filter_dynamic_event_names : track_event_config -> bool + (** presence of field "filter_dynamic_event_names" in [track_event_config] *) + +val track_event_config_set_filter_dynamic_event_names : track_event_config -> bool -> unit + (** set field filter_dynamic_event_names in track_event_config *) + +val make_data_source_config : + ?name:string -> + ?target_buffer:int32 -> + ?trace_duration_ms:int32 -> + ?prefer_suspend_clock_for_duration:bool -> + ?stop_timeout_ms:int32 -> + ?enable_extra_guardrails:bool -> + ?session_initiator:data_source_config_session_initiator -> + ?tracing_session_id:int64 -> + ?buffer_exhausted_policy:data_source_config_buffer_exhausted_policy -> + ?priority_boost:priority_boost_config -> + ?ftrace_config:ftrace_config -> + ?inode_file_config:inode_file_config -> + ?process_stats_config:process_stats_config -> + ?sys_stats_config:sys_stats_config -> + ?heapprofd_config:heapprofd_config -> + ?android_power_config:android_power_config -> + ?android_log_config:android_log_config -> + ?gpu_counter_config:gpu_counter_config -> + ?android_game_intervention_list_config:android_game_intervention_list_config -> + ?packages_list_config:packages_list_config -> + ?vulkan_memory_config:vulkan_memory_config -> + ?track_event_config:track_event_config -> + ?android_polled_state_config:android_polled_state_config -> + ?android_system_property_config:android_system_property_config -> + ?statsd_tracing_config:statsd_tracing_config -> + ?system_info_config:unit -> + ?frozen_ftrace_config:frozen_ftrace_config -> + ?chrome_config:chrome_config -> + ?v8_config:v8_config -> + ?interceptor_config:interceptor_config -> + ?network_packet_trace_config:network_packet_trace_config -> + ?surfaceflinger_layers_config:surface_flinger_layers_config -> + ?surfaceflinger_transactions_config:surface_flinger_transactions_config -> + ?android_sdk_sysprop_guard_config:android_sdk_sysprop_guard_config -> + ?etw_config:etw_config -> + ?protolog_config:proto_log_config -> + ?android_input_event_config:android_input_event_config -> + ?pixel_modem_config:pixel_modem_config -> + ?windowmanager_config:window_manager_config -> + ?chromium_system_metrics:chromium_system_metrics_config -> + ?kernel_wakelocks_config:kernel_wakelocks_config -> + ?gpu_renderstages_config:gpu_render_stages_config -> + ?chromium_histogram_samples:chromium_histogram_samples_config -> + ?app_wakelocks_config:app_wakelocks_config -> + ?cpu_per_uid_config:cpu_per_uid_config -> + ?legacy_config:string -> + ?for_testing:test_config -> + unit -> + data_source_config +(** [make_data_source_config … ()] is a builder for type [data_source_config] *) + +val copy_data_source_config : data_source_config -> data_source_config + +val data_source_config_has_name : data_source_config -> bool + (** presence of field "name" in [data_source_config] *) + +val data_source_config_set_name : data_source_config -> string -> unit + (** set field name in data_source_config *) + +val data_source_config_has_target_buffer : data_source_config -> bool + (** presence of field "target_buffer" in [data_source_config] *) + +val data_source_config_set_target_buffer : data_source_config -> int32 -> unit + (** set field target_buffer in data_source_config *) + +val data_source_config_has_trace_duration_ms : data_source_config -> bool + (** presence of field "trace_duration_ms" in [data_source_config] *) + +val data_source_config_set_trace_duration_ms : data_source_config -> int32 -> unit + (** set field trace_duration_ms in data_source_config *) + +val data_source_config_has_prefer_suspend_clock_for_duration : data_source_config -> bool + (** presence of field "prefer_suspend_clock_for_duration" in [data_source_config] *) + +val data_source_config_set_prefer_suspend_clock_for_duration : data_source_config -> bool -> unit + (** set field prefer_suspend_clock_for_duration in data_source_config *) + +val data_source_config_has_stop_timeout_ms : data_source_config -> bool + (** presence of field "stop_timeout_ms" in [data_source_config] *) + +val data_source_config_set_stop_timeout_ms : data_source_config -> int32 -> unit + (** set field stop_timeout_ms in data_source_config *) + +val data_source_config_has_enable_extra_guardrails : data_source_config -> bool + (** presence of field "enable_extra_guardrails" in [data_source_config] *) + +val data_source_config_set_enable_extra_guardrails : data_source_config -> bool -> unit + (** set field enable_extra_guardrails in data_source_config *) + +val data_source_config_has_session_initiator : data_source_config -> bool + (** presence of field "session_initiator" in [data_source_config] *) + +val data_source_config_set_session_initiator : data_source_config -> data_source_config_session_initiator -> unit + (** set field session_initiator in data_source_config *) + +val data_source_config_has_tracing_session_id : data_source_config -> bool + (** presence of field "tracing_session_id" in [data_source_config] *) + +val data_source_config_set_tracing_session_id : data_source_config -> int64 -> unit + (** set field tracing_session_id in data_source_config *) + +val data_source_config_has_buffer_exhausted_policy : data_source_config -> bool + (** presence of field "buffer_exhausted_policy" in [data_source_config] *) + +val data_source_config_set_buffer_exhausted_policy : data_source_config -> data_source_config_buffer_exhausted_policy -> unit + (** set field buffer_exhausted_policy in data_source_config *) + +val data_source_config_set_priority_boost : data_source_config -> priority_boost_config -> unit + (** set field priority_boost in data_source_config *) + +val data_source_config_set_ftrace_config : data_source_config -> ftrace_config -> unit + (** set field ftrace_config in data_source_config *) + +val data_source_config_set_inode_file_config : data_source_config -> inode_file_config -> unit + (** set field inode_file_config in data_source_config *) + +val data_source_config_set_process_stats_config : data_source_config -> process_stats_config -> unit + (** set field process_stats_config in data_source_config *) + +val data_source_config_set_sys_stats_config : data_source_config -> sys_stats_config -> unit + (** set field sys_stats_config in data_source_config *) + +val data_source_config_set_heapprofd_config : data_source_config -> heapprofd_config -> unit + (** set field heapprofd_config in data_source_config *) + +val data_source_config_set_android_power_config : data_source_config -> android_power_config -> unit + (** set field android_power_config in data_source_config *) + +val data_source_config_set_android_log_config : data_source_config -> android_log_config -> unit + (** set field android_log_config in data_source_config *) + +val data_source_config_set_gpu_counter_config : data_source_config -> gpu_counter_config -> unit + (** set field gpu_counter_config in data_source_config *) + +val data_source_config_set_android_game_intervention_list_config : data_source_config -> android_game_intervention_list_config -> unit + (** set field android_game_intervention_list_config in data_source_config *) + +val data_source_config_set_packages_list_config : data_source_config -> packages_list_config -> unit + (** set field packages_list_config in data_source_config *) + +val data_source_config_set_vulkan_memory_config : data_source_config -> vulkan_memory_config -> unit + (** set field vulkan_memory_config in data_source_config *) + +val data_source_config_set_track_event_config : data_source_config -> track_event_config -> unit + (** set field track_event_config in data_source_config *) + +val data_source_config_set_android_polled_state_config : data_source_config -> android_polled_state_config -> unit + (** set field android_polled_state_config in data_source_config *) + +val data_source_config_set_android_system_property_config : data_source_config -> android_system_property_config -> unit + (** set field android_system_property_config in data_source_config *) + +val data_source_config_set_statsd_tracing_config : data_source_config -> statsd_tracing_config -> unit + (** set field statsd_tracing_config in data_source_config *) + +val data_source_config_has_system_info_config : data_source_config -> bool + (** presence of field "system_info_config" in [data_source_config] *) + +val data_source_config_set_system_info_config : data_source_config -> unit -> unit + (** set field system_info_config in data_source_config *) + +val data_source_config_set_frozen_ftrace_config : data_source_config -> frozen_ftrace_config -> unit + (** set field frozen_ftrace_config in data_source_config *) + +val data_source_config_set_chrome_config : data_source_config -> chrome_config -> unit + (** set field chrome_config in data_source_config *) + +val data_source_config_set_v8_config : data_source_config -> v8_config -> unit + (** set field v8_config in data_source_config *) + +val data_source_config_set_interceptor_config : data_source_config -> interceptor_config -> unit + (** set field interceptor_config in data_source_config *) + +val data_source_config_set_network_packet_trace_config : data_source_config -> network_packet_trace_config -> unit + (** set field network_packet_trace_config in data_source_config *) + +val data_source_config_set_surfaceflinger_layers_config : data_source_config -> surface_flinger_layers_config -> unit + (** set field surfaceflinger_layers_config in data_source_config *) + +val data_source_config_set_surfaceflinger_transactions_config : data_source_config -> surface_flinger_transactions_config -> unit + (** set field surfaceflinger_transactions_config in data_source_config *) + +val data_source_config_set_android_sdk_sysprop_guard_config : data_source_config -> android_sdk_sysprop_guard_config -> unit + (** set field android_sdk_sysprop_guard_config in data_source_config *) + +val data_source_config_set_etw_config : data_source_config -> etw_config -> unit + (** set field etw_config in data_source_config *) + +val data_source_config_set_protolog_config : data_source_config -> proto_log_config -> unit + (** set field protolog_config in data_source_config *) + +val data_source_config_set_android_input_event_config : data_source_config -> android_input_event_config -> unit + (** set field android_input_event_config in data_source_config *) + +val data_source_config_set_pixel_modem_config : data_source_config -> pixel_modem_config -> unit + (** set field pixel_modem_config in data_source_config *) + +val data_source_config_set_windowmanager_config : data_source_config -> window_manager_config -> unit + (** set field windowmanager_config in data_source_config *) + +val data_source_config_set_chromium_system_metrics : data_source_config -> chromium_system_metrics_config -> unit + (** set field chromium_system_metrics in data_source_config *) + +val data_source_config_set_kernel_wakelocks_config : data_source_config -> kernel_wakelocks_config -> unit + (** set field kernel_wakelocks_config in data_source_config *) + +val data_source_config_set_gpu_renderstages_config : data_source_config -> gpu_render_stages_config -> unit + (** set field gpu_renderstages_config in data_source_config *) + +val data_source_config_set_chromium_histogram_samples : data_source_config -> chromium_histogram_samples_config -> unit + (** set field chromium_histogram_samples in data_source_config *) + +val data_source_config_set_app_wakelocks_config : data_source_config -> app_wakelocks_config -> unit + (** set field app_wakelocks_config in data_source_config *) + +val data_source_config_set_cpu_per_uid_config : data_source_config -> cpu_per_uid_config -> unit + (** set field cpu_per_uid_config in data_source_config *) + +val data_source_config_has_legacy_config : data_source_config -> bool + (** presence of field "legacy_config" in [data_source_config] *) + +val data_source_config_set_legacy_config : data_source_config -> string -> unit + (** set field legacy_config in data_source_config *) + +val data_source_config_set_for_testing : data_source_config -> test_config -> unit + (** set field for_testing in data_source_config *) + +val make_trace_config_buffer_config : + ?size_kb:int32 -> + ?fill_policy:trace_config_buffer_config_fill_policy -> + ?transfer_on_clone:bool -> + ?clear_before_clone:bool -> + unit -> + trace_config_buffer_config +(** [make_trace_config_buffer_config … ()] is a builder for type [trace_config_buffer_config] *) + +val copy_trace_config_buffer_config : trace_config_buffer_config -> trace_config_buffer_config + +val trace_config_buffer_config_has_size_kb : trace_config_buffer_config -> bool + (** presence of field "size_kb" in [trace_config_buffer_config] *) + +val trace_config_buffer_config_set_size_kb : trace_config_buffer_config -> int32 -> unit + (** set field size_kb in trace_config_buffer_config *) + +val trace_config_buffer_config_has_fill_policy : trace_config_buffer_config -> bool + (** presence of field "fill_policy" in [trace_config_buffer_config] *) + +val trace_config_buffer_config_set_fill_policy : trace_config_buffer_config -> trace_config_buffer_config_fill_policy -> unit + (** set field fill_policy in trace_config_buffer_config *) + +val trace_config_buffer_config_has_transfer_on_clone : trace_config_buffer_config -> bool + (** presence of field "transfer_on_clone" in [trace_config_buffer_config] *) + +val trace_config_buffer_config_set_transfer_on_clone : trace_config_buffer_config -> bool -> unit + (** set field transfer_on_clone in trace_config_buffer_config *) + +val trace_config_buffer_config_has_clear_before_clone : trace_config_buffer_config -> bool + (** presence of field "clear_before_clone" in [trace_config_buffer_config] *) + +val trace_config_buffer_config_set_clear_before_clone : trace_config_buffer_config -> bool -> unit + (** set field clear_before_clone in trace_config_buffer_config *) + +val make_trace_config_data_source : + ?config:data_source_config -> + ?producer_name_filter:string list -> + ?producer_name_regex_filter:string list -> + ?machine_name_filter:string list -> + unit -> + trace_config_data_source +(** [make_trace_config_data_source … ()] is a builder for type [trace_config_data_source] *) + +val copy_trace_config_data_source : trace_config_data_source -> trace_config_data_source + +val trace_config_data_source_set_config : trace_config_data_source -> data_source_config -> unit + (** set field config in trace_config_data_source *) + +val trace_config_data_source_set_producer_name_filter : trace_config_data_source -> string list -> unit + (** set field producer_name_filter in trace_config_data_source *) + +val trace_config_data_source_set_producer_name_regex_filter : trace_config_data_source -> string list -> unit + (** set field producer_name_regex_filter in trace_config_data_source *) + +val trace_config_data_source_set_machine_name_filter : trace_config_data_source -> string list -> unit + (** set field machine_name_filter in trace_config_data_source *) + +val make_trace_config_builtin_data_source : + ?disable_clock_snapshotting:bool -> + ?disable_trace_config:bool -> + ?disable_system_info:bool -> + ?disable_service_events:bool -> + ?primary_trace_clock:builtin_clock -> + ?snapshot_interval_ms:int32 -> + ?prefer_suspend_clock_for_snapshot:bool -> + ?disable_chunk_usage_histograms:bool -> + unit -> + trace_config_builtin_data_source +(** [make_trace_config_builtin_data_source … ()] is a builder for type [trace_config_builtin_data_source] *) + +val copy_trace_config_builtin_data_source : trace_config_builtin_data_source -> trace_config_builtin_data_source + +val trace_config_builtin_data_source_has_disable_clock_snapshotting : trace_config_builtin_data_source -> bool + (** presence of field "disable_clock_snapshotting" in [trace_config_builtin_data_source] *) + +val trace_config_builtin_data_source_set_disable_clock_snapshotting : trace_config_builtin_data_source -> bool -> unit + (** set field disable_clock_snapshotting in trace_config_builtin_data_source *) + +val trace_config_builtin_data_source_has_disable_trace_config : trace_config_builtin_data_source -> bool + (** presence of field "disable_trace_config" in [trace_config_builtin_data_source] *) + +val trace_config_builtin_data_source_set_disable_trace_config : trace_config_builtin_data_source -> bool -> unit + (** set field disable_trace_config in trace_config_builtin_data_source *) + +val trace_config_builtin_data_source_has_disable_system_info : trace_config_builtin_data_source -> bool + (** presence of field "disable_system_info" in [trace_config_builtin_data_source] *) + +val trace_config_builtin_data_source_set_disable_system_info : trace_config_builtin_data_source -> bool -> unit + (** set field disable_system_info in trace_config_builtin_data_source *) + +val trace_config_builtin_data_source_has_disable_service_events : trace_config_builtin_data_source -> bool + (** presence of field "disable_service_events" in [trace_config_builtin_data_source] *) + +val trace_config_builtin_data_source_set_disable_service_events : trace_config_builtin_data_source -> bool -> unit + (** set field disable_service_events in trace_config_builtin_data_source *) + +val trace_config_builtin_data_source_has_primary_trace_clock : trace_config_builtin_data_source -> bool + (** presence of field "primary_trace_clock" in [trace_config_builtin_data_source] *) + +val trace_config_builtin_data_source_set_primary_trace_clock : trace_config_builtin_data_source -> builtin_clock -> unit + (** set field primary_trace_clock in trace_config_builtin_data_source *) + +val trace_config_builtin_data_source_has_snapshot_interval_ms : trace_config_builtin_data_source -> bool + (** presence of field "snapshot_interval_ms" in [trace_config_builtin_data_source] *) + +val trace_config_builtin_data_source_set_snapshot_interval_ms : trace_config_builtin_data_source -> int32 -> unit + (** set field snapshot_interval_ms in trace_config_builtin_data_source *) + +val trace_config_builtin_data_source_has_prefer_suspend_clock_for_snapshot : trace_config_builtin_data_source -> bool + (** presence of field "prefer_suspend_clock_for_snapshot" in [trace_config_builtin_data_source] *) + +val trace_config_builtin_data_source_set_prefer_suspend_clock_for_snapshot : trace_config_builtin_data_source -> bool -> unit + (** set field prefer_suspend_clock_for_snapshot in trace_config_builtin_data_source *) + +val trace_config_builtin_data_source_has_disable_chunk_usage_histograms : trace_config_builtin_data_source -> bool + (** presence of field "disable_chunk_usage_histograms" in [trace_config_builtin_data_source] *) + +val trace_config_builtin_data_source_set_disable_chunk_usage_histograms : trace_config_builtin_data_source -> bool -> unit + (** set field disable_chunk_usage_histograms in trace_config_builtin_data_source *) + +val make_trace_config_producer_config : + ?producer_name:string -> + ?shm_size_kb:int32 -> + ?page_size_kb:int32 -> + unit -> + trace_config_producer_config +(** [make_trace_config_producer_config … ()] is a builder for type [trace_config_producer_config] *) + +val copy_trace_config_producer_config : trace_config_producer_config -> trace_config_producer_config + +val trace_config_producer_config_has_producer_name : trace_config_producer_config -> bool + (** presence of field "producer_name" in [trace_config_producer_config] *) + +val trace_config_producer_config_set_producer_name : trace_config_producer_config -> string -> unit + (** set field producer_name in trace_config_producer_config *) + +val trace_config_producer_config_has_shm_size_kb : trace_config_producer_config -> bool + (** presence of field "shm_size_kb" in [trace_config_producer_config] *) + +val trace_config_producer_config_set_shm_size_kb : trace_config_producer_config -> int32 -> unit + (** set field shm_size_kb in trace_config_producer_config *) + +val trace_config_producer_config_has_page_size_kb : trace_config_producer_config -> bool + (** presence of field "page_size_kb" in [trace_config_producer_config] *) + +val trace_config_producer_config_set_page_size_kb : trace_config_producer_config -> int32 -> unit + (** set field page_size_kb in trace_config_producer_config *) + +val make_trace_config_statsd_metadata : + ?triggering_alert_id:int64 -> + ?triggering_config_uid:int32 -> + ?triggering_config_id:int64 -> + ?triggering_subscription_id:int64 -> + unit -> + trace_config_statsd_metadata +(** [make_trace_config_statsd_metadata … ()] is a builder for type [trace_config_statsd_metadata] *) + +val copy_trace_config_statsd_metadata : trace_config_statsd_metadata -> trace_config_statsd_metadata + +val trace_config_statsd_metadata_has_triggering_alert_id : trace_config_statsd_metadata -> bool + (** presence of field "triggering_alert_id" in [trace_config_statsd_metadata] *) + +val trace_config_statsd_metadata_set_triggering_alert_id : trace_config_statsd_metadata -> int64 -> unit + (** set field triggering_alert_id in trace_config_statsd_metadata *) + +val trace_config_statsd_metadata_has_triggering_config_uid : trace_config_statsd_metadata -> bool + (** presence of field "triggering_config_uid" in [trace_config_statsd_metadata] *) + +val trace_config_statsd_metadata_set_triggering_config_uid : trace_config_statsd_metadata -> int32 -> unit + (** set field triggering_config_uid in trace_config_statsd_metadata *) + +val trace_config_statsd_metadata_has_triggering_config_id : trace_config_statsd_metadata -> bool + (** presence of field "triggering_config_id" in [trace_config_statsd_metadata] *) + +val trace_config_statsd_metadata_set_triggering_config_id : trace_config_statsd_metadata -> int64 -> unit + (** set field triggering_config_id in trace_config_statsd_metadata *) + +val trace_config_statsd_metadata_has_triggering_subscription_id : trace_config_statsd_metadata -> bool + (** presence of field "triggering_subscription_id" in [trace_config_statsd_metadata] *) + +val trace_config_statsd_metadata_set_triggering_subscription_id : trace_config_statsd_metadata -> int64 -> unit + (** set field triggering_subscription_id in trace_config_statsd_metadata *) + +val make_trace_config_guardrail_overrides : + ?max_upload_per_day_bytes:int64 -> + ?max_tracing_buffer_size_kb:int32 -> + unit -> + trace_config_guardrail_overrides +(** [make_trace_config_guardrail_overrides … ()] is a builder for type [trace_config_guardrail_overrides] *) + +val copy_trace_config_guardrail_overrides : trace_config_guardrail_overrides -> trace_config_guardrail_overrides + +val trace_config_guardrail_overrides_has_max_upload_per_day_bytes : trace_config_guardrail_overrides -> bool + (** presence of field "max_upload_per_day_bytes" in [trace_config_guardrail_overrides] *) + +val trace_config_guardrail_overrides_set_max_upload_per_day_bytes : trace_config_guardrail_overrides -> int64 -> unit + (** set field max_upload_per_day_bytes in trace_config_guardrail_overrides *) + +val trace_config_guardrail_overrides_has_max_tracing_buffer_size_kb : trace_config_guardrail_overrides -> bool + (** presence of field "max_tracing_buffer_size_kb" in [trace_config_guardrail_overrides] *) + +val trace_config_guardrail_overrides_set_max_tracing_buffer_size_kb : trace_config_guardrail_overrides -> int32 -> unit + (** set field max_tracing_buffer_size_kb in trace_config_guardrail_overrides *) + +val make_trace_config_trigger_config_trigger : + ?name:string -> + ?producer_name_regex:string -> + ?stop_delay_ms:int32 -> + ?max_per_24_h:int32 -> + ?skip_probability:float -> + unit -> + trace_config_trigger_config_trigger +(** [make_trace_config_trigger_config_trigger … ()] is a builder for type [trace_config_trigger_config_trigger] *) + +val copy_trace_config_trigger_config_trigger : trace_config_trigger_config_trigger -> trace_config_trigger_config_trigger + +val trace_config_trigger_config_trigger_has_name : trace_config_trigger_config_trigger -> bool + (** presence of field "name" in [trace_config_trigger_config_trigger] *) + +val trace_config_trigger_config_trigger_set_name : trace_config_trigger_config_trigger -> string -> unit + (** set field name in trace_config_trigger_config_trigger *) + +val trace_config_trigger_config_trigger_has_producer_name_regex : trace_config_trigger_config_trigger -> bool + (** presence of field "producer_name_regex" in [trace_config_trigger_config_trigger] *) + +val trace_config_trigger_config_trigger_set_producer_name_regex : trace_config_trigger_config_trigger -> string -> unit + (** set field producer_name_regex in trace_config_trigger_config_trigger *) + +val trace_config_trigger_config_trigger_has_stop_delay_ms : trace_config_trigger_config_trigger -> bool + (** presence of field "stop_delay_ms" in [trace_config_trigger_config_trigger] *) + +val trace_config_trigger_config_trigger_set_stop_delay_ms : trace_config_trigger_config_trigger -> int32 -> unit + (** set field stop_delay_ms in trace_config_trigger_config_trigger *) + +val trace_config_trigger_config_trigger_has_max_per_24_h : trace_config_trigger_config_trigger -> bool + (** presence of field "max_per_24_h" in [trace_config_trigger_config_trigger] *) + +val trace_config_trigger_config_trigger_set_max_per_24_h : trace_config_trigger_config_trigger -> int32 -> unit + (** set field max_per_24_h in trace_config_trigger_config_trigger *) + +val trace_config_trigger_config_trigger_has_skip_probability : trace_config_trigger_config_trigger -> bool + (** presence of field "skip_probability" in [trace_config_trigger_config_trigger] *) + +val trace_config_trigger_config_trigger_set_skip_probability : trace_config_trigger_config_trigger -> float -> unit + (** set field skip_probability in trace_config_trigger_config_trigger *) + +val make_trace_config_trigger_config : + ?trigger_mode:trace_config_trigger_config_trigger_mode -> + ?use_clone_snapshot_if_available:bool -> + ?triggers:trace_config_trigger_config_trigger list -> + ?trigger_timeout_ms:int32 -> + unit -> + trace_config_trigger_config +(** [make_trace_config_trigger_config … ()] is a builder for type [trace_config_trigger_config] *) + +val copy_trace_config_trigger_config : trace_config_trigger_config -> trace_config_trigger_config + +val trace_config_trigger_config_has_trigger_mode : trace_config_trigger_config -> bool + (** presence of field "trigger_mode" in [trace_config_trigger_config] *) + +val trace_config_trigger_config_set_trigger_mode : trace_config_trigger_config -> trace_config_trigger_config_trigger_mode -> unit + (** set field trigger_mode in trace_config_trigger_config *) + +val trace_config_trigger_config_has_use_clone_snapshot_if_available : trace_config_trigger_config -> bool + (** presence of field "use_clone_snapshot_if_available" in [trace_config_trigger_config] *) + +val trace_config_trigger_config_set_use_clone_snapshot_if_available : trace_config_trigger_config -> bool -> unit + (** set field use_clone_snapshot_if_available in trace_config_trigger_config *) + +val trace_config_trigger_config_set_triggers : trace_config_trigger_config -> trace_config_trigger_config_trigger list -> unit + (** set field triggers in trace_config_trigger_config *) + +val trace_config_trigger_config_has_trigger_timeout_ms : trace_config_trigger_config -> bool + (** presence of field "trigger_timeout_ms" in [trace_config_trigger_config] *) + +val trace_config_trigger_config_set_trigger_timeout_ms : trace_config_trigger_config -> int32 -> unit + (** set field trigger_timeout_ms in trace_config_trigger_config *) + +val make_trace_config_incremental_state_config : + ?clear_period_ms:int32 -> + unit -> + trace_config_incremental_state_config +(** [make_trace_config_incremental_state_config … ()] is a builder for type [trace_config_incremental_state_config] *) + +val copy_trace_config_incremental_state_config : trace_config_incremental_state_config -> trace_config_incremental_state_config + +val trace_config_incremental_state_config_has_clear_period_ms : trace_config_incremental_state_config -> bool + (** presence of field "clear_period_ms" in [trace_config_incremental_state_config] *) + +val trace_config_incremental_state_config_set_clear_period_ms : trace_config_incremental_state_config -> int32 -> unit + (** set field clear_period_ms in trace_config_incremental_state_config *) + +val make_trace_config_incident_report_config : + ?destination_package:string -> + ?destination_class:string -> + ?privacy_level:int32 -> + ?skip_incidentd:bool -> + ?skip_dropbox:bool -> + unit -> + trace_config_incident_report_config +(** [make_trace_config_incident_report_config … ()] is a builder for type [trace_config_incident_report_config] *) + +val copy_trace_config_incident_report_config : trace_config_incident_report_config -> trace_config_incident_report_config + +val trace_config_incident_report_config_has_destination_package : trace_config_incident_report_config -> bool + (** presence of field "destination_package" in [trace_config_incident_report_config] *) + +val trace_config_incident_report_config_set_destination_package : trace_config_incident_report_config -> string -> unit + (** set field destination_package in trace_config_incident_report_config *) + +val trace_config_incident_report_config_has_destination_class : trace_config_incident_report_config -> bool + (** presence of field "destination_class" in [trace_config_incident_report_config] *) + +val trace_config_incident_report_config_set_destination_class : trace_config_incident_report_config -> string -> unit + (** set field destination_class in trace_config_incident_report_config *) + +val trace_config_incident_report_config_has_privacy_level : trace_config_incident_report_config -> bool + (** presence of field "privacy_level" in [trace_config_incident_report_config] *) + +val trace_config_incident_report_config_set_privacy_level : trace_config_incident_report_config -> int32 -> unit + (** set field privacy_level in trace_config_incident_report_config *) + +val trace_config_incident_report_config_has_skip_incidentd : trace_config_incident_report_config -> bool + (** presence of field "skip_incidentd" in [trace_config_incident_report_config] *) + +val trace_config_incident_report_config_set_skip_incidentd : trace_config_incident_report_config -> bool -> unit + (** set field skip_incidentd in trace_config_incident_report_config *) + +val trace_config_incident_report_config_has_skip_dropbox : trace_config_incident_report_config -> bool + (** presence of field "skip_dropbox" in [trace_config_incident_report_config] *) + +val trace_config_incident_report_config_set_skip_dropbox : trace_config_incident_report_config -> bool -> unit + (** set field skip_dropbox in trace_config_incident_report_config *) + +val make_trace_config_trace_filter_string_filter_rule : + ?policy:trace_config_trace_filter_string_filter_policy -> + ?regex_pattern:string -> + ?atrace_payload_starts_with:string -> + unit -> + trace_config_trace_filter_string_filter_rule +(** [make_trace_config_trace_filter_string_filter_rule … ()] is a builder for type [trace_config_trace_filter_string_filter_rule] *) + +val copy_trace_config_trace_filter_string_filter_rule : trace_config_trace_filter_string_filter_rule -> trace_config_trace_filter_string_filter_rule + +val trace_config_trace_filter_string_filter_rule_has_policy : trace_config_trace_filter_string_filter_rule -> bool + (** presence of field "policy" in [trace_config_trace_filter_string_filter_rule] *) + +val trace_config_trace_filter_string_filter_rule_set_policy : trace_config_trace_filter_string_filter_rule -> trace_config_trace_filter_string_filter_policy -> unit + (** set field policy in trace_config_trace_filter_string_filter_rule *) + +val trace_config_trace_filter_string_filter_rule_has_regex_pattern : trace_config_trace_filter_string_filter_rule -> bool + (** presence of field "regex_pattern" in [trace_config_trace_filter_string_filter_rule] *) + +val trace_config_trace_filter_string_filter_rule_set_regex_pattern : trace_config_trace_filter_string_filter_rule -> string -> unit + (** set field regex_pattern in trace_config_trace_filter_string_filter_rule *) + +val trace_config_trace_filter_string_filter_rule_has_atrace_payload_starts_with : trace_config_trace_filter_string_filter_rule -> bool + (** presence of field "atrace_payload_starts_with" in [trace_config_trace_filter_string_filter_rule] *) + +val trace_config_trace_filter_string_filter_rule_set_atrace_payload_starts_with : trace_config_trace_filter_string_filter_rule -> string -> unit + (** set field atrace_payload_starts_with in trace_config_trace_filter_string_filter_rule *) + +val make_trace_config_trace_filter_string_filter_chain : + ?rules:trace_config_trace_filter_string_filter_rule list -> + unit -> + trace_config_trace_filter_string_filter_chain +(** [make_trace_config_trace_filter_string_filter_chain … ()] is a builder for type [trace_config_trace_filter_string_filter_chain] *) + +val copy_trace_config_trace_filter_string_filter_chain : trace_config_trace_filter_string_filter_chain -> trace_config_trace_filter_string_filter_chain + +val trace_config_trace_filter_string_filter_chain_set_rules : trace_config_trace_filter_string_filter_chain -> trace_config_trace_filter_string_filter_rule list -> unit + (** set field rules in trace_config_trace_filter_string_filter_chain *) + +val make_trace_config_trace_filter : + ?bytecode:bytes -> + ?bytecode_v2:bytes -> + ?string_filter_chain:trace_config_trace_filter_string_filter_chain -> + unit -> + trace_config_trace_filter +(** [make_trace_config_trace_filter … ()] is a builder for type [trace_config_trace_filter] *) + +val copy_trace_config_trace_filter : trace_config_trace_filter -> trace_config_trace_filter + +val trace_config_trace_filter_has_bytecode : trace_config_trace_filter -> bool + (** presence of field "bytecode" in [trace_config_trace_filter] *) + +val trace_config_trace_filter_set_bytecode : trace_config_trace_filter -> bytes -> unit + (** set field bytecode in trace_config_trace_filter *) + +val trace_config_trace_filter_has_bytecode_v2 : trace_config_trace_filter -> bool + (** presence of field "bytecode_v2" in [trace_config_trace_filter] *) + +val trace_config_trace_filter_set_bytecode_v2 : trace_config_trace_filter -> bytes -> unit + (** set field bytecode_v2 in trace_config_trace_filter *) + +val trace_config_trace_filter_set_string_filter_chain : trace_config_trace_filter -> trace_config_trace_filter_string_filter_chain -> unit + (** set field string_filter_chain in trace_config_trace_filter *) + +val make_trace_config_android_report_config : + ?reporter_service_package:string -> + ?reporter_service_class:string -> + ?skip_report:bool -> + ?use_pipe_in_framework_for_testing:bool -> + unit -> + trace_config_android_report_config +(** [make_trace_config_android_report_config … ()] is a builder for type [trace_config_android_report_config] *) + +val copy_trace_config_android_report_config : trace_config_android_report_config -> trace_config_android_report_config + +val trace_config_android_report_config_has_reporter_service_package : trace_config_android_report_config -> bool + (** presence of field "reporter_service_package" in [trace_config_android_report_config] *) + +val trace_config_android_report_config_set_reporter_service_package : trace_config_android_report_config -> string -> unit + (** set field reporter_service_package in trace_config_android_report_config *) + +val trace_config_android_report_config_has_reporter_service_class : trace_config_android_report_config -> bool + (** presence of field "reporter_service_class" in [trace_config_android_report_config] *) + +val trace_config_android_report_config_set_reporter_service_class : trace_config_android_report_config -> string -> unit + (** set field reporter_service_class in trace_config_android_report_config *) + +val trace_config_android_report_config_has_skip_report : trace_config_android_report_config -> bool + (** presence of field "skip_report" in [trace_config_android_report_config] *) + +val trace_config_android_report_config_set_skip_report : trace_config_android_report_config -> bool -> unit + (** set field skip_report in trace_config_android_report_config *) + +val trace_config_android_report_config_has_use_pipe_in_framework_for_testing : trace_config_android_report_config -> bool + (** presence of field "use_pipe_in_framework_for_testing" in [trace_config_android_report_config] *) + +val trace_config_android_report_config_set_use_pipe_in_framework_for_testing : trace_config_android_report_config -> bool -> unit + (** set field use_pipe_in_framework_for_testing in trace_config_android_report_config *) + +val make_trace_config_cmd_trace_start_delay : + ?min_delay_ms:int32 -> + ?max_delay_ms:int32 -> + unit -> + trace_config_cmd_trace_start_delay +(** [make_trace_config_cmd_trace_start_delay … ()] is a builder for type [trace_config_cmd_trace_start_delay] *) + +val copy_trace_config_cmd_trace_start_delay : trace_config_cmd_trace_start_delay -> trace_config_cmd_trace_start_delay + +val trace_config_cmd_trace_start_delay_has_min_delay_ms : trace_config_cmd_trace_start_delay -> bool + (** presence of field "min_delay_ms" in [trace_config_cmd_trace_start_delay] *) + +val trace_config_cmd_trace_start_delay_set_min_delay_ms : trace_config_cmd_trace_start_delay -> int32 -> unit + (** set field min_delay_ms in trace_config_cmd_trace_start_delay *) + +val trace_config_cmd_trace_start_delay_has_max_delay_ms : trace_config_cmd_trace_start_delay -> bool + (** presence of field "max_delay_ms" in [trace_config_cmd_trace_start_delay] *) + +val trace_config_cmd_trace_start_delay_set_max_delay_ms : trace_config_cmd_trace_start_delay -> int32 -> unit + (** set field max_delay_ms in trace_config_cmd_trace_start_delay *) + +val make_trace_config_session_semaphore : + ?name:string -> + ?max_other_session_count:int64 -> + unit -> + trace_config_session_semaphore +(** [make_trace_config_session_semaphore … ()] is a builder for type [trace_config_session_semaphore] *) + +val copy_trace_config_session_semaphore : trace_config_session_semaphore -> trace_config_session_semaphore + +val trace_config_session_semaphore_has_name : trace_config_session_semaphore -> bool + (** presence of field "name" in [trace_config_session_semaphore] *) + +val trace_config_session_semaphore_set_name : trace_config_session_semaphore -> string -> unit + (** set field name in trace_config_session_semaphore *) + +val trace_config_session_semaphore_has_max_other_session_count : trace_config_session_semaphore -> bool + (** presence of field "max_other_session_count" in [trace_config_session_semaphore] *) + +val trace_config_session_semaphore_set_max_other_session_count : trace_config_session_semaphore -> int64 -> unit + (** set field max_other_session_count in trace_config_session_semaphore *) + +val make_trace_config : + ?buffers:trace_config_buffer_config list -> + ?data_sources:trace_config_data_source list -> + ?builtin_data_sources:trace_config_builtin_data_source -> + ?duration_ms:int32 -> + ?prefer_suspend_clock_for_duration:bool -> + ?enable_extra_guardrails:bool -> + ?lockdown_mode:trace_config_lockdown_mode_operation -> + ?producers:trace_config_producer_config list -> + ?statsd_metadata:trace_config_statsd_metadata -> + ?write_into_file:bool -> + ?output_path:string -> + ?file_write_period_ms:int32 -> + ?max_file_size_bytes:int64 -> + ?guardrail_overrides:trace_config_guardrail_overrides -> + ?deferred_start:bool -> + ?flush_period_ms:int32 -> + ?flush_timeout_ms:int32 -> + ?data_source_stop_timeout_ms:int32 -> + ?notify_traceur:bool -> + ?bugreport_score:int32 -> + ?bugreport_filename:string -> + ?trigger_config:trace_config_trigger_config -> + ?activate_triggers:string list -> + ?incremental_state_config:trace_config_incremental_state_config -> + ?allow_user_build_tracing:bool -> + ?unique_session_name:string -> + ?compression_type:trace_config_compression_type -> + ?incident_report_config:trace_config_incident_report_config -> + ?statsd_logging:trace_config_statsd_logging -> + ?trace_uuid_msb:int64 -> + ?trace_uuid_lsb:int64 -> + ?trace_filter:trace_config_trace_filter -> + ?android_report_config:trace_config_android_report_config -> + ?cmd_trace_start_delay:trace_config_cmd_trace_start_delay -> + ?session_semaphores:trace_config_session_semaphore list -> + ?priority_boost:priority_boost_config -> + ?exclusive_prio:int32 -> + ?no_flush_before_write_into_file:bool -> + unit -> + trace_config +(** [make_trace_config … ()] is a builder for type [trace_config] *) + +val copy_trace_config : trace_config -> trace_config + +val trace_config_set_buffers : trace_config -> trace_config_buffer_config list -> unit + (** set field buffers in trace_config *) + +val trace_config_set_data_sources : trace_config -> trace_config_data_source list -> unit + (** set field data_sources in trace_config *) + +val trace_config_set_builtin_data_sources : trace_config -> trace_config_builtin_data_source -> unit + (** set field builtin_data_sources in trace_config *) + +val trace_config_has_duration_ms : trace_config -> bool + (** presence of field "duration_ms" in [trace_config] *) + +val trace_config_set_duration_ms : trace_config -> int32 -> unit + (** set field duration_ms in trace_config *) + +val trace_config_has_prefer_suspend_clock_for_duration : trace_config -> bool + (** presence of field "prefer_suspend_clock_for_duration" in [trace_config] *) + +val trace_config_set_prefer_suspend_clock_for_duration : trace_config -> bool -> unit + (** set field prefer_suspend_clock_for_duration in trace_config *) + +val trace_config_has_enable_extra_guardrails : trace_config -> bool + (** presence of field "enable_extra_guardrails" in [trace_config] *) + +val trace_config_set_enable_extra_guardrails : trace_config -> bool -> unit + (** set field enable_extra_guardrails in trace_config *) + +val trace_config_has_lockdown_mode : trace_config -> bool + (** presence of field "lockdown_mode" in [trace_config] *) + +val trace_config_set_lockdown_mode : trace_config -> trace_config_lockdown_mode_operation -> unit + (** set field lockdown_mode in trace_config *) + +val trace_config_set_producers : trace_config -> trace_config_producer_config list -> unit + (** set field producers in trace_config *) + +val trace_config_set_statsd_metadata : trace_config -> trace_config_statsd_metadata -> unit + (** set field statsd_metadata in trace_config *) + +val trace_config_has_write_into_file : trace_config -> bool + (** presence of field "write_into_file" in [trace_config] *) + +val trace_config_set_write_into_file : trace_config -> bool -> unit + (** set field write_into_file in trace_config *) + +val trace_config_has_output_path : trace_config -> bool + (** presence of field "output_path" in [trace_config] *) + +val trace_config_set_output_path : trace_config -> string -> unit + (** set field output_path in trace_config *) + +val trace_config_has_file_write_period_ms : trace_config -> bool + (** presence of field "file_write_period_ms" in [trace_config] *) + +val trace_config_set_file_write_period_ms : trace_config -> int32 -> unit + (** set field file_write_period_ms in trace_config *) + +val trace_config_has_max_file_size_bytes : trace_config -> bool + (** presence of field "max_file_size_bytes" in [trace_config] *) + +val trace_config_set_max_file_size_bytes : trace_config -> int64 -> unit + (** set field max_file_size_bytes in trace_config *) + +val trace_config_set_guardrail_overrides : trace_config -> trace_config_guardrail_overrides -> unit + (** set field guardrail_overrides in trace_config *) + +val trace_config_has_deferred_start : trace_config -> bool + (** presence of field "deferred_start" in [trace_config] *) + +val trace_config_set_deferred_start : trace_config -> bool -> unit + (** set field deferred_start in trace_config *) + +val trace_config_has_flush_period_ms : trace_config -> bool + (** presence of field "flush_period_ms" in [trace_config] *) + +val trace_config_set_flush_period_ms : trace_config -> int32 -> unit + (** set field flush_period_ms in trace_config *) + +val trace_config_has_flush_timeout_ms : trace_config -> bool + (** presence of field "flush_timeout_ms" in [trace_config] *) + +val trace_config_set_flush_timeout_ms : trace_config -> int32 -> unit + (** set field flush_timeout_ms in trace_config *) + +val trace_config_has_data_source_stop_timeout_ms : trace_config -> bool + (** presence of field "data_source_stop_timeout_ms" in [trace_config] *) + +val trace_config_set_data_source_stop_timeout_ms : trace_config -> int32 -> unit + (** set field data_source_stop_timeout_ms in trace_config *) + +val trace_config_has_notify_traceur : trace_config -> bool + (** presence of field "notify_traceur" in [trace_config] *) + +val trace_config_set_notify_traceur : trace_config -> bool -> unit + (** set field notify_traceur in trace_config *) + +val trace_config_has_bugreport_score : trace_config -> bool + (** presence of field "bugreport_score" in [trace_config] *) + +val trace_config_set_bugreport_score : trace_config -> int32 -> unit + (** set field bugreport_score in trace_config *) + +val trace_config_has_bugreport_filename : trace_config -> bool + (** presence of field "bugreport_filename" in [trace_config] *) + +val trace_config_set_bugreport_filename : trace_config -> string -> unit + (** set field bugreport_filename in trace_config *) + +val trace_config_set_trigger_config : trace_config -> trace_config_trigger_config -> unit + (** set field trigger_config in trace_config *) + +val trace_config_set_activate_triggers : trace_config -> string list -> unit + (** set field activate_triggers in trace_config *) + +val trace_config_set_incremental_state_config : trace_config -> trace_config_incremental_state_config -> unit + (** set field incremental_state_config in trace_config *) + +val trace_config_has_allow_user_build_tracing : trace_config -> bool + (** presence of field "allow_user_build_tracing" in [trace_config] *) + +val trace_config_set_allow_user_build_tracing : trace_config -> bool -> unit + (** set field allow_user_build_tracing in trace_config *) + +val trace_config_has_unique_session_name : trace_config -> bool + (** presence of field "unique_session_name" in [trace_config] *) + +val trace_config_set_unique_session_name : trace_config -> string -> unit + (** set field unique_session_name in trace_config *) + +val trace_config_has_compression_type : trace_config -> bool + (** presence of field "compression_type" in [trace_config] *) + +val trace_config_set_compression_type : trace_config -> trace_config_compression_type -> unit + (** set field compression_type in trace_config *) + +val trace_config_set_incident_report_config : trace_config -> trace_config_incident_report_config -> unit + (** set field incident_report_config in trace_config *) + +val trace_config_has_statsd_logging : trace_config -> bool + (** presence of field "statsd_logging" in [trace_config] *) + +val trace_config_set_statsd_logging : trace_config -> trace_config_statsd_logging -> unit + (** set field statsd_logging in trace_config *) + +val trace_config_has_trace_uuid_msb : trace_config -> bool + (** presence of field "trace_uuid_msb" in [trace_config] *) + +val trace_config_set_trace_uuid_msb : trace_config -> int64 -> unit + (** set field trace_uuid_msb in trace_config *) + +val trace_config_has_trace_uuid_lsb : trace_config -> bool + (** presence of field "trace_uuid_lsb" in [trace_config] *) + +val trace_config_set_trace_uuid_lsb : trace_config -> int64 -> unit + (** set field trace_uuid_lsb in trace_config *) + +val trace_config_set_trace_filter : trace_config -> trace_config_trace_filter -> unit + (** set field trace_filter in trace_config *) + +val trace_config_set_android_report_config : trace_config -> trace_config_android_report_config -> unit + (** set field android_report_config in trace_config *) + +val trace_config_set_cmd_trace_start_delay : trace_config -> trace_config_cmd_trace_start_delay -> unit + (** set field cmd_trace_start_delay in trace_config *) + +val trace_config_set_session_semaphores : trace_config -> trace_config_session_semaphore list -> unit + (** set field session_semaphores in trace_config *) + +val trace_config_set_priority_boost : trace_config -> priority_boost_config -> unit + (** set field priority_boost in trace_config *) + +val trace_config_has_exclusive_prio : trace_config -> bool + (** presence of field "exclusive_prio" in [trace_config] *) + +val trace_config_set_exclusive_prio : trace_config -> int32 -> unit + (** set field exclusive_prio in trace_config *) + +val trace_config_has_no_flush_before_write_into_file : trace_config -> bool + (** presence of field "no_flush_before_write_into_file" in [trace_config] *) + +val trace_config_set_no_flush_before_write_into_file : trace_config -> bool -> unit + (** set field no_flush_before_write_into_file in trace_config *) + +val make_utsname : + ?sysname:string -> + ?version:string -> + ?release:string -> + ?machine:string -> + unit -> + utsname +(** [make_utsname … ()] is a builder for type [utsname] *) + +val copy_utsname : utsname -> utsname + +val utsname_has_sysname : utsname -> bool + (** presence of field "sysname" in [utsname] *) + +val utsname_set_sysname : utsname -> string -> unit + (** set field sysname in utsname *) + +val utsname_has_version : utsname -> bool + (** presence of field "version" in [utsname] *) + +val utsname_set_version : utsname -> string -> unit + (** set field version in utsname *) + +val utsname_has_release : utsname -> bool + (** presence of field "release" in [utsname] *) + +val utsname_set_release : utsname -> string -> unit + (** set field release in utsname *) + +val utsname_has_machine : utsname -> bool + (** presence of field "machine" in [utsname] *) + +val utsname_set_machine : utsname -> string -> unit + (** set field machine in utsname *) + +val make_system_info : + ?utsname:utsname -> + ?android_build_fingerprint:string -> + ?android_device_manufacturer:string -> + ?android_soc_model:string -> + ?android_guest_soc_model:string -> + ?android_hardware_revision:string -> + ?android_storage_model:string -> + ?android_ram_model:string -> + ?android_serial_console:string -> + ?tracing_service_version:string -> + ?android_sdk_version:int64 -> + ?page_size:int32 -> + ?num_cpus:int32 -> + ?timezone_off_mins:int32 -> + ?hz:int64 -> + unit -> + system_info +(** [make_system_info … ()] is a builder for type [system_info] *) + +val copy_system_info : system_info -> system_info + +val system_info_set_utsname : system_info -> utsname -> unit + (** set field utsname in system_info *) + +val system_info_has_android_build_fingerprint : system_info -> bool + (** presence of field "android_build_fingerprint" in [system_info] *) + +val system_info_set_android_build_fingerprint : system_info -> string -> unit + (** set field android_build_fingerprint in system_info *) + +val system_info_has_android_device_manufacturer : system_info -> bool + (** presence of field "android_device_manufacturer" in [system_info] *) + +val system_info_set_android_device_manufacturer : system_info -> string -> unit + (** set field android_device_manufacturer in system_info *) + +val system_info_has_android_soc_model : system_info -> bool + (** presence of field "android_soc_model" in [system_info] *) + +val system_info_set_android_soc_model : system_info -> string -> unit + (** set field android_soc_model in system_info *) + +val system_info_has_android_guest_soc_model : system_info -> bool + (** presence of field "android_guest_soc_model" in [system_info] *) + +val system_info_set_android_guest_soc_model : system_info -> string -> unit + (** set field android_guest_soc_model in system_info *) + +val system_info_has_android_hardware_revision : system_info -> bool + (** presence of field "android_hardware_revision" in [system_info] *) + +val system_info_set_android_hardware_revision : system_info -> string -> unit + (** set field android_hardware_revision in system_info *) + +val system_info_has_android_storage_model : system_info -> bool + (** presence of field "android_storage_model" in [system_info] *) + +val system_info_set_android_storage_model : system_info -> string -> unit + (** set field android_storage_model in system_info *) + +val system_info_has_android_ram_model : system_info -> bool + (** presence of field "android_ram_model" in [system_info] *) + +val system_info_set_android_ram_model : system_info -> string -> unit + (** set field android_ram_model in system_info *) + +val system_info_has_android_serial_console : system_info -> bool + (** presence of field "android_serial_console" in [system_info] *) + +val system_info_set_android_serial_console : system_info -> string -> unit + (** set field android_serial_console in system_info *) + +val system_info_has_tracing_service_version : system_info -> bool + (** presence of field "tracing_service_version" in [system_info] *) + +val system_info_set_tracing_service_version : system_info -> string -> unit + (** set field tracing_service_version in system_info *) + +val system_info_has_android_sdk_version : system_info -> bool + (** presence of field "android_sdk_version" in [system_info] *) + +val system_info_set_android_sdk_version : system_info -> int64 -> unit + (** set field android_sdk_version in system_info *) + +val system_info_has_page_size : system_info -> bool + (** presence of field "page_size" in [system_info] *) + +val system_info_set_page_size : system_info -> int32 -> unit + (** set field page_size in system_info *) + +val system_info_has_num_cpus : system_info -> bool + (** presence of field "num_cpus" in [system_info] *) + +val system_info_set_num_cpus : system_info -> int32 -> unit + (** set field num_cpus in system_info *) + +val system_info_has_timezone_off_mins : system_info -> bool + (** presence of field "timezone_off_mins" in [system_info] *) + +val system_info_set_timezone_off_mins : system_info -> int32 -> unit + (** set field timezone_off_mins in system_info *) + +val system_info_has_hz : system_info -> bool + (** presence of field "hz" in [system_info] *) + +val system_info_set_hz : system_info -> int64 -> unit + (** set field hz in system_info *) + +val make_trace_stats_buffer_stats : + ?buffer_size:int64 -> + ?bytes_written:int64 -> + ?bytes_overwritten:int64 -> + ?bytes_read:int64 -> + ?padding_bytes_written:int64 -> + ?padding_bytes_cleared:int64 -> + ?chunks_written:int64 -> + ?chunks_rewritten:int64 -> + ?chunks_overwritten:int64 -> + ?chunks_discarded:int64 -> + ?chunks_read:int64 -> + ?chunks_committed_out_of_order:int64 -> + ?write_wrap_count:int64 -> + ?patches_succeeded:int64 -> + ?patches_failed:int64 -> + ?readaheads_succeeded:int64 -> + ?readaheads_failed:int64 -> + ?abi_violations:int64 -> + ?trace_writer_packet_loss:int64 -> + unit -> + trace_stats_buffer_stats +(** [make_trace_stats_buffer_stats … ()] is a builder for type [trace_stats_buffer_stats] *) + +val copy_trace_stats_buffer_stats : trace_stats_buffer_stats -> trace_stats_buffer_stats + +val trace_stats_buffer_stats_has_buffer_size : trace_stats_buffer_stats -> bool + (** presence of field "buffer_size" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_buffer_size : trace_stats_buffer_stats -> int64 -> unit + (** set field buffer_size in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_bytes_written : trace_stats_buffer_stats -> bool + (** presence of field "bytes_written" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_bytes_written : trace_stats_buffer_stats -> int64 -> unit + (** set field bytes_written in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_bytes_overwritten : trace_stats_buffer_stats -> bool + (** presence of field "bytes_overwritten" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_bytes_overwritten : trace_stats_buffer_stats -> int64 -> unit + (** set field bytes_overwritten in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_bytes_read : trace_stats_buffer_stats -> bool + (** presence of field "bytes_read" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_bytes_read : trace_stats_buffer_stats -> int64 -> unit + (** set field bytes_read in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_padding_bytes_written : trace_stats_buffer_stats -> bool + (** presence of field "padding_bytes_written" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_padding_bytes_written : trace_stats_buffer_stats -> int64 -> unit + (** set field padding_bytes_written in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_padding_bytes_cleared : trace_stats_buffer_stats -> bool + (** presence of field "padding_bytes_cleared" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_padding_bytes_cleared : trace_stats_buffer_stats -> int64 -> unit + (** set field padding_bytes_cleared in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_chunks_written : trace_stats_buffer_stats -> bool + (** presence of field "chunks_written" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_chunks_written : trace_stats_buffer_stats -> int64 -> unit + (** set field chunks_written in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_chunks_rewritten : trace_stats_buffer_stats -> bool + (** presence of field "chunks_rewritten" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_chunks_rewritten : trace_stats_buffer_stats -> int64 -> unit + (** set field chunks_rewritten in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_chunks_overwritten : trace_stats_buffer_stats -> bool + (** presence of field "chunks_overwritten" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_chunks_overwritten : trace_stats_buffer_stats -> int64 -> unit + (** set field chunks_overwritten in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_chunks_discarded : trace_stats_buffer_stats -> bool + (** presence of field "chunks_discarded" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_chunks_discarded : trace_stats_buffer_stats -> int64 -> unit + (** set field chunks_discarded in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_chunks_read : trace_stats_buffer_stats -> bool + (** presence of field "chunks_read" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_chunks_read : trace_stats_buffer_stats -> int64 -> unit + (** set field chunks_read in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_chunks_committed_out_of_order : trace_stats_buffer_stats -> bool + (** presence of field "chunks_committed_out_of_order" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_chunks_committed_out_of_order : trace_stats_buffer_stats -> int64 -> unit + (** set field chunks_committed_out_of_order in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_write_wrap_count : trace_stats_buffer_stats -> bool + (** presence of field "write_wrap_count" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_write_wrap_count : trace_stats_buffer_stats -> int64 -> unit + (** set field write_wrap_count in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_patches_succeeded : trace_stats_buffer_stats -> bool + (** presence of field "patches_succeeded" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_patches_succeeded : trace_stats_buffer_stats -> int64 -> unit + (** set field patches_succeeded in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_patches_failed : trace_stats_buffer_stats -> bool + (** presence of field "patches_failed" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_patches_failed : trace_stats_buffer_stats -> int64 -> unit + (** set field patches_failed in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_readaheads_succeeded : trace_stats_buffer_stats -> bool + (** presence of field "readaheads_succeeded" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_readaheads_succeeded : trace_stats_buffer_stats -> int64 -> unit + (** set field readaheads_succeeded in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_readaheads_failed : trace_stats_buffer_stats -> bool + (** presence of field "readaheads_failed" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_readaheads_failed : trace_stats_buffer_stats -> int64 -> unit + (** set field readaheads_failed in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_abi_violations : trace_stats_buffer_stats -> bool + (** presence of field "abi_violations" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_abi_violations : trace_stats_buffer_stats -> int64 -> unit + (** set field abi_violations in trace_stats_buffer_stats *) + +val trace_stats_buffer_stats_has_trace_writer_packet_loss : trace_stats_buffer_stats -> bool + (** presence of field "trace_writer_packet_loss" in [trace_stats_buffer_stats] *) + +val trace_stats_buffer_stats_set_trace_writer_packet_loss : trace_stats_buffer_stats -> int64 -> unit + (** set field trace_writer_packet_loss in trace_stats_buffer_stats *) + +val make_trace_stats_writer_stats : + ?sequence_id:int64 -> + ?buffer:int32 -> + ?chunk_payload_histogram_counts:int64 list -> + ?chunk_payload_histogram_sum:int64 list -> + unit -> + trace_stats_writer_stats +(** [make_trace_stats_writer_stats … ()] is a builder for type [trace_stats_writer_stats] *) + +val copy_trace_stats_writer_stats : trace_stats_writer_stats -> trace_stats_writer_stats + +val trace_stats_writer_stats_has_sequence_id : trace_stats_writer_stats -> bool + (** presence of field "sequence_id" in [trace_stats_writer_stats] *) + +val trace_stats_writer_stats_set_sequence_id : trace_stats_writer_stats -> int64 -> unit + (** set field sequence_id in trace_stats_writer_stats *) + +val trace_stats_writer_stats_has_buffer : trace_stats_writer_stats -> bool + (** presence of field "buffer" in [trace_stats_writer_stats] *) + +val trace_stats_writer_stats_set_buffer : trace_stats_writer_stats -> int32 -> unit + (** set field buffer in trace_stats_writer_stats *) + +val trace_stats_writer_stats_set_chunk_payload_histogram_counts : trace_stats_writer_stats -> int64 list -> unit + (** set field chunk_payload_histogram_counts in trace_stats_writer_stats *) + +val trace_stats_writer_stats_set_chunk_payload_histogram_sum : trace_stats_writer_stats -> int64 list -> unit + (** set field chunk_payload_histogram_sum in trace_stats_writer_stats *) + +val make_trace_stats_filter_stats : + ?input_packets:int64 -> + ?input_bytes:int64 -> + ?output_bytes:int64 -> + ?errors:int64 -> + ?time_taken_ns:int64 -> + ?bytes_discarded_per_buffer:int64 list -> + unit -> + trace_stats_filter_stats +(** [make_trace_stats_filter_stats … ()] is a builder for type [trace_stats_filter_stats] *) + +val copy_trace_stats_filter_stats : trace_stats_filter_stats -> trace_stats_filter_stats + +val trace_stats_filter_stats_has_input_packets : trace_stats_filter_stats -> bool + (** presence of field "input_packets" in [trace_stats_filter_stats] *) + +val trace_stats_filter_stats_set_input_packets : trace_stats_filter_stats -> int64 -> unit + (** set field input_packets in trace_stats_filter_stats *) + +val trace_stats_filter_stats_has_input_bytes : trace_stats_filter_stats -> bool + (** presence of field "input_bytes" in [trace_stats_filter_stats] *) + +val trace_stats_filter_stats_set_input_bytes : trace_stats_filter_stats -> int64 -> unit + (** set field input_bytes in trace_stats_filter_stats *) + +val trace_stats_filter_stats_has_output_bytes : trace_stats_filter_stats -> bool + (** presence of field "output_bytes" in [trace_stats_filter_stats] *) + +val trace_stats_filter_stats_set_output_bytes : trace_stats_filter_stats -> int64 -> unit + (** set field output_bytes in trace_stats_filter_stats *) + +val trace_stats_filter_stats_has_errors : trace_stats_filter_stats -> bool + (** presence of field "errors" in [trace_stats_filter_stats] *) + +val trace_stats_filter_stats_set_errors : trace_stats_filter_stats -> int64 -> unit + (** set field errors in trace_stats_filter_stats *) + +val trace_stats_filter_stats_has_time_taken_ns : trace_stats_filter_stats -> bool + (** presence of field "time_taken_ns" in [trace_stats_filter_stats] *) + +val trace_stats_filter_stats_set_time_taken_ns : trace_stats_filter_stats -> int64 -> unit + (** set field time_taken_ns in trace_stats_filter_stats *) + +val trace_stats_filter_stats_set_bytes_discarded_per_buffer : trace_stats_filter_stats -> int64 list -> unit + (** set field bytes_discarded_per_buffer in trace_stats_filter_stats *) + +val make_trace_stats : + ?buffer_stats:trace_stats_buffer_stats list -> + ?chunk_payload_histogram_def:int64 list -> + ?writer_stats:trace_stats_writer_stats list -> + ?producers_connected:int32 -> + ?producers_seen:int64 -> + ?data_sources_registered:int32 -> + ?data_sources_seen:int64 -> + ?tracing_sessions:int32 -> + ?total_buffers:int32 -> + ?chunks_discarded:int64 -> + ?patches_discarded:int64 -> + ?invalid_packets:int64 -> + ?filter_stats:trace_stats_filter_stats -> + ?flushes_requested:int64 -> + ?flushes_succeeded:int64 -> + ?flushes_failed:int64 -> + ?final_flush_outcome:trace_stats_final_flush_outcome -> + unit -> + trace_stats +(** [make_trace_stats … ()] is a builder for type [trace_stats] *) + +val copy_trace_stats : trace_stats -> trace_stats + +val trace_stats_set_buffer_stats : trace_stats -> trace_stats_buffer_stats list -> unit + (** set field buffer_stats in trace_stats *) + +val trace_stats_set_chunk_payload_histogram_def : trace_stats -> int64 list -> unit + (** set field chunk_payload_histogram_def in trace_stats *) + +val trace_stats_set_writer_stats : trace_stats -> trace_stats_writer_stats list -> unit + (** set field writer_stats in trace_stats *) + +val trace_stats_has_producers_connected : trace_stats -> bool + (** presence of field "producers_connected" in [trace_stats] *) + +val trace_stats_set_producers_connected : trace_stats -> int32 -> unit + (** set field producers_connected in trace_stats *) + +val trace_stats_has_producers_seen : trace_stats -> bool + (** presence of field "producers_seen" in [trace_stats] *) + +val trace_stats_set_producers_seen : trace_stats -> int64 -> unit + (** set field producers_seen in trace_stats *) + +val trace_stats_has_data_sources_registered : trace_stats -> bool + (** presence of field "data_sources_registered" in [trace_stats] *) + +val trace_stats_set_data_sources_registered : trace_stats -> int32 -> unit + (** set field data_sources_registered in trace_stats *) + +val trace_stats_has_data_sources_seen : trace_stats -> bool + (** presence of field "data_sources_seen" in [trace_stats] *) + +val trace_stats_set_data_sources_seen : trace_stats -> int64 -> unit + (** set field data_sources_seen in trace_stats *) + +val trace_stats_has_tracing_sessions : trace_stats -> bool + (** presence of field "tracing_sessions" in [trace_stats] *) + +val trace_stats_set_tracing_sessions : trace_stats -> int32 -> unit + (** set field tracing_sessions in trace_stats *) + +val trace_stats_has_total_buffers : trace_stats -> bool + (** presence of field "total_buffers" in [trace_stats] *) + +val trace_stats_set_total_buffers : trace_stats -> int32 -> unit + (** set field total_buffers in trace_stats *) + +val trace_stats_has_chunks_discarded : trace_stats -> bool + (** presence of field "chunks_discarded" in [trace_stats] *) + +val trace_stats_set_chunks_discarded : trace_stats -> int64 -> unit + (** set field chunks_discarded in trace_stats *) + +val trace_stats_has_patches_discarded : trace_stats -> bool + (** presence of field "patches_discarded" in [trace_stats] *) + +val trace_stats_set_patches_discarded : trace_stats -> int64 -> unit + (** set field patches_discarded in trace_stats *) + +val trace_stats_has_invalid_packets : trace_stats -> bool + (** presence of field "invalid_packets" in [trace_stats] *) + +val trace_stats_set_invalid_packets : trace_stats -> int64 -> unit + (** set field invalid_packets in trace_stats *) + +val trace_stats_set_filter_stats : trace_stats -> trace_stats_filter_stats -> unit + (** set field filter_stats in trace_stats *) + +val trace_stats_has_flushes_requested : trace_stats -> bool + (** presence of field "flushes_requested" in [trace_stats] *) + +val trace_stats_set_flushes_requested : trace_stats -> int64 -> unit + (** set field flushes_requested in trace_stats *) + +val trace_stats_has_flushes_succeeded : trace_stats -> bool + (** presence of field "flushes_succeeded" in [trace_stats] *) + +val trace_stats_set_flushes_succeeded : trace_stats -> int64 -> unit + (** set field flushes_succeeded in trace_stats *) + +val trace_stats_has_flushes_failed : trace_stats -> bool + (** presence of field "flushes_failed" in [trace_stats] *) + +val trace_stats_set_flushes_failed : trace_stats -> int64 -> unit + (** set field flushes_failed in trace_stats *) + +val trace_stats_has_final_flush_outcome : trace_stats -> bool + (** presence of field "final_flush_outcome" in [trace_stats] *) + +val trace_stats_set_final_flush_outcome : trace_stats -> trace_stats_final_flush_outcome -> unit + (** set field final_flush_outcome in trace_stats *) + +val make_android_game_intervention_list_game_mode_info : + ?mode:int32 -> + ?use_angle:bool -> + ?resolution_downscale:float -> + ?fps:float -> + unit -> + android_game_intervention_list_game_mode_info +(** [make_android_game_intervention_list_game_mode_info … ()] is a builder for type [android_game_intervention_list_game_mode_info] *) + +val copy_android_game_intervention_list_game_mode_info : android_game_intervention_list_game_mode_info -> android_game_intervention_list_game_mode_info + +val android_game_intervention_list_game_mode_info_has_mode : android_game_intervention_list_game_mode_info -> bool + (** presence of field "mode" in [android_game_intervention_list_game_mode_info] *) + +val android_game_intervention_list_game_mode_info_set_mode : android_game_intervention_list_game_mode_info -> int32 -> unit + (** set field mode in android_game_intervention_list_game_mode_info *) + +val android_game_intervention_list_game_mode_info_has_use_angle : android_game_intervention_list_game_mode_info -> bool + (** presence of field "use_angle" in [android_game_intervention_list_game_mode_info] *) + +val android_game_intervention_list_game_mode_info_set_use_angle : android_game_intervention_list_game_mode_info -> bool -> unit + (** set field use_angle in android_game_intervention_list_game_mode_info *) + +val android_game_intervention_list_game_mode_info_has_resolution_downscale : android_game_intervention_list_game_mode_info -> bool + (** presence of field "resolution_downscale" in [android_game_intervention_list_game_mode_info] *) + +val android_game_intervention_list_game_mode_info_set_resolution_downscale : android_game_intervention_list_game_mode_info -> float -> unit + (** set field resolution_downscale in android_game_intervention_list_game_mode_info *) + +val android_game_intervention_list_game_mode_info_has_fps : android_game_intervention_list_game_mode_info -> bool + (** presence of field "fps" in [android_game_intervention_list_game_mode_info] *) + +val android_game_intervention_list_game_mode_info_set_fps : android_game_intervention_list_game_mode_info -> float -> unit + (** set field fps in android_game_intervention_list_game_mode_info *) + +val make_android_game_intervention_list_game_package_info : + ?name:string -> + ?uid:int64 -> + ?current_mode:int32 -> + ?game_mode_info:android_game_intervention_list_game_mode_info list -> + unit -> + android_game_intervention_list_game_package_info +(** [make_android_game_intervention_list_game_package_info … ()] is a builder for type [android_game_intervention_list_game_package_info] *) + +val copy_android_game_intervention_list_game_package_info : android_game_intervention_list_game_package_info -> android_game_intervention_list_game_package_info + +val android_game_intervention_list_game_package_info_has_name : android_game_intervention_list_game_package_info -> bool + (** presence of field "name" in [android_game_intervention_list_game_package_info] *) + +val android_game_intervention_list_game_package_info_set_name : android_game_intervention_list_game_package_info -> string -> unit + (** set field name in android_game_intervention_list_game_package_info *) + +val android_game_intervention_list_game_package_info_has_uid : android_game_intervention_list_game_package_info -> bool + (** presence of field "uid" in [android_game_intervention_list_game_package_info] *) + +val android_game_intervention_list_game_package_info_set_uid : android_game_intervention_list_game_package_info -> int64 -> unit + (** set field uid in android_game_intervention_list_game_package_info *) + +val android_game_intervention_list_game_package_info_has_current_mode : android_game_intervention_list_game_package_info -> bool + (** presence of field "current_mode" in [android_game_intervention_list_game_package_info] *) + +val android_game_intervention_list_game_package_info_set_current_mode : android_game_intervention_list_game_package_info -> int32 -> unit + (** set field current_mode in android_game_intervention_list_game_package_info *) + +val android_game_intervention_list_game_package_info_set_game_mode_info : android_game_intervention_list_game_package_info -> android_game_intervention_list_game_mode_info list -> unit + (** set field game_mode_info in android_game_intervention_list_game_package_info *) + +val make_android_game_intervention_list : + ?game_packages:android_game_intervention_list_game_package_info list -> + ?parse_error:bool -> + ?read_error:bool -> + unit -> + android_game_intervention_list +(** [make_android_game_intervention_list … ()] is a builder for type [android_game_intervention_list] *) + +val copy_android_game_intervention_list : android_game_intervention_list -> android_game_intervention_list + +val android_game_intervention_list_set_game_packages : android_game_intervention_list -> android_game_intervention_list_game_package_info list -> unit + (** set field game_packages in android_game_intervention_list *) + +val android_game_intervention_list_has_parse_error : android_game_intervention_list -> bool + (** presence of field "parse_error" in [android_game_intervention_list] *) + +val android_game_intervention_list_set_parse_error : android_game_intervention_list -> bool -> unit + (** set field parse_error in android_game_intervention_list *) + +val android_game_intervention_list_has_read_error : android_game_intervention_list -> bool + (** presence of field "read_error" in [android_game_intervention_list] *) + +val android_game_intervention_list_set_read_error : android_game_intervention_list -> bool -> unit + (** set field read_error in android_game_intervention_list *) + +val make_android_log_packet_log_event_arg : + ?name:string -> + ?value:android_log_packet_log_event_arg_value -> + unit -> + android_log_packet_log_event_arg +(** [make_android_log_packet_log_event_arg … ()] is a builder for type [android_log_packet_log_event_arg] *) + +val copy_android_log_packet_log_event_arg : android_log_packet_log_event_arg -> android_log_packet_log_event_arg + +val android_log_packet_log_event_arg_has_name : android_log_packet_log_event_arg -> bool + (** presence of field "name" in [android_log_packet_log_event_arg] *) + +val android_log_packet_log_event_arg_set_name : android_log_packet_log_event_arg -> string -> unit + (** set field name in android_log_packet_log_event_arg *) + +val android_log_packet_log_event_arg_set_value : android_log_packet_log_event_arg -> android_log_packet_log_event_arg_value -> unit + (** set field value in android_log_packet_log_event_arg *) + +val make_android_log_packet_log_event : + ?log_id:android_log_id -> + ?pid:int32 -> + ?tid:int32 -> + ?uid:int32 -> + ?timestamp:int64 -> + ?tag:string -> + ?prio:android_log_priority -> + ?message:string -> + ?args:android_log_packet_log_event_arg list -> + unit -> + android_log_packet_log_event +(** [make_android_log_packet_log_event … ()] is a builder for type [android_log_packet_log_event] *) + +val copy_android_log_packet_log_event : android_log_packet_log_event -> android_log_packet_log_event + +val android_log_packet_log_event_has_log_id : android_log_packet_log_event -> bool + (** presence of field "log_id" in [android_log_packet_log_event] *) + +val android_log_packet_log_event_set_log_id : android_log_packet_log_event -> android_log_id -> unit + (** set field log_id in android_log_packet_log_event *) + +val android_log_packet_log_event_has_pid : android_log_packet_log_event -> bool + (** presence of field "pid" in [android_log_packet_log_event] *) + +val android_log_packet_log_event_set_pid : android_log_packet_log_event -> int32 -> unit + (** set field pid in android_log_packet_log_event *) + +val android_log_packet_log_event_has_tid : android_log_packet_log_event -> bool + (** presence of field "tid" in [android_log_packet_log_event] *) + +val android_log_packet_log_event_set_tid : android_log_packet_log_event -> int32 -> unit + (** set field tid in android_log_packet_log_event *) + +val android_log_packet_log_event_has_uid : android_log_packet_log_event -> bool + (** presence of field "uid" in [android_log_packet_log_event] *) + +val android_log_packet_log_event_set_uid : android_log_packet_log_event -> int32 -> unit + (** set field uid in android_log_packet_log_event *) + +val android_log_packet_log_event_has_timestamp : android_log_packet_log_event -> bool + (** presence of field "timestamp" in [android_log_packet_log_event] *) + +val android_log_packet_log_event_set_timestamp : android_log_packet_log_event -> int64 -> unit + (** set field timestamp in android_log_packet_log_event *) + +val android_log_packet_log_event_has_tag : android_log_packet_log_event -> bool + (** presence of field "tag" in [android_log_packet_log_event] *) + +val android_log_packet_log_event_set_tag : android_log_packet_log_event -> string -> unit + (** set field tag in android_log_packet_log_event *) + +val android_log_packet_log_event_has_prio : android_log_packet_log_event -> bool + (** presence of field "prio" in [android_log_packet_log_event] *) + +val android_log_packet_log_event_set_prio : android_log_packet_log_event -> android_log_priority -> unit + (** set field prio in android_log_packet_log_event *) + +val android_log_packet_log_event_has_message : android_log_packet_log_event -> bool + (** presence of field "message" in [android_log_packet_log_event] *) + +val android_log_packet_log_event_set_message : android_log_packet_log_event -> string -> unit + (** set field message in android_log_packet_log_event *) + +val android_log_packet_log_event_set_args : android_log_packet_log_event -> android_log_packet_log_event_arg list -> unit + (** set field args in android_log_packet_log_event *) + +val make_android_log_packet_stats : + ?num_total:int64 -> + ?num_failed:int64 -> + ?num_skipped:int64 -> + unit -> + android_log_packet_stats +(** [make_android_log_packet_stats … ()] is a builder for type [android_log_packet_stats] *) + +val copy_android_log_packet_stats : android_log_packet_stats -> android_log_packet_stats + +val android_log_packet_stats_has_num_total : android_log_packet_stats -> bool + (** presence of field "num_total" in [android_log_packet_stats] *) + +val android_log_packet_stats_set_num_total : android_log_packet_stats -> int64 -> unit + (** set field num_total in android_log_packet_stats *) + +val android_log_packet_stats_has_num_failed : android_log_packet_stats -> bool + (** presence of field "num_failed" in [android_log_packet_stats] *) + +val android_log_packet_stats_set_num_failed : android_log_packet_stats -> int64 -> unit + (** set field num_failed in android_log_packet_stats *) + +val android_log_packet_stats_has_num_skipped : android_log_packet_stats -> bool + (** presence of field "num_skipped" in [android_log_packet_stats] *) + +val android_log_packet_stats_set_num_skipped : android_log_packet_stats -> int64 -> unit + (** set field num_skipped in android_log_packet_stats *) + +val make_android_log_packet : + ?events:android_log_packet_log_event list -> + ?stats:android_log_packet_stats -> + unit -> + android_log_packet +(** [make_android_log_packet … ()] is a builder for type [android_log_packet] *) + +val copy_android_log_packet : android_log_packet -> android_log_packet + +val android_log_packet_set_events : android_log_packet -> android_log_packet_log_event list -> unit + (** set field events in android_log_packet *) + +val android_log_packet_set_stats : android_log_packet -> android_log_packet_stats -> unit + (** set field stats in android_log_packet *) + +val make_android_system_property_property_value : + ?name:string -> + ?value:string -> + unit -> + android_system_property_property_value +(** [make_android_system_property_property_value … ()] is a builder for type [android_system_property_property_value] *) + +val copy_android_system_property_property_value : android_system_property_property_value -> android_system_property_property_value + +val android_system_property_property_value_has_name : android_system_property_property_value -> bool + (** presence of field "name" in [android_system_property_property_value] *) + +val android_system_property_property_value_set_name : android_system_property_property_value -> string -> unit + (** set field name in android_system_property_property_value *) + +val android_system_property_property_value_has_value : android_system_property_property_value -> bool + (** presence of field "value" in [android_system_property_property_value] *) + +val android_system_property_property_value_set_value : android_system_property_property_value -> string -> unit + (** set field value in android_system_property_property_value *) + +val make_android_system_property : + ?values:android_system_property_property_value list -> + unit -> + android_system_property +(** [make_android_system_property … ()] is a builder for type [android_system_property] *) + +val copy_android_system_property : android_system_property -> android_system_property + +val android_system_property_set_values : android_system_property -> android_system_property_property_value list -> unit + (** set field values in android_system_property *) + +val make_app_wakelock_info : + ?iid:int32 -> + ?tag:string -> + ?flags:int32 -> + ?owner_pid:int32 -> + ?owner_uid:int32 -> + ?work_uid:int32 -> + unit -> + app_wakelock_info +(** [make_app_wakelock_info … ()] is a builder for type [app_wakelock_info] *) + +val copy_app_wakelock_info : app_wakelock_info -> app_wakelock_info + +val app_wakelock_info_has_iid : app_wakelock_info -> bool + (** presence of field "iid" in [app_wakelock_info] *) + +val app_wakelock_info_set_iid : app_wakelock_info -> int32 -> unit + (** set field iid in app_wakelock_info *) + +val app_wakelock_info_has_tag : app_wakelock_info -> bool + (** presence of field "tag" in [app_wakelock_info] *) + +val app_wakelock_info_set_tag : app_wakelock_info -> string -> unit + (** set field tag in app_wakelock_info *) + +val app_wakelock_info_has_flags : app_wakelock_info -> bool + (** presence of field "flags" in [app_wakelock_info] *) + +val app_wakelock_info_set_flags : app_wakelock_info -> int32 -> unit + (** set field flags in app_wakelock_info *) + +val app_wakelock_info_has_owner_pid : app_wakelock_info -> bool + (** presence of field "owner_pid" in [app_wakelock_info] *) + +val app_wakelock_info_set_owner_pid : app_wakelock_info -> int32 -> unit + (** set field owner_pid in app_wakelock_info *) + +val app_wakelock_info_has_owner_uid : app_wakelock_info -> bool + (** presence of field "owner_uid" in [app_wakelock_info] *) + +val app_wakelock_info_set_owner_uid : app_wakelock_info -> int32 -> unit + (** set field owner_uid in app_wakelock_info *) + +val app_wakelock_info_has_work_uid : app_wakelock_info -> bool + (** presence of field "work_uid" in [app_wakelock_info] *) + +val app_wakelock_info_set_work_uid : app_wakelock_info -> int32 -> unit + (** set field work_uid in app_wakelock_info *) + +val make_app_wakelock_bundle : + ?intern_id:int32 list -> + ?encoded_ts:int64 list -> + ?info:app_wakelock_info -> + ?acquired:bool -> + unit -> + app_wakelock_bundle +(** [make_app_wakelock_bundle … ()] is a builder for type [app_wakelock_bundle] *) + +val copy_app_wakelock_bundle : app_wakelock_bundle -> app_wakelock_bundle + +val app_wakelock_bundle_set_intern_id : app_wakelock_bundle -> int32 list -> unit + (** set field intern_id in app_wakelock_bundle *) + +val app_wakelock_bundle_set_encoded_ts : app_wakelock_bundle -> int64 list -> unit + (** set field encoded_ts in app_wakelock_bundle *) + +val app_wakelock_bundle_set_info : app_wakelock_bundle -> app_wakelock_info -> unit + (** set field info in app_wakelock_bundle *) + +val app_wakelock_bundle_has_acquired : app_wakelock_bundle -> bool + (** presence of field "acquired" in [app_wakelock_bundle] *) + +val app_wakelock_bundle_set_acquired : app_wakelock_bundle -> bool -> unit + (** set field acquired in app_wakelock_bundle *) + +val make_bluetooth_trace_event : + ?packet_type:bluetooth_trace_packet_type -> + ?count:int32 -> + ?length:int32 -> + ?duration:int32 -> + ?op_code:int32 -> + ?event_code:int32 -> + ?subevent_code:int32 -> + ?connection_handle:int32 -> + unit -> + bluetooth_trace_event +(** [make_bluetooth_trace_event … ()] is a builder for type [bluetooth_trace_event] *) + +val copy_bluetooth_trace_event : bluetooth_trace_event -> bluetooth_trace_event + +val bluetooth_trace_event_has_packet_type : bluetooth_trace_event -> bool + (** presence of field "packet_type" in [bluetooth_trace_event] *) + +val bluetooth_trace_event_set_packet_type : bluetooth_trace_event -> bluetooth_trace_packet_type -> unit + (** set field packet_type in bluetooth_trace_event *) + +val bluetooth_trace_event_has_count : bluetooth_trace_event -> bool + (** presence of field "count" in [bluetooth_trace_event] *) + +val bluetooth_trace_event_set_count : bluetooth_trace_event -> int32 -> unit + (** set field count in bluetooth_trace_event *) + +val bluetooth_trace_event_has_length : bluetooth_trace_event -> bool + (** presence of field "length" in [bluetooth_trace_event] *) + +val bluetooth_trace_event_set_length : bluetooth_trace_event -> int32 -> unit + (** set field length in bluetooth_trace_event *) + +val bluetooth_trace_event_has_duration : bluetooth_trace_event -> bool + (** presence of field "duration" in [bluetooth_trace_event] *) + +val bluetooth_trace_event_set_duration : bluetooth_trace_event -> int32 -> unit + (** set field duration in bluetooth_trace_event *) + +val bluetooth_trace_event_has_op_code : bluetooth_trace_event -> bool + (** presence of field "op_code" in [bluetooth_trace_event] *) + +val bluetooth_trace_event_set_op_code : bluetooth_trace_event -> int32 -> unit + (** set field op_code in bluetooth_trace_event *) + +val bluetooth_trace_event_has_event_code : bluetooth_trace_event -> bool + (** presence of field "event_code" in [bluetooth_trace_event] *) + +val bluetooth_trace_event_set_event_code : bluetooth_trace_event -> int32 -> unit + (** set field event_code in bluetooth_trace_event *) + +val bluetooth_trace_event_has_subevent_code : bluetooth_trace_event -> bool + (** presence of field "subevent_code" in [bluetooth_trace_event] *) + +val bluetooth_trace_event_set_subevent_code : bluetooth_trace_event -> int32 -> unit + (** set field subevent_code in bluetooth_trace_event *) + +val bluetooth_trace_event_has_connection_handle : bluetooth_trace_event -> bool + (** presence of field "connection_handle" in [bluetooth_trace_event] *) + +val bluetooth_trace_event_set_connection_handle : bluetooth_trace_event -> int32 -> unit + (** set field connection_handle in bluetooth_trace_event *) + +val make_android_camera_frame_event_camera_node_processing_details : + ?node_id:int64 -> + ?start_processing_ns:int64 -> + ?end_processing_ns:int64 -> + ?scheduling_latency_ns:int64 -> + unit -> + android_camera_frame_event_camera_node_processing_details +(** [make_android_camera_frame_event_camera_node_processing_details … ()] is a builder for type [android_camera_frame_event_camera_node_processing_details] *) + +val copy_android_camera_frame_event_camera_node_processing_details : android_camera_frame_event_camera_node_processing_details -> android_camera_frame_event_camera_node_processing_details + +val android_camera_frame_event_camera_node_processing_details_has_node_id : android_camera_frame_event_camera_node_processing_details -> bool + (** presence of field "node_id" in [android_camera_frame_event_camera_node_processing_details] *) + +val android_camera_frame_event_camera_node_processing_details_set_node_id : android_camera_frame_event_camera_node_processing_details -> int64 -> unit + (** set field node_id in android_camera_frame_event_camera_node_processing_details *) + +val android_camera_frame_event_camera_node_processing_details_has_start_processing_ns : android_camera_frame_event_camera_node_processing_details -> bool + (** presence of field "start_processing_ns" in [android_camera_frame_event_camera_node_processing_details] *) + +val android_camera_frame_event_camera_node_processing_details_set_start_processing_ns : android_camera_frame_event_camera_node_processing_details -> int64 -> unit + (** set field start_processing_ns in android_camera_frame_event_camera_node_processing_details *) + +val android_camera_frame_event_camera_node_processing_details_has_end_processing_ns : android_camera_frame_event_camera_node_processing_details -> bool + (** presence of field "end_processing_ns" in [android_camera_frame_event_camera_node_processing_details] *) + +val android_camera_frame_event_camera_node_processing_details_set_end_processing_ns : android_camera_frame_event_camera_node_processing_details -> int64 -> unit + (** set field end_processing_ns in android_camera_frame_event_camera_node_processing_details *) + +val android_camera_frame_event_camera_node_processing_details_has_scheduling_latency_ns : android_camera_frame_event_camera_node_processing_details -> bool + (** presence of field "scheduling_latency_ns" in [android_camera_frame_event_camera_node_processing_details] *) + +val android_camera_frame_event_camera_node_processing_details_set_scheduling_latency_ns : android_camera_frame_event_camera_node_processing_details -> int64 -> unit + (** set field scheduling_latency_ns in android_camera_frame_event_camera_node_processing_details *) + +val make_android_camera_frame_event : + ?session_id:int64 -> + ?camera_id:int32 -> + ?frame_number:int64 -> + ?request_id:int64 -> + ?request_received_ns:int64 -> + ?request_processing_started_ns:int64 -> + ?start_of_exposure_ns:int64 -> + ?start_of_frame_ns:int64 -> + ?responses_all_sent_ns:int64 -> + ?capture_result_status:android_camera_frame_event_capture_result_status -> + ?skipped_sensor_frames:int32 -> + ?capture_intent:int32 -> + ?num_streams:int32 -> + ?node_processing_details:android_camera_frame_event_camera_node_processing_details list -> + ?vendor_data_version:int32 -> + ?vendor_data:bytes -> + unit -> + android_camera_frame_event +(** [make_android_camera_frame_event … ()] is a builder for type [android_camera_frame_event] *) + +val copy_android_camera_frame_event : android_camera_frame_event -> android_camera_frame_event + +val android_camera_frame_event_has_session_id : android_camera_frame_event -> bool + (** presence of field "session_id" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_session_id : android_camera_frame_event -> int64 -> unit + (** set field session_id in android_camera_frame_event *) + +val android_camera_frame_event_has_camera_id : android_camera_frame_event -> bool + (** presence of field "camera_id" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_camera_id : android_camera_frame_event -> int32 -> unit + (** set field camera_id in android_camera_frame_event *) + +val android_camera_frame_event_has_frame_number : android_camera_frame_event -> bool + (** presence of field "frame_number" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_frame_number : android_camera_frame_event -> int64 -> unit + (** set field frame_number in android_camera_frame_event *) + +val android_camera_frame_event_has_request_id : android_camera_frame_event -> bool + (** presence of field "request_id" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_request_id : android_camera_frame_event -> int64 -> unit + (** set field request_id in android_camera_frame_event *) + +val android_camera_frame_event_has_request_received_ns : android_camera_frame_event -> bool + (** presence of field "request_received_ns" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_request_received_ns : android_camera_frame_event -> int64 -> unit + (** set field request_received_ns in android_camera_frame_event *) + +val android_camera_frame_event_has_request_processing_started_ns : android_camera_frame_event -> bool + (** presence of field "request_processing_started_ns" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_request_processing_started_ns : android_camera_frame_event -> int64 -> unit + (** set field request_processing_started_ns in android_camera_frame_event *) + +val android_camera_frame_event_has_start_of_exposure_ns : android_camera_frame_event -> bool + (** presence of field "start_of_exposure_ns" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_start_of_exposure_ns : android_camera_frame_event -> int64 -> unit + (** set field start_of_exposure_ns in android_camera_frame_event *) + +val android_camera_frame_event_has_start_of_frame_ns : android_camera_frame_event -> bool + (** presence of field "start_of_frame_ns" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_start_of_frame_ns : android_camera_frame_event -> int64 -> unit + (** set field start_of_frame_ns in android_camera_frame_event *) + +val android_camera_frame_event_has_responses_all_sent_ns : android_camera_frame_event -> bool + (** presence of field "responses_all_sent_ns" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_responses_all_sent_ns : android_camera_frame_event -> int64 -> unit + (** set field responses_all_sent_ns in android_camera_frame_event *) + +val android_camera_frame_event_has_capture_result_status : android_camera_frame_event -> bool + (** presence of field "capture_result_status" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_capture_result_status : android_camera_frame_event -> android_camera_frame_event_capture_result_status -> unit + (** set field capture_result_status in android_camera_frame_event *) + +val android_camera_frame_event_has_skipped_sensor_frames : android_camera_frame_event -> bool + (** presence of field "skipped_sensor_frames" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_skipped_sensor_frames : android_camera_frame_event -> int32 -> unit + (** set field skipped_sensor_frames in android_camera_frame_event *) + +val android_camera_frame_event_has_capture_intent : android_camera_frame_event -> bool + (** presence of field "capture_intent" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_capture_intent : android_camera_frame_event -> int32 -> unit + (** set field capture_intent in android_camera_frame_event *) + +val android_camera_frame_event_has_num_streams : android_camera_frame_event -> bool + (** presence of field "num_streams" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_num_streams : android_camera_frame_event -> int32 -> unit + (** set field num_streams in android_camera_frame_event *) + +val android_camera_frame_event_set_node_processing_details : android_camera_frame_event -> android_camera_frame_event_camera_node_processing_details list -> unit + (** set field node_processing_details in android_camera_frame_event *) + +val android_camera_frame_event_has_vendor_data_version : android_camera_frame_event -> bool + (** presence of field "vendor_data_version" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_vendor_data_version : android_camera_frame_event -> int32 -> unit + (** set field vendor_data_version in android_camera_frame_event *) + +val android_camera_frame_event_has_vendor_data : android_camera_frame_event -> bool + (** presence of field "vendor_data" in [android_camera_frame_event] *) + +val android_camera_frame_event_set_vendor_data : android_camera_frame_event -> bytes -> unit + (** set field vendor_data in android_camera_frame_event *) + +val make_android_camera_session_stats_camera_graph_camera_node : + ?node_id:int64 -> + ?input_ids:int64 list -> + ?output_ids:int64 list -> + ?vendor_data_version:int32 -> + ?vendor_data:bytes -> + unit -> + android_camera_session_stats_camera_graph_camera_node +(** [make_android_camera_session_stats_camera_graph_camera_node … ()] is a builder for type [android_camera_session_stats_camera_graph_camera_node] *) + +val copy_android_camera_session_stats_camera_graph_camera_node : android_camera_session_stats_camera_graph_camera_node -> android_camera_session_stats_camera_graph_camera_node + +val android_camera_session_stats_camera_graph_camera_node_has_node_id : android_camera_session_stats_camera_graph_camera_node -> bool + (** presence of field "node_id" in [android_camera_session_stats_camera_graph_camera_node] *) + +val android_camera_session_stats_camera_graph_camera_node_set_node_id : android_camera_session_stats_camera_graph_camera_node -> int64 -> unit + (** set field node_id in android_camera_session_stats_camera_graph_camera_node *) + +val android_camera_session_stats_camera_graph_camera_node_set_input_ids : android_camera_session_stats_camera_graph_camera_node -> int64 list -> unit + (** set field input_ids in android_camera_session_stats_camera_graph_camera_node *) + +val android_camera_session_stats_camera_graph_camera_node_set_output_ids : android_camera_session_stats_camera_graph_camera_node -> int64 list -> unit + (** set field output_ids in android_camera_session_stats_camera_graph_camera_node *) + +val android_camera_session_stats_camera_graph_camera_node_has_vendor_data_version : android_camera_session_stats_camera_graph_camera_node -> bool + (** presence of field "vendor_data_version" in [android_camera_session_stats_camera_graph_camera_node] *) + +val android_camera_session_stats_camera_graph_camera_node_set_vendor_data_version : android_camera_session_stats_camera_graph_camera_node -> int32 -> unit + (** set field vendor_data_version in android_camera_session_stats_camera_graph_camera_node *) + +val android_camera_session_stats_camera_graph_camera_node_has_vendor_data : android_camera_session_stats_camera_graph_camera_node -> bool + (** presence of field "vendor_data" in [android_camera_session_stats_camera_graph_camera_node] *) + +val android_camera_session_stats_camera_graph_camera_node_set_vendor_data : android_camera_session_stats_camera_graph_camera_node -> bytes -> unit + (** set field vendor_data in android_camera_session_stats_camera_graph_camera_node *) + +val make_android_camera_session_stats_camera_graph_camera_edge : + ?output_node_id:int64 -> + ?output_id:int64 -> + ?input_node_id:int64 -> + ?input_id:int64 -> + ?vendor_data_version:int32 -> + ?vendor_data:bytes -> + unit -> + android_camera_session_stats_camera_graph_camera_edge +(** [make_android_camera_session_stats_camera_graph_camera_edge … ()] is a builder for type [android_camera_session_stats_camera_graph_camera_edge] *) + +val copy_android_camera_session_stats_camera_graph_camera_edge : android_camera_session_stats_camera_graph_camera_edge -> android_camera_session_stats_camera_graph_camera_edge + +val android_camera_session_stats_camera_graph_camera_edge_has_output_node_id : android_camera_session_stats_camera_graph_camera_edge -> bool + (** presence of field "output_node_id" in [android_camera_session_stats_camera_graph_camera_edge] *) + +val android_camera_session_stats_camera_graph_camera_edge_set_output_node_id : android_camera_session_stats_camera_graph_camera_edge -> int64 -> unit + (** set field output_node_id in android_camera_session_stats_camera_graph_camera_edge *) + +val android_camera_session_stats_camera_graph_camera_edge_has_output_id : android_camera_session_stats_camera_graph_camera_edge -> bool + (** presence of field "output_id" in [android_camera_session_stats_camera_graph_camera_edge] *) + +val android_camera_session_stats_camera_graph_camera_edge_set_output_id : android_camera_session_stats_camera_graph_camera_edge -> int64 -> unit + (** set field output_id in android_camera_session_stats_camera_graph_camera_edge *) + +val android_camera_session_stats_camera_graph_camera_edge_has_input_node_id : android_camera_session_stats_camera_graph_camera_edge -> bool + (** presence of field "input_node_id" in [android_camera_session_stats_camera_graph_camera_edge] *) + +val android_camera_session_stats_camera_graph_camera_edge_set_input_node_id : android_camera_session_stats_camera_graph_camera_edge -> int64 -> unit + (** set field input_node_id in android_camera_session_stats_camera_graph_camera_edge *) + +val android_camera_session_stats_camera_graph_camera_edge_has_input_id : android_camera_session_stats_camera_graph_camera_edge -> bool + (** presence of field "input_id" in [android_camera_session_stats_camera_graph_camera_edge] *) + +val android_camera_session_stats_camera_graph_camera_edge_set_input_id : android_camera_session_stats_camera_graph_camera_edge -> int64 -> unit + (** set field input_id in android_camera_session_stats_camera_graph_camera_edge *) + +val android_camera_session_stats_camera_graph_camera_edge_has_vendor_data_version : android_camera_session_stats_camera_graph_camera_edge -> bool + (** presence of field "vendor_data_version" in [android_camera_session_stats_camera_graph_camera_edge] *) + +val android_camera_session_stats_camera_graph_camera_edge_set_vendor_data_version : android_camera_session_stats_camera_graph_camera_edge -> int32 -> unit + (** set field vendor_data_version in android_camera_session_stats_camera_graph_camera_edge *) + +val android_camera_session_stats_camera_graph_camera_edge_has_vendor_data : android_camera_session_stats_camera_graph_camera_edge -> bool + (** presence of field "vendor_data" in [android_camera_session_stats_camera_graph_camera_edge] *) + +val android_camera_session_stats_camera_graph_camera_edge_set_vendor_data : android_camera_session_stats_camera_graph_camera_edge -> bytes -> unit + (** set field vendor_data in android_camera_session_stats_camera_graph_camera_edge *) + +val make_android_camera_session_stats_camera_graph : + ?nodes:android_camera_session_stats_camera_graph_camera_node list -> + ?edges:android_camera_session_stats_camera_graph_camera_edge list -> + unit -> + android_camera_session_stats_camera_graph +(** [make_android_camera_session_stats_camera_graph … ()] is a builder for type [android_camera_session_stats_camera_graph] *) + +val copy_android_camera_session_stats_camera_graph : android_camera_session_stats_camera_graph -> android_camera_session_stats_camera_graph + +val android_camera_session_stats_camera_graph_set_nodes : android_camera_session_stats_camera_graph -> android_camera_session_stats_camera_graph_camera_node list -> unit + (** set field nodes in android_camera_session_stats_camera_graph *) + +val android_camera_session_stats_camera_graph_set_edges : android_camera_session_stats_camera_graph -> android_camera_session_stats_camera_graph_camera_edge list -> unit + (** set field edges in android_camera_session_stats_camera_graph *) + +val make_android_camera_session_stats : + ?session_id:int64 -> + ?graph:android_camera_session_stats_camera_graph -> + unit -> + android_camera_session_stats +(** [make_android_camera_session_stats … ()] is a builder for type [android_camera_session_stats] *) + +val copy_android_camera_session_stats : android_camera_session_stats -> android_camera_session_stats + +val android_camera_session_stats_has_session_id : android_camera_session_stats -> bool + (** presence of field "session_id" in [android_camera_session_stats] *) + +val android_camera_session_stats_set_session_id : android_camera_session_stats -> int64 -> unit + (** set field session_id in android_camera_session_stats *) + +val android_camera_session_stats_set_graph : android_camera_session_stats -> android_camera_session_stats_camera_graph -> unit + (** set field graph in android_camera_session_stats *) + +val make_cpu_per_uid_data : + ?cluster_count:int32 -> + ?uid:int32 list -> + ?total_time_ms:int64 list -> + unit -> + cpu_per_uid_data +(** [make_cpu_per_uid_data … ()] is a builder for type [cpu_per_uid_data] *) + +val copy_cpu_per_uid_data : cpu_per_uid_data -> cpu_per_uid_data + +val cpu_per_uid_data_has_cluster_count : cpu_per_uid_data -> bool + (** presence of field "cluster_count" in [cpu_per_uid_data] *) + +val cpu_per_uid_data_set_cluster_count : cpu_per_uid_data -> int32 -> unit + (** set field cluster_count in cpu_per_uid_data *) + +val cpu_per_uid_data_set_uid : cpu_per_uid_data -> int32 list -> unit + (** set field uid in cpu_per_uid_data *) + +val cpu_per_uid_data_set_total_time_ms : cpu_per_uid_data -> int64 list -> unit + (** set field total_time_ms in cpu_per_uid_data *) + +val make_frame_timeline_event_expected_surface_frame_start : + ?cookie:int64 -> + ?token:int64 -> + ?display_frame_token:int64 -> + ?pid:int32 -> + ?layer_name:string -> + unit -> + frame_timeline_event_expected_surface_frame_start +(** [make_frame_timeline_event_expected_surface_frame_start … ()] is a builder for type [frame_timeline_event_expected_surface_frame_start] *) + +val copy_frame_timeline_event_expected_surface_frame_start : frame_timeline_event_expected_surface_frame_start -> frame_timeline_event_expected_surface_frame_start + +val frame_timeline_event_expected_surface_frame_start_has_cookie : frame_timeline_event_expected_surface_frame_start -> bool + (** presence of field "cookie" in [frame_timeline_event_expected_surface_frame_start] *) + +val frame_timeline_event_expected_surface_frame_start_set_cookie : frame_timeline_event_expected_surface_frame_start -> int64 -> unit + (** set field cookie in frame_timeline_event_expected_surface_frame_start *) + +val frame_timeline_event_expected_surface_frame_start_has_token : frame_timeline_event_expected_surface_frame_start -> bool + (** presence of field "token" in [frame_timeline_event_expected_surface_frame_start] *) + +val frame_timeline_event_expected_surface_frame_start_set_token : frame_timeline_event_expected_surface_frame_start -> int64 -> unit + (** set field token in frame_timeline_event_expected_surface_frame_start *) + +val frame_timeline_event_expected_surface_frame_start_has_display_frame_token : frame_timeline_event_expected_surface_frame_start -> bool + (** presence of field "display_frame_token" in [frame_timeline_event_expected_surface_frame_start] *) + +val frame_timeline_event_expected_surface_frame_start_set_display_frame_token : frame_timeline_event_expected_surface_frame_start -> int64 -> unit + (** set field display_frame_token in frame_timeline_event_expected_surface_frame_start *) + +val frame_timeline_event_expected_surface_frame_start_has_pid : frame_timeline_event_expected_surface_frame_start -> bool + (** presence of field "pid" in [frame_timeline_event_expected_surface_frame_start] *) + +val frame_timeline_event_expected_surface_frame_start_set_pid : frame_timeline_event_expected_surface_frame_start -> int32 -> unit + (** set field pid in frame_timeline_event_expected_surface_frame_start *) + +val frame_timeline_event_expected_surface_frame_start_has_layer_name : frame_timeline_event_expected_surface_frame_start -> bool + (** presence of field "layer_name" in [frame_timeline_event_expected_surface_frame_start] *) + +val frame_timeline_event_expected_surface_frame_start_set_layer_name : frame_timeline_event_expected_surface_frame_start -> string -> unit + (** set field layer_name in frame_timeline_event_expected_surface_frame_start *) + +val make_frame_timeline_event_actual_surface_frame_start : + ?cookie:int64 -> + ?token:int64 -> + ?display_frame_token:int64 -> + ?pid:int32 -> + ?layer_name:string -> + ?present_type:frame_timeline_event_present_type -> + ?on_time_finish:bool -> + ?gpu_composition:bool -> + ?jank_type:int32 -> + ?prediction_type:frame_timeline_event_prediction_type -> + ?is_buffer:bool -> + ?jank_severity_type:frame_timeline_event_jank_severity_type -> + ?present_delay_millis:float -> + ?vsync_resynced_jitter_millis:float -> + ?jank_severity_score:float -> + ?jank_type_experimental:int32 -> + ?present_type_experimental:frame_timeline_event_present_type -> + unit -> + frame_timeline_event_actual_surface_frame_start +(** [make_frame_timeline_event_actual_surface_frame_start … ()] is a builder for type [frame_timeline_event_actual_surface_frame_start] *) + +val copy_frame_timeline_event_actual_surface_frame_start : frame_timeline_event_actual_surface_frame_start -> frame_timeline_event_actual_surface_frame_start + +val frame_timeline_event_actual_surface_frame_start_has_cookie : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "cookie" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_cookie : frame_timeline_event_actual_surface_frame_start -> int64 -> unit + (** set field cookie in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_token : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "token" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_token : frame_timeline_event_actual_surface_frame_start -> int64 -> unit + (** set field token in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_display_frame_token : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "display_frame_token" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_display_frame_token : frame_timeline_event_actual_surface_frame_start -> int64 -> unit + (** set field display_frame_token in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_pid : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "pid" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_pid : frame_timeline_event_actual_surface_frame_start -> int32 -> unit + (** set field pid in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_layer_name : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "layer_name" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_layer_name : frame_timeline_event_actual_surface_frame_start -> string -> unit + (** set field layer_name in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_present_type : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "present_type" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_present_type : frame_timeline_event_actual_surface_frame_start -> frame_timeline_event_present_type -> unit + (** set field present_type in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_on_time_finish : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "on_time_finish" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_on_time_finish : frame_timeline_event_actual_surface_frame_start -> bool -> unit + (** set field on_time_finish in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_gpu_composition : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "gpu_composition" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_gpu_composition : frame_timeline_event_actual_surface_frame_start -> bool -> unit + (** set field gpu_composition in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_jank_type : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "jank_type" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_jank_type : frame_timeline_event_actual_surface_frame_start -> int32 -> unit + (** set field jank_type in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_prediction_type : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "prediction_type" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_prediction_type : frame_timeline_event_actual_surface_frame_start -> frame_timeline_event_prediction_type -> unit + (** set field prediction_type in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_is_buffer : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "is_buffer" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_is_buffer : frame_timeline_event_actual_surface_frame_start -> bool -> unit + (** set field is_buffer in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_jank_severity_type : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "jank_severity_type" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_jank_severity_type : frame_timeline_event_actual_surface_frame_start -> frame_timeline_event_jank_severity_type -> unit + (** set field jank_severity_type in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_present_delay_millis : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "present_delay_millis" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_present_delay_millis : frame_timeline_event_actual_surface_frame_start -> float -> unit + (** set field present_delay_millis in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_vsync_resynced_jitter_millis : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "vsync_resynced_jitter_millis" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_vsync_resynced_jitter_millis : frame_timeline_event_actual_surface_frame_start -> float -> unit + (** set field vsync_resynced_jitter_millis in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_jank_severity_score : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "jank_severity_score" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_jank_severity_score : frame_timeline_event_actual_surface_frame_start -> float -> unit + (** set field jank_severity_score in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_jank_type_experimental : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "jank_type_experimental" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_jank_type_experimental : frame_timeline_event_actual_surface_frame_start -> int32 -> unit + (** set field jank_type_experimental in frame_timeline_event_actual_surface_frame_start *) + +val frame_timeline_event_actual_surface_frame_start_has_present_type_experimental : frame_timeline_event_actual_surface_frame_start -> bool + (** presence of field "present_type_experimental" in [frame_timeline_event_actual_surface_frame_start] *) + +val frame_timeline_event_actual_surface_frame_start_set_present_type_experimental : frame_timeline_event_actual_surface_frame_start -> frame_timeline_event_present_type -> unit + (** set field present_type_experimental in frame_timeline_event_actual_surface_frame_start *) + +val make_frame_timeline_event_expected_display_frame_start : + ?cookie:int64 -> + ?token:int64 -> + ?pid:int32 -> + unit -> + frame_timeline_event_expected_display_frame_start +(** [make_frame_timeline_event_expected_display_frame_start … ()] is a builder for type [frame_timeline_event_expected_display_frame_start] *) + +val copy_frame_timeline_event_expected_display_frame_start : frame_timeline_event_expected_display_frame_start -> frame_timeline_event_expected_display_frame_start + +val frame_timeline_event_expected_display_frame_start_has_cookie : frame_timeline_event_expected_display_frame_start -> bool + (** presence of field "cookie" in [frame_timeline_event_expected_display_frame_start] *) + +val frame_timeline_event_expected_display_frame_start_set_cookie : frame_timeline_event_expected_display_frame_start -> int64 -> unit + (** set field cookie in frame_timeline_event_expected_display_frame_start *) + +val frame_timeline_event_expected_display_frame_start_has_token : frame_timeline_event_expected_display_frame_start -> bool + (** presence of field "token" in [frame_timeline_event_expected_display_frame_start] *) + +val frame_timeline_event_expected_display_frame_start_set_token : frame_timeline_event_expected_display_frame_start -> int64 -> unit + (** set field token in frame_timeline_event_expected_display_frame_start *) + +val frame_timeline_event_expected_display_frame_start_has_pid : frame_timeline_event_expected_display_frame_start -> bool + (** presence of field "pid" in [frame_timeline_event_expected_display_frame_start] *) + +val frame_timeline_event_expected_display_frame_start_set_pid : frame_timeline_event_expected_display_frame_start -> int32 -> unit + (** set field pid in frame_timeline_event_expected_display_frame_start *) + +val make_frame_timeline_event_actual_display_frame_start : + ?cookie:int64 -> + ?token:int64 -> + ?pid:int32 -> + ?present_type:frame_timeline_event_present_type -> + ?on_time_finish:bool -> + ?gpu_composition:bool -> + ?jank_type:int32 -> + ?prediction_type:frame_timeline_event_prediction_type -> + ?jank_severity_type:frame_timeline_event_jank_severity_type -> + ?present_delay_millis:float -> + ?jank_severity_score:float -> + ?jank_type_experimental:int32 -> + ?present_type_experimental:frame_timeline_event_present_type -> + unit -> + frame_timeline_event_actual_display_frame_start +(** [make_frame_timeline_event_actual_display_frame_start … ()] is a builder for type [frame_timeline_event_actual_display_frame_start] *) + +val copy_frame_timeline_event_actual_display_frame_start : frame_timeline_event_actual_display_frame_start -> frame_timeline_event_actual_display_frame_start + +val frame_timeline_event_actual_display_frame_start_has_cookie : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "cookie" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_cookie : frame_timeline_event_actual_display_frame_start -> int64 -> unit + (** set field cookie in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_token : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "token" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_token : frame_timeline_event_actual_display_frame_start -> int64 -> unit + (** set field token in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_pid : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "pid" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_pid : frame_timeline_event_actual_display_frame_start -> int32 -> unit + (** set field pid in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_present_type : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "present_type" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_present_type : frame_timeline_event_actual_display_frame_start -> frame_timeline_event_present_type -> unit + (** set field present_type in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_on_time_finish : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "on_time_finish" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_on_time_finish : frame_timeline_event_actual_display_frame_start -> bool -> unit + (** set field on_time_finish in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_gpu_composition : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "gpu_composition" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_gpu_composition : frame_timeline_event_actual_display_frame_start -> bool -> unit + (** set field gpu_composition in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_jank_type : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "jank_type" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_jank_type : frame_timeline_event_actual_display_frame_start -> int32 -> unit + (** set field jank_type in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_prediction_type : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "prediction_type" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_prediction_type : frame_timeline_event_actual_display_frame_start -> frame_timeline_event_prediction_type -> unit + (** set field prediction_type in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_jank_severity_type : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "jank_severity_type" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_jank_severity_type : frame_timeline_event_actual_display_frame_start -> frame_timeline_event_jank_severity_type -> unit + (** set field jank_severity_type in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_present_delay_millis : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "present_delay_millis" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_present_delay_millis : frame_timeline_event_actual_display_frame_start -> float -> unit + (** set field present_delay_millis in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_jank_severity_score : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "jank_severity_score" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_jank_severity_score : frame_timeline_event_actual_display_frame_start -> float -> unit + (** set field jank_severity_score in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_jank_type_experimental : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "jank_type_experimental" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_jank_type_experimental : frame_timeline_event_actual_display_frame_start -> int32 -> unit + (** set field jank_type_experimental in frame_timeline_event_actual_display_frame_start *) + +val frame_timeline_event_actual_display_frame_start_has_present_type_experimental : frame_timeline_event_actual_display_frame_start -> bool + (** presence of field "present_type_experimental" in [frame_timeline_event_actual_display_frame_start] *) + +val frame_timeline_event_actual_display_frame_start_set_present_type_experimental : frame_timeline_event_actual_display_frame_start -> frame_timeline_event_present_type -> unit + (** set field present_type_experimental in frame_timeline_event_actual_display_frame_start *) + +val make_frame_timeline_event_frame_end : + ?cookie:int64 -> + unit -> + frame_timeline_event_frame_end +(** [make_frame_timeline_event_frame_end … ()] is a builder for type [frame_timeline_event_frame_end] *) + +val copy_frame_timeline_event_frame_end : frame_timeline_event_frame_end -> frame_timeline_event_frame_end + +val frame_timeline_event_frame_end_has_cookie : frame_timeline_event_frame_end -> bool + (** presence of field "cookie" in [frame_timeline_event_frame_end] *) + +val frame_timeline_event_frame_end_set_cookie : frame_timeline_event_frame_end -> int64 -> unit + (** set field cookie in frame_timeline_event_frame_end *) + +val make_gpu_mem_total_event : + ?gpu_id:int32 -> + ?pid:int32 -> + ?size:int64 -> + unit -> + gpu_mem_total_event +(** [make_gpu_mem_total_event … ()] is a builder for type [gpu_mem_total_event] *) + +val copy_gpu_mem_total_event : gpu_mem_total_event -> gpu_mem_total_event + +val gpu_mem_total_event_has_gpu_id : gpu_mem_total_event -> bool + (** presence of field "gpu_id" in [gpu_mem_total_event] *) + +val gpu_mem_total_event_set_gpu_id : gpu_mem_total_event -> int32 -> unit + (** set field gpu_id in gpu_mem_total_event *) + +val gpu_mem_total_event_has_pid : gpu_mem_total_event -> bool + (** presence of field "pid" in [gpu_mem_total_event] *) + +val gpu_mem_total_event_set_pid : gpu_mem_total_event -> int32 -> unit + (** set field pid in gpu_mem_total_event *) + +val gpu_mem_total_event_has_size : gpu_mem_total_event -> bool + (** presence of field "size" in [gpu_mem_total_event] *) + +val gpu_mem_total_event_set_size : gpu_mem_total_event -> int64 -> unit + (** set field size in gpu_mem_total_event *) + +val make_graphics_frame_event_buffer_event : + ?frame_number:int32 -> + ?type_:graphics_frame_event_buffer_event_type -> + ?layer_name:string -> + ?duration_ns:int64 -> + ?buffer_id:int32 -> + unit -> + graphics_frame_event_buffer_event +(** [make_graphics_frame_event_buffer_event … ()] is a builder for type [graphics_frame_event_buffer_event] *) + +val copy_graphics_frame_event_buffer_event : graphics_frame_event_buffer_event -> graphics_frame_event_buffer_event + +val graphics_frame_event_buffer_event_has_frame_number : graphics_frame_event_buffer_event -> bool + (** presence of field "frame_number" in [graphics_frame_event_buffer_event] *) + +val graphics_frame_event_buffer_event_set_frame_number : graphics_frame_event_buffer_event -> int32 -> unit + (** set field frame_number in graphics_frame_event_buffer_event *) + +val graphics_frame_event_buffer_event_has_type_ : graphics_frame_event_buffer_event -> bool + (** presence of field "type_" in [graphics_frame_event_buffer_event] *) + +val graphics_frame_event_buffer_event_set_type_ : graphics_frame_event_buffer_event -> graphics_frame_event_buffer_event_type -> unit + (** set field type_ in graphics_frame_event_buffer_event *) + +val graphics_frame_event_buffer_event_has_layer_name : graphics_frame_event_buffer_event -> bool + (** presence of field "layer_name" in [graphics_frame_event_buffer_event] *) + +val graphics_frame_event_buffer_event_set_layer_name : graphics_frame_event_buffer_event -> string -> unit + (** set field layer_name in graphics_frame_event_buffer_event *) + +val graphics_frame_event_buffer_event_has_duration_ns : graphics_frame_event_buffer_event -> bool + (** presence of field "duration_ns" in [graphics_frame_event_buffer_event] *) + +val graphics_frame_event_buffer_event_set_duration_ns : graphics_frame_event_buffer_event -> int64 -> unit + (** set field duration_ns in graphics_frame_event_buffer_event *) + +val graphics_frame_event_buffer_event_has_buffer_id : graphics_frame_event_buffer_event -> bool + (** presence of field "buffer_id" in [graphics_frame_event_buffer_event] *) + +val graphics_frame_event_buffer_event_set_buffer_id : graphics_frame_event_buffer_event -> int32 -> unit + (** set field buffer_id in graphics_frame_event_buffer_event *) + +val make_graphics_frame_event : + ?buffer_event:graphics_frame_event_buffer_event -> + unit -> + graphics_frame_event +(** [make_graphics_frame_event … ()] is a builder for type [graphics_frame_event] *) + +val copy_graphics_frame_event : graphics_frame_event -> graphics_frame_event + +val graphics_frame_event_set_buffer_event : graphics_frame_event -> graphics_frame_event_buffer_event -> unit + (** set field buffer_event in graphics_frame_event *) + +val make_initial_display_state : + ?display_state:int32 -> + ?brightness:float -> + unit -> + initial_display_state +(** [make_initial_display_state … ()] is a builder for type [initial_display_state] *) + +val copy_initial_display_state : initial_display_state -> initial_display_state + +val initial_display_state_has_display_state : initial_display_state -> bool + (** presence of field "display_state" in [initial_display_state] *) + +val initial_display_state_set_display_state : initial_display_state -> int32 -> unit + (** set field display_state in initial_display_state *) + +val initial_display_state_has_brightness : initial_display_state -> bool + (** presence of field "brightness" in [initial_display_state] *) + +val initial_display_state_set_brightness : initial_display_state -> float -> unit + (** set field brightness in initial_display_state *) + +val make_kernel_wakelock_data_wakelock : + ?wakelock_id:int32 -> + ?wakelock_name:string -> + ?wakelock_type:kernel_wakelock_data_wakelock_type -> + unit -> + kernel_wakelock_data_wakelock +(** [make_kernel_wakelock_data_wakelock … ()] is a builder for type [kernel_wakelock_data_wakelock] *) + +val copy_kernel_wakelock_data_wakelock : kernel_wakelock_data_wakelock -> kernel_wakelock_data_wakelock + +val kernel_wakelock_data_wakelock_has_wakelock_id : kernel_wakelock_data_wakelock -> bool + (** presence of field "wakelock_id" in [kernel_wakelock_data_wakelock] *) + +val kernel_wakelock_data_wakelock_set_wakelock_id : kernel_wakelock_data_wakelock -> int32 -> unit + (** set field wakelock_id in kernel_wakelock_data_wakelock *) + +val kernel_wakelock_data_wakelock_has_wakelock_name : kernel_wakelock_data_wakelock -> bool + (** presence of field "wakelock_name" in [kernel_wakelock_data_wakelock] *) + +val kernel_wakelock_data_wakelock_set_wakelock_name : kernel_wakelock_data_wakelock -> string -> unit + (** set field wakelock_name in kernel_wakelock_data_wakelock *) + +val kernel_wakelock_data_wakelock_has_wakelock_type : kernel_wakelock_data_wakelock -> bool + (** presence of field "wakelock_type" in [kernel_wakelock_data_wakelock] *) + +val kernel_wakelock_data_wakelock_set_wakelock_type : kernel_wakelock_data_wakelock -> kernel_wakelock_data_wakelock_type -> unit + (** set field wakelock_type in kernel_wakelock_data_wakelock *) + +val make_kernel_wakelock_data : + ?wakelock:kernel_wakelock_data_wakelock list -> + ?wakelock_id:int32 list -> + ?time_held_millis:int64 list -> + ?error_flags:int64 -> + unit -> + kernel_wakelock_data +(** [make_kernel_wakelock_data … ()] is a builder for type [kernel_wakelock_data] *) + +val copy_kernel_wakelock_data : kernel_wakelock_data -> kernel_wakelock_data + +val kernel_wakelock_data_set_wakelock : kernel_wakelock_data -> kernel_wakelock_data_wakelock list -> unit + (** set field wakelock in kernel_wakelock_data *) + +val kernel_wakelock_data_set_wakelock_id : kernel_wakelock_data -> int32 list -> unit + (** set field wakelock_id in kernel_wakelock_data *) + +val kernel_wakelock_data_set_time_held_millis : kernel_wakelock_data -> int64 list -> unit + (** set field time_held_millis in kernel_wakelock_data *) + +val kernel_wakelock_data_has_error_flags : kernel_wakelock_data -> bool + (** presence of field "error_flags" in [kernel_wakelock_data] *) + +val kernel_wakelock_data_set_error_flags : kernel_wakelock_data -> int64 -> unit + (** set field error_flags in kernel_wakelock_data *) + +val make_network_packet_event : + ?direction:traffic_direction -> + ?network_interface:string -> + ?length:int32 -> + ?uid:int32 -> + ?tag:int32 -> + ?ip_proto:int32 -> + ?tcp_flags:int32 -> + ?local_port:int32 -> + ?remote_port:int32 -> + ?icmp_type:int32 -> + ?icmp_code:int32 -> + unit -> + network_packet_event +(** [make_network_packet_event … ()] is a builder for type [network_packet_event] *) + +val copy_network_packet_event : network_packet_event -> network_packet_event + +val network_packet_event_has_direction : network_packet_event -> bool + (** presence of field "direction" in [network_packet_event] *) + +val network_packet_event_set_direction : network_packet_event -> traffic_direction -> unit + (** set field direction in network_packet_event *) + +val network_packet_event_has_network_interface : network_packet_event -> bool + (** presence of field "network_interface" in [network_packet_event] *) + +val network_packet_event_set_network_interface : network_packet_event -> string -> unit + (** set field network_interface in network_packet_event *) + +val network_packet_event_has_length : network_packet_event -> bool + (** presence of field "length" in [network_packet_event] *) + +val network_packet_event_set_length : network_packet_event -> int32 -> unit + (** set field length in network_packet_event *) + +val network_packet_event_has_uid : network_packet_event -> bool + (** presence of field "uid" in [network_packet_event] *) + +val network_packet_event_set_uid : network_packet_event -> int32 -> unit + (** set field uid in network_packet_event *) + +val network_packet_event_has_tag : network_packet_event -> bool + (** presence of field "tag" in [network_packet_event] *) + +val network_packet_event_set_tag : network_packet_event -> int32 -> unit + (** set field tag in network_packet_event *) + +val network_packet_event_has_ip_proto : network_packet_event -> bool + (** presence of field "ip_proto" in [network_packet_event] *) + +val network_packet_event_set_ip_proto : network_packet_event -> int32 -> unit + (** set field ip_proto in network_packet_event *) + +val network_packet_event_has_tcp_flags : network_packet_event -> bool + (** presence of field "tcp_flags" in [network_packet_event] *) + +val network_packet_event_set_tcp_flags : network_packet_event -> int32 -> unit + (** set field tcp_flags in network_packet_event *) + +val network_packet_event_has_local_port : network_packet_event -> bool + (** presence of field "local_port" in [network_packet_event] *) + +val network_packet_event_set_local_port : network_packet_event -> int32 -> unit + (** set field local_port in network_packet_event *) + +val network_packet_event_has_remote_port : network_packet_event -> bool + (** presence of field "remote_port" in [network_packet_event] *) + +val network_packet_event_set_remote_port : network_packet_event -> int32 -> unit + (** set field remote_port in network_packet_event *) + +val network_packet_event_has_icmp_type : network_packet_event -> bool + (** presence of field "icmp_type" in [network_packet_event] *) + +val network_packet_event_set_icmp_type : network_packet_event -> int32 -> unit + (** set field icmp_type in network_packet_event *) + +val network_packet_event_has_icmp_code : network_packet_event -> bool + (** presence of field "icmp_code" in [network_packet_event] *) + +val network_packet_event_set_icmp_code : network_packet_event -> int32 -> unit + (** set field icmp_code in network_packet_event *) + +val make_network_packet_bundle : + ?packet_context:network_packet_bundle_packet_context -> + ?packet_timestamps:int64 list -> + ?packet_lengths:int32 list -> + ?total_packets:int32 -> + ?total_duration:int64 -> + ?total_length:int64 -> + unit -> + network_packet_bundle +(** [make_network_packet_bundle … ()] is a builder for type [network_packet_bundle] *) + +val copy_network_packet_bundle : network_packet_bundle -> network_packet_bundle + +val network_packet_bundle_set_packet_context : network_packet_bundle -> network_packet_bundle_packet_context -> unit + (** set field packet_context in network_packet_bundle *) + +val network_packet_bundle_set_packet_timestamps : network_packet_bundle -> int64 list -> unit + (** set field packet_timestamps in network_packet_bundle *) + +val network_packet_bundle_set_packet_lengths : network_packet_bundle -> int32 list -> unit + (** set field packet_lengths in network_packet_bundle *) + +val network_packet_bundle_has_total_packets : network_packet_bundle -> bool + (** presence of field "total_packets" in [network_packet_bundle] *) + +val network_packet_bundle_set_total_packets : network_packet_bundle -> int32 -> unit + (** set field total_packets in network_packet_bundle *) + +val network_packet_bundle_has_total_duration : network_packet_bundle -> bool + (** presence of field "total_duration" in [network_packet_bundle] *) + +val network_packet_bundle_set_total_duration : network_packet_bundle -> int64 -> unit + (** set field total_duration in network_packet_bundle *) + +val network_packet_bundle_has_total_length : network_packet_bundle -> bool + (** presence of field "total_length" in [network_packet_bundle] *) + +val network_packet_bundle_set_total_length : network_packet_bundle -> int64 -> unit + (** set field total_length in network_packet_bundle *) + +val make_network_packet_context : + ?iid:int64 -> + ?ctx:network_packet_event -> + unit -> + network_packet_context +(** [make_network_packet_context … ()] is a builder for type [network_packet_context] *) + +val copy_network_packet_context : network_packet_context -> network_packet_context + +val network_packet_context_has_iid : network_packet_context -> bool + (** presence of field "iid" in [network_packet_context] *) + +val network_packet_context_set_iid : network_packet_context -> int64 -> unit + (** set field iid in network_packet_context *) + +val network_packet_context_set_ctx : network_packet_context -> network_packet_event -> unit + (** set field ctx in network_packet_context *) + +val make_packages_list_package_info : + ?name:string -> + ?uid:int64 -> + ?debuggable:bool -> + ?profileable_from_shell:bool -> + ?version_code:int64 -> + unit -> + packages_list_package_info +(** [make_packages_list_package_info … ()] is a builder for type [packages_list_package_info] *) + +val copy_packages_list_package_info : packages_list_package_info -> packages_list_package_info + +val packages_list_package_info_has_name : packages_list_package_info -> bool + (** presence of field "name" in [packages_list_package_info] *) + +val packages_list_package_info_set_name : packages_list_package_info -> string -> unit + (** set field name in packages_list_package_info *) + +val packages_list_package_info_has_uid : packages_list_package_info -> bool + (** presence of field "uid" in [packages_list_package_info] *) + +val packages_list_package_info_set_uid : packages_list_package_info -> int64 -> unit + (** set field uid in packages_list_package_info *) + +val packages_list_package_info_has_debuggable : packages_list_package_info -> bool + (** presence of field "debuggable" in [packages_list_package_info] *) + +val packages_list_package_info_set_debuggable : packages_list_package_info -> bool -> unit + (** set field debuggable in packages_list_package_info *) + +val packages_list_package_info_has_profileable_from_shell : packages_list_package_info -> bool + (** presence of field "profileable_from_shell" in [packages_list_package_info] *) + +val packages_list_package_info_set_profileable_from_shell : packages_list_package_info -> bool -> unit + (** set field profileable_from_shell in packages_list_package_info *) + +val packages_list_package_info_has_version_code : packages_list_package_info -> bool + (** presence of field "version_code" in [packages_list_package_info] *) + +val packages_list_package_info_set_version_code : packages_list_package_info -> int64 -> unit + (** set field version_code in packages_list_package_info *) + +val make_packages_list : + ?packages:packages_list_package_info list -> + ?parse_error:bool -> + ?read_error:bool -> + unit -> + packages_list +(** [make_packages_list … ()] is a builder for type [packages_list] *) + +val copy_packages_list : packages_list -> packages_list + +val packages_list_set_packages : packages_list -> packages_list_package_info list -> unit + (** set field packages in packages_list *) + +val packages_list_has_parse_error : packages_list -> bool + (** presence of field "parse_error" in [packages_list] *) + +val packages_list_set_parse_error : packages_list -> bool -> unit + (** set field parse_error in packages_list *) + +val packages_list_has_read_error : packages_list -> bool + (** presence of field "read_error" in [packages_list] *) + +val packages_list_set_read_error : packages_list -> bool -> unit + (** set field read_error in packages_list *) + +val make_pixel_modem_events : + ?events:bytes list -> + ?event_time_nanos:int64 list -> + unit -> + pixel_modem_events +(** [make_pixel_modem_events … ()] is a builder for type [pixel_modem_events] *) + +val copy_pixel_modem_events : pixel_modem_events -> pixel_modem_events + +val pixel_modem_events_set_events : pixel_modem_events -> bytes list -> unit + (** set field events in pixel_modem_events *) + +val pixel_modem_events_set_event_time_nanos : pixel_modem_events -> int64 list -> unit + (** set field event_time_nanos in pixel_modem_events *) + +val make_pixel_modem_token_database : + ?database:bytes -> + unit -> + pixel_modem_token_database +(** [make_pixel_modem_token_database … ()] is a builder for type [pixel_modem_token_database] *) + +val copy_pixel_modem_token_database : pixel_modem_token_database -> pixel_modem_token_database + +val pixel_modem_token_database_has_database : pixel_modem_token_database -> bool + (** presence of field "database" in [pixel_modem_token_database] *) + +val pixel_modem_token_database_set_database : pixel_modem_token_database -> bytes -> unit + (** set field database in pixel_modem_token_database *) + +val make_proto_log_message : + ?message_id:int64 -> + ?str_param_iids:int32 list -> + ?sint64_params:int64 list -> + ?double_params:float list -> + ?boolean_params:int32 list -> + ?stacktrace_iid:int32 -> + unit -> + proto_log_message +(** [make_proto_log_message … ()] is a builder for type [proto_log_message] *) + +val copy_proto_log_message : proto_log_message -> proto_log_message + +val proto_log_message_has_message_id : proto_log_message -> bool + (** presence of field "message_id" in [proto_log_message] *) + +val proto_log_message_set_message_id : proto_log_message -> int64 -> unit + (** set field message_id in proto_log_message *) + +val proto_log_message_set_str_param_iids : proto_log_message -> int32 list -> unit + (** set field str_param_iids in proto_log_message *) + +val proto_log_message_set_sint64_params : proto_log_message -> int64 list -> unit + (** set field sint64_params in proto_log_message *) + +val proto_log_message_set_double_params : proto_log_message -> float list -> unit + (** set field double_params in proto_log_message *) + +val proto_log_message_set_boolean_params : proto_log_message -> int32 list -> unit + (** set field boolean_params in proto_log_message *) + +val proto_log_message_has_stacktrace_iid : proto_log_message -> bool + (** presence of field "stacktrace_iid" in [proto_log_message] *) + +val proto_log_message_set_stacktrace_iid : proto_log_message -> int32 -> unit + (** set field stacktrace_iid in proto_log_message *) + +val make_proto_log_viewer_config_message_data : + ?message_id:int64 -> + ?message:string -> + ?level:proto_log_level -> + ?group_id:int32 -> + ?location:string -> + unit -> + proto_log_viewer_config_message_data +(** [make_proto_log_viewer_config_message_data … ()] is a builder for type [proto_log_viewer_config_message_data] *) + +val copy_proto_log_viewer_config_message_data : proto_log_viewer_config_message_data -> proto_log_viewer_config_message_data + +val proto_log_viewer_config_message_data_has_message_id : proto_log_viewer_config_message_data -> bool + (** presence of field "message_id" in [proto_log_viewer_config_message_data] *) + +val proto_log_viewer_config_message_data_set_message_id : proto_log_viewer_config_message_data -> int64 -> unit + (** set field message_id in proto_log_viewer_config_message_data *) + +val proto_log_viewer_config_message_data_has_message : proto_log_viewer_config_message_data -> bool + (** presence of field "message" in [proto_log_viewer_config_message_data] *) + +val proto_log_viewer_config_message_data_set_message : proto_log_viewer_config_message_data -> string -> unit + (** set field message in proto_log_viewer_config_message_data *) + +val proto_log_viewer_config_message_data_has_level : proto_log_viewer_config_message_data -> bool + (** presence of field "level" in [proto_log_viewer_config_message_data] *) + +val proto_log_viewer_config_message_data_set_level : proto_log_viewer_config_message_data -> proto_log_level -> unit + (** set field level in proto_log_viewer_config_message_data *) + +val proto_log_viewer_config_message_data_has_group_id : proto_log_viewer_config_message_data -> bool + (** presence of field "group_id" in [proto_log_viewer_config_message_data] *) + +val proto_log_viewer_config_message_data_set_group_id : proto_log_viewer_config_message_data -> int32 -> unit + (** set field group_id in proto_log_viewer_config_message_data *) + +val proto_log_viewer_config_message_data_has_location : proto_log_viewer_config_message_data -> bool + (** presence of field "location" in [proto_log_viewer_config_message_data] *) + +val proto_log_viewer_config_message_data_set_location : proto_log_viewer_config_message_data -> string -> unit + (** set field location in proto_log_viewer_config_message_data *) + +val make_proto_log_viewer_config_group : + ?id:int32 -> + ?name:string -> + ?tag:string -> + unit -> + proto_log_viewer_config_group +(** [make_proto_log_viewer_config_group … ()] is a builder for type [proto_log_viewer_config_group] *) + +val copy_proto_log_viewer_config_group : proto_log_viewer_config_group -> proto_log_viewer_config_group + +val proto_log_viewer_config_group_has_id : proto_log_viewer_config_group -> bool + (** presence of field "id" in [proto_log_viewer_config_group] *) + +val proto_log_viewer_config_group_set_id : proto_log_viewer_config_group -> int32 -> unit + (** set field id in proto_log_viewer_config_group *) + +val proto_log_viewer_config_group_has_name : proto_log_viewer_config_group -> bool + (** presence of field "name" in [proto_log_viewer_config_group] *) + +val proto_log_viewer_config_group_set_name : proto_log_viewer_config_group -> string -> unit + (** set field name in proto_log_viewer_config_group *) + +val proto_log_viewer_config_group_has_tag : proto_log_viewer_config_group -> bool + (** presence of field "tag" in [proto_log_viewer_config_group] *) + +val proto_log_viewer_config_group_set_tag : proto_log_viewer_config_group -> string -> unit + (** set field tag in proto_log_viewer_config_group *) + +val make_proto_log_viewer_config : + ?messages:proto_log_viewer_config_message_data list -> + ?groups:proto_log_viewer_config_group list -> + unit -> + proto_log_viewer_config +(** [make_proto_log_viewer_config … ()] is a builder for type [proto_log_viewer_config] *) + +val copy_proto_log_viewer_config : proto_log_viewer_config -> proto_log_viewer_config + +val proto_log_viewer_config_set_messages : proto_log_viewer_config -> proto_log_viewer_config_message_data list -> unit + (** set field messages in proto_log_viewer_config *) + +val proto_log_viewer_config_set_groups : proto_log_viewer_config -> proto_log_viewer_config_group list -> unit + (** set field groups in proto_log_viewer_config *) + +val make_shell_transition_target : + ?mode:int32 -> + ?layer_id:int32 -> + ?window_id:int32 -> + ?flags:int32 -> + unit -> + shell_transition_target +(** [make_shell_transition_target … ()] is a builder for type [shell_transition_target] *) + +val copy_shell_transition_target : shell_transition_target -> shell_transition_target + +val shell_transition_target_has_mode : shell_transition_target -> bool + (** presence of field "mode" in [shell_transition_target] *) + +val shell_transition_target_set_mode : shell_transition_target -> int32 -> unit + (** set field mode in shell_transition_target *) + +val shell_transition_target_has_layer_id : shell_transition_target -> bool + (** presence of field "layer_id" in [shell_transition_target] *) + +val shell_transition_target_set_layer_id : shell_transition_target -> int32 -> unit + (** set field layer_id in shell_transition_target *) + +val shell_transition_target_has_window_id : shell_transition_target -> bool + (** presence of field "window_id" in [shell_transition_target] *) + +val shell_transition_target_set_window_id : shell_transition_target -> int32 -> unit + (** set field window_id in shell_transition_target *) + +val shell_transition_target_has_flags : shell_transition_target -> bool + (** presence of field "flags" in [shell_transition_target] *) + +val shell_transition_target_set_flags : shell_transition_target -> int32 -> unit + (** set field flags in shell_transition_target *) + +val make_shell_transition : + ?id:int32 -> + ?create_time_ns:int64 -> + ?send_time_ns:int64 -> + ?dispatch_time_ns:int64 -> + ?merge_time_ns:int64 -> + ?merge_request_time_ns:int64 -> + ?shell_abort_time_ns:int64 -> + ?wm_abort_time_ns:int64 -> + ?finish_time_ns:int64 -> + ?start_transaction_id:int64 -> + ?finish_transaction_id:int64 -> + ?handler:int32 -> + ?type_:int32 -> + ?targets:shell_transition_target list -> + ?merge_target:int32 -> + ?flags:int32 -> + ?starting_window_remove_time_ns:int64 -> + unit -> + shell_transition +(** [make_shell_transition … ()] is a builder for type [shell_transition] *) + +val copy_shell_transition : shell_transition -> shell_transition + +val shell_transition_has_id : shell_transition -> bool + (** presence of field "id" in [shell_transition] *) + +val shell_transition_set_id : shell_transition -> int32 -> unit + (** set field id in shell_transition *) + +val shell_transition_has_create_time_ns : shell_transition -> bool + (** presence of field "create_time_ns" in [shell_transition] *) + +val shell_transition_set_create_time_ns : shell_transition -> int64 -> unit + (** set field create_time_ns in shell_transition *) + +val shell_transition_has_send_time_ns : shell_transition -> bool + (** presence of field "send_time_ns" in [shell_transition] *) + +val shell_transition_set_send_time_ns : shell_transition -> int64 -> unit + (** set field send_time_ns in shell_transition *) + +val shell_transition_has_dispatch_time_ns : shell_transition -> bool + (** presence of field "dispatch_time_ns" in [shell_transition] *) + +val shell_transition_set_dispatch_time_ns : shell_transition -> int64 -> unit + (** set field dispatch_time_ns in shell_transition *) + +val shell_transition_has_merge_time_ns : shell_transition -> bool + (** presence of field "merge_time_ns" in [shell_transition] *) + +val shell_transition_set_merge_time_ns : shell_transition -> int64 -> unit + (** set field merge_time_ns in shell_transition *) + +val shell_transition_has_merge_request_time_ns : shell_transition -> bool + (** presence of field "merge_request_time_ns" in [shell_transition] *) + +val shell_transition_set_merge_request_time_ns : shell_transition -> int64 -> unit + (** set field merge_request_time_ns in shell_transition *) + +val shell_transition_has_shell_abort_time_ns : shell_transition -> bool + (** presence of field "shell_abort_time_ns" in [shell_transition] *) + +val shell_transition_set_shell_abort_time_ns : shell_transition -> int64 -> unit + (** set field shell_abort_time_ns in shell_transition *) + +val shell_transition_has_wm_abort_time_ns : shell_transition -> bool + (** presence of field "wm_abort_time_ns" in [shell_transition] *) + +val shell_transition_set_wm_abort_time_ns : shell_transition -> int64 -> unit + (** set field wm_abort_time_ns in shell_transition *) + +val shell_transition_has_finish_time_ns : shell_transition -> bool + (** presence of field "finish_time_ns" in [shell_transition] *) + +val shell_transition_set_finish_time_ns : shell_transition -> int64 -> unit + (** set field finish_time_ns in shell_transition *) + +val shell_transition_has_start_transaction_id : shell_transition -> bool + (** presence of field "start_transaction_id" in [shell_transition] *) + +val shell_transition_set_start_transaction_id : shell_transition -> int64 -> unit + (** set field start_transaction_id in shell_transition *) + +val shell_transition_has_finish_transaction_id : shell_transition -> bool + (** presence of field "finish_transaction_id" in [shell_transition] *) + +val shell_transition_set_finish_transaction_id : shell_transition -> int64 -> unit + (** set field finish_transaction_id in shell_transition *) + +val shell_transition_has_handler : shell_transition -> bool + (** presence of field "handler" in [shell_transition] *) + +val shell_transition_set_handler : shell_transition -> int32 -> unit + (** set field handler in shell_transition *) + +val shell_transition_has_type_ : shell_transition -> bool + (** presence of field "type_" in [shell_transition] *) + +val shell_transition_set_type_ : shell_transition -> int32 -> unit + (** set field type_ in shell_transition *) + +val shell_transition_set_targets : shell_transition -> shell_transition_target list -> unit + (** set field targets in shell_transition *) + +val shell_transition_has_merge_target : shell_transition -> bool + (** presence of field "merge_target" in [shell_transition] *) + +val shell_transition_set_merge_target : shell_transition -> int32 -> unit + (** set field merge_target in shell_transition *) + +val shell_transition_has_flags : shell_transition -> bool + (** presence of field "flags" in [shell_transition] *) + +val shell_transition_set_flags : shell_transition -> int32 -> unit + (** set field flags in shell_transition *) + +val shell_transition_has_starting_window_remove_time_ns : shell_transition -> bool + (** presence of field "starting_window_remove_time_ns" in [shell_transition] *) + +val shell_transition_set_starting_window_remove_time_ns : shell_transition -> int64 -> unit + (** set field starting_window_remove_time_ns in shell_transition *) + +val make_shell_handler_mapping : + ?id:int32 -> + ?name:string -> + unit -> + shell_handler_mapping +(** [make_shell_handler_mapping … ()] is a builder for type [shell_handler_mapping] *) + +val copy_shell_handler_mapping : shell_handler_mapping -> shell_handler_mapping + +val shell_handler_mapping_has_id : shell_handler_mapping -> bool + (** presence of field "id" in [shell_handler_mapping] *) + +val shell_handler_mapping_set_id : shell_handler_mapping -> int32 -> unit + (** set field id in shell_handler_mapping *) + +val shell_handler_mapping_has_name : shell_handler_mapping -> bool + (** presence of field "name" in [shell_handler_mapping] *) + +val shell_handler_mapping_set_name : shell_handler_mapping -> string -> unit + (** set field name in shell_handler_mapping *) + +val make_shell_handler_mappings : + ?mapping:shell_handler_mapping list -> + unit -> + shell_handler_mappings +(** [make_shell_handler_mappings … ()] is a builder for type [shell_handler_mappings] *) + +val copy_shell_handler_mappings : shell_handler_mappings -> shell_handler_mappings + +val shell_handler_mappings_set_mapping : shell_handler_mappings -> shell_handler_mapping list -> unit + (** set field mapping in shell_handler_mappings *) + +val make_rect_proto : + ?left:int32 -> + ?top:int32 -> + ?right:int32 -> + ?bottom:int32 -> + unit -> + rect_proto +(** [make_rect_proto … ()] is a builder for type [rect_proto] *) + +val copy_rect_proto : rect_proto -> rect_proto + +val rect_proto_has_left : rect_proto -> bool + (** presence of field "left" in [rect_proto] *) + +val rect_proto_set_left : rect_proto -> int32 -> unit + (** set field left in rect_proto *) + +val rect_proto_has_top : rect_proto -> bool + (** presence of field "top" in [rect_proto] *) + +val rect_proto_set_top : rect_proto -> int32 -> unit + (** set field top in rect_proto *) + +val rect_proto_has_right : rect_proto -> bool + (** presence of field "right" in [rect_proto] *) + +val rect_proto_set_right : rect_proto -> int32 -> unit + (** set field right in rect_proto *) + +val rect_proto_has_bottom : rect_proto -> bool + (** presence of field "bottom" in [rect_proto] *) + +val rect_proto_set_bottom : rect_proto -> int32 -> unit + (** set field bottom in rect_proto *) + +val make_region_proto : + ?rect:rect_proto list -> + unit -> + region_proto +(** [make_region_proto … ()] is a builder for type [region_proto] *) + +val copy_region_proto : region_proto -> region_proto + +val region_proto_set_rect : region_proto -> rect_proto list -> unit + (** set field rect in region_proto *) + +val make_size_proto : + ?w:int32 -> + ?h:int32 -> + unit -> + size_proto +(** [make_size_proto … ()] is a builder for type [size_proto] *) + +val copy_size_proto : size_proto -> size_proto + +val size_proto_has_w : size_proto -> bool + (** presence of field "w" in [size_proto] *) + +val size_proto_set_w : size_proto -> int32 -> unit + (** set field w in size_proto *) + +val size_proto_has_h : size_proto -> bool + (** presence of field "h" in [size_proto] *) + +val size_proto_set_h : size_proto -> int32 -> unit + (** set field h in size_proto *) + +val make_transform_proto : + ?dsdx:float -> + ?dtdx:float -> + ?dsdy:float -> + ?dtdy:float -> + ?type_:int32 -> + unit -> + transform_proto +(** [make_transform_proto … ()] is a builder for type [transform_proto] *) + +val copy_transform_proto : transform_proto -> transform_proto + +val transform_proto_has_dsdx : transform_proto -> bool + (** presence of field "dsdx" in [transform_proto] *) + +val transform_proto_set_dsdx : transform_proto -> float -> unit + (** set field dsdx in transform_proto *) + +val transform_proto_has_dtdx : transform_proto -> bool + (** presence of field "dtdx" in [transform_proto] *) + +val transform_proto_set_dtdx : transform_proto -> float -> unit + (** set field dtdx in transform_proto *) + +val transform_proto_has_dsdy : transform_proto -> bool + (** presence of field "dsdy" in [transform_proto] *) + +val transform_proto_set_dsdy : transform_proto -> float -> unit + (** set field dsdy in transform_proto *) + +val transform_proto_has_dtdy : transform_proto -> bool + (** presence of field "dtdy" in [transform_proto] *) + +val transform_proto_set_dtdy : transform_proto -> float -> unit + (** set field dtdy in transform_proto *) + +val transform_proto_has_type_ : transform_proto -> bool + (** presence of field "type_" in [transform_proto] *) + +val transform_proto_set_type_ : transform_proto -> int32 -> unit + (** set field type_ in transform_proto *) + +val make_color_proto : + ?r:float -> + ?g:float -> + ?b:float -> + ?a:float -> + unit -> + color_proto +(** [make_color_proto … ()] is a builder for type [color_proto] *) + +val copy_color_proto : color_proto -> color_proto + +val color_proto_has_r : color_proto -> bool + (** presence of field "r" in [color_proto] *) + +val color_proto_set_r : color_proto -> float -> unit + (** set field r in color_proto *) + +val color_proto_has_g : color_proto -> bool + (** presence of field "g" in [color_proto] *) + +val color_proto_set_g : color_proto -> float -> unit + (** set field g in color_proto *) + +val color_proto_has_b : color_proto -> bool + (** presence of field "b" in [color_proto] *) + +val color_proto_set_b : color_proto -> float -> unit + (** set field b in color_proto *) + +val color_proto_has_a : color_proto -> bool + (** presence of field "a" in [color_proto] *) + +val color_proto_set_a : color_proto -> float -> unit + (** set field a in color_proto *) + +val make_input_window_info_proto : + ?layout_params_flags:int32 -> + ?layout_params_type:int32 -> + ?frame:rect_proto -> + ?touchable_region:region_proto -> + ?surface_inset:int32 -> + ?visible:bool -> + ?can_receive_keys:bool -> + ?focusable:bool -> + ?has_wallpaper:bool -> + ?global_scale_factor:float -> + ?window_x_scale:float -> + ?window_y_scale:float -> + ?crop_layer_id:int32 -> + ?replace_touchable_region_with_crop:bool -> + ?touchable_region_crop:rect_proto -> + ?transform:transform_proto -> + ?input_config:int32 -> + unit -> + input_window_info_proto +(** [make_input_window_info_proto … ()] is a builder for type [input_window_info_proto] *) + +val copy_input_window_info_proto : input_window_info_proto -> input_window_info_proto + +val input_window_info_proto_has_layout_params_flags : input_window_info_proto -> bool + (** presence of field "layout_params_flags" in [input_window_info_proto] *) + +val input_window_info_proto_set_layout_params_flags : input_window_info_proto -> int32 -> unit + (** set field layout_params_flags in input_window_info_proto *) + +val input_window_info_proto_has_layout_params_type : input_window_info_proto -> bool + (** presence of field "layout_params_type" in [input_window_info_proto] *) + +val input_window_info_proto_set_layout_params_type : input_window_info_proto -> int32 -> unit + (** set field layout_params_type in input_window_info_proto *) + +val input_window_info_proto_set_frame : input_window_info_proto -> rect_proto -> unit + (** set field frame in input_window_info_proto *) + +val input_window_info_proto_set_touchable_region : input_window_info_proto -> region_proto -> unit + (** set field touchable_region in input_window_info_proto *) + +val input_window_info_proto_has_surface_inset : input_window_info_proto -> bool + (** presence of field "surface_inset" in [input_window_info_proto] *) + +val input_window_info_proto_set_surface_inset : input_window_info_proto -> int32 -> unit + (** set field surface_inset in input_window_info_proto *) + +val input_window_info_proto_has_visible : input_window_info_proto -> bool + (** presence of field "visible" in [input_window_info_proto] *) + +val input_window_info_proto_set_visible : input_window_info_proto -> bool -> unit + (** set field visible in input_window_info_proto *) + +val input_window_info_proto_has_can_receive_keys : input_window_info_proto -> bool + (** presence of field "can_receive_keys" in [input_window_info_proto] *) + +val input_window_info_proto_set_can_receive_keys : input_window_info_proto -> bool -> unit + (** set field can_receive_keys in input_window_info_proto *) + +val input_window_info_proto_has_focusable : input_window_info_proto -> bool + (** presence of field "focusable" in [input_window_info_proto] *) + +val input_window_info_proto_set_focusable : input_window_info_proto -> bool -> unit + (** set field focusable in input_window_info_proto *) + +val input_window_info_proto_has_has_wallpaper : input_window_info_proto -> bool + (** presence of field "has_wallpaper" in [input_window_info_proto] *) + +val input_window_info_proto_set_has_wallpaper : input_window_info_proto -> bool -> unit + (** set field has_wallpaper in input_window_info_proto *) + +val input_window_info_proto_has_global_scale_factor : input_window_info_proto -> bool + (** presence of field "global_scale_factor" in [input_window_info_proto] *) + +val input_window_info_proto_set_global_scale_factor : input_window_info_proto -> float -> unit + (** set field global_scale_factor in input_window_info_proto *) + +val input_window_info_proto_has_window_x_scale : input_window_info_proto -> bool + (** presence of field "window_x_scale" in [input_window_info_proto] *) + +val input_window_info_proto_set_window_x_scale : input_window_info_proto -> float -> unit + (** set field window_x_scale in input_window_info_proto *) + +val input_window_info_proto_has_window_y_scale : input_window_info_proto -> bool + (** presence of field "window_y_scale" in [input_window_info_proto] *) + +val input_window_info_proto_set_window_y_scale : input_window_info_proto -> float -> unit + (** set field window_y_scale in input_window_info_proto *) + +val input_window_info_proto_has_crop_layer_id : input_window_info_proto -> bool + (** presence of field "crop_layer_id" in [input_window_info_proto] *) + +val input_window_info_proto_set_crop_layer_id : input_window_info_proto -> int32 -> unit + (** set field crop_layer_id in input_window_info_proto *) + +val input_window_info_proto_has_replace_touchable_region_with_crop : input_window_info_proto -> bool + (** presence of field "replace_touchable_region_with_crop" in [input_window_info_proto] *) + +val input_window_info_proto_set_replace_touchable_region_with_crop : input_window_info_proto -> bool -> unit + (** set field replace_touchable_region_with_crop in input_window_info_proto *) + +val input_window_info_proto_set_touchable_region_crop : input_window_info_proto -> rect_proto -> unit + (** set field touchable_region_crop in input_window_info_proto *) + +val input_window_info_proto_set_transform : input_window_info_proto -> transform_proto -> unit + (** set field transform in input_window_info_proto *) + +val input_window_info_proto_has_input_config : input_window_info_proto -> bool + (** presence of field "input_config" in [input_window_info_proto] *) + +val input_window_info_proto_set_input_config : input_window_info_proto -> int32 -> unit + (** set field input_config in input_window_info_proto *) + +val make_blur_region : + ?blur_radius:int32 -> + ?corner_radius_tl:int32 -> + ?corner_radius_tr:int32 -> + ?corner_radius_bl:int32 -> + ?corner_radius_br:float -> + ?corner_radius_tlx:float -> + ?corner_radius_tly:float -> + ?corner_radius_trx:float -> + ?corner_radius_try:float -> + ?corner_radius_blx:float -> + ?corner_radius_bly:float -> + ?corner_radius_brx:float -> + ?corner_radius_bry:float -> + ?alpha:float -> + ?left:int32 -> + ?top:int32 -> + ?right:int32 -> + ?bottom:int32 -> + unit -> + blur_region +(** [make_blur_region … ()] is a builder for type [blur_region] *) + +val copy_blur_region : blur_region -> blur_region + +val blur_region_has_blur_radius : blur_region -> bool + (** presence of field "blur_radius" in [blur_region] *) + +val blur_region_set_blur_radius : blur_region -> int32 -> unit + (** set field blur_radius in blur_region *) + +val blur_region_has_corner_radius_tl : blur_region -> bool + (** presence of field "corner_radius_tl" in [blur_region] *) + +val blur_region_set_corner_radius_tl : blur_region -> int32 -> unit + (** set field corner_radius_tl in blur_region *) + +val blur_region_has_corner_radius_tr : blur_region -> bool + (** presence of field "corner_radius_tr" in [blur_region] *) + +val blur_region_set_corner_radius_tr : blur_region -> int32 -> unit + (** set field corner_radius_tr in blur_region *) + +val blur_region_has_corner_radius_bl : blur_region -> bool + (** presence of field "corner_radius_bl" in [blur_region] *) + +val blur_region_set_corner_radius_bl : blur_region -> int32 -> unit + (** set field corner_radius_bl in blur_region *) + +val blur_region_has_corner_radius_br : blur_region -> bool + (** presence of field "corner_radius_br" in [blur_region] *) + +val blur_region_set_corner_radius_br : blur_region -> float -> unit + (** set field corner_radius_br in blur_region *) + +val blur_region_has_corner_radius_tlx : blur_region -> bool + (** presence of field "corner_radius_tlx" in [blur_region] *) + +val blur_region_set_corner_radius_tlx : blur_region -> float -> unit + (** set field corner_radius_tlx in blur_region *) + +val blur_region_has_corner_radius_tly : blur_region -> bool + (** presence of field "corner_radius_tly" in [blur_region] *) + +val blur_region_set_corner_radius_tly : blur_region -> float -> unit + (** set field corner_radius_tly in blur_region *) + +val blur_region_has_corner_radius_trx : blur_region -> bool + (** presence of field "corner_radius_trx" in [blur_region] *) + +val blur_region_set_corner_radius_trx : blur_region -> float -> unit + (** set field corner_radius_trx in blur_region *) + +val blur_region_has_corner_radius_try : blur_region -> bool + (** presence of field "corner_radius_try" in [blur_region] *) + +val blur_region_set_corner_radius_try : blur_region -> float -> unit + (** set field corner_radius_try in blur_region *) + +val blur_region_has_corner_radius_blx : blur_region -> bool + (** presence of field "corner_radius_blx" in [blur_region] *) + +val blur_region_set_corner_radius_blx : blur_region -> float -> unit + (** set field corner_radius_blx in blur_region *) + +val blur_region_has_corner_radius_bly : blur_region -> bool + (** presence of field "corner_radius_bly" in [blur_region] *) + +val blur_region_set_corner_radius_bly : blur_region -> float -> unit + (** set field corner_radius_bly in blur_region *) + +val blur_region_has_corner_radius_brx : blur_region -> bool + (** presence of field "corner_radius_brx" in [blur_region] *) + +val blur_region_set_corner_radius_brx : blur_region -> float -> unit + (** set field corner_radius_brx in blur_region *) + +val blur_region_has_corner_radius_bry : blur_region -> bool + (** presence of field "corner_radius_bry" in [blur_region] *) + +val blur_region_set_corner_radius_bry : blur_region -> float -> unit + (** set field corner_radius_bry in blur_region *) + +val blur_region_has_alpha : blur_region -> bool + (** presence of field "alpha" in [blur_region] *) + +val blur_region_set_alpha : blur_region -> float -> unit + (** set field alpha in blur_region *) + +val blur_region_has_left : blur_region -> bool + (** presence of field "left" in [blur_region] *) + +val blur_region_set_left : blur_region -> int32 -> unit + (** set field left in blur_region *) + +val blur_region_has_top : blur_region -> bool + (** presence of field "top" in [blur_region] *) + +val blur_region_set_top : blur_region -> int32 -> unit + (** set field top in blur_region *) + +val blur_region_has_right : blur_region -> bool + (** presence of field "right" in [blur_region] *) + +val blur_region_set_right : blur_region -> int32 -> unit + (** set field right in blur_region *) + +val blur_region_has_bottom : blur_region -> bool + (** presence of field "bottom" in [blur_region] *) + +val blur_region_set_bottom : blur_region -> int32 -> unit + (** set field bottom in blur_region *) + +val make_color_transform_proto : + ?val_:float list -> + unit -> + color_transform_proto +(** [make_color_transform_proto … ()] is a builder for type [color_transform_proto] *) + +val copy_color_transform_proto : color_transform_proto -> color_transform_proto + +val color_transform_proto_set_val_ : color_transform_proto -> float list -> unit + (** set field val_ in color_transform_proto *) + +val make_box_shadow_settings_box_shadow_params : + ?blur_radius:float -> + ?spread_radius:float -> + ?color:int32 -> + ?offset_x:float -> + ?offset_y:float -> + unit -> + box_shadow_settings_box_shadow_params +(** [make_box_shadow_settings_box_shadow_params … ()] is a builder for type [box_shadow_settings_box_shadow_params] *) + +val copy_box_shadow_settings_box_shadow_params : box_shadow_settings_box_shadow_params -> box_shadow_settings_box_shadow_params + +val box_shadow_settings_box_shadow_params_has_blur_radius : box_shadow_settings_box_shadow_params -> bool + (** presence of field "blur_radius" in [box_shadow_settings_box_shadow_params] *) + +val box_shadow_settings_box_shadow_params_set_blur_radius : box_shadow_settings_box_shadow_params -> float -> unit + (** set field blur_radius in box_shadow_settings_box_shadow_params *) + +val box_shadow_settings_box_shadow_params_has_spread_radius : box_shadow_settings_box_shadow_params -> bool + (** presence of field "spread_radius" in [box_shadow_settings_box_shadow_params] *) + +val box_shadow_settings_box_shadow_params_set_spread_radius : box_shadow_settings_box_shadow_params -> float -> unit + (** set field spread_radius in box_shadow_settings_box_shadow_params *) + +val box_shadow_settings_box_shadow_params_has_color : box_shadow_settings_box_shadow_params -> bool + (** presence of field "color" in [box_shadow_settings_box_shadow_params] *) + +val box_shadow_settings_box_shadow_params_set_color : box_shadow_settings_box_shadow_params -> int32 -> unit + (** set field color in box_shadow_settings_box_shadow_params *) + +val box_shadow_settings_box_shadow_params_has_offset_x : box_shadow_settings_box_shadow_params -> bool + (** presence of field "offset_x" in [box_shadow_settings_box_shadow_params] *) + +val box_shadow_settings_box_shadow_params_set_offset_x : box_shadow_settings_box_shadow_params -> float -> unit + (** set field offset_x in box_shadow_settings_box_shadow_params *) + +val box_shadow_settings_box_shadow_params_has_offset_y : box_shadow_settings_box_shadow_params -> bool + (** presence of field "offset_y" in [box_shadow_settings_box_shadow_params] *) + +val box_shadow_settings_box_shadow_params_set_offset_y : box_shadow_settings_box_shadow_params -> float -> unit + (** set field offset_y in box_shadow_settings_box_shadow_params *) + +val make_box_shadow_settings : + ?box_shadows:box_shadow_settings_box_shadow_params list -> + unit -> + box_shadow_settings +(** [make_box_shadow_settings … ()] is a builder for type [box_shadow_settings] *) + +val copy_box_shadow_settings : box_shadow_settings -> box_shadow_settings + +val box_shadow_settings_set_box_shadows : box_shadow_settings -> box_shadow_settings_box_shadow_params list -> unit + (** set field box_shadows in box_shadow_settings *) + +val make_border_settings : + ?stroke_width:float -> + ?color:int32 -> + unit -> + border_settings +(** [make_border_settings … ()] is a builder for type [border_settings] *) + +val copy_border_settings : border_settings -> border_settings + +val border_settings_has_stroke_width : border_settings -> bool + (** presence of field "stroke_width" in [border_settings] *) + +val border_settings_set_stroke_width : border_settings -> float -> unit + (** set field stroke_width in border_settings *) + +val border_settings_has_color : border_settings -> bool + (** presence of field "color" in [border_settings] *) + +val border_settings_set_color : border_settings -> int32 -> unit + (** set field color in border_settings *) + +val make_position_proto : + ?x:float -> + ?y:float -> + unit -> + position_proto +(** [make_position_proto … ()] is a builder for type [position_proto] *) + +val copy_position_proto : position_proto -> position_proto + +val position_proto_has_x : position_proto -> bool + (** presence of field "x" in [position_proto] *) + +val position_proto_set_x : position_proto -> float -> unit + (** set field x in position_proto *) + +val position_proto_has_y : position_proto -> bool + (** presence of field "y" in [position_proto] *) + +val position_proto_set_y : position_proto -> float -> unit + (** set field y in position_proto *) + +val make_active_buffer_proto : + ?width:int32 -> + ?height:int32 -> + ?stride:int32 -> + ?format:int32 -> + ?usage:int64 -> + unit -> + active_buffer_proto +(** [make_active_buffer_proto … ()] is a builder for type [active_buffer_proto] *) + +val copy_active_buffer_proto : active_buffer_proto -> active_buffer_proto + +val active_buffer_proto_has_width : active_buffer_proto -> bool + (** presence of field "width" in [active_buffer_proto] *) + +val active_buffer_proto_set_width : active_buffer_proto -> int32 -> unit + (** set field width in active_buffer_proto *) + +val active_buffer_proto_has_height : active_buffer_proto -> bool + (** presence of field "height" in [active_buffer_proto] *) + +val active_buffer_proto_set_height : active_buffer_proto -> int32 -> unit + (** set field height in active_buffer_proto *) + +val active_buffer_proto_has_stride : active_buffer_proto -> bool + (** presence of field "stride" in [active_buffer_proto] *) + +val active_buffer_proto_set_stride : active_buffer_proto -> int32 -> unit + (** set field stride in active_buffer_proto *) + +val active_buffer_proto_has_format : active_buffer_proto -> bool + (** presence of field "format" in [active_buffer_proto] *) + +val active_buffer_proto_set_format : active_buffer_proto -> int32 -> unit + (** set field format in active_buffer_proto *) + +val active_buffer_proto_has_usage : active_buffer_proto -> bool + (** presence of field "usage" in [active_buffer_proto] *) + +val active_buffer_proto_set_usage : active_buffer_proto -> int64 -> unit + (** set field usage in active_buffer_proto *) + +val make_float_rect_proto : + ?left:float -> + ?top:float -> + ?right:float -> + ?bottom:float -> + unit -> + float_rect_proto +(** [make_float_rect_proto … ()] is a builder for type [float_rect_proto] *) + +val copy_float_rect_proto : float_rect_proto -> float_rect_proto + +val float_rect_proto_has_left : float_rect_proto -> bool + (** presence of field "left" in [float_rect_proto] *) + +val float_rect_proto_set_left : float_rect_proto -> float -> unit + (** set field left in float_rect_proto *) + +val float_rect_proto_has_top : float_rect_proto -> bool + (** presence of field "top" in [float_rect_proto] *) + +val float_rect_proto_set_top : float_rect_proto -> float -> unit + (** set field top in float_rect_proto *) + +val float_rect_proto_has_right : float_rect_proto -> bool + (** presence of field "right" in [float_rect_proto] *) + +val float_rect_proto_set_right : float_rect_proto -> float -> unit + (** set field right in float_rect_proto *) + +val float_rect_proto_has_bottom : float_rect_proto -> bool + (** presence of field "bottom" in [float_rect_proto] *) + +val float_rect_proto_set_bottom : float_rect_proto -> float -> unit + (** set field bottom in float_rect_proto *) + +val make_barrier_layer_proto : + ?id:int32 -> + ?frame_number:int64 -> + unit -> + barrier_layer_proto +(** [make_barrier_layer_proto … ()] is a builder for type [barrier_layer_proto] *) + +val copy_barrier_layer_proto : barrier_layer_proto -> barrier_layer_proto + +val barrier_layer_proto_has_id : barrier_layer_proto -> bool + (** presence of field "id" in [barrier_layer_proto] *) + +val barrier_layer_proto_set_id : barrier_layer_proto -> int32 -> unit + (** set field id in barrier_layer_proto *) + +val barrier_layer_proto_has_frame_number : barrier_layer_proto -> bool + (** presence of field "frame_number" in [barrier_layer_proto] *) + +val barrier_layer_proto_set_frame_number : barrier_layer_proto -> int64 -> unit + (** set field frame_number in barrier_layer_proto *) + +val make_corner_radii_proto : + ?tl:float -> + ?tr:float -> + ?bl:float -> + ?br:float -> + unit -> + corner_radii_proto +(** [make_corner_radii_proto … ()] is a builder for type [corner_radii_proto] *) + +val copy_corner_radii_proto : corner_radii_proto -> corner_radii_proto + +val corner_radii_proto_has_tl : corner_radii_proto -> bool + (** presence of field "tl" in [corner_radii_proto] *) + +val corner_radii_proto_set_tl : corner_radii_proto -> float -> unit + (** set field tl in corner_radii_proto *) + +val corner_radii_proto_has_tr : corner_radii_proto -> bool + (** presence of field "tr" in [corner_radii_proto] *) + +val corner_radii_proto_set_tr : corner_radii_proto -> float -> unit + (** set field tr in corner_radii_proto *) + +val corner_radii_proto_has_bl : corner_radii_proto -> bool + (** presence of field "bl" in [corner_radii_proto] *) + +val corner_radii_proto_set_bl : corner_radii_proto -> float -> unit + (** set field bl in corner_radii_proto *) + +val corner_radii_proto_has_br : corner_radii_proto -> bool + (** presence of field "br" in [corner_radii_proto] *) + +val corner_radii_proto_set_br : corner_radii_proto -> float -> unit + (** set field br in corner_radii_proto *) + +val make_layer_proto : + ?id:int32 -> + ?name:string -> + ?children:int32 list -> + ?relatives:int32 list -> + ?type_:string -> + ?transparent_region:region_proto -> + ?visible_region:region_proto -> + ?damage_region:region_proto -> + ?layer_stack:int32 -> + ?z:int32 -> + ?position:position_proto -> + ?requested_position:position_proto -> + ?size:size_proto -> + ?crop:rect_proto -> + ?final_crop:rect_proto -> + ?is_opaque:bool -> + ?invalidate:bool -> + ?dataspace:string -> + ?pixel_format:string -> + ?color:color_proto -> + ?requested_color:color_proto -> + ?flags:int32 -> + ?transform:transform_proto -> + ?requested_transform:transform_proto -> + ?parent:int32 -> + ?z_order_relative_of:int32 -> + ?active_buffer:active_buffer_proto -> + ?queued_frames:int32 -> + ?refresh_pending:bool -> + ?hwc_frame:rect_proto -> + ?hwc_crop:float_rect_proto -> + ?hwc_transform:int32 -> + ?window_type:int32 -> + ?app_id:int32 -> + ?hwc_composition_type:hwc_composition_type -> + ?is_protected:bool -> + ?curr_frame:int64 -> + ?barrier_layer:barrier_layer_proto list -> + ?buffer_transform:transform_proto -> + ?effective_scaling_mode:int32 -> + ?corner_radius:float -> + ?metadata:(int32 * string) list -> + ?effective_transform:transform_proto -> + ?source_bounds:float_rect_proto -> + ?bounds:float_rect_proto -> + ?screen_bounds:float_rect_proto -> + ?input_window_info:input_window_info_proto -> + ?corner_radius_crop:float_rect_proto -> + ?shadow_radius:float -> + ?color_transform:color_transform_proto -> + ?is_relative_of:bool -> + ?background_blur_radius:int32 -> + ?owner_uid:int32 -> + ?blur_regions:blur_region list -> + ?is_trusted_overlay:bool -> + ?requested_corner_radius:float -> + ?destination_frame:rect_proto -> + ?original_id:int32 -> + ?trusted_overlay:trusted_overlay -> + ?background_blur_scale:float -> + ?corner_radii:corner_radii_proto -> + ?requested_corner_radii:corner_radii_proto -> + ?client_drawn_corner_radii:corner_radii_proto -> + ?system_content_priority:int32 -> + ?box_shadow_settings:box_shadow_settings -> + ?border_settings:border_settings -> + ?effective_radii:corner_radii_proto -> + unit -> + layer_proto +(** [make_layer_proto … ()] is a builder for type [layer_proto] *) + +val copy_layer_proto : layer_proto -> layer_proto + +val layer_proto_has_id : layer_proto -> bool + (** presence of field "id" in [layer_proto] *) + +val layer_proto_set_id : layer_proto -> int32 -> unit + (** set field id in layer_proto *) + +val layer_proto_has_name : layer_proto -> bool + (** presence of field "name" in [layer_proto] *) + +val layer_proto_set_name : layer_proto -> string -> unit + (** set field name in layer_proto *) + +val layer_proto_set_children : layer_proto -> int32 list -> unit + (** set field children in layer_proto *) + +val layer_proto_set_relatives : layer_proto -> int32 list -> unit + (** set field relatives in layer_proto *) + +val layer_proto_has_type_ : layer_proto -> bool + (** presence of field "type_" in [layer_proto] *) + +val layer_proto_set_type_ : layer_proto -> string -> unit + (** set field type_ in layer_proto *) + +val layer_proto_set_transparent_region : layer_proto -> region_proto -> unit + (** set field transparent_region in layer_proto *) + +val layer_proto_set_visible_region : layer_proto -> region_proto -> unit + (** set field visible_region in layer_proto *) + +val layer_proto_set_damage_region : layer_proto -> region_proto -> unit + (** set field damage_region in layer_proto *) + +val layer_proto_has_layer_stack : layer_proto -> bool + (** presence of field "layer_stack" in [layer_proto] *) + +val layer_proto_set_layer_stack : layer_proto -> int32 -> unit + (** set field layer_stack in layer_proto *) + +val layer_proto_has_z : layer_proto -> bool + (** presence of field "z" in [layer_proto] *) + +val layer_proto_set_z : layer_proto -> int32 -> unit + (** set field z in layer_proto *) + +val layer_proto_set_position : layer_proto -> position_proto -> unit + (** set field position in layer_proto *) + +val layer_proto_set_requested_position : layer_proto -> position_proto -> unit + (** set field requested_position in layer_proto *) + +val layer_proto_set_size : layer_proto -> size_proto -> unit + (** set field size in layer_proto *) + +val layer_proto_set_crop : layer_proto -> rect_proto -> unit + (** set field crop in layer_proto *) + +val layer_proto_set_final_crop : layer_proto -> rect_proto -> unit + (** set field final_crop in layer_proto *) + +val layer_proto_has_is_opaque : layer_proto -> bool + (** presence of field "is_opaque" in [layer_proto] *) + +val layer_proto_set_is_opaque : layer_proto -> bool -> unit + (** set field is_opaque in layer_proto *) + +val layer_proto_has_invalidate : layer_proto -> bool + (** presence of field "invalidate" in [layer_proto] *) + +val layer_proto_set_invalidate : layer_proto -> bool -> unit + (** set field invalidate in layer_proto *) + +val layer_proto_has_dataspace : layer_proto -> bool + (** presence of field "dataspace" in [layer_proto] *) + +val layer_proto_set_dataspace : layer_proto -> string -> unit + (** set field dataspace in layer_proto *) + +val layer_proto_has_pixel_format : layer_proto -> bool + (** presence of field "pixel_format" in [layer_proto] *) + +val layer_proto_set_pixel_format : layer_proto -> string -> unit + (** set field pixel_format in layer_proto *) + +val layer_proto_set_color : layer_proto -> color_proto -> unit + (** set field color in layer_proto *) + +val layer_proto_set_requested_color : layer_proto -> color_proto -> unit + (** set field requested_color in layer_proto *) + +val layer_proto_has_flags : layer_proto -> bool + (** presence of field "flags" in [layer_proto] *) + +val layer_proto_set_flags : layer_proto -> int32 -> unit + (** set field flags in layer_proto *) + +val layer_proto_set_transform : layer_proto -> transform_proto -> unit + (** set field transform in layer_proto *) + +val layer_proto_set_requested_transform : layer_proto -> transform_proto -> unit + (** set field requested_transform in layer_proto *) + +val layer_proto_has_parent : layer_proto -> bool + (** presence of field "parent" in [layer_proto] *) + +val layer_proto_set_parent : layer_proto -> int32 -> unit + (** set field parent in layer_proto *) + +val layer_proto_has_z_order_relative_of : layer_proto -> bool + (** presence of field "z_order_relative_of" in [layer_proto] *) + +val layer_proto_set_z_order_relative_of : layer_proto -> int32 -> unit + (** set field z_order_relative_of in layer_proto *) + +val layer_proto_set_active_buffer : layer_proto -> active_buffer_proto -> unit + (** set field active_buffer in layer_proto *) + +val layer_proto_has_queued_frames : layer_proto -> bool + (** presence of field "queued_frames" in [layer_proto] *) + +val layer_proto_set_queued_frames : layer_proto -> int32 -> unit + (** set field queued_frames in layer_proto *) + +val layer_proto_has_refresh_pending : layer_proto -> bool + (** presence of field "refresh_pending" in [layer_proto] *) + +val layer_proto_set_refresh_pending : layer_proto -> bool -> unit + (** set field refresh_pending in layer_proto *) + +val layer_proto_set_hwc_frame : layer_proto -> rect_proto -> unit + (** set field hwc_frame in layer_proto *) + +val layer_proto_set_hwc_crop : layer_proto -> float_rect_proto -> unit + (** set field hwc_crop in layer_proto *) + +val layer_proto_has_hwc_transform : layer_proto -> bool + (** presence of field "hwc_transform" in [layer_proto] *) + +val layer_proto_set_hwc_transform : layer_proto -> int32 -> unit + (** set field hwc_transform in layer_proto *) + +val layer_proto_has_window_type : layer_proto -> bool + (** presence of field "window_type" in [layer_proto] *) + +val layer_proto_set_window_type : layer_proto -> int32 -> unit + (** set field window_type in layer_proto *) + +val layer_proto_has_app_id : layer_proto -> bool + (** presence of field "app_id" in [layer_proto] *) + +val layer_proto_set_app_id : layer_proto -> int32 -> unit + (** set field app_id in layer_proto *) + +val layer_proto_has_hwc_composition_type : layer_proto -> bool + (** presence of field "hwc_composition_type" in [layer_proto] *) + +val layer_proto_set_hwc_composition_type : layer_proto -> hwc_composition_type -> unit + (** set field hwc_composition_type in layer_proto *) + +val layer_proto_has_is_protected : layer_proto -> bool + (** presence of field "is_protected" in [layer_proto] *) + +val layer_proto_set_is_protected : layer_proto -> bool -> unit + (** set field is_protected in layer_proto *) + +val layer_proto_has_curr_frame : layer_proto -> bool + (** presence of field "curr_frame" in [layer_proto] *) + +val layer_proto_set_curr_frame : layer_proto -> int64 -> unit + (** set field curr_frame in layer_proto *) + +val layer_proto_set_barrier_layer : layer_proto -> barrier_layer_proto list -> unit + (** set field barrier_layer in layer_proto *) + +val layer_proto_set_buffer_transform : layer_proto -> transform_proto -> unit + (** set field buffer_transform in layer_proto *) + +val layer_proto_has_effective_scaling_mode : layer_proto -> bool + (** presence of field "effective_scaling_mode" in [layer_proto] *) + +val layer_proto_set_effective_scaling_mode : layer_proto -> int32 -> unit + (** set field effective_scaling_mode in layer_proto *) + +val layer_proto_has_corner_radius : layer_proto -> bool + (** presence of field "corner_radius" in [layer_proto] *) + +val layer_proto_set_corner_radius : layer_proto -> float -> unit + (** set field corner_radius in layer_proto *) + +val layer_proto_set_metadata : layer_proto -> (int32 * string) list -> unit + (** set field metadata in layer_proto *) + +val layer_proto_set_effective_transform : layer_proto -> transform_proto -> unit + (** set field effective_transform in layer_proto *) + +val layer_proto_set_source_bounds : layer_proto -> float_rect_proto -> unit + (** set field source_bounds in layer_proto *) + +val layer_proto_set_bounds : layer_proto -> float_rect_proto -> unit + (** set field bounds in layer_proto *) + +val layer_proto_set_screen_bounds : layer_proto -> float_rect_proto -> unit + (** set field screen_bounds in layer_proto *) + +val layer_proto_set_input_window_info : layer_proto -> input_window_info_proto -> unit + (** set field input_window_info in layer_proto *) + +val layer_proto_set_corner_radius_crop : layer_proto -> float_rect_proto -> unit + (** set field corner_radius_crop in layer_proto *) + +val layer_proto_has_shadow_radius : layer_proto -> bool + (** presence of field "shadow_radius" in [layer_proto] *) + +val layer_proto_set_shadow_radius : layer_proto -> float -> unit + (** set field shadow_radius in layer_proto *) + +val layer_proto_set_color_transform : layer_proto -> color_transform_proto -> unit + (** set field color_transform in layer_proto *) + +val layer_proto_has_is_relative_of : layer_proto -> bool + (** presence of field "is_relative_of" in [layer_proto] *) + +val layer_proto_set_is_relative_of : layer_proto -> bool -> unit + (** set field is_relative_of in layer_proto *) + +val layer_proto_has_background_blur_radius : layer_proto -> bool + (** presence of field "background_blur_radius" in [layer_proto] *) + +val layer_proto_set_background_blur_radius : layer_proto -> int32 -> unit + (** set field background_blur_radius in layer_proto *) + +val layer_proto_has_owner_uid : layer_proto -> bool + (** presence of field "owner_uid" in [layer_proto] *) + +val layer_proto_set_owner_uid : layer_proto -> int32 -> unit + (** set field owner_uid in layer_proto *) + +val layer_proto_set_blur_regions : layer_proto -> blur_region list -> unit + (** set field blur_regions in layer_proto *) + +val layer_proto_has_is_trusted_overlay : layer_proto -> bool + (** presence of field "is_trusted_overlay" in [layer_proto] *) + +val layer_proto_set_is_trusted_overlay : layer_proto -> bool -> unit + (** set field is_trusted_overlay in layer_proto *) + +val layer_proto_has_requested_corner_radius : layer_proto -> bool + (** presence of field "requested_corner_radius" in [layer_proto] *) + +val layer_proto_set_requested_corner_radius : layer_proto -> float -> unit + (** set field requested_corner_radius in layer_proto *) + +val layer_proto_set_destination_frame : layer_proto -> rect_proto -> unit + (** set field destination_frame in layer_proto *) + +val layer_proto_has_original_id : layer_proto -> bool + (** presence of field "original_id" in [layer_proto] *) + +val layer_proto_set_original_id : layer_proto -> int32 -> unit + (** set field original_id in layer_proto *) + +val layer_proto_has_trusted_overlay : layer_proto -> bool + (** presence of field "trusted_overlay" in [layer_proto] *) + +val layer_proto_set_trusted_overlay : layer_proto -> trusted_overlay -> unit + (** set field trusted_overlay in layer_proto *) + +val layer_proto_has_background_blur_scale : layer_proto -> bool + (** presence of field "background_blur_scale" in [layer_proto] *) + +val layer_proto_set_background_blur_scale : layer_proto -> float -> unit + (** set field background_blur_scale in layer_proto *) + +val layer_proto_set_corner_radii : layer_proto -> corner_radii_proto -> unit + (** set field corner_radii in layer_proto *) + +val layer_proto_set_requested_corner_radii : layer_proto -> corner_radii_proto -> unit + (** set field requested_corner_radii in layer_proto *) + +val layer_proto_set_client_drawn_corner_radii : layer_proto -> corner_radii_proto -> unit + (** set field client_drawn_corner_radii in layer_proto *) + +val layer_proto_has_system_content_priority : layer_proto -> bool + (** presence of field "system_content_priority" in [layer_proto] *) + +val layer_proto_set_system_content_priority : layer_proto -> int32 -> unit + (** set field system_content_priority in layer_proto *) + +val layer_proto_set_box_shadow_settings : layer_proto -> box_shadow_settings -> unit + (** set field box_shadow_settings in layer_proto *) + +val layer_proto_set_border_settings : layer_proto -> border_settings -> unit + (** set field border_settings in layer_proto *) + +val layer_proto_set_effective_radii : layer_proto -> corner_radii_proto -> unit + (** set field effective_radii in layer_proto *) + +val make_layers_proto : + ?layers:layer_proto list -> + unit -> + layers_proto +(** [make_layers_proto … ()] is a builder for type [layers_proto] *) + +val copy_layers_proto : layers_proto -> layers_proto + +val layers_proto_set_layers : layers_proto -> layer_proto list -> unit + (** set field layers in layers_proto *) + +val make_display_proto : + ?id:int64 -> + ?name:string -> + ?layer_stack:int32 -> + ?size:size_proto -> + ?layer_stack_space_rect:rect_proto -> + ?transform:transform_proto -> + ?is_virtual:bool -> + ?dpi_x:float -> + ?dpi_y:float -> + unit -> + display_proto +(** [make_display_proto … ()] is a builder for type [display_proto] *) + +val copy_display_proto : display_proto -> display_proto + +val display_proto_has_id : display_proto -> bool + (** presence of field "id" in [display_proto] *) + +val display_proto_set_id : display_proto -> int64 -> unit + (** set field id in display_proto *) + +val display_proto_has_name : display_proto -> bool + (** presence of field "name" in [display_proto] *) + +val display_proto_set_name : display_proto -> string -> unit + (** set field name in display_proto *) + +val display_proto_has_layer_stack : display_proto -> bool + (** presence of field "layer_stack" in [display_proto] *) + +val display_proto_set_layer_stack : display_proto -> int32 -> unit + (** set field layer_stack in display_proto *) + +val display_proto_set_size : display_proto -> size_proto -> unit + (** set field size in display_proto *) + +val display_proto_set_layer_stack_space_rect : display_proto -> rect_proto -> unit + (** set field layer_stack_space_rect in display_proto *) + +val display_proto_set_transform : display_proto -> transform_proto -> unit + (** set field transform in display_proto *) + +val display_proto_has_is_virtual : display_proto -> bool + (** presence of field "is_virtual" in [display_proto] *) + +val display_proto_set_is_virtual : display_proto -> bool -> unit + (** set field is_virtual in display_proto *) + +val display_proto_has_dpi_x : display_proto -> bool + (** presence of field "dpi_x" in [display_proto] *) + +val display_proto_set_dpi_x : display_proto -> float -> unit + (** set field dpi_x in display_proto *) + +val display_proto_has_dpi_y : display_proto -> bool + (** presence of field "dpi_y" in [display_proto] *) + +val display_proto_set_dpi_y : display_proto -> float -> unit + (** set field dpi_y in display_proto *) + +val make_layers_snapshot_proto : + ?elapsed_realtime_nanos:int64 -> + ?where:string -> + ?layers:layers_proto -> + ?hwc_blob:string -> + ?excludes_composition_state:bool -> + ?missed_entries:int32 -> + ?displays:display_proto list -> + ?vsync_id:int64 -> + unit -> + layers_snapshot_proto +(** [make_layers_snapshot_proto … ()] is a builder for type [layers_snapshot_proto] *) + +val copy_layers_snapshot_proto : layers_snapshot_proto -> layers_snapshot_proto + +val layers_snapshot_proto_has_elapsed_realtime_nanos : layers_snapshot_proto -> bool + (** presence of field "elapsed_realtime_nanos" in [layers_snapshot_proto] *) + +val layers_snapshot_proto_set_elapsed_realtime_nanos : layers_snapshot_proto -> int64 -> unit + (** set field elapsed_realtime_nanos in layers_snapshot_proto *) + +val layers_snapshot_proto_has_where : layers_snapshot_proto -> bool + (** presence of field "where" in [layers_snapshot_proto] *) + +val layers_snapshot_proto_set_where : layers_snapshot_proto -> string -> unit + (** set field where in layers_snapshot_proto *) + +val layers_snapshot_proto_set_layers : layers_snapshot_proto -> layers_proto -> unit + (** set field layers in layers_snapshot_proto *) + +val layers_snapshot_proto_has_hwc_blob : layers_snapshot_proto -> bool + (** presence of field "hwc_blob" in [layers_snapshot_proto] *) + +val layers_snapshot_proto_set_hwc_blob : layers_snapshot_proto -> string -> unit + (** set field hwc_blob in layers_snapshot_proto *) + +val layers_snapshot_proto_has_excludes_composition_state : layers_snapshot_proto -> bool + (** presence of field "excludes_composition_state" in [layers_snapshot_proto] *) + +val layers_snapshot_proto_set_excludes_composition_state : layers_snapshot_proto -> bool -> unit + (** set field excludes_composition_state in layers_snapshot_proto *) + +val layers_snapshot_proto_has_missed_entries : layers_snapshot_proto -> bool + (** presence of field "missed_entries" in [layers_snapshot_proto] *) + +val layers_snapshot_proto_set_missed_entries : layers_snapshot_proto -> int32 -> unit + (** set field missed_entries in layers_snapshot_proto *) + +val layers_snapshot_proto_set_displays : layers_snapshot_proto -> display_proto list -> unit + (** set field displays in layers_snapshot_proto *) + +val layers_snapshot_proto_has_vsync_id : layers_snapshot_proto -> bool + (** presence of field "vsync_id" in [layers_snapshot_proto] *) + +val layers_snapshot_proto_set_vsync_id : layers_snapshot_proto -> int64 -> unit + (** set field vsync_id in layers_snapshot_proto *) + +val make_layers_trace_file_proto : + ?magic_number:int64 -> + ?entry:layers_snapshot_proto list -> + ?real_to_elapsed_time_offset_nanos:int64 -> + unit -> + layers_trace_file_proto +(** [make_layers_trace_file_proto … ()] is a builder for type [layers_trace_file_proto] *) + +val copy_layers_trace_file_proto : layers_trace_file_proto -> layers_trace_file_proto + +val layers_trace_file_proto_has_magic_number : layers_trace_file_proto -> bool + (** presence of field "magic_number" in [layers_trace_file_proto] *) + +val layers_trace_file_proto_set_magic_number : layers_trace_file_proto -> int64 -> unit + (** set field magic_number in layers_trace_file_proto *) + +val layers_trace_file_proto_set_entry : layers_trace_file_proto -> layers_snapshot_proto list -> unit + (** set field entry in layers_trace_file_proto *) + +val layers_trace_file_proto_has_real_to_elapsed_time_offset_nanos : layers_trace_file_proto -> bool + (** presence of field "real_to_elapsed_time_offset_nanos" in [layers_trace_file_proto] *) + +val layers_trace_file_proto_set_real_to_elapsed_time_offset_nanos : layers_trace_file_proto -> int64 -> unit + (** set field real_to_elapsed_time_offset_nanos in layers_trace_file_proto *) + +val make_layer_state_matrix22 : + ?dsdx:float -> + ?dtdx:float -> + ?dtdy:float -> + ?dsdy:float -> + unit -> + layer_state_matrix22 +(** [make_layer_state_matrix22 … ()] is a builder for type [layer_state_matrix22] *) + +val copy_layer_state_matrix22 : layer_state_matrix22 -> layer_state_matrix22 + +val layer_state_matrix22_has_dsdx : layer_state_matrix22 -> bool + (** presence of field "dsdx" in [layer_state_matrix22] *) + +val layer_state_matrix22_set_dsdx : layer_state_matrix22 -> float -> unit + (** set field dsdx in layer_state_matrix22 *) + +val layer_state_matrix22_has_dtdx : layer_state_matrix22 -> bool + (** presence of field "dtdx" in [layer_state_matrix22] *) + +val layer_state_matrix22_set_dtdx : layer_state_matrix22 -> float -> unit + (** set field dtdx in layer_state_matrix22 *) + +val layer_state_matrix22_has_dtdy : layer_state_matrix22 -> bool + (** presence of field "dtdy" in [layer_state_matrix22] *) + +val layer_state_matrix22_set_dtdy : layer_state_matrix22 -> float -> unit + (** set field dtdy in layer_state_matrix22 *) + +val layer_state_matrix22_has_dsdy : layer_state_matrix22 -> bool + (** presence of field "dsdy" in [layer_state_matrix22] *) + +val layer_state_matrix22_set_dsdy : layer_state_matrix22 -> float -> unit + (** set field dsdy in layer_state_matrix22 *) + +val make_layer_state_color3 : + ?r:float -> + ?g:float -> + ?b:float -> + unit -> + layer_state_color3 +(** [make_layer_state_color3 … ()] is a builder for type [layer_state_color3] *) + +val copy_layer_state_color3 : layer_state_color3 -> layer_state_color3 + +val layer_state_color3_has_r : layer_state_color3 -> bool + (** presence of field "r" in [layer_state_color3] *) + +val layer_state_color3_set_r : layer_state_color3 -> float -> unit + (** set field r in layer_state_color3 *) + +val layer_state_color3_has_g : layer_state_color3 -> bool + (** presence of field "g" in [layer_state_color3] *) + +val layer_state_color3_set_g : layer_state_color3 -> float -> unit + (** set field g in layer_state_color3 *) + +val layer_state_color3_has_b : layer_state_color3 -> bool + (** presence of field "b" in [layer_state_color3] *) + +val layer_state_color3_set_b : layer_state_color3 -> float -> unit + (** set field b in layer_state_color3 *) + +val make_layer_state_buffer_data : + ?buffer_id:int64 -> + ?width:int32 -> + ?height:int32 -> + ?frame_number:int64 -> + ?flags:int32 -> + ?cached_buffer_id:int64 -> + ?pixel_format:layer_state_buffer_data_pixel_format -> + ?usage:int64 -> + unit -> + layer_state_buffer_data +(** [make_layer_state_buffer_data … ()] is a builder for type [layer_state_buffer_data] *) + +val copy_layer_state_buffer_data : layer_state_buffer_data -> layer_state_buffer_data + +val layer_state_buffer_data_has_buffer_id : layer_state_buffer_data -> bool + (** presence of field "buffer_id" in [layer_state_buffer_data] *) + +val layer_state_buffer_data_set_buffer_id : layer_state_buffer_data -> int64 -> unit + (** set field buffer_id in layer_state_buffer_data *) + +val layer_state_buffer_data_has_width : layer_state_buffer_data -> bool + (** presence of field "width" in [layer_state_buffer_data] *) + +val layer_state_buffer_data_set_width : layer_state_buffer_data -> int32 -> unit + (** set field width in layer_state_buffer_data *) + +val layer_state_buffer_data_has_height : layer_state_buffer_data -> bool + (** presence of field "height" in [layer_state_buffer_data] *) + +val layer_state_buffer_data_set_height : layer_state_buffer_data -> int32 -> unit + (** set field height in layer_state_buffer_data *) + +val layer_state_buffer_data_has_frame_number : layer_state_buffer_data -> bool + (** presence of field "frame_number" in [layer_state_buffer_data] *) + +val layer_state_buffer_data_set_frame_number : layer_state_buffer_data -> int64 -> unit + (** set field frame_number in layer_state_buffer_data *) + +val layer_state_buffer_data_has_flags : layer_state_buffer_data -> bool + (** presence of field "flags" in [layer_state_buffer_data] *) + +val layer_state_buffer_data_set_flags : layer_state_buffer_data -> int32 -> unit + (** set field flags in layer_state_buffer_data *) + +val layer_state_buffer_data_has_cached_buffer_id : layer_state_buffer_data -> bool + (** presence of field "cached_buffer_id" in [layer_state_buffer_data] *) + +val layer_state_buffer_data_set_cached_buffer_id : layer_state_buffer_data -> int64 -> unit + (** set field cached_buffer_id in layer_state_buffer_data *) + +val layer_state_buffer_data_has_pixel_format : layer_state_buffer_data -> bool + (** presence of field "pixel_format" in [layer_state_buffer_data] *) + +val layer_state_buffer_data_set_pixel_format : layer_state_buffer_data -> layer_state_buffer_data_pixel_format -> unit + (** set field pixel_format in layer_state_buffer_data *) + +val layer_state_buffer_data_has_usage : layer_state_buffer_data -> bool + (** presence of field "usage" in [layer_state_buffer_data] *) + +val layer_state_buffer_data_set_usage : layer_state_buffer_data -> int64 -> unit + (** set field usage in layer_state_buffer_data *) + +val make_transform : + ?dsdx:float -> + ?dtdx:float -> + ?dtdy:float -> + ?dsdy:float -> + ?tx:float -> + ?ty:float -> + unit -> + transform +(** [make_transform … ()] is a builder for type [transform] *) + +val copy_transform : transform -> transform + +val transform_has_dsdx : transform -> bool + (** presence of field "dsdx" in [transform] *) + +val transform_set_dsdx : transform -> float -> unit + (** set field dsdx in transform *) + +val transform_has_dtdx : transform -> bool + (** presence of field "dtdx" in [transform] *) + +val transform_set_dtdx : transform -> float -> unit + (** set field dtdx in transform *) + +val transform_has_dtdy : transform -> bool + (** presence of field "dtdy" in [transform] *) + +val transform_set_dtdy : transform -> float -> unit + (** set field dtdy in transform *) + +val transform_has_dsdy : transform -> bool + (** presence of field "dsdy" in [transform] *) + +val transform_set_dsdy : transform -> float -> unit + (** set field dsdy in transform *) + +val transform_has_tx : transform -> bool + (** presence of field "tx" in [transform] *) + +val transform_set_tx : transform -> float -> unit + (** set field tx in transform *) + +val transform_has_ty : transform -> bool + (** presence of field "ty" in [transform] *) + +val transform_set_ty : transform -> float -> unit + (** set field ty in transform *) + +val make_layer_state_window_info : + ?layout_params_flags:int32 -> + ?layout_params_type:int32 -> + ?touchable_region:region_proto -> + ?surface_inset:int32 -> + ?focusable:bool -> + ?has_wallpaper:bool -> + ?global_scale_factor:float -> + ?crop_layer_id:int32 -> + ?replace_touchable_region_with_crop:bool -> + ?touchable_region_crop:rect_proto -> + ?transform:transform -> + ?input_config:int32 -> + unit -> + layer_state_window_info +(** [make_layer_state_window_info … ()] is a builder for type [layer_state_window_info] *) + +val copy_layer_state_window_info : layer_state_window_info -> layer_state_window_info + +val layer_state_window_info_has_layout_params_flags : layer_state_window_info -> bool + (** presence of field "layout_params_flags" in [layer_state_window_info] *) + +val layer_state_window_info_set_layout_params_flags : layer_state_window_info -> int32 -> unit + (** set field layout_params_flags in layer_state_window_info *) + +val layer_state_window_info_has_layout_params_type : layer_state_window_info -> bool + (** presence of field "layout_params_type" in [layer_state_window_info] *) + +val layer_state_window_info_set_layout_params_type : layer_state_window_info -> int32 -> unit + (** set field layout_params_type in layer_state_window_info *) + +val layer_state_window_info_set_touchable_region : layer_state_window_info -> region_proto -> unit + (** set field touchable_region in layer_state_window_info *) + +val layer_state_window_info_has_surface_inset : layer_state_window_info -> bool + (** presence of field "surface_inset" in [layer_state_window_info] *) + +val layer_state_window_info_set_surface_inset : layer_state_window_info -> int32 -> unit + (** set field surface_inset in layer_state_window_info *) + +val layer_state_window_info_has_focusable : layer_state_window_info -> bool + (** presence of field "focusable" in [layer_state_window_info] *) + +val layer_state_window_info_set_focusable : layer_state_window_info -> bool -> unit + (** set field focusable in layer_state_window_info *) + +val layer_state_window_info_has_has_wallpaper : layer_state_window_info -> bool + (** presence of field "has_wallpaper" in [layer_state_window_info] *) + +val layer_state_window_info_set_has_wallpaper : layer_state_window_info -> bool -> unit + (** set field has_wallpaper in layer_state_window_info *) + +val layer_state_window_info_has_global_scale_factor : layer_state_window_info -> bool + (** presence of field "global_scale_factor" in [layer_state_window_info] *) + +val layer_state_window_info_set_global_scale_factor : layer_state_window_info -> float -> unit + (** set field global_scale_factor in layer_state_window_info *) + +val layer_state_window_info_has_crop_layer_id : layer_state_window_info -> bool + (** presence of field "crop_layer_id" in [layer_state_window_info] *) + +val layer_state_window_info_set_crop_layer_id : layer_state_window_info -> int32 -> unit + (** set field crop_layer_id in layer_state_window_info *) + +val layer_state_window_info_has_replace_touchable_region_with_crop : layer_state_window_info -> bool + (** presence of field "replace_touchable_region_with_crop" in [layer_state_window_info] *) + +val layer_state_window_info_set_replace_touchable_region_with_crop : layer_state_window_info -> bool -> unit + (** set field replace_touchable_region_with_crop in layer_state_window_info *) + +val layer_state_window_info_set_touchable_region_crop : layer_state_window_info -> rect_proto -> unit + (** set field touchable_region_crop in layer_state_window_info *) + +val layer_state_window_info_set_transform : layer_state_window_info -> transform -> unit + (** set field transform in layer_state_window_info *) + +val layer_state_window_info_has_input_config : layer_state_window_info -> bool + (** presence of field "input_config" in [layer_state_window_info] *) + +val layer_state_window_info_set_input_config : layer_state_window_info -> int32 -> unit + (** set field input_config in layer_state_window_info *) + +val make_layer_state_corner_radii : + ?tl:float -> + ?tr:float -> + ?bl:float -> + ?br:float -> + unit -> + layer_state_corner_radii +(** [make_layer_state_corner_radii … ()] is a builder for type [layer_state_corner_radii] *) + +val copy_layer_state_corner_radii : layer_state_corner_radii -> layer_state_corner_radii + +val layer_state_corner_radii_has_tl : layer_state_corner_radii -> bool + (** presence of field "tl" in [layer_state_corner_radii] *) + +val layer_state_corner_radii_set_tl : layer_state_corner_radii -> float -> unit + (** set field tl in layer_state_corner_radii *) + +val layer_state_corner_radii_has_tr : layer_state_corner_radii -> bool + (** presence of field "tr" in [layer_state_corner_radii] *) + +val layer_state_corner_radii_set_tr : layer_state_corner_radii -> float -> unit + (** set field tr in layer_state_corner_radii *) + +val layer_state_corner_radii_has_bl : layer_state_corner_radii -> bool + (** presence of field "bl" in [layer_state_corner_radii] *) + +val layer_state_corner_radii_set_bl : layer_state_corner_radii -> float -> unit + (** set field bl in layer_state_corner_radii *) + +val layer_state_corner_radii_has_br : layer_state_corner_radii -> bool + (** presence of field "br" in [layer_state_corner_radii] *) + +val layer_state_corner_radii_set_br : layer_state_corner_radii -> float -> unit + (** set field br in layer_state_corner_radii *) + +val make_layer_state : + ?layer_id:int32 -> + ?what:int64 -> + ?x:float -> + ?y:float -> + ?z:int32 -> + ?w:int32 -> + ?h:int32 -> + ?layer_stack:int32 -> + ?flags:int32 -> + ?mask:int32 -> + ?matrix:layer_state_matrix22 -> + ?corner_radius:float -> + ?background_blur_radius:int32 -> + ?parent_id:int32 -> + ?relative_parent_id:int32 -> + ?alpha:float -> + ?color:layer_state_color3 -> + ?transparent_region:region_proto -> + ?transform:int32 -> + ?transform_to_display_inverse:bool -> + ?crop:rect_proto -> + ?buffer_data:layer_state_buffer_data -> + ?api:int32 -> + ?has_sideband_stream:bool -> + ?color_transform:color_transform_proto -> + ?blur_regions:blur_region list -> + ?window_info_handle:layer_state_window_info -> + ?bg_color_alpha:float -> + ?bg_color_dataspace:int32 -> + ?color_space_agnostic:bool -> + ?shadow_radius:float -> + ?frame_rate_selection_priority:int32 -> + ?frame_rate:float -> + ?frame_rate_compatibility:int32 -> + ?change_frame_rate_strategy:int32 -> + ?fixed_transform_hint:int32 -> + ?frame_number:int64 -> + ?auto_refresh:bool -> + ?is_trusted_overlay:bool -> + ?buffer_crop:rect_proto -> + ?destination_frame:rect_proto -> + ?drop_input_mode:layer_state_drop_input_mode -> + ?trusted_overlay:trusted_overlay -> + ?background_blur_scale:float -> + ?corner_radii:layer_state_corner_radii -> + ?client_drawn_corner_radii:layer_state_corner_radii -> + ?system_content_priority:int32 -> + ?box_shadow_settings:box_shadow_settings -> + ?border_settings:border_settings -> + unit -> + layer_state +(** [make_layer_state … ()] is a builder for type [layer_state] *) + +val copy_layer_state : layer_state -> layer_state + +val layer_state_has_layer_id : layer_state -> bool + (** presence of field "layer_id" in [layer_state] *) + +val layer_state_set_layer_id : layer_state -> int32 -> unit + (** set field layer_id in layer_state *) + +val layer_state_has_what : layer_state -> bool + (** presence of field "what" in [layer_state] *) + +val layer_state_set_what : layer_state -> int64 -> unit + (** set field what in layer_state *) + +val layer_state_has_x : layer_state -> bool + (** presence of field "x" in [layer_state] *) + +val layer_state_set_x : layer_state -> float -> unit + (** set field x in layer_state *) + +val layer_state_has_y : layer_state -> bool + (** presence of field "y" in [layer_state] *) + +val layer_state_set_y : layer_state -> float -> unit + (** set field y in layer_state *) + +val layer_state_has_z : layer_state -> bool + (** presence of field "z" in [layer_state] *) + +val layer_state_set_z : layer_state -> int32 -> unit + (** set field z in layer_state *) + +val layer_state_has_w : layer_state -> bool + (** presence of field "w" in [layer_state] *) + +val layer_state_set_w : layer_state -> int32 -> unit + (** set field w in layer_state *) + +val layer_state_has_h : layer_state -> bool + (** presence of field "h" in [layer_state] *) + +val layer_state_set_h : layer_state -> int32 -> unit + (** set field h in layer_state *) + +val layer_state_has_layer_stack : layer_state -> bool + (** presence of field "layer_stack" in [layer_state] *) + +val layer_state_set_layer_stack : layer_state -> int32 -> unit + (** set field layer_stack in layer_state *) + +val layer_state_has_flags : layer_state -> bool + (** presence of field "flags" in [layer_state] *) + +val layer_state_set_flags : layer_state -> int32 -> unit + (** set field flags in layer_state *) + +val layer_state_has_mask : layer_state -> bool + (** presence of field "mask" in [layer_state] *) + +val layer_state_set_mask : layer_state -> int32 -> unit + (** set field mask in layer_state *) + +val layer_state_set_matrix : layer_state -> layer_state_matrix22 -> unit + (** set field matrix in layer_state *) + +val layer_state_has_corner_radius : layer_state -> bool + (** presence of field "corner_radius" in [layer_state] *) + +val layer_state_set_corner_radius : layer_state -> float -> unit + (** set field corner_radius in layer_state *) + +val layer_state_has_background_blur_radius : layer_state -> bool + (** presence of field "background_blur_radius" in [layer_state] *) + +val layer_state_set_background_blur_radius : layer_state -> int32 -> unit + (** set field background_blur_radius in layer_state *) + +val layer_state_has_parent_id : layer_state -> bool + (** presence of field "parent_id" in [layer_state] *) + +val layer_state_set_parent_id : layer_state -> int32 -> unit + (** set field parent_id in layer_state *) + +val layer_state_has_relative_parent_id : layer_state -> bool + (** presence of field "relative_parent_id" in [layer_state] *) + +val layer_state_set_relative_parent_id : layer_state -> int32 -> unit + (** set field relative_parent_id in layer_state *) + +val layer_state_has_alpha : layer_state -> bool + (** presence of field "alpha" in [layer_state] *) + +val layer_state_set_alpha : layer_state -> float -> unit + (** set field alpha in layer_state *) + +val layer_state_set_color : layer_state -> layer_state_color3 -> unit + (** set field color in layer_state *) + +val layer_state_set_transparent_region : layer_state -> region_proto -> unit + (** set field transparent_region in layer_state *) + +val layer_state_has_transform : layer_state -> bool + (** presence of field "transform" in [layer_state] *) + +val layer_state_set_transform : layer_state -> int32 -> unit + (** set field transform in layer_state *) + +val layer_state_has_transform_to_display_inverse : layer_state -> bool + (** presence of field "transform_to_display_inverse" in [layer_state] *) + +val layer_state_set_transform_to_display_inverse : layer_state -> bool -> unit + (** set field transform_to_display_inverse in layer_state *) + +val layer_state_set_crop : layer_state -> rect_proto -> unit + (** set field crop in layer_state *) + +val layer_state_set_buffer_data : layer_state -> layer_state_buffer_data -> unit + (** set field buffer_data in layer_state *) + +val layer_state_has_api : layer_state -> bool + (** presence of field "api" in [layer_state] *) + +val layer_state_set_api : layer_state -> int32 -> unit + (** set field api in layer_state *) + +val layer_state_has_has_sideband_stream : layer_state -> bool + (** presence of field "has_sideband_stream" in [layer_state] *) + +val layer_state_set_has_sideband_stream : layer_state -> bool -> unit + (** set field has_sideband_stream in layer_state *) + +val layer_state_set_color_transform : layer_state -> color_transform_proto -> unit + (** set field color_transform in layer_state *) + +val layer_state_set_blur_regions : layer_state -> blur_region list -> unit + (** set field blur_regions in layer_state *) + +val layer_state_set_window_info_handle : layer_state -> layer_state_window_info -> unit + (** set field window_info_handle in layer_state *) + +val layer_state_has_bg_color_alpha : layer_state -> bool + (** presence of field "bg_color_alpha" in [layer_state] *) + +val layer_state_set_bg_color_alpha : layer_state -> float -> unit + (** set field bg_color_alpha in layer_state *) + +val layer_state_has_bg_color_dataspace : layer_state -> bool + (** presence of field "bg_color_dataspace" in [layer_state] *) + +val layer_state_set_bg_color_dataspace : layer_state -> int32 -> unit + (** set field bg_color_dataspace in layer_state *) + +val layer_state_has_color_space_agnostic : layer_state -> bool + (** presence of field "color_space_agnostic" in [layer_state] *) + +val layer_state_set_color_space_agnostic : layer_state -> bool -> unit + (** set field color_space_agnostic in layer_state *) + +val layer_state_has_shadow_radius : layer_state -> bool + (** presence of field "shadow_radius" in [layer_state] *) + +val layer_state_set_shadow_radius : layer_state -> float -> unit + (** set field shadow_radius in layer_state *) + +val layer_state_has_frame_rate_selection_priority : layer_state -> bool + (** presence of field "frame_rate_selection_priority" in [layer_state] *) + +val layer_state_set_frame_rate_selection_priority : layer_state -> int32 -> unit + (** set field frame_rate_selection_priority in layer_state *) + +val layer_state_has_frame_rate : layer_state -> bool + (** presence of field "frame_rate" in [layer_state] *) + +val layer_state_set_frame_rate : layer_state -> float -> unit + (** set field frame_rate in layer_state *) + +val layer_state_has_frame_rate_compatibility : layer_state -> bool + (** presence of field "frame_rate_compatibility" in [layer_state] *) + +val layer_state_set_frame_rate_compatibility : layer_state -> int32 -> unit + (** set field frame_rate_compatibility in layer_state *) + +val layer_state_has_change_frame_rate_strategy : layer_state -> bool + (** presence of field "change_frame_rate_strategy" in [layer_state] *) + +val layer_state_set_change_frame_rate_strategy : layer_state -> int32 -> unit + (** set field change_frame_rate_strategy in layer_state *) + +val layer_state_has_fixed_transform_hint : layer_state -> bool + (** presence of field "fixed_transform_hint" in [layer_state] *) + +val layer_state_set_fixed_transform_hint : layer_state -> int32 -> unit + (** set field fixed_transform_hint in layer_state *) + +val layer_state_has_frame_number : layer_state -> bool + (** presence of field "frame_number" in [layer_state] *) + +val layer_state_set_frame_number : layer_state -> int64 -> unit + (** set field frame_number in layer_state *) + +val layer_state_has_auto_refresh : layer_state -> bool + (** presence of field "auto_refresh" in [layer_state] *) + +val layer_state_set_auto_refresh : layer_state -> bool -> unit + (** set field auto_refresh in layer_state *) + +val layer_state_has_is_trusted_overlay : layer_state -> bool + (** presence of field "is_trusted_overlay" in [layer_state] *) + +val layer_state_set_is_trusted_overlay : layer_state -> bool -> unit + (** set field is_trusted_overlay in layer_state *) + +val layer_state_set_buffer_crop : layer_state -> rect_proto -> unit + (** set field buffer_crop in layer_state *) + +val layer_state_set_destination_frame : layer_state -> rect_proto -> unit + (** set field destination_frame in layer_state *) + +val layer_state_has_drop_input_mode : layer_state -> bool + (** presence of field "drop_input_mode" in [layer_state] *) + +val layer_state_set_drop_input_mode : layer_state -> layer_state_drop_input_mode -> unit + (** set field drop_input_mode in layer_state *) + +val layer_state_has_trusted_overlay : layer_state -> bool + (** presence of field "trusted_overlay" in [layer_state] *) + +val layer_state_set_trusted_overlay : layer_state -> trusted_overlay -> unit + (** set field trusted_overlay in layer_state *) + +val layer_state_has_background_blur_scale : layer_state -> bool + (** presence of field "background_blur_scale" in [layer_state] *) + +val layer_state_set_background_blur_scale : layer_state -> float -> unit + (** set field background_blur_scale in layer_state *) + +val layer_state_set_corner_radii : layer_state -> layer_state_corner_radii -> unit + (** set field corner_radii in layer_state *) + +val layer_state_set_client_drawn_corner_radii : layer_state -> layer_state_corner_radii -> unit + (** set field client_drawn_corner_radii in layer_state *) + +val layer_state_has_system_content_priority : layer_state -> bool + (** presence of field "system_content_priority" in [layer_state] *) + +val layer_state_set_system_content_priority : layer_state -> int32 -> unit + (** set field system_content_priority in layer_state *) + +val layer_state_set_box_shadow_settings : layer_state -> box_shadow_settings -> unit + (** set field box_shadow_settings in layer_state *) + +val layer_state_set_border_settings : layer_state -> border_settings -> unit + (** set field border_settings in layer_state *) + +val make_display_state : + ?id:int32 -> + ?what:int32 -> + ?flags:int32 -> + ?layer_stack:int32 -> + ?orientation:int32 -> + ?layer_stack_space_rect:rect_proto -> + ?oriented_display_space_rect:rect_proto -> + ?width:int32 -> + ?height:int32 -> + unit -> + display_state +(** [make_display_state … ()] is a builder for type [display_state] *) + +val copy_display_state : display_state -> display_state + +val display_state_has_id : display_state -> bool + (** presence of field "id" in [display_state] *) + +val display_state_set_id : display_state -> int32 -> unit + (** set field id in display_state *) + +val display_state_has_what : display_state -> bool + (** presence of field "what" in [display_state] *) + +val display_state_set_what : display_state -> int32 -> unit + (** set field what in display_state *) + +val display_state_has_flags : display_state -> bool + (** presence of field "flags" in [display_state] *) + +val display_state_set_flags : display_state -> int32 -> unit + (** set field flags in display_state *) + +val display_state_has_layer_stack : display_state -> bool + (** presence of field "layer_stack" in [display_state] *) + +val display_state_set_layer_stack : display_state -> int32 -> unit + (** set field layer_stack in display_state *) + +val display_state_has_orientation : display_state -> bool + (** presence of field "orientation" in [display_state] *) + +val display_state_set_orientation : display_state -> int32 -> unit + (** set field orientation in display_state *) + +val display_state_set_layer_stack_space_rect : display_state -> rect_proto -> unit + (** set field layer_stack_space_rect in display_state *) + +val display_state_set_oriented_display_space_rect : display_state -> rect_proto -> unit + (** set field oriented_display_space_rect in display_state *) + +val display_state_has_width : display_state -> bool + (** presence of field "width" in [display_state] *) + +val display_state_set_width : display_state -> int32 -> unit + (** set field width in display_state *) + +val display_state_has_height : display_state -> bool + (** presence of field "height" in [display_state] *) + +val display_state_set_height : display_state -> int32 -> unit + (** set field height in display_state *) + +val make_transaction_barrier : + ?barrier_token:string -> + ?kind:int32 -> + unit -> + transaction_barrier +(** [make_transaction_barrier … ()] is a builder for type [transaction_barrier] *) + +val copy_transaction_barrier : transaction_barrier -> transaction_barrier + +val transaction_barrier_has_barrier_token : transaction_barrier -> bool + (** presence of field "barrier_token" in [transaction_barrier] *) + +val transaction_barrier_set_barrier_token : transaction_barrier -> string -> unit + (** set field barrier_token in transaction_barrier *) + +val transaction_barrier_has_kind : transaction_barrier -> bool + (** presence of field "kind" in [transaction_barrier] *) + +val transaction_barrier_set_kind : transaction_barrier -> int32 -> unit + (** set field kind in transaction_barrier *) + +val make_transaction_state : + ?pid:int32 -> + ?uid:int32 -> + ?vsync_id:int64 -> + ?input_event_id:int32 -> + ?post_time:int64 -> + ?transaction_id:int64 -> + ?layer_changes:layer_state list -> + ?display_changes:display_state list -> + ?merged_transaction_ids:int64 list -> + ?apply_token:int64 -> + ?transaction_barriers:transaction_barrier list -> + unit -> + transaction_state +(** [make_transaction_state … ()] is a builder for type [transaction_state] *) + +val copy_transaction_state : transaction_state -> transaction_state + +val transaction_state_has_pid : transaction_state -> bool + (** presence of field "pid" in [transaction_state] *) + +val transaction_state_set_pid : transaction_state -> int32 -> unit + (** set field pid in transaction_state *) + +val transaction_state_has_uid : transaction_state -> bool + (** presence of field "uid" in [transaction_state] *) + +val transaction_state_set_uid : transaction_state -> int32 -> unit + (** set field uid in transaction_state *) + +val transaction_state_has_vsync_id : transaction_state -> bool + (** presence of field "vsync_id" in [transaction_state] *) + +val transaction_state_set_vsync_id : transaction_state -> int64 -> unit + (** set field vsync_id in transaction_state *) + +val transaction_state_has_input_event_id : transaction_state -> bool + (** presence of field "input_event_id" in [transaction_state] *) + +val transaction_state_set_input_event_id : transaction_state -> int32 -> unit + (** set field input_event_id in transaction_state *) + +val transaction_state_has_post_time : transaction_state -> bool + (** presence of field "post_time" in [transaction_state] *) + +val transaction_state_set_post_time : transaction_state -> int64 -> unit + (** set field post_time in transaction_state *) + +val transaction_state_has_transaction_id : transaction_state -> bool + (** presence of field "transaction_id" in [transaction_state] *) + +val transaction_state_set_transaction_id : transaction_state -> int64 -> unit + (** set field transaction_id in transaction_state *) + +val transaction_state_set_layer_changes : transaction_state -> layer_state list -> unit + (** set field layer_changes in transaction_state *) + +val transaction_state_set_display_changes : transaction_state -> display_state list -> unit + (** set field display_changes in transaction_state *) + +val transaction_state_set_merged_transaction_ids : transaction_state -> int64 list -> unit + (** set field merged_transaction_ids in transaction_state *) + +val transaction_state_has_apply_token : transaction_state -> bool + (** presence of field "apply_token" in [transaction_state] *) + +val transaction_state_set_apply_token : transaction_state -> int64 -> unit + (** set field apply_token in transaction_state *) + +val transaction_state_set_transaction_barriers : transaction_state -> transaction_barrier list -> unit + (** set field transaction_barriers in transaction_state *) + +val make_layer_creation_args : + ?layer_id:int32 -> + ?name:string -> + ?flags:int32 -> + ?parent_id:int32 -> + ?mirror_from_id:int32 -> + ?add_to_root:bool -> + ?layer_stack_to_mirror:int32 -> + unit -> + layer_creation_args +(** [make_layer_creation_args … ()] is a builder for type [layer_creation_args] *) + +val copy_layer_creation_args : layer_creation_args -> layer_creation_args + +val layer_creation_args_has_layer_id : layer_creation_args -> bool + (** presence of field "layer_id" in [layer_creation_args] *) + +val layer_creation_args_set_layer_id : layer_creation_args -> int32 -> unit + (** set field layer_id in layer_creation_args *) + +val layer_creation_args_has_name : layer_creation_args -> bool + (** presence of field "name" in [layer_creation_args] *) + +val layer_creation_args_set_name : layer_creation_args -> string -> unit + (** set field name in layer_creation_args *) + +val layer_creation_args_has_flags : layer_creation_args -> bool + (** presence of field "flags" in [layer_creation_args] *) + +val layer_creation_args_set_flags : layer_creation_args -> int32 -> unit + (** set field flags in layer_creation_args *) + +val layer_creation_args_has_parent_id : layer_creation_args -> bool + (** presence of field "parent_id" in [layer_creation_args] *) + +val layer_creation_args_set_parent_id : layer_creation_args -> int32 -> unit + (** set field parent_id in layer_creation_args *) + +val layer_creation_args_has_mirror_from_id : layer_creation_args -> bool + (** presence of field "mirror_from_id" in [layer_creation_args] *) + +val layer_creation_args_set_mirror_from_id : layer_creation_args -> int32 -> unit + (** set field mirror_from_id in layer_creation_args *) + +val layer_creation_args_has_add_to_root : layer_creation_args -> bool + (** presence of field "add_to_root" in [layer_creation_args] *) + +val layer_creation_args_set_add_to_root : layer_creation_args -> bool -> unit + (** set field add_to_root in layer_creation_args *) + +val layer_creation_args_has_layer_stack_to_mirror : layer_creation_args -> bool + (** presence of field "layer_stack_to_mirror" in [layer_creation_args] *) + +val layer_creation_args_set_layer_stack_to_mirror : layer_creation_args -> int32 -> unit + (** set field layer_stack_to_mirror in layer_creation_args *) + +val make_display_info : + ?layer_stack:int32 -> + ?display_id:int32 -> + ?logical_width:int32 -> + ?logical_height:int32 -> + ?transform_inverse:transform -> + ?transform:transform -> + ?receives_input:bool -> + ?is_secure:bool -> + ?is_primary:bool -> + ?is_virtual:bool -> + ?rotation_flags:int32 -> + ?transform_hint:int32 -> + unit -> + display_info +(** [make_display_info … ()] is a builder for type [display_info] *) + +val copy_display_info : display_info -> display_info + +val display_info_has_layer_stack : display_info -> bool + (** presence of field "layer_stack" in [display_info] *) + +val display_info_set_layer_stack : display_info -> int32 -> unit + (** set field layer_stack in display_info *) + +val display_info_has_display_id : display_info -> bool + (** presence of field "display_id" in [display_info] *) + +val display_info_set_display_id : display_info -> int32 -> unit + (** set field display_id in display_info *) + +val display_info_has_logical_width : display_info -> bool + (** presence of field "logical_width" in [display_info] *) + +val display_info_set_logical_width : display_info -> int32 -> unit + (** set field logical_width in display_info *) + +val display_info_has_logical_height : display_info -> bool + (** presence of field "logical_height" in [display_info] *) + +val display_info_set_logical_height : display_info -> int32 -> unit + (** set field logical_height in display_info *) + +val display_info_set_transform_inverse : display_info -> transform -> unit + (** set field transform_inverse in display_info *) + +val display_info_set_transform : display_info -> transform -> unit + (** set field transform in display_info *) + +val display_info_has_receives_input : display_info -> bool + (** presence of field "receives_input" in [display_info] *) + +val display_info_set_receives_input : display_info -> bool -> unit + (** set field receives_input in display_info *) + +val display_info_has_is_secure : display_info -> bool + (** presence of field "is_secure" in [display_info] *) + +val display_info_set_is_secure : display_info -> bool -> unit + (** set field is_secure in display_info *) + +val display_info_has_is_primary : display_info -> bool + (** presence of field "is_primary" in [display_info] *) + +val display_info_set_is_primary : display_info -> bool -> unit + (** set field is_primary in display_info *) + +val display_info_has_is_virtual : display_info -> bool + (** presence of field "is_virtual" in [display_info] *) + +val display_info_set_is_virtual : display_info -> bool -> unit + (** set field is_virtual in display_info *) + +val display_info_has_rotation_flags : display_info -> bool + (** presence of field "rotation_flags" in [display_info] *) + +val display_info_set_rotation_flags : display_info -> int32 -> unit + (** set field rotation_flags in display_info *) + +val display_info_has_transform_hint : display_info -> bool + (** presence of field "transform_hint" in [display_info] *) + +val display_info_set_transform_hint : display_info -> int32 -> unit + (** set field transform_hint in display_info *) + +val make_transaction_trace_entry : + ?elapsed_realtime_nanos:int64 -> + ?vsync_id:int64 -> + ?transactions:transaction_state list -> + ?added_layers:layer_creation_args list -> + ?destroyed_layers:int32 list -> + ?added_displays:display_state list -> + ?removed_displays:int32 list -> + ?destroyed_layer_handles:int32 list -> + ?displays_changed:bool -> + ?displays:display_info list -> + unit -> + transaction_trace_entry +(** [make_transaction_trace_entry … ()] is a builder for type [transaction_trace_entry] *) + +val copy_transaction_trace_entry : transaction_trace_entry -> transaction_trace_entry + +val transaction_trace_entry_has_elapsed_realtime_nanos : transaction_trace_entry -> bool + (** presence of field "elapsed_realtime_nanos" in [transaction_trace_entry] *) + +val transaction_trace_entry_set_elapsed_realtime_nanos : transaction_trace_entry -> int64 -> unit + (** set field elapsed_realtime_nanos in transaction_trace_entry *) + +val transaction_trace_entry_has_vsync_id : transaction_trace_entry -> bool + (** presence of field "vsync_id" in [transaction_trace_entry] *) + +val transaction_trace_entry_set_vsync_id : transaction_trace_entry -> int64 -> unit + (** set field vsync_id in transaction_trace_entry *) + +val transaction_trace_entry_set_transactions : transaction_trace_entry -> transaction_state list -> unit + (** set field transactions in transaction_trace_entry *) + +val transaction_trace_entry_set_added_layers : transaction_trace_entry -> layer_creation_args list -> unit + (** set field added_layers in transaction_trace_entry *) + +val transaction_trace_entry_set_destroyed_layers : transaction_trace_entry -> int32 list -> unit + (** set field destroyed_layers in transaction_trace_entry *) + +val transaction_trace_entry_set_added_displays : transaction_trace_entry -> display_state list -> unit + (** set field added_displays in transaction_trace_entry *) + +val transaction_trace_entry_set_removed_displays : transaction_trace_entry -> int32 list -> unit + (** set field removed_displays in transaction_trace_entry *) + +val transaction_trace_entry_set_destroyed_layer_handles : transaction_trace_entry -> int32 list -> unit + (** set field destroyed_layer_handles in transaction_trace_entry *) + +val transaction_trace_entry_has_displays_changed : transaction_trace_entry -> bool + (** presence of field "displays_changed" in [transaction_trace_entry] *) + +val transaction_trace_entry_set_displays_changed : transaction_trace_entry -> bool -> unit + (** set field displays_changed in transaction_trace_entry *) + +val transaction_trace_entry_set_displays : transaction_trace_entry -> display_info list -> unit + (** set field displays in transaction_trace_entry *) + +val make_transaction_trace_file : + ?magic_number:int64 -> + ?entry:transaction_trace_entry list -> + ?real_to_elapsed_time_offset_nanos:int64 -> + ?version:int32 -> + unit -> + transaction_trace_file +(** [make_transaction_trace_file … ()] is a builder for type [transaction_trace_file] *) + +val copy_transaction_trace_file : transaction_trace_file -> transaction_trace_file + +val transaction_trace_file_has_magic_number : transaction_trace_file -> bool + (** presence of field "magic_number" in [transaction_trace_file] *) + +val transaction_trace_file_set_magic_number : transaction_trace_file -> int64 -> unit + (** set field magic_number in transaction_trace_file *) + +val transaction_trace_file_set_entry : transaction_trace_file -> transaction_trace_entry list -> unit + (** set field entry in transaction_trace_file *) + +val transaction_trace_file_has_real_to_elapsed_time_offset_nanos : transaction_trace_file -> bool + (** presence of field "real_to_elapsed_time_offset_nanos" in [transaction_trace_file] *) + +val transaction_trace_file_set_real_to_elapsed_time_offset_nanos : transaction_trace_file -> int64 -> unit + (** set field real_to_elapsed_time_offset_nanos in transaction_trace_file *) + +val transaction_trace_file_has_version : transaction_trace_file -> bool + (** presence of field "version" in [transaction_trace_file] *) + +val transaction_trace_file_set_version : transaction_trace_file -> int32 -> unit + (** set field version in transaction_trace_file *) + +val make_chrome_benchmark_metadata : + ?benchmark_start_time_us:int64 -> + ?story_run_time_us:int64 -> + ?benchmark_name:string -> + ?benchmark_description:string -> + ?label:string -> + ?story_name:string -> + ?story_tags:string list -> + ?story_run_index:int32 -> + ?had_failures:bool -> + unit -> + chrome_benchmark_metadata +(** [make_chrome_benchmark_metadata … ()] is a builder for type [chrome_benchmark_metadata] *) + +val copy_chrome_benchmark_metadata : chrome_benchmark_metadata -> chrome_benchmark_metadata + +val chrome_benchmark_metadata_has_benchmark_start_time_us : chrome_benchmark_metadata -> bool + (** presence of field "benchmark_start_time_us" in [chrome_benchmark_metadata] *) + +val chrome_benchmark_metadata_set_benchmark_start_time_us : chrome_benchmark_metadata -> int64 -> unit + (** set field benchmark_start_time_us in chrome_benchmark_metadata *) + +val chrome_benchmark_metadata_has_story_run_time_us : chrome_benchmark_metadata -> bool + (** presence of field "story_run_time_us" in [chrome_benchmark_metadata] *) + +val chrome_benchmark_metadata_set_story_run_time_us : chrome_benchmark_metadata -> int64 -> unit + (** set field story_run_time_us in chrome_benchmark_metadata *) + +val chrome_benchmark_metadata_has_benchmark_name : chrome_benchmark_metadata -> bool + (** presence of field "benchmark_name" in [chrome_benchmark_metadata] *) + +val chrome_benchmark_metadata_set_benchmark_name : chrome_benchmark_metadata -> string -> unit + (** set field benchmark_name in chrome_benchmark_metadata *) + +val chrome_benchmark_metadata_has_benchmark_description : chrome_benchmark_metadata -> bool + (** presence of field "benchmark_description" in [chrome_benchmark_metadata] *) + +val chrome_benchmark_metadata_set_benchmark_description : chrome_benchmark_metadata -> string -> unit + (** set field benchmark_description in chrome_benchmark_metadata *) + +val chrome_benchmark_metadata_has_label : chrome_benchmark_metadata -> bool + (** presence of field "label" in [chrome_benchmark_metadata] *) + +val chrome_benchmark_metadata_set_label : chrome_benchmark_metadata -> string -> unit + (** set field label in chrome_benchmark_metadata *) + +val chrome_benchmark_metadata_has_story_name : chrome_benchmark_metadata -> bool + (** presence of field "story_name" in [chrome_benchmark_metadata] *) + +val chrome_benchmark_metadata_set_story_name : chrome_benchmark_metadata -> string -> unit + (** set field story_name in chrome_benchmark_metadata *) + +val chrome_benchmark_metadata_set_story_tags : chrome_benchmark_metadata -> string list -> unit + (** set field story_tags in chrome_benchmark_metadata *) + +val chrome_benchmark_metadata_has_story_run_index : chrome_benchmark_metadata -> bool + (** presence of field "story_run_index" in [chrome_benchmark_metadata] *) + +val chrome_benchmark_metadata_set_story_run_index : chrome_benchmark_metadata -> int32 -> unit + (** set field story_run_index in chrome_benchmark_metadata *) + +val chrome_benchmark_metadata_has_had_failures : chrome_benchmark_metadata -> bool + (** presence of field "had_failures" in [chrome_benchmark_metadata] *) + +val chrome_benchmark_metadata_set_had_failures : chrome_benchmark_metadata -> bool -> unit + (** set field had_failures in chrome_benchmark_metadata *) + +val make_chrome_metadata_packet_finch_hash : + ?name:int32 -> + ?group:int32 -> + unit -> + chrome_metadata_packet_finch_hash +(** [make_chrome_metadata_packet_finch_hash … ()] is a builder for type [chrome_metadata_packet_finch_hash] *) + +val copy_chrome_metadata_packet_finch_hash : chrome_metadata_packet_finch_hash -> chrome_metadata_packet_finch_hash + +val chrome_metadata_packet_finch_hash_has_name : chrome_metadata_packet_finch_hash -> bool + (** presence of field "name" in [chrome_metadata_packet_finch_hash] *) + +val chrome_metadata_packet_finch_hash_set_name : chrome_metadata_packet_finch_hash -> int32 -> unit + (** set field name in chrome_metadata_packet_finch_hash *) + +val chrome_metadata_packet_finch_hash_has_group : chrome_metadata_packet_finch_hash -> bool + (** presence of field "group" in [chrome_metadata_packet_finch_hash] *) + +val chrome_metadata_packet_finch_hash_set_group : chrome_metadata_packet_finch_hash -> int32 -> unit + (** set field group in chrome_metadata_packet_finch_hash *) + +val make_background_tracing_metadata_trigger_rule_histogram_rule : + ?histogram_name_hash:int64 -> + ?histogram_min_trigger:int64 -> + ?histogram_max_trigger:int64 -> + unit -> + background_tracing_metadata_trigger_rule_histogram_rule +(** [make_background_tracing_metadata_trigger_rule_histogram_rule … ()] is a builder for type [background_tracing_metadata_trigger_rule_histogram_rule] *) + +val copy_background_tracing_metadata_trigger_rule_histogram_rule : background_tracing_metadata_trigger_rule_histogram_rule -> background_tracing_metadata_trigger_rule_histogram_rule + +val background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_name_hash : background_tracing_metadata_trigger_rule_histogram_rule -> bool + (** presence of field "histogram_name_hash" in [background_tracing_metadata_trigger_rule_histogram_rule] *) + +val background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_name_hash : background_tracing_metadata_trigger_rule_histogram_rule -> int64 -> unit + (** set field histogram_name_hash in background_tracing_metadata_trigger_rule_histogram_rule *) + +val background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_min_trigger : background_tracing_metadata_trigger_rule_histogram_rule -> bool + (** presence of field "histogram_min_trigger" in [background_tracing_metadata_trigger_rule_histogram_rule] *) + +val background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_min_trigger : background_tracing_metadata_trigger_rule_histogram_rule -> int64 -> unit + (** set field histogram_min_trigger in background_tracing_metadata_trigger_rule_histogram_rule *) + +val background_tracing_metadata_trigger_rule_histogram_rule_has_histogram_max_trigger : background_tracing_metadata_trigger_rule_histogram_rule -> bool + (** presence of field "histogram_max_trigger" in [background_tracing_metadata_trigger_rule_histogram_rule] *) + +val background_tracing_metadata_trigger_rule_histogram_rule_set_histogram_max_trigger : background_tracing_metadata_trigger_rule_histogram_rule -> int64 -> unit + (** set field histogram_max_trigger in background_tracing_metadata_trigger_rule_histogram_rule *) + +val make_background_tracing_metadata_trigger_rule_named_rule : + ?event_type:background_tracing_metadata_trigger_rule_named_rule_event_type -> + ?content_trigger_name_hash:int64 -> + unit -> + background_tracing_metadata_trigger_rule_named_rule +(** [make_background_tracing_metadata_trigger_rule_named_rule … ()] is a builder for type [background_tracing_metadata_trigger_rule_named_rule] *) + +val copy_background_tracing_metadata_trigger_rule_named_rule : background_tracing_metadata_trigger_rule_named_rule -> background_tracing_metadata_trigger_rule_named_rule + +val background_tracing_metadata_trigger_rule_named_rule_has_event_type : background_tracing_metadata_trigger_rule_named_rule -> bool + (** presence of field "event_type" in [background_tracing_metadata_trigger_rule_named_rule] *) + +val background_tracing_metadata_trigger_rule_named_rule_set_event_type : background_tracing_metadata_trigger_rule_named_rule -> background_tracing_metadata_trigger_rule_named_rule_event_type -> unit + (** set field event_type in background_tracing_metadata_trigger_rule_named_rule *) + +val background_tracing_metadata_trigger_rule_named_rule_has_content_trigger_name_hash : background_tracing_metadata_trigger_rule_named_rule -> bool + (** presence of field "content_trigger_name_hash" in [background_tracing_metadata_trigger_rule_named_rule] *) + +val background_tracing_metadata_trigger_rule_named_rule_set_content_trigger_name_hash : background_tracing_metadata_trigger_rule_named_rule -> int64 -> unit + (** set field content_trigger_name_hash in background_tracing_metadata_trigger_rule_named_rule *) + +val make_background_tracing_metadata_trigger_rule : + ?trigger_type:background_tracing_metadata_trigger_rule_trigger_type -> + ?histogram_rule:background_tracing_metadata_trigger_rule_histogram_rule -> + ?named_rule:background_tracing_metadata_trigger_rule_named_rule -> + ?name_hash:int32 -> + unit -> + background_tracing_metadata_trigger_rule +(** [make_background_tracing_metadata_trigger_rule … ()] is a builder for type [background_tracing_metadata_trigger_rule] *) + +val copy_background_tracing_metadata_trigger_rule : background_tracing_metadata_trigger_rule -> background_tracing_metadata_trigger_rule + +val background_tracing_metadata_trigger_rule_has_trigger_type : background_tracing_metadata_trigger_rule -> bool + (** presence of field "trigger_type" in [background_tracing_metadata_trigger_rule] *) + +val background_tracing_metadata_trigger_rule_set_trigger_type : background_tracing_metadata_trigger_rule -> background_tracing_metadata_trigger_rule_trigger_type -> unit + (** set field trigger_type in background_tracing_metadata_trigger_rule *) + +val background_tracing_metadata_trigger_rule_set_histogram_rule : background_tracing_metadata_trigger_rule -> background_tracing_metadata_trigger_rule_histogram_rule -> unit + (** set field histogram_rule in background_tracing_metadata_trigger_rule *) + +val background_tracing_metadata_trigger_rule_set_named_rule : background_tracing_metadata_trigger_rule -> background_tracing_metadata_trigger_rule_named_rule -> unit + (** set field named_rule in background_tracing_metadata_trigger_rule *) + +val background_tracing_metadata_trigger_rule_has_name_hash : background_tracing_metadata_trigger_rule -> bool + (** presence of field "name_hash" in [background_tracing_metadata_trigger_rule] *) + +val background_tracing_metadata_trigger_rule_set_name_hash : background_tracing_metadata_trigger_rule -> int32 -> unit + (** set field name_hash in background_tracing_metadata_trigger_rule *) + +val make_background_tracing_metadata : + ?triggered_rule:background_tracing_metadata_trigger_rule -> + ?active_rules:background_tracing_metadata_trigger_rule list -> + ?scenario_name_hash:int32 -> + unit -> + background_tracing_metadata +(** [make_background_tracing_metadata … ()] is a builder for type [background_tracing_metadata] *) + +val copy_background_tracing_metadata : background_tracing_metadata -> background_tracing_metadata + +val background_tracing_metadata_set_triggered_rule : background_tracing_metadata -> background_tracing_metadata_trigger_rule -> unit + (** set field triggered_rule in background_tracing_metadata *) + +val background_tracing_metadata_set_active_rules : background_tracing_metadata -> background_tracing_metadata_trigger_rule list -> unit + (** set field active_rules in background_tracing_metadata *) + +val background_tracing_metadata_has_scenario_name_hash : background_tracing_metadata -> bool + (** presence of field "scenario_name_hash" in [background_tracing_metadata] *) + +val background_tracing_metadata_set_scenario_name_hash : background_tracing_metadata -> int32 -> unit + (** set field scenario_name_hash in background_tracing_metadata *) + +val make_chrome_metadata_packet : + ?background_tracing_metadata:background_tracing_metadata -> + ?chrome_version_code:int32 -> + ?enabled_categories:string -> + ?field_trial_hashes:chrome_metadata_packet_finch_hash list -> + unit -> + chrome_metadata_packet +(** [make_chrome_metadata_packet … ()] is a builder for type [chrome_metadata_packet] *) + +val copy_chrome_metadata_packet : chrome_metadata_packet -> chrome_metadata_packet + +val chrome_metadata_packet_set_background_tracing_metadata : chrome_metadata_packet -> background_tracing_metadata -> unit + (** set field background_tracing_metadata in chrome_metadata_packet *) + +val chrome_metadata_packet_has_chrome_version_code : chrome_metadata_packet -> bool + (** presence of field "chrome_version_code" in [chrome_metadata_packet] *) + +val chrome_metadata_packet_set_chrome_version_code : chrome_metadata_packet -> int32 -> unit + (** set field chrome_version_code in chrome_metadata_packet *) + +val chrome_metadata_packet_has_enabled_categories : chrome_metadata_packet -> bool + (** presence of field "enabled_categories" in [chrome_metadata_packet] *) + +val chrome_metadata_packet_set_enabled_categories : chrome_metadata_packet -> string -> unit + (** set field enabled_categories in chrome_metadata_packet *) + +val chrome_metadata_packet_set_field_trial_hashes : chrome_metadata_packet -> chrome_metadata_packet_finch_hash list -> unit + (** set field field_trial_hashes in chrome_metadata_packet *) + +val make_chrome_traced_value : + ?nested_type:chrome_traced_value_nested_type -> + ?dict_keys:string list -> + ?dict_values:chrome_traced_value list -> + ?array_values:chrome_traced_value list -> + ?int_value:int32 -> + ?double_value:float -> + ?bool_value:bool -> + ?string_value:string -> + unit -> + chrome_traced_value +(** [make_chrome_traced_value … ()] is a builder for type [chrome_traced_value] *) + +val copy_chrome_traced_value : chrome_traced_value -> chrome_traced_value + +val chrome_traced_value_has_nested_type : chrome_traced_value -> bool + (** presence of field "nested_type" in [chrome_traced_value] *) + +val chrome_traced_value_set_nested_type : chrome_traced_value -> chrome_traced_value_nested_type -> unit + (** set field nested_type in chrome_traced_value *) + +val chrome_traced_value_set_dict_keys : chrome_traced_value -> string list -> unit + (** set field dict_keys in chrome_traced_value *) + +val chrome_traced_value_set_dict_values : chrome_traced_value -> chrome_traced_value list -> unit + (** set field dict_values in chrome_traced_value *) + +val chrome_traced_value_set_array_values : chrome_traced_value -> chrome_traced_value list -> unit + (** set field array_values in chrome_traced_value *) + +val chrome_traced_value_has_int_value : chrome_traced_value -> bool + (** presence of field "int_value" in [chrome_traced_value] *) + +val chrome_traced_value_set_int_value : chrome_traced_value -> int32 -> unit + (** set field int_value in chrome_traced_value *) + +val chrome_traced_value_has_double_value : chrome_traced_value -> bool + (** presence of field "double_value" in [chrome_traced_value] *) + +val chrome_traced_value_set_double_value : chrome_traced_value -> float -> unit + (** set field double_value in chrome_traced_value *) + +val chrome_traced_value_has_bool_value : chrome_traced_value -> bool + (** presence of field "bool_value" in [chrome_traced_value] *) + +val chrome_traced_value_set_bool_value : chrome_traced_value -> bool -> unit + (** set field bool_value in chrome_traced_value *) + +val chrome_traced_value_has_string_value : chrome_traced_value -> bool + (** presence of field "string_value" in [chrome_traced_value] *) + +val chrome_traced_value_set_string_value : chrome_traced_value -> string -> unit + (** set field string_value in chrome_traced_value *) + +val make_chrome_string_table_entry : + ?value:string -> + ?index:int32 -> + unit -> + chrome_string_table_entry +(** [make_chrome_string_table_entry … ()] is a builder for type [chrome_string_table_entry] *) + +val copy_chrome_string_table_entry : chrome_string_table_entry -> chrome_string_table_entry + +val chrome_string_table_entry_has_value : chrome_string_table_entry -> bool + (** presence of field "value" in [chrome_string_table_entry] *) + +val chrome_string_table_entry_set_value : chrome_string_table_entry -> string -> unit + (** set field value in chrome_string_table_entry *) + +val chrome_string_table_entry_has_index : chrome_string_table_entry -> bool + (** presence of field "index" in [chrome_string_table_entry] *) + +val chrome_string_table_entry_set_index : chrome_string_table_entry -> int32 -> unit + (** set field index in chrome_string_table_entry *) + +val make_chrome_trace_event_arg : + ?name:string -> + ?value:chrome_trace_event_arg_value -> + ?name_index:int32 -> + unit -> + chrome_trace_event_arg +(** [make_chrome_trace_event_arg … ()] is a builder for type [chrome_trace_event_arg] *) + +val copy_chrome_trace_event_arg : chrome_trace_event_arg -> chrome_trace_event_arg + +val chrome_trace_event_arg_has_name : chrome_trace_event_arg -> bool + (** presence of field "name" in [chrome_trace_event_arg] *) + +val chrome_trace_event_arg_set_name : chrome_trace_event_arg -> string -> unit + (** set field name in chrome_trace_event_arg *) + +val chrome_trace_event_arg_set_value : chrome_trace_event_arg -> chrome_trace_event_arg_value -> unit + (** set field value in chrome_trace_event_arg *) + +val chrome_trace_event_arg_has_name_index : chrome_trace_event_arg -> bool + (** presence of field "name_index" in [chrome_trace_event_arg] *) + +val chrome_trace_event_arg_set_name_index : chrome_trace_event_arg -> int32 -> unit + (** set field name_index in chrome_trace_event_arg *) + +val make_chrome_trace_event : + ?name:string -> + ?timestamp:int64 -> + ?phase:int32 -> + ?thread_id:int32 -> + ?duration:int64 -> + ?thread_duration:int64 -> + ?scope:string -> + ?id:int64 -> + ?flags:int32 -> + ?category_group_name:string -> + ?process_id:int32 -> + ?thread_timestamp:int64 -> + ?bind_id:int64 -> + ?args:chrome_trace_event_arg list -> + ?name_index:int32 -> + ?category_group_name_index:int32 -> + unit -> + chrome_trace_event +(** [make_chrome_trace_event … ()] is a builder for type [chrome_trace_event] *) + +val copy_chrome_trace_event : chrome_trace_event -> chrome_trace_event + +val chrome_trace_event_has_name : chrome_trace_event -> bool + (** presence of field "name" in [chrome_trace_event] *) + +val chrome_trace_event_set_name : chrome_trace_event -> string -> unit + (** set field name in chrome_trace_event *) + +val chrome_trace_event_has_timestamp : chrome_trace_event -> bool + (** presence of field "timestamp" in [chrome_trace_event] *) + +val chrome_trace_event_set_timestamp : chrome_trace_event -> int64 -> unit + (** set field timestamp in chrome_trace_event *) + +val chrome_trace_event_has_phase : chrome_trace_event -> bool + (** presence of field "phase" in [chrome_trace_event] *) + +val chrome_trace_event_set_phase : chrome_trace_event -> int32 -> unit + (** set field phase in chrome_trace_event *) + +val chrome_trace_event_has_thread_id : chrome_trace_event -> bool + (** presence of field "thread_id" in [chrome_trace_event] *) + +val chrome_trace_event_set_thread_id : chrome_trace_event -> int32 -> unit + (** set field thread_id in chrome_trace_event *) + +val chrome_trace_event_has_duration : chrome_trace_event -> bool + (** presence of field "duration" in [chrome_trace_event] *) + +val chrome_trace_event_set_duration : chrome_trace_event -> int64 -> unit + (** set field duration in chrome_trace_event *) + +val chrome_trace_event_has_thread_duration : chrome_trace_event -> bool + (** presence of field "thread_duration" in [chrome_trace_event] *) + +val chrome_trace_event_set_thread_duration : chrome_trace_event -> int64 -> unit + (** set field thread_duration in chrome_trace_event *) + +val chrome_trace_event_has_scope : chrome_trace_event -> bool + (** presence of field "scope" in [chrome_trace_event] *) + +val chrome_trace_event_set_scope : chrome_trace_event -> string -> unit + (** set field scope in chrome_trace_event *) + +val chrome_trace_event_has_id : chrome_trace_event -> bool + (** presence of field "id" in [chrome_trace_event] *) + +val chrome_trace_event_set_id : chrome_trace_event -> int64 -> unit + (** set field id in chrome_trace_event *) + +val chrome_trace_event_has_flags : chrome_trace_event -> bool + (** presence of field "flags" in [chrome_trace_event] *) + +val chrome_trace_event_set_flags : chrome_trace_event -> int32 -> unit + (** set field flags in chrome_trace_event *) + +val chrome_trace_event_has_category_group_name : chrome_trace_event -> bool + (** presence of field "category_group_name" in [chrome_trace_event] *) + +val chrome_trace_event_set_category_group_name : chrome_trace_event -> string -> unit + (** set field category_group_name in chrome_trace_event *) + +val chrome_trace_event_has_process_id : chrome_trace_event -> bool + (** presence of field "process_id" in [chrome_trace_event] *) + +val chrome_trace_event_set_process_id : chrome_trace_event -> int32 -> unit + (** set field process_id in chrome_trace_event *) + +val chrome_trace_event_has_thread_timestamp : chrome_trace_event -> bool + (** presence of field "thread_timestamp" in [chrome_trace_event] *) + +val chrome_trace_event_set_thread_timestamp : chrome_trace_event -> int64 -> unit + (** set field thread_timestamp in chrome_trace_event *) + +val chrome_trace_event_has_bind_id : chrome_trace_event -> bool + (** presence of field "bind_id" in [chrome_trace_event] *) + +val chrome_trace_event_set_bind_id : chrome_trace_event -> int64 -> unit + (** set field bind_id in chrome_trace_event *) + +val chrome_trace_event_set_args : chrome_trace_event -> chrome_trace_event_arg list -> unit + (** set field args in chrome_trace_event *) + +val chrome_trace_event_has_name_index : chrome_trace_event -> bool + (** presence of field "name_index" in [chrome_trace_event] *) + +val chrome_trace_event_set_name_index : chrome_trace_event -> int32 -> unit + (** set field name_index in chrome_trace_event *) + +val chrome_trace_event_has_category_group_name_index : chrome_trace_event -> bool + (** presence of field "category_group_name_index" in [chrome_trace_event] *) + +val chrome_trace_event_set_category_group_name_index : chrome_trace_event -> int32 -> unit + (** set field category_group_name_index in chrome_trace_event *) + +val make_chrome_metadata : + ?name:string -> + ?value:chrome_metadata_value -> + unit -> + chrome_metadata +(** [make_chrome_metadata … ()] is a builder for type [chrome_metadata] *) + +val copy_chrome_metadata : chrome_metadata -> chrome_metadata + +val chrome_metadata_has_name : chrome_metadata -> bool + (** presence of field "name" in [chrome_metadata] *) + +val chrome_metadata_set_name : chrome_metadata -> string -> unit + (** set field name in chrome_metadata *) + +val chrome_metadata_set_value : chrome_metadata -> chrome_metadata_value -> unit + (** set field value in chrome_metadata *) + +val make_chrome_legacy_json_trace : + ?type_:chrome_legacy_json_trace_trace_type -> + ?data:string -> + unit -> + chrome_legacy_json_trace +(** [make_chrome_legacy_json_trace … ()] is a builder for type [chrome_legacy_json_trace] *) + +val copy_chrome_legacy_json_trace : chrome_legacy_json_trace -> chrome_legacy_json_trace + +val chrome_legacy_json_trace_has_type_ : chrome_legacy_json_trace -> bool + (** presence of field "type_" in [chrome_legacy_json_trace] *) + +val chrome_legacy_json_trace_set_type_ : chrome_legacy_json_trace -> chrome_legacy_json_trace_trace_type -> unit + (** set field type_ in chrome_legacy_json_trace *) + +val chrome_legacy_json_trace_has_data : chrome_legacy_json_trace -> bool + (** presence of field "data" in [chrome_legacy_json_trace] *) + +val chrome_legacy_json_trace_set_data : chrome_legacy_json_trace -> string -> unit + (** set field data in chrome_legacy_json_trace *) + +val make_chrome_event_bundle : + ?trace_events:chrome_trace_event list -> + ?metadata:chrome_metadata list -> + ?legacy_ftrace_output:string list -> + ?legacy_json_trace:chrome_legacy_json_trace list -> + ?string_table:chrome_string_table_entry list -> + unit -> + chrome_event_bundle +(** [make_chrome_event_bundle … ()] is a builder for type [chrome_event_bundle] *) + +val copy_chrome_event_bundle : chrome_event_bundle -> chrome_event_bundle + +val chrome_event_bundle_set_trace_events : chrome_event_bundle -> chrome_trace_event list -> unit + (** set field trace_events in chrome_event_bundle *) + +val chrome_event_bundle_set_metadata : chrome_event_bundle -> chrome_metadata list -> unit + (** set field metadata in chrome_event_bundle *) + +val chrome_event_bundle_set_legacy_ftrace_output : chrome_event_bundle -> string list -> unit + (** set field legacy_ftrace_output in chrome_event_bundle *) + +val chrome_event_bundle_set_legacy_json_trace : chrome_event_bundle -> chrome_legacy_json_trace list -> unit + (** set field legacy_json_trace in chrome_event_bundle *) + +val chrome_event_bundle_set_string_table : chrome_event_bundle -> chrome_string_table_entry list -> unit + (** set field string_table in chrome_event_bundle *) + +val make_chrome_trigger : + ?trigger_name:string -> + ?trigger_name_hash:int32 -> + ?flow_id:int64 -> + unit -> + chrome_trigger +(** [make_chrome_trigger … ()] is a builder for type [chrome_trigger] *) + +val copy_chrome_trigger : chrome_trigger -> chrome_trigger + +val chrome_trigger_has_trigger_name : chrome_trigger -> bool + (** presence of field "trigger_name" in [chrome_trigger] *) + +val chrome_trigger_set_trigger_name : chrome_trigger -> string -> unit + (** set field trigger_name in chrome_trigger *) + +val chrome_trigger_has_trigger_name_hash : chrome_trigger -> bool + (** presence of field "trigger_name_hash" in [chrome_trigger] *) + +val chrome_trigger_set_trigger_name_hash : chrome_trigger -> int32 -> unit + (** set field trigger_name_hash in chrome_trigger *) + +val chrome_trigger_has_flow_id : chrome_trigger -> bool + (** presence of field "flow_id" in [chrome_trigger] *) + +val chrome_trigger_set_flow_id : chrome_trigger -> int64 -> unit + (** set field flow_id in chrome_trigger *) + +val make_interned_v8_string : + ?iid:int64 -> + ?encoded_string:interned_v8_string_encoded_string -> + unit -> + interned_v8_string +(** [make_interned_v8_string … ()] is a builder for type [interned_v8_string] *) + +val copy_interned_v8_string : interned_v8_string -> interned_v8_string + +val interned_v8_string_has_iid : interned_v8_string -> bool + (** presence of field "iid" in [interned_v8_string] *) + +val interned_v8_string_set_iid : interned_v8_string -> int64 -> unit + (** set field iid in interned_v8_string *) + +val interned_v8_string_set_encoded_string : interned_v8_string -> interned_v8_string_encoded_string -> unit + (** set field encoded_string in interned_v8_string *) + +val make_interned_v8_js_script : + ?iid:int64 -> + ?script_id:int32 -> + ?type_:interned_v8_js_script_type -> + ?name:v8_string -> + ?source:v8_string -> + unit -> + interned_v8_js_script +(** [make_interned_v8_js_script … ()] is a builder for type [interned_v8_js_script] *) + +val copy_interned_v8_js_script : interned_v8_js_script -> interned_v8_js_script + +val interned_v8_js_script_has_iid : interned_v8_js_script -> bool + (** presence of field "iid" in [interned_v8_js_script] *) + +val interned_v8_js_script_set_iid : interned_v8_js_script -> int64 -> unit + (** set field iid in interned_v8_js_script *) + +val interned_v8_js_script_has_script_id : interned_v8_js_script -> bool + (** presence of field "script_id" in [interned_v8_js_script] *) + +val interned_v8_js_script_set_script_id : interned_v8_js_script -> int32 -> unit + (** set field script_id in interned_v8_js_script *) + +val interned_v8_js_script_has_type_ : interned_v8_js_script -> bool + (** presence of field "type_" in [interned_v8_js_script] *) + +val interned_v8_js_script_set_type_ : interned_v8_js_script -> interned_v8_js_script_type -> unit + (** set field type_ in interned_v8_js_script *) + +val interned_v8_js_script_set_name : interned_v8_js_script -> v8_string -> unit + (** set field name in interned_v8_js_script *) + +val interned_v8_js_script_set_source : interned_v8_js_script -> v8_string -> unit + (** set field source in interned_v8_js_script *) + +val make_interned_v8_wasm_script : + ?iid:int64 -> + ?script_id:int32 -> + ?url:string -> + ?wire_bytes:bytes -> + unit -> + interned_v8_wasm_script +(** [make_interned_v8_wasm_script … ()] is a builder for type [interned_v8_wasm_script] *) + +val copy_interned_v8_wasm_script : interned_v8_wasm_script -> interned_v8_wasm_script + +val interned_v8_wasm_script_has_iid : interned_v8_wasm_script -> bool + (** presence of field "iid" in [interned_v8_wasm_script] *) + +val interned_v8_wasm_script_set_iid : interned_v8_wasm_script -> int64 -> unit + (** set field iid in interned_v8_wasm_script *) + +val interned_v8_wasm_script_has_script_id : interned_v8_wasm_script -> bool + (** presence of field "script_id" in [interned_v8_wasm_script] *) + +val interned_v8_wasm_script_set_script_id : interned_v8_wasm_script -> int32 -> unit + (** set field script_id in interned_v8_wasm_script *) + +val interned_v8_wasm_script_has_url : interned_v8_wasm_script -> bool + (** presence of field "url" in [interned_v8_wasm_script] *) + +val interned_v8_wasm_script_set_url : interned_v8_wasm_script -> string -> unit + (** set field url in interned_v8_wasm_script *) + +val interned_v8_wasm_script_has_wire_bytes : interned_v8_wasm_script -> bool + (** presence of field "wire_bytes" in [interned_v8_wasm_script] *) + +val interned_v8_wasm_script_set_wire_bytes : interned_v8_wasm_script -> bytes -> unit + (** set field wire_bytes in interned_v8_wasm_script *) + +val make_interned_v8_js_function : + ?iid:int64 -> + ?v8_js_function_name_iid:int64 -> + ?v8_js_script_iid:int64 -> + ?is_toplevel:bool -> + ?kind:interned_v8_js_function_kind -> + ?byte_offset:int32 -> + ?line:int32 -> + ?column:int32 -> + unit -> + interned_v8_js_function +(** [make_interned_v8_js_function … ()] is a builder for type [interned_v8_js_function] *) + +val copy_interned_v8_js_function : interned_v8_js_function -> interned_v8_js_function + +val interned_v8_js_function_has_iid : interned_v8_js_function -> bool + (** presence of field "iid" in [interned_v8_js_function] *) + +val interned_v8_js_function_set_iid : interned_v8_js_function -> int64 -> unit + (** set field iid in interned_v8_js_function *) + +val interned_v8_js_function_has_v8_js_function_name_iid : interned_v8_js_function -> bool + (** presence of field "v8_js_function_name_iid" in [interned_v8_js_function] *) + +val interned_v8_js_function_set_v8_js_function_name_iid : interned_v8_js_function -> int64 -> unit + (** set field v8_js_function_name_iid in interned_v8_js_function *) + +val interned_v8_js_function_has_v8_js_script_iid : interned_v8_js_function -> bool + (** presence of field "v8_js_script_iid" in [interned_v8_js_function] *) + +val interned_v8_js_function_set_v8_js_script_iid : interned_v8_js_function -> int64 -> unit + (** set field v8_js_script_iid in interned_v8_js_function *) + +val interned_v8_js_function_has_is_toplevel : interned_v8_js_function -> bool + (** presence of field "is_toplevel" in [interned_v8_js_function] *) + +val interned_v8_js_function_set_is_toplevel : interned_v8_js_function -> bool -> unit + (** set field is_toplevel in interned_v8_js_function *) + +val interned_v8_js_function_has_kind : interned_v8_js_function -> bool + (** presence of field "kind" in [interned_v8_js_function] *) + +val interned_v8_js_function_set_kind : interned_v8_js_function -> interned_v8_js_function_kind -> unit + (** set field kind in interned_v8_js_function *) + +val interned_v8_js_function_has_byte_offset : interned_v8_js_function -> bool + (** presence of field "byte_offset" in [interned_v8_js_function] *) + +val interned_v8_js_function_set_byte_offset : interned_v8_js_function -> int32 -> unit + (** set field byte_offset in interned_v8_js_function *) + +val interned_v8_js_function_has_line : interned_v8_js_function -> bool + (** presence of field "line" in [interned_v8_js_function] *) + +val interned_v8_js_function_set_line : interned_v8_js_function -> int32 -> unit + (** set field line in interned_v8_js_function *) + +val interned_v8_js_function_has_column : interned_v8_js_function -> bool + (** presence of field "column" in [interned_v8_js_function] *) + +val interned_v8_js_function_set_column : interned_v8_js_function -> int32 -> unit + (** set field column in interned_v8_js_function *) + +val make_interned_v8_isolate_code_range : + ?base_address:int64 -> + ?size:int64 -> + ?embedded_blob_code_copy_start_address:int64 -> + ?is_process_wide:bool -> + unit -> + interned_v8_isolate_code_range +(** [make_interned_v8_isolate_code_range … ()] is a builder for type [interned_v8_isolate_code_range] *) + +val copy_interned_v8_isolate_code_range : interned_v8_isolate_code_range -> interned_v8_isolate_code_range + +val interned_v8_isolate_code_range_has_base_address : interned_v8_isolate_code_range -> bool + (** presence of field "base_address" in [interned_v8_isolate_code_range] *) + +val interned_v8_isolate_code_range_set_base_address : interned_v8_isolate_code_range -> int64 -> unit + (** set field base_address in interned_v8_isolate_code_range *) + +val interned_v8_isolate_code_range_has_size : interned_v8_isolate_code_range -> bool + (** presence of field "size" in [interned_v8_isolate_code_range] *) + +val interned_v8_isolate_code_range_set_size : interned_v8_isolate_code_range -> int64 -> unit + (** set field size in interned_v8_isolate_code_range *) + +val interned_v8_isolate_code_range_has_embedded_blob_code_copy_start_address : interned_v8_isolate_code_range -> bool + (** presence of field "embedded_blob_code_copy_start_address" in [interned_v8_isolate_code_range] *) + +val interned_v8_isolate_code_range_set_embedded_blob_code_copy_start_address : interned_v8_isolate_code_range -> int64 -> unit + (** set field embedded_blob_code_copy_start_address in interned_v8_isolate_code_range *) + +val interned_v8_isolate_code_range_has_is_process_wide : interned_v8_isolate_code_range -> bool + (** presence of field "is_process_wide" in [interned_v8_isolate_code_range] *) + +val interned_v8_isolate_code_range_set_is_process_wide : interned_v8_isolate_code_range -> bool -> unit + (** set field is_process_wide in interned_v8_isolate_code_range *) + +val make_interned_v8_isolate : + ?iid:int64 -> + ?pid:int32 -> + ?isolate_id:int32 -> + ?code_range:interned_v8_isolate_code_range -> + ?embedded_blob_code_start_address:int64 -> + ?embedded_blob_code_size:int64 -> + unit -> + interned_v8_isolate +(** [make_interned_v8_isolate … ()] is a builder for type [interned_v8_isolate] *) + +val copy_interned_v8_isolate : interned_v8_isolate -> interned_v8_isolate + +val interned_v8_isolate_has_iid : interned_v8_isolate -> bool + (** presence of field "iid" in [interned_v8_isolate] *) + +val interned_v8_isolate_set_iid : interned_v8_isolate -> int64 -> unit + (** set field iid in interned_v8_isolate *) + +val interned_v8_isolate_has_pid : interned_v8_isolate -> bool + (** presence of field "pid" in [interned_v8_isolate] *) + +val interned_v8_isolate_set_pid : interned_v8_isolate -> int32 -> unit + (** set field pid in interned_v8_isolate *) + +val interned_v8_isolate_has_isolate_id : interned_v8_isolate -> bool + (** presence of field "isolate_id" in [interned_v8_isolate] *) + +val interned_v8_isolate_set_isolate_id : interned_v8_isolate -> int32 -> unit + (** set field isolate_id in interned_v8_isolate *) + +val interned_v8_isolate_set_code_range : interned_v8_isolate -> interned_v8_isolate_code_range -> unit + (** set field code_range in interned_v8_isolate *) + +val interned_v8_isolate_has_embedded_blob_code_start_address : interned_v8_isolate -> bool + (** presence of field "embedded_blob_code_start_address" in [interned_v8_isolate] *) + +val interned_v8_isolate_set_embedded_blob_code_start_address : interned_v8_isolate -> int64 -> unit + (** set field embedded_blob_code_start_address in interned_v8_isolate *) + +val interned_v8_isolate_has_embedded_blob_code_size : interned_v8_isolate -> bool + (** presence of field "embedded_blob_code_size" in [interned_v8_isolate] *) + +val interned_v8_isolate_set_embedded_blob_code_size : interned_v8_isolate -> int64 -> unit + (** set field embedded_blob_code_size in interned_v8_isolate *) + +val make_v8_js_code : + ?v8_isolate_iid:int64 -> + ?tid:int32 -> + ?v8_js_function_iid:int64 -> + ?tier:v8_js_code_tier -> + ?instruction_start:int64 -> + ?instruction_size_bytes:int64 -> + ?instructions:v8_js_code_instructions -> + unit -> + v8_js_code +(** [make_v8_js_code … ()] is a builder for type [v8_js_code] *) + +val copy_v8_js_code : v8_js_code -> v8_js_code + +val v8_js_code_has_v8_isolate_iid : v8_js_code -> bool + (** presence of field "v8_isolate_iid" in [v8_js_code] *) + +val v8_js_code_set_v8_isolate_iid : v8_js_code -> int64 -> unit + (** set field v8_isolate_iid in v8_js_code *) + +val v8_js_code_has_tid : v8_js_code -> bool + (** presence of field "tid" in [v8_js_code] *) + +val v8_js_code_set_tid : v8_js_code -> int32 -> unit + (** set field tid in v8_js_code *) + +val v8_js_code_has_v8_js_function_iid : v8_js_code -> bool + (** presence of field "v8_js_function_iid" in [v8_js_code] *) + +val v8_js_code_set_v8_js_function_iid : v8_js_code -> int64 -> unit + (** set field v8_js_function_iid in v8_js_code *) + +val v8_js_code_has_tier : v8_js_code -> bool + (** presence of field "tier" in [v8_js_code] *) + +val v8_js_code_set_tier : v8_js_code -> v8_js_code_tier -> unit + (** set field tier in v8_js_code *) + +val v8_js_code_has_instruction_start : v8_js_code -> bool + (** presence of field "instruction_start" in [v8_js_code] *) + +val v8_js_code_set_instruction_start : v8_js_code -> int64 -> unit + (** set field instruction_start in v8_js_code *) + +val v8_js_code_has_instruction_size_bytes : v8_js_code -> bool + (** presence of field "instruction_size_bytes" in [v8_js_code] *) + +val v8_js_code_set_instruction_size_bytes : v8_js_code -> int64 -> unit + (** set field instruction_size_bytes in v8_js_code *) + +val v8_js_code_set_instructions : v8_js_code -> v8_js_code_instructions -> unit + (** set field instructions in v8_js_code *) + +val make_v8_internal_code : + ?v8_isolate_iid:int64 -> + ?tid:int32 -> + ?name:string -> + ?type_:v8_internal_code_type -> + ?builtin_id:int32 -> + ?instruction_start:int64 -> + ?instruction_size_bytes:int64 -> + ?machine_code:bytes -> + unit -> + v8_internal_code +(** [make_v8_internal_code … ()] is a builder for type [v8_internal_code] *) + +val copy_v8_internal_code : v8_internal_code -> v8_internal_code + +val v8_internal_code_has_v8_isolate_iid : v8_internal_code -> bool + (** presence of field "v8_isolate_iid" in [v8_internal_code] *) + +val v8_internal_code_set_v8_isolate_iid : v8_internal_code -> int64 -> unit + (** set field v8_isolate_iid in v8_internal_code *) + +val v8_internal_code_has_tid : v8_internal_code -> bool + (** presence of field "tid" in [v8_internal_code] *) + +val v8_internal_code_set_tid : v8_internal_code -> int32 -> unit + (** set field tid in v8_internal_code *) + +val v8_internal_code_has_name : v8_internal_code -> bool + (** presence of field "name" in [v8_internal_code] *) + +val v8_internal_code_set_name : v8_internal_code -> string -> unit + (** set field name in v8_internal_code *) + +val v8_internal_code_has_type_ : v8_internal_code -> bool + (** presence of field "type_" in [v8_internal_code] *) + +val v8_internal_code_set_type_ : v8_internal_code -> v8_internal_code_type -> unit + (** set field type_ in v8_internal_code *) + +val v8_internal_code_has_builtin_id : v8_internal_code -> bool + (** presence of field "builtin_id" in [v8_internal_code] *) + +val v8_internal_code_set_builtin_id : v8_internal_code -> int32 -> unit + (** set field builtin_id in v8_internal_code *) + +val v8_internal_code_has_instruction_start : v8_internal_code -> bool + (** presence of field "instruction_start" in [v8_internal_code] *) + +val v8_internal_code_set_instruction_start : v8_internal_code -> int64 -> unit + (** set field instruction_start in v8_internal_code *) + +val v8_internal_code_has_instruction_size_bytes : v8_internal_code -> bool + (** presence of field "instruction_size_bytes" in [v8_internal_code] *) + +val v8_internal_code_set_instruction_size_bytes : v8_internal_code -> int64 -> unit + (** set field instruction_size_bytes in v8_internal_code *) + +val v8_internal_code_has_machine_code : v8_internal_code -> bool + (** presence of field "machine_code" in [v8_internal_code] *) + +val v8_internal_code_set_machine_code : v8_internal_code -> bytes -> unit + (** set field machine_code in v8_internal_code *) + +val make_v8_wasm_code : + ?v8_isolate_iid:int64 -> + ?tid:int32 -> + ?v8_wasm_script_iid:int64 -> + ?function_name:string -> + ?tier:v8_wasm_code_tier -> + ?code_offset_in_module:int32 -> + ?instruction_start:int64 -> + ?instruction_size_bytes:int64 -> + ?machine_code:bytes -> + unit -> + v8_wasm_code +(** [make_v8_wasm_code … ()] is a builder for type [v8_wasm_code] *) + +val copy_v8_wasm_code : v8_wasm_code -> v8_wasm_code + +val v8_wasm_code_has_v8_isolate_iid : v8_wasm_code -> bool + (** presence of field "v8_isolate_iid" in [v8_wasm_code] *) + +val v8_wasm_code_set_v8_isolate_iid : v8_wasm_code -> int64 -> unit + (** set field v8_isolate_iid in v8_wasm_code *) + +val v8_wasm_code_has_tid : v8_wasm_code -> bool + (** presence of field "tid" in [v8_wasm_code] *) + +val v8_wasm_code_set_tid : v8_wasm_code -> int32 -> unit + (** set field tid in v8_wasm_code *) + +val v8_wasm_code_has_v8_wasm_script_iid : v8_wasm_code -> bool + (** presence of field "v8_wasm_script_iid" in [v8_wasm_code] *) + +val v8_wasm_code_set_v8_wasm_script_iid : v8_wasm_code -> int64 -> unit + (** set field v8_wasm_script_iid in v8_wasm_code *) + +val v8_wasm_code_has_function_name : v8_wasm_code -> bool + (** presence of field "function_name" in [v8_wasm_code] *) + +val v8_wasm_code_set_function_name : v8_wasm_code -> string -> unit + (** set field function_name in v8_wasm_code *) + +val v8_wasm_code_has_tier : v8_wasm_code -> bool + (** presence of field "tier" in [v8_wasm_code] *) + +val v8_wasm_code_set_tier : v8_wasm_code -> v8_wasm_code_tier -> unit + (** set field tier in v8_wasm_code *) + +val v8_wasm_code_has_code_offset_in_module : v8_wasm_code -> bool + (** presence of field "code_offset_in_module" in [v8_wasm_code] *) + +val v8_wasm_code_set_code_offset_in_module : v8_wasm_code -> int32 -> unit + (** set field code_offset_in_module in v8_wasm_code *) + +val v8_wasm_code_has_instruction_start : v8_wasm_code -> bool + (** presence of field "instruction_start" in [v8_wasm_code] *) + +val v8_wasm_code_set_instruction_start : v8_wasm_code -> int64 -> unit + (** set field instruction_start in v8_wasm_code *) + +val v8_wasm_code_has_instruction_size_bytes : v8_wasm_code -> bool + (** presence of field "instruction_size_bytes" in [v8_wasm_code] *) + +val v8_wasm_code_set_instruction_size_bytes : v8_wasm_code -> int64 -> unit + (** set field instruction_size_bytes in v8_wasm_code *) + +val v8_wasm_code_has_machine_code : v8_wasm_code -> bool + (** presence of field "machine_code" in [v8_wasm_code] *) + +val v8_wasm_code_set_machine_code : v8_wasm_code -> bytes -> unit + (** set field machine_code in v8_wasm_code *) + +val make_v8_reg_exp_code : + ?v8_isolate_iid:int64 -> + ?tid:int32 -> + ?pattern:v8_string -> + ?instruction_start:int64 -> + ?instruction_size_bytes:int64 -> + ?machine_code:bytes -> + unit -> + v8_reg_exp_code +(** [make_v8_reg_exp_code … ()] is a builder for type [v8_reg_exp_code] *) + +val copy_v8_reg_exp_code : v8_reg_exp_code -> v8_reg_exp_code + +val v8_reg_exp_code_has_v8_isolate_iid : v8_reg_exp_code -> bool + (** presence of field "v8_isolate_iid" in [v8_reg_exp_code] *) + +val v8_reg_exp_code_set_v8_isolate_iid : v8_reg_exp_code -> int64 -> unit + (** set field v8_isolate_iid in v8_reg_exp_code *) + +val v8_reg_exp_code_has_tid : v8_reg_exp_code -> bool + (** presence of field "tid" in [v8_reg_exp_code] *) + +val v8_reg_exp_code_set_tid : v8_reg_exp_code -> int32 -> unit + (** set field tid in v8_reg_exp_code *) + +val v8_reg_exp_code_set_pattern : v8_reg_exp_code -> v8_string -> unit + (** set field pattern in v8_reg_exp_code *) + +val v8_reg_exp_code_has_instruction_start : v8_reg_exp_code -> bool + (** presence of field "instruction_start" in [v8_reg_exp_code] *) + +val v8_reg_exp_code_set_instruction_start : v8_reg_exp_code -> int64 -> unit + (** set field instruction_start in v8_reg_exp_code *) + +val v8_reg_exp_code_has_instruction_size_bytes : v8_reg_exp_code -> bool + (** presence of field "instruction_size_bytes" in [v8_reg_exp_code] *) + +val v8_reg_exp_code_set_instruction_size_bytes : v8_reg_exp_code -> int64 -> unit + (** set field instruction_size_bytes in v8_reg_exp_code *) + +val v8_reg_exp_code_has_machine_code : v8_reg_exp_code -> bool + (** presence of field "machine_code" in [v8_reg_exp_code] *) + +val v8_reg_exp_code_set_machine_code : v8_reg_exp_code -> bytes -> unit + (** set field machine_code in v8_reg_exp_code *) + +val make_v8_code_move : + ?isolate_iid:int64 -> + ?tid:int32 -> + ?from_instruction_start_address:int64 -> + ?to_instruction_start_address:int64 -> + ?instruction_size_bytes:int64 -> + ?to_instructions:v8_code_move_to_instructions -> + unit -> + v8_code_move +(** [make_v8_code_move … ()] is a builder for type [v8_code_move] *) + +val copy_v8_code_move : v8_code_move -> v8_code_move + +val v8_code_move_has_isolate_iid : v8_code_move -> bool + (** presence of field "isolate_iid" in [v8_code_move] *) + +val v8_code_move_set_isolate_iid : v8_code_move -> int64 -> unit + (** set field isolate_iid in v8_code_move *) + +val v8_code_move_has_tid : v8_code_move -> bool + (** presence of field "tid" in [v8_code_move] *) + +val v8_code_move_set_tid : v8_code_move -> int32 -> unit + (** set field tid in v8_code_move *) + +val v8_code_move_has_from_instruction_start_address : v8_code_move -> bool + (** presence of field "from_instruction_start_address" in [v8_code_move] *) + +val v8_code_move_set_from_instruction_start_address : v8_code_move -> int64 -> unit + (** set field from_instruction_start_address in v8_code_move *) + +val v8_code_move_has_to_instruction_start_address : v8_code_move -> bool + (** presence of field "to_instruction_start_address" in [v8_code_move] *) + +val v8_code_move_set_to_instruction_start_address : v8_code_move -> int64 -> unit + (** set field to_instruction_start_address in v8_code_move *) + +val v8_code_move_has_instruction_size_bytes : v8_code_move -> bool + (** presence of field "instruction_size_bytes" in [v8_code_move] *) + +val v8_code_move_set_instruction_size_bytes : v8_code_move -> int64 -> unit + (** set field instruction_size_bytes in v8_code_move *) + +val v8_code_move_set_to_instructions : v8_code_move -> v8_code_move_to_instructions -> unit + (** set field to_instructions in v8_code_move *) + +val make_v8_code_defaults : + ?tid:int32 -> + unit -> + v8_code_defaults +(** [make_v8_code_defaults … ()] is a builder for type [v8_code_defaults] *) + +val copy_v8_code_defaults : v8_code_defaults -> v8_code_defaults + +val v8_code_defaults_has_tid : v8_code_defaults -> bool + (** presence of field "tid" in [v8_code_defaults] *) + +val v8_code_defaults_set_tid : v8_code_defaults -> int32 -> unit + (** set field tid in v8_code_defaults *) + +val make_clock_snapshot_clock : + ?clock_id:int32 -> + ?timestamp:int64 -> + ?is_incremental:bool -> + ?unit_multiplier_ns:int64 -> + unit -> + clock_snapshot_clock +(** [make_clock_snapshot_clock … ()] is a builder for type [clock_snapshot_clock] *) + +val copy_clock_snapshot_clock : clock_snapshot_clock -> clock_snapshot_clock + +val clock_snapshot_clock_has_clock_id : clock_snapshot_clock -> bool + (** presence of field "clock_id" in [clock_snapshot_clock] *) + +val clock_snapshot_clock_set_clock_id : clock_snapshot_clock -> int32 -> unit + (** set field clock_id in clock_snapshot_clock *) + +val clock_snapshot_clock_has_timestamp : clock_snapshot_clock -> bool + (** presence of field "timestamp" in [clock_snapshot_clock] *) + +val clock_snapshot_clock_set_timestamp : clock_snapshot_clock -> int64 -> unit + (** set field timestamp in clock_snapshot_clock *) + +val clock_snapshot_clock_has_is_incremental : clock_snapshot_clock -> bool + (** presence of field "is_incremental" in [clock_snapshot_clock] *) + +val clock_snapshot_clock_set_is_incremental : clock_snapshot_clock -> bool -> unit + (** set field is_incremental in clock_snapshot_clock *) + +val clock_snapshot_clock_has_unit_multiplier_ns : clock_snapshot_clock -> bool + (** presence of field "unit_multiplier_ns" in [clock_snapshot_clock] *) + +val clock_snapshot_clock_set_unit_multiplier_ns : clock_snapshot_clock -> int64 -> unit + (** set field unit_multiplier_ns in clock_snapshot_clock *) + +val make_clock_snapshot : + ?clocks:clock_snapshot_clock list -> + ?primary_trace_clock:builtin_clock -> + unit -> + clock_snapshot +(** [make_clock_snapshot … ()] is a builder for type [clock_snapshot] *) + +val copy_clock_snapshot : clock_snapshot -> clock_snapshot + +val clock_snapshot_set_clocks : clock_snapshot -> clock_snapshot_clock list -> unit + (** set field clocks in clock_snapshot *) + +val clock_snapshot_has_primary_trace_clock : clock_snapshot -> bool + (** presence of field "primary_trace_clock" in [clock_snapshot] *) + +val clock_snapshot_set_primary_trace_clock : clock_snapshot -> builtin_clock -> unit + (** set field primary_trace_clock in clock_snapshot *) + +val make_cswitch_etw_event : + ?new_thread_id:int32 -> + ?old_thread_id:int32 -> + ?new_thread_priority:int32 -> + ?old_thread_priority:int32 -> + ?previous_c_state:int32 -> + ?old_thread_wait_reason_enum_or_int:cswitch_etw_event_old_thread_wait_reason_enum_or_int -> + ?old_thread_wait_mode_enum_or_int:cswitch_etw_event_old_thread_wait_mode_enum_or_int -> + ?old_thread_state_enum_or_int:cswitch_etw_event_old_thread_state_enum_or_int -> + ?old_thread_wait_ideal_processor:int32 -> + ?new_thread_wait_time:int32 -> + unit -> + cswitch_etw_event +(** [make_cswitch_etw_event … ()] is a builder for type [cswitch_etw_event] *) + +val copy_cswitch_etw_event : cswitch_etw_event -> cswitch_etw_event + +val cswitch_etw_event_has_new_thread_id : cswitch_etw_event -> bool + (** presence of field "new_thread_id" in [cswitch_etw_event] *) + +val cswitch_etw_event_set_new_thread_id : cswitch_etw_event -> int32 -> unit + (** set field new_thread_id in cswitch_etw_event *) + +val cswitch_etw_event_has_old_thread_id : cswitch_etw_event -> bool + (** presence of field "old_thread_id" in [cswitch_etw_event] *) + +val cswitch_etw_event_set_old_thread_id : cswitch_etw_event -> int32 -> unit + (** set field old_thread_id in cswitch_etw_event *) + +val cswitch_etw_event_has_new_thread_priority : cswitch_etw_event -> bool + (** presence of field "new_thread_priority" in [cswitch_etw_event] *) + +val cswitch_etw_event_set_new_thread_priority : cswitch_etw_event -> int32 -> unit + (** set field new_thread_priority in cswitch_etw_event *) + +val cswitch_etw_event_has_old_thread_priority : cswitch_etw_event -> bool + (** presence of field "old_thread_priority" in [cswitch_etw_event] *) + +val cswitch_etw_event_set_old_thread_priority : cswitch_etw_event -> int32 -> unit + (** set field old_thread_priority in cswitch_etw_event *) + +val cswitch_etw_event_has_previous_c_state : cswitch_etw_event -> bool + (** presence of field "previous_c_state" in [cswitch_etw_event] *) + +val cswitch_etw_event_set_previous_c_state : cswitch_etw_event -> int32 -> unit + (** set field previous_c_state in cswitch_etw_event *) + +val cswitch_etw_event_set_old_thread_wait_reason_enum_or_int : cswitch_etw_event -> cswitch_etw_event_old_thread_wait_reason_enum_or_int -> unit + (** set field old_thread_wait_reason_enum_or_int in cswitch_etw_event *) + +val cswitch_etw_event_set_old_thread_wait_mode_enum_or_int : cswitch_etw_event -> cswitch_etw_event_old_thread_wait_mode_enum_or_int -> unit + (** set field old_thread_wait_mode_enum_or_int in cswitch_etw_event *) + +val cswitch_etw_event_set_old_thread_state_enum_or_int : cswitch_etw_event -> cswitch_etw_event_old_thread_state_enum_or_int -> unit + (** set field old_thread_state_enum_or_int in cswitch_etw_event *) + +val cswitch_etw_event_has_old_thread_wait_ideal_processor : cswitch_etw_event -> bool + (** presence of field "old_thread_wait_ideal_processor" in [cswitch_etw_event] *) + +val cswitch_etw_event_set_old_thread_wait_ideal_processor : cswitch_etw_event -> int32 -> unit + (** set field old_thread_wait_ideal_processor in cswitch_etw_event *) + +val cswitch_etw_event_has_new_thread_wait_time : cswitch_etw_event -> bool + (** presence of field "new_thread_wait_time" in [cswitch_etw_event] *) + +val cswitch_etw_event_set_new_thread_wait_time : cswitch_etw_event -> int32 -> unit + (** set field new_thread_wait_time in cswitch_etw_event *) + +val make_ready_thread_etw_event : + ?t_thread_id:int32 -> + ?adjust_reason_enum_or_int:ready_thread_etw_event_adjust_reason_enum_or_int -> + ?adjust_increment:int32 -> + ?flag_enum_or_int:ready_thread_etw_event_flag_enum_or_int -> + unit -> + ready_thread_etw_event +(** [make_ready_thread_etw_event … ()] is a builder for type [ready_thread_etw_event] *) + +val copy_ready_thread_etw_event : ready_thread_etw_event -> ready_thread_etw_event + +val ready_thread_etw_event_has_t_thread_id : ready_thread_etw_event -> bool + (** presence of field "t_thread_id" in [ready_thread_etw_event] *) + +val ready_thread_etw_event_set_t_thread_id : ready_thread_etw_event -> int32 -> unit + (** set field t_thread_id in ready_thread_etw_event *) + +val ready_thread_etw_event_set_adjust_reason_enum_or_int : ready_thread_etw_event -> ready_thread_etw_event_adjust_reason_enum_or_int -> unit + (** set field adjust_reason_enum_or_int in ready_thread_etw_event *) + +val ready_thread_etw_event_has_adjust_increment : ready_thread_etw_event -> bool + (** presence of field "adjust_increment" in [ready_thread_etw_event] *) + +val ready_thread_etw_event_set_adjust_increment : ready_thread_etw_event -> int32 -> unit + (** set field adjust_increment in ready_thread_etw_event *) + +val ready_thread_etw_event_set_flag_enum_or_int : ready_thread_etw_event -> ready_thread_etw_event_flag_enum_or_int -> unit + (** set field flag_enum_or_int in ready_thread_etw_event *) + +val make_mem_info_etw_event : + ?priority_levels:int32 -> + ?zero_page_count:int64 -> + ?free_page_count:int64 -> + ?modified_page_count:int64 -> + ?modified_no_write_page_count:int64 -> + ?bad_page_count:int64 -> + ?standby_page_counts:int64 list -> + ?repurposed_page_counts:int64 list -> + ?modified_page_count_page_file:int64 -> + ?paged_pool_page_count:int64 -> + ?non_paged_pool_page_count:int64 -> + ?mdl_page_count:int64 -> + ?commit_page_count:int64 -> + unit -> + mem_info_etw_event +(** [make_mem_info_etw_event … ()] is a builder for type [mem_info_etw_event] *) + +val copy_mem_info_etw_event : mem_info_etw_event -> mem_info_etw_event + +val mem_info_etw_event_has_priority_levels : mem_info_etw_event -> bool + (** presence of field "priority_levels" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_priority_levels : mem_info_etw_event -> int32 -> unit + (** set field priority_levels in mem_info_etw_event *) + +val mem_info_etw_event_has_zero_page_count : mem_info_etw_event -> bool + (** presence of field "zero_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_zero_page_count : mem_info_etw_event -> int64 -> unit + (** set field zero_page_count in mem_info_etw_event *) + +val mem_info_etw_event_has_free_page_count : mem_info_etw_event -> bool + (** presence of field "free_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_free_page_count : mem_info_etw_event -> int64 -> unit + (** set field free_page_count in mem_info_etw_event *) + +val mem_info_etw_event_has_modified_page_count : mem_info_etw_event -> bool + (** presence of field "modified_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_modified_page_count : mem_info_etw_event -> int64 -> unit + (** set field modified_page_count in mem_info_etw_event *) + +val mem_info_etw_event_has_modified_no_write_page_count : mem_info_etw_event -> bool + (** presence of field "modified_no_write_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_modified_no_write_page_count : mem_info_etw_event -> int64 -> unit + (** set field modified_no_write_page_count in mem_info_etw_event *) + +val mem_info_etw_event_has_bad_page_count : mem_info_etw_event -> bool + (** presence of field "bad_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_bad_page_count : mem_info_etw_event -> int64 -> unit + (** set field bad_page_count in mem_info_etw_event *) + +val mem_info_etw_event_set_standby_page_counts : mem_info_etw_event -> int64 list -> unit + (** set field standby_page_counts in mem_info_etw_event *) + +val mem_info_etw_event_set_repurposed_page_counts : mem_info_etw_event -> int64 list -> unit + (** set field repurposed_page_counts in mem_info_etw_event *) + +val mem_info_etw_event_has_modified_page_count_page_file : mem_info_etw_event -> bool + (** presence of field "modified_page_count_page_file" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_modified_page_count_page_file : mem_info_etw_event -> int64 -> unit + (** set field modified_page_count_page_file in mem_info_etw_event *) + +val mem_info_etw_event_has_paged_pool_page_count : mem_info_etw_event -> bool + (** presence of field "paged_pool_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_paged_pool_page_count : mem_info_etw_event -> int64 -> unit + (** set field paged_pool_page_count in mem_info_etw_event *) + +val mem_info_etw_event_has_non_paged_pool_page_count : mem_info_etw_event -> bool + (** presence of field "non_paged_pool_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_non_paged_pool_page_count : mem_info_etw_event -> int64 -> unit + (** set field non_paged_pool_page_count in mem_info_etw_event *) + +val mem_info_etw_event_has_mdl_page_count : mem_info_etw_event -> bool + (** presence of field "mdl_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_mdl_page_count : mem_info_etw_event -> int64 -> unit + (** set field mdl_page_count in mem_info_etw_event *) + +val mem_info_etw_event_has_commit_page_count : mem_info_etw_event -> bool + (** presence of field "commit_page_count" in [mem_info_etw_event] *) + +val mem_info_etw_event_set_commit_page_count : mem_info_etw_event -> int64 -> unit + (** set field commit_page_count in mem_info_etw_event *) + +val make_file_io_create_etw_event : + ?irp_ptr:int64 -> + ?file_object:int64 -> + ?ttid:int32 -> + ?create_options:int32 -> + ?file_attributes:int32 -> + ?share_access:int32 -> + ?open_path:string -> + unit -> + file_io_create_etw_event +(** [make_file_io_create_etw_event … ()] is a builder for type [file_io_create_etw_event] *) + +val copy_file_io_create_etw_event : file_io_create_etw_event -> file_io_create_etw_event + +val file_io_create_etw_event_has_irp_ptr : file_io_create_etw_event -> bool + (** presence of field "irp_ptr" in [file_io_create_etw_event] *) + +val file_io_create_etw_event_set_irp_ptr : file_io_create_etw_event -> int64 -> unit + (** set field irp_ptr in file_io_create_etw_event *) + +val file_io_create_etw_event_has_file_object : file_io_create_etw_event -> bool + (** presence of field "file_object" in [file_io_create_etw_event] *) + +val file_io_create_etw_event_set_file_object : file_io_create_etw_event -> int64 -> unit + (** set field file_object in file_io_create_etw_event *) + +val file_io_create_etw_event_has_ttid : file_io_create_etw_event -> bool + (** presence of field "ttid" in [file_io_create_etw_event] *) + +val file_io_create_etw_event_set_ttid : file_io_create_etw_event -> int32 -> unit + (** set field ttid in file_io_create_etw_event *) + +val file_io_create_etw_event_has_create_options : file_io_create_etw_event -> bool + (** presence of field "create_options" in [file_io_create_etw_event] *) + +val file_io_create_etw_event_set_create_options : file_io_create_etw_event -> int32 -> unit + (** set field create_options in file_io_create_etw_event *) + +val file_io_create_etw_event_has_file_attributes : file_io_create_etw_event -> bool + (** presence of field "file_attributes" in [file_io_create_etw_event] *) + +val file_io_create_etw_event_set_file_attributes : file_io_create_etw_event -> int32 -> unit + (** set field file_attributes in file_io_create_etw_event *) + +val file_io_create_etw_event_has_share_access : file_io_create_etw_event -> bool + (** presence of field "share_access" in [file_io_create_etw_event] *) + +val file_io_create_etw_event_set_share_access : file_io_create_etw_event -> int32 -> unit + (** set field share_access in file_io_create_etw_event *) + +val file_io_create_etw_event_has_open_path : file_io_create_etw_event -> bool + (** presence of field "open_path" in [file_io_create_etw_event] *) + +val file_io_create_etw_event_set_open_path : file_io_create_etw_event -> string -> unit + (** set field open_path in file_io_create_etw_event *) + +val make_file_io_dir_enum_etw_event : + ?irp_ptr:int64 -> + ?file_object:int64 -> + ?file_key:int64 -> + ?ttid:int32 -> + ?length:int32 -> + ?info_class:int32 -> + ?file_index:int32 -> + ?file_name:string -> + unit -> + file_io_dir_enum_etw_event +(** [make_file_io_dir_enum_etw_event … ()] is a builder for type [file_io_dir_enum_etw_event] *) + +val copy_file_io_dir_enum_etw_event : file_io_dir_enum_etw_event -> file_io_dir_enum_etw_event + +val file_io_dir_enum_etw_event_has_irp_ptr : file_io_dir_enum_etw_event -> bool + (** presence of field "irp_ptr" in [file_io_dir_enum_etw_event] *) + +val file_io_dir_enum_etw_event_set_irp_ptr : file_io_dir_enum_etw_event -> int64 -> unit + (** set field irp_ptr in file_io_dir_enum_etw_event *) + +val file_io_dir_enum_etw_event_has_file_object : file_io_dir_enum_etw_event -> bool + (** presence of field "file_object" in [file_io_dir_enum_etw_event] *) + +val file_io_dir_enum_etw_event_set_file_object : file_io_dir_enum_etw_event -> int64 -> unit + (** set field file_object in file_io_dir_enum_etw_event *) + +val file_io_dir_enum_etw_event_has_file_key : file_io_dir_enum_etw_event -> bool + (** presence of field "file_key" in [file_io_dir_enum_etw_event] *) + +val file_io_dir_enum_etw_event_set_file_key : file_io_dir_enum_etw_event -> int64 -> unit + (** set field file_key in file_io_dir_enum_etw_event *) + +val file_io_dir_enum_etw_event_has_ttid : file_io_dir_enum_etw_event -> bool + (** presence of field "ttid" in [file_io_dir_enum_etw_event] *) + +val file_io_dir_enum_etw_event_set_ttid : file_io_dir_enum_etw_event -> int32 -> unit + (** set field ttid in file_io_dir_enum_etw_event *) + +val file_io_dir_enum_etw_event_has_length : file_io_dir_enum_etw_event -> bool + (** presence of field "length" in [file_io_dir_enum_etw_event] *) + +val file_io_dir_enum_etw_event_set_length : file_io_dir_enum_etw_event -> int32 -> unit + (** set field length in file_io_dir_enum_etw_event *) + +val file_io_dir_enum_etw_event_has_info_class : file_io_dir_enum_etw_event -> bool + (** presence of field "info_class" in [file_io_dir_enum_etw_event] *) + +val file_io_dir_enum_etw_event_set_info_class : file_io_dir_enum_etw_event -> int32 -> unit + (** set field info_class in file_io_dir_enum_etw_event *) + +val file_io_dir_enum_etw_event_has_file_index : file_io_dir_enum_etw_event -> bool + (** presence of field "file_index" in [file_io_dir_enum_etw_event] *) + +val file_io_dir_enum_etw_event_set_file_index : file_io_dir_enum_etw_event -> int32 -> unit + (** set field file_index in file_io_dir_enum_etw_event *) + +val file_io_dir_enum_etw_event_has_file_name : file_io_dir_enum_etw_event -> bool + (** presence of field "file_name" in [file_io_dir_enum_etw_event] *) + +val file_io_dir_enum_etw_event_set_file_name : file_io_dir_enum_etw_event -> string -> unit + (** set field file_name in file_io_dir_enum_etw_event *) + +val make_file_io_info_etw_event : + ?irp_ptr:int64 -> + ?file_object:int64 -> + ?file_key:int64 -> + ?extra_info:int64 -> + ?ttid:int32 -> + ?info_class:int32 -> + unit -> + file_io_info_etw_event +(** [make_file_io_info_etw_event … ()] is a builder for type [file_io_info_etw_event] *) + +val copy_file_io_info_etw_event : file_io_info_etw_event -> file_io_info_etw_event + +val file_io_info_etw_event_has_irp_ptr : file_io_info_etw_event -> bool + (** presence of field "irp_ptr" in [file_io_info_etw_event] *) + +val file_io_info_etw_event_set_irp_ptr : file_io_info_etw_event -> int64 -> unit + (** set field irp_ptr in file_io_info_etw_event *) + +val file_io_info_etw_event_has_file_object : file_io_info_etw_event -> bool + (** presence of field "file_object" in [file_io_info_etw_event] *) + +val file_io_info_etw_event_set_file_object : file_io_info_etw_event -> int64 -> unit + (** set field file_object in file_io_info_etw_event *) + +val file_io_info_etw_event_has_file_key : file_io_info_etw_event -> bool + (** presence of field "file_key" in [file_io_info_etw_event] *) + +val file_io_info_etw_event_set_file_key : file_io_info_etw_event -> int64 -> unit + (** set field file_key in file_io_info_etw_event *) + +val file_io_info_etw_event_has_extra_info : file_io_info_etw_event -> bool + (** presence of field "extra_info" in [file_io_info_etw_event] *) + +val file_io_info_etw_event_set_extra_info : file_io_info_etw_event -> int64 -> unit + (** set field extra_info in file_io_info_etw_event *) + +val file_io_info_etw_event_has_ttid : file_io_info_etw_event -> bool + (** presence of field "ttid" in [file_io_info_etw_event] *) + +val file_io_info_etw_event_set_ttid : file_io_info_etw_event -> int32 -> unit + (** set field ttid in file_io_info_etw_event *) + +val file_io_info_etw_event_has_info_class : file_io_info_etw_event -> bool + (** presence of field "info_class" in [file_io_info_etw_event] *) + +val file_io_info_etw_event_set_info_class : file_io_info_etw_event -> int32 -> unit + (** set field info_class in file_io_info_etw_event *) + +val make_file_io_read_write_etw_event : + ?offset:int64 -> + ?irp_ptr:int64 -> + ?file_object:int64 -> + ?file_key:int64 -> + ?ttid:int32 -> + ?io_size:int32 -> + ?io_flags:int32 -> + unit -> + file_io_read_write_etw_event +(** [make_file_io_read_write_etw_event … ()] is a builder for type [file_io_read_write_etw_event] *) + +val copy_file_io_read_write_etw_event : file_io_read_write_etw_event -> file_io_read_write_etw_event + +val file_io_read_write_etw_event_has_offset : file_io_read_write_etw_event -> bool + (** presence of field "offset" in [file_io_read_write_etw_event] *) + +val file_io_read_write_etw_event_set_offset : file_io_read_write_etw_event -> int64 -> unit + (** set field offset in file_io_read_write_etw_event *) + +val file_io_read_write_etw_event_has_irp_ptr : file_io_read_write_etw_event -> bool + (** presence of field "irp_ptr" in [file_io_read_write_etw_event] *) + +val file_io_read_write_etw_event_set_irp_ptr : file_io_read_write_etw_event -> int64 -> unit + (** set field irp_ptr in file_io_read_write_etw_event *) + +val file_io_read_write_etw_event_has_file_object : file_io_read_write_etw_event -> bool + (** presence of field "file_object" in [file_io_read_write_etw_event] *) + +val file_io_read_write_etw_event_set_file_object : file_io_read_write_etw_event -> int64 -> unit + (** set field file_object in file_io_read_write_etw_event *) + +val file_io_read_write_etw_event_has_file_key : file_io_read_write_etw_event -> bool + (** presence of field "file_key" in [file_io_read_write_etw_event] *) + +val file_io_read_write_etw_event_set_file_key : file_io_read_write_etw_event -> int64 -> unit + (** set field file_key in file_io_read_write_etw_event *) + +val file_io_read_write_etw_event_has_ttid : file_io_read_write_etw_event -> bool + (** presence of field "ttid" in [file_io_read_write_etw_event] *) + +val file_io_read_write_etw_event_set_ttid : file_io_read_write_etw_event -> int32 -> unit + (** set field ttid in file_io_read_write_etw_event *) + +val file_io_read_write_etw_event_has_io_size : file_io_read_write_etw_event -> bool + (** presence of field "io_size" in [file_io_read_write_etw_event] *) + +val file_io_read_write_etw_event_set_io_size : file_io_read_write_etw_event -> int32 -> unit + (** set field io_size in file_io_read_write_etw_event *) + +val file_io_read_write_etw_event_has_io_flags : file_io_read_write_etw_event -> bool + (** presence of field "io_flags" in [file_io_read_write_etw_event] *) + +val file_io_read_write_etw_event_set_io_flags : file_io_read_write_etw_event -> int32 -> unit + (** set field io_flags in file_io_read_write_etw_event *) + +val make_file_io_simple_op_etw_event : + ?irp_ptr:int64 -> + ?file_object:int64 -> + ?file_key:int64 -> + ?ttid:int32 -> + unit -> + file_io_simple_op_etw_event +(** [make_file_io_simple_op_etw_event … ()] is a builder for type [file_io_simple_op_etw_event] *) + +val copy_file_io_simple_op_etw_event : file_io_simple_op_etw_event -> file_io_simple_op_etw_event + +val file_io_simple_op_etw_event_has_irp_ptr : file_io_simple_op_etw_event -> bool + (** presence of field "irp_ptr" in [file_io_simple_op_etw_event] *) + +val file_io_simple_op_etw_event_set_irp_ptr : file_io_simple_op_etw_event -> int64 -> unit + (** set field irp_ptr in file_io_simple_op_etw_event *) + +val file_io_simple_op_etw_event_has_file_object : file_io_simple_op_etw_event -> bool + (** presence of field "file_object" in [file_io_simple_op_etw_event] *) + +val file_io_simple_op_etw_event_set_file_object : file_io_simple_op_etw_event -> int64 -> unit + (** set field file_object in file_io_simple_op_etw_event *) + +val file_io_simple_op_etw_event_has_file_key : file_io_simple_op_etw_event -> bool + (** presence of field "file_key" in [file_io_simple_op_etw_event] *) + +val file_io_simple_op_etw_event_set_file_key : file_io_simple_op_etw_event -> int64 -> unit + (** set field file_key in file_io_simple_op_etw_event *) + +val file_io_simple_op_etw_event_has_ttid : file_io_simple_op_etw_event -> bool + (** presence of field "ttid" in [file_io_simple_op_etw_event] *) + +val file_io_simple_op_etw_event_set_ttid : file_io_simple_op_etw_event -> int32 -> unit + (** set field ttid in file_io_simple_op_etw_event *) + +val make_file_io_op_end_etw_event : + ?irp_ptr:int64 -> + ?extra_info:int64 -> + ?nt_status:int32 -> + unit -> + file_io_op_end_etw_event +(** [make_file_io_op_end_etw_event … ()] is a builder for type [file_io_op_end_etw_event] *) + +val copy_file_io_op_end_etw_event : file_io_op_end_etw_event -> file_io_op_end_etw_event + +val file_io_op_end_etw_event_has_irp_ptr : file_io_op_end_etw_event -> bool + (** presence of field "irp_ptr" in [file_io_op_end_etw_event] *) + +val file_io_op_end_etw_event_set_irp_ptr : file_io_op_end_etw_event -> int64 -> unit + (** set field irp_ptr in file_io_op_end_etw_event *) + +val file_io_op_end_etw_event_has_extra_info : file_io_op_end_etw_event -> bool + (** presence of field "extra_info" in [file_io_op_end_etw_event] *) + +val file_io_op_end_etw_event_set_extra_info : file_io_op_end_etw_event -> int64 -> unit + (** set field extra_info in file_io_op_end_etw_event *) + +val file_io_op_end_etw_event_has_nt_status : file_io_op_end_etw_event -> bool + (** presence of field "nt_status" in [file_io_op_end_etw_event] *) + +val file_io_op_end_etw_event_set_nt_status : file_io_op_end_etw_event -> int32 -> unit + (** set field nt_status in file_io_op_end_etw_event *) + +val make_etw_trace_event : + ?timestamp:int64 -> + ?cpu:int32 -> + ?thread_id:int32 -> + ?event:etw_trace_event_event -> + unit -> + etw_trace_event +(** [make_etw_trace_event … ()] is a builder for type [etw_trace_event] *) + +val copy_etw_trace_event : etw_trace_event -> etw_trace_event + +val etw_trace_event_has_timestamp : etw_trace_event -> bool + (** presence of field "timestamp" in [etw_trace_event] *) + +val etw_trace_event_set_timestamp : etw_trace_event -> int64 -> unit + (** set field timestamp in etw_trace_event *) + +val etw_trace_event_has_cpu : etw_trace_event -> bool + (** presence of field "cpu" in [etw_trace_event] *) + +val etw_trace_event_set_cpu : etw_trace_event -> int32 -> unit + (** set field cpu in etw_trace_event *) + +val etw_trace_event_has_thread_id : etw_trace_event -> bool + (** presence of field "thread_id" in [etw_trace_event] *) + +val etw_trace_event_set_thread_id : etw_trace_event -> int32 -> unit + (** set field thread_id in etw_trace_event *) + +val etw_trace_event_set_event : etw_trace_event -> etw_trace_event_event -> unit + (** set field event in etw_trace_event *) + +val make_etw_trace_event_bundle : + ?cpu:int32 -> + ?event:etw_trace_event list -> + unit -> + etw_trace_event_bundle +(** [make_etw_trace_event_bundle … ()] is a builder for type [etw_trace_event_bundle] *) + +val copy_etw_trace_event_bundle : etw_trace_event_bundle -> etw_trace_event_bundle + +val etw_trace_event_bundle_has_cpu : etw_trace_event_bundle -> bool + (** presence of field "cpu" in [etw_trace_event_bundle] *) + +val etw_trace_event_bundle_set_cpu : etw_trace_event_bundle -> int32 -> unit + (** set field cpu in etw_trace_event_bundle *) + +val etw_trace_event_bundle_set_event : etw_trace_event_bundle -> etw_trace_event list -> unit + (** set field event in etw_trace_event_bundle *) + +val make_evdev_event_input_event : + ?kernel_timestamp:int64 -> + ?type_:int32 -> + ?code:int32 -> + ?value:int32 -> + unit -> + evdev_event_input_event +(** [make_evdev_event_input_event … ()] is a builder for type [evdev_event_input_event] *) + +val copy_evdev_event_input_event : evdev_event_input_event -> evdev_event_input_event + +val evdev_event_input_event_has_kernel_timestamp : evdev_event_input_event -> bool + (** presence of field "kernel_timestamp" in [evdev_event_input_event] *) + +val evdev_event_input_event_set_kernel_timestamp : evdev_event_input_event -> int64 -> unit + (** set field kernel_timestamp in evdev_event_input_event *) + +val evdev_event_input_event_has_type_ : evdev_event_input_event -> bool + (** presence of field "type_" in [evdev_event_input_event] *) + +val evdev_event_input_event_set_type_ : evdev_event_input_event -> int32 -> unit + (** set field type_ in evdev_event_input_event *) + +val evdev_event_input_event_has_code : evdev_event_input_event -> bool + (** presence of field "code" in [evdev_event_input_event] *) + +val evdev_event_input_event_set_code : evdev_event_input_event -> int32 -> unit + (** set field code in evdev_event_input_event *) + +val evdev_event_input_event_has_value : evdev_event_input_event -> bool + (** presence of field "value" in [evdev_event_input_event] *) + +val evdev_event_input_event_set_value : evdev_event_input_event -> int32 -> unit + (** set field value in evdev_event_input_event *) + +val make_evdev_event : + ?device_id:int32 -> + ?event:evdev_event_event -> + unit -> + evdev_event +(** [make_evdev_event … ()] is a builder for type [evdev_event] *) + +val copy_evdev_event : evdev_event -> evdev_event + +val evdev_event_has_device_id : evdev_event -> bool + (** presence of field "device_id" in [evdev_event] *) + +val evdev_event_set_device_id : evdev_event -> int32 -> unit + (** set field device_id in evdev_event *) + +val evdev_event_set_event : evdev_event -> evdev_event_event -> unit + (** set field event in evdev_event *) + +val make_uninterpreted_option_name_part : + ?name_part:string -> + ?is_extension:bool -> + unit -> + uninterpreted_option_name_part +(** [make_uninterpreted_option_name_part … ()] is a builder for type [uninterpreted_option_name_part] *) + +val copy_uninterpreted_option_name_part : uninterpreted_option_name_part -> uninterpreted_option_name_part + +val uninterpreted_option_name_part_has_name_part : uninterpreted_option_name_part -> bool + (** presence of field "name_part" in [uninterpreted_option_name_part] *) + +val uninterpreted_option_name_part_set_name_part : uninterpreted_option_name_part -> string -> unit + (** set field name_part in uninterpreted_option_name_part *) + +val uninterpreted_option_name_part_has_is_extension : uninterpreted_option_name_part -> bool + (** presence of field "is_extension" in [uninterpreted_option_name_part] *) + +val uninterpreted_option_name_part_set_is_extension : uninterpreted_option_name_part -> bool -> unit + (** set field is_extension in uninterpreted_option_name_part *) + +val make_uninterpreted_option : + ?name:uninterpreted_option_name_part list -> + ?identifier_value:string -> + ?positive_int_value:int64 -> + ?negative_int_value:int64 -> + ?double_value:float -> + ?string_value:bytes -> + ?aggregate_value:string -> + unit -> + uninterpreted_option +(** [make_uninterpreted_option … ()] is a builder for type [uninterpreted_option] *) + +val copy_uninterpreted_option : uninterpreted_option -> uninterpreted_option + +val uninterpreted_option_set_name : uninterpreted_option -> uninterpreted_option_name_part list -> unit + (** set field name in uninterpreted_option *) + +val uninterpreted_option_has_identifier_value : uninterpreted_option -> bool + (** presence of field "identifier_value" in [uninterpreted_option] *) + +val uninterpreted_option_set_identifier_value : uninterpreted_option -> string -> unit + (** set field identifier_value in uninterpreted_option *) + +val uninterpreted_option_has_positive_int_value : uninterpreted_option -> bool + (** presence of field "positive_int_value" in [uninterpreted_option] *) + +val uninterpreted_option_set_positive_int_value : uninterpreted_option -> int64 -> unit + (** set field positive_int_value in uninterpreted_option *) + +val uninterpreted_option_has_negative_int_value : uninterpreted_option -> bool + (** presence of field "negative_int_value" in [uninterpreted_option] *) + +val uninterpreted_option_set_negative_int_value : uninterpreted_option -> int64 -> unit + (** set field negative_int_value in uninterpreted_option *) + +val uninterpreted_option_has_double_value : uninterpreted_option -> bool + (** presence of field "double_value" in [uninterpreted_option] *) + +val uninterpreted_option_set_double_value : uninterpreted_option -> float -> unit + (** set field double_value in uninterpreted_option *) + +val uninterpreted_option_has_string_value : uninterpreted_option -> bool + (** presence of field "string_value" in [uninterpreted_option] *) + +val uninterpreted_option_set_string_value : uninterpreted_option -> bytes -> unit + (** set field string_value in uninterpreted_option *) + +val uninterpreted_option_has_aggregate_value : uninterpreted_option -> bool + (** presence of field "aggregate_value" in [uninterpreted_option] *) + +val uninterpreted_option_set_aggregate_value : uninterpreted_option -> string -> unit + (** set field aggregate_value in uninterpreted_option *) + +val make_field_options : + ?packed:bool -> + ?uninterpreted_option:uninterpreted_option list -> + unit -> + field_options +(** [make_field_options … ()] is a builder for type [field_options] *) + +val copy_field_options : field_options -> field_options + +val field_options_has_packed : field_options -> bool + (** presence of field "packed" in [field_options] *) + +val field_options_set_packed : field_options -> bool -> unit + (** set field packed in field_options *) + +val field_options_set_uninterpreted_option : field_options -> uninterpreted_option list -> unit + (** set field uninterpreted_option in field_options *) + +val make_field_descriptor_proto : + ?name:string -> + ?number:int32 -> + ?label:field_descriptor_proto_label -> + ?type_:field_descriptor_proto_type -> + ?type_name:string -> + ?extendee:string -> + ?default_value:string -> + ?options:field_options -> + ?oneof_index:int32 -> + unit -> + field_descriptor_proto +(** [make_field_descriptor_proto … ()] is a builder for type [field_descriptor_proto] *) + +val copy_field_descriptor_proto : field_descriptor_proto -> field_descriptor_proto + +val field_descriptor_proto_has_name : field_descriptor_proto -> bool + (** presence of field "name" in [field_descriptor_proto] *) + +val field_descriptor_proto_set_name : field_descriptor_proto -> string -> unit + (** set field name in field_descriptor_proto *) + +val field_descriptor_proto_has_number : field_descriptor_proto -> bool + (** presence of field "number" in [field_descriptor_proto] *) + +val field_descriptor_proto_set_number : field_descriptor_proto -> int32 -> unit + (** set field number in field_descriptor_proto *) + +val field_descriptor_proto_has_label : field_descriptor_proto -> bool + (** presence of field "label" in [field_descriptor_proto] *) + +val field_descriptor_proto_set_label : field_descriptor_proto -> field_descriptor_proto_label -> unit + (** set field label in field_descriptor_proto *) + +val field_descriptor_proto_has_type_ : field_descriptor_proto -> bool + (** presence of field "type_" in [field_descriptor_proto] *) + +val field_descriptor_proto_set_type_ : field_descriptor_proto -> field_descriptor_proto_type -> unit + (** set field type_ in field_descriptor_proto *) + +val field_descriptor_proto_has_type_name : field_descriptor_proto -> bool + (** presence of field "type_name" in [field_descriptor_proto] *) + +val field_descriptor_proto_set_type_name : field_descriptor_proto -> string -> unit + (** set field type_name in field_descriptor_proto *) + +val field_descriptor_proto_has_extendee : field_descriptor_proto -> bool + (** presence of field "extendee" in [field_descriptor_proto] *) + +val field_descriptor_proto_set_extendee : field_descriptor_proto -> string -> unit + (** set field extendee in field_descriptor_proto *) + +val field_descriptor_proto_has_default_value : field_descriptor_proto -> bool + (** presence of field "default_value" in [field_descriptor_proto] *) + +val field_descriptor_proto_set_default_value : field_descriptor_proto -> string -> unit + (** set field default_value in field_descriptor_proto *) + +val field_descriptor_proto_set_options : field_descriptor_proto -> field_options -> unit + (** set field options in field_descriptor_proto *) + +val field_descriptor_proto_has_oneof_index : field_descriptor_proto -> bool + (** presence of field "oneof_index" in [field_descriptor_proto] *) + +val field_descriptor_proto_set_oneof_index : field_descriptor_proto -> int32 -> unit + (** set field oneof_index in field_descriptor_proto *) + +val make_enum_value_descriptor_proto : + ?name:string -> + ?number:int32 -> + unit -> + enum_value_descriptor_proto +(** [make_enum_value_descriptor_proto … ()] is a builder for type [enum_value_descriptor_proto] *) + +val copy_enum_value_descriptor_proto : enum_value_descriptor_proto -> enum_value_descriptor_proto + +val enum_value_descriptor_proto_has_name : enum_value_descriptor_proto -> bool + (** presence of field "name" in [enum_value_descriptor_proto] *) + +val enum_value_descriptor_proto_set_name : enum_value_descriptor_proto -> string -> unit + (** set field name in enum_value_descriptor_proto *) + +val enum_value_descriptor_proto_has_number : enum_value_descriptor_proto -> bool + (** presence of field "number" in [enum_value_descriptor_proto] *) + +val enum_value_descriptor_proto_set_number : enum_value_descriptor_proto -> int32 -> unit + (** set field number in enum_value_descriptor_proto *) + +val make_enum_descriptor_proto : + ?name:string -> + ?value:enum_value_descriptor_proto list -> + ?reserved_name:string list -> + unit -> + enum_descriptor_proto +(** [make_enum_descriptor_proto … ()] is a builder for type [enum_descriptor_proto] *) + +val copy_enum_descriptor_proto : enum_descriptor_proto -> enum_descriptor_proto + +val enum_descriptor_proto_has_name : enum_descriptor_proto -> bool + (** presence of field "name" in [enum_descriptor_proto] *) + +val enum_descriptor_proto_set_name : enum_descriptor_proto -> string -> unit + (** set field name in enum_descriptor_proto *) + +val enum_descriptor_proto_set_value : enum_descriptor_proto -> enum_value_descriptor_proto list -> unit + (** set field value in enum_descriptor_proto *) + +val enum_descriptor_proto_set_reserved_name : enum_descriptor_proto -> string list -> unit + (** set field reserved_name in enum_descriptor_proto *) + +val make_oneof_descriptor_proto : + ?name:string -> + ?options:unit -> + unit -> + oneof_descriptor_proto +(** [make_oneof_descriptor_proto … ()] is a builder for type [oneof_descriptor_proto] *) + +val copy_oneof_descriptor_proto : oneof_descriptor_proto -> oneof_descriptor_proto + +val oneof_descriptor_proto_has_name : oneof_descriptor_proto -> bool + (** presence of field "name" in [oneof_descriptor_proto] *) + +val oneof_descriptor_proto_set_name : oneof_descriptor_proto -> string -> unit + (** set field name in oneof_descriptor_proto *) + +val oneof_descriptor_proto_has_options : oneof_descriptor_proto -> bool + (** presence of field "options" in [oneof_descriptor_proto] *) + +val oneof_descriptor_proto_set_options : oneof_descriptor_proto -> unit -> unit + (** set field options in oneof_descriptor_proto *) + +val make_descriptor_proto_reserved_range : + ?start:int32 -> + ?end_:int32 -> + unit -> + descriptor_proto_reserved_range +(** [make_descriptor_proto_reserved_range … ()] is a builder for type [descriptor_proto_reserved_range] *) + +val copy_descriptor_proto_reserved_range : descriptor_proto_reserved_range -> descriptor_proto_reserved_range + +val descriptor_proto_reserved_range_has_start : descriptor_proto_reserved_range -> bool + (** presence of field "start" in [descriptor_proto_reserved_range] *) + +val descriptor_proto_reserved_range_set_start : descriptor_proto_reserved_range -> int32 -> unit + (** set field start in descriptor_proto_reserved_range *) + +val descriptor_proto_reserved_range_has_end_ : descriptor_proto_reserved_range -> bool + (** presence of field "end_" in [descriptor_proto_reserved_range] *) + +val descriptor_proto_reserved_range_set_end_ : descriptor_proto_reserved_range -> int32 -> unit + (** set field end_ in descriptor_proto_reserved_range *) + +val make_descriptor_proto : + ?name:string -> + ?field:field_descriptor_proto list -> + ?extension:field_descriptor_proto list -> + ?nested_type:descriptor_proto list -> + ?enum_type:enum_descriptor_proto list -> + ?oneof_decl:oneof_descriptor_proto list -> + ?reserved_range:descriptor_proto_reserved_range list -> + ?reserved_name:string list -> + unit -> + descriptor_proto +(** [make_descriptor_proto … ()] is a builder for type [descriptor_proto] *) + +val copy_descriptor_proto : descriptor_proto -> descriptor_proto + +val descriptor_proto_has_name : descriptor_proto -> bool + (** presence of field "name" in [descriptor_proto] *) + +val descriptor_proto_set_name : descriptor_proto -> string -> unit + (** set field name in descriptor_proto *) + +val descriptor_proto_set_field : descriptor_proto -> field_descriptor_proto list -> unit + (** set field field in descriptor_proto *) + +val descriptor_proto_set_extension : descriptor_proto -> field_descriptor_proto list -> unit + (** set field extension in descriptor_proto *) + +val descriptor_proto_set_nested_type : descriptor_proto -> descriptor_proto list -> unit + (** set field nested_type in descriptor_proto *) + +val descriptor_proto_set_enum_type : descriptor_proto -> enum_descriptor_proto list -> unit + (** set field enum_type in descriptor_proto *) + +val descriptor_proto_set_oneof_decl : descriptor_proto -> oneof_descriptor_proto list -> unit + (** set field oneof_decl in descriptor_proto *) + +val descriptor_proto_set_reserved_range : descriptor_proto -> descriptor_proto_reserved_range list -> unit + (** set field reserved_range in descriptor_proto *) + +val descriptor_proto_set_reserved_name : descriptor_proto -> string list -> unit + (** set field reserved_name in descriptor_proto *) + +val make_file_descriptor_proto : + ?name:string -> + ?package:string -> + ?dependency:string list -> + ?public_dependency:int32 list -> + ?weak_dependency:int32 list -> + ?message_type:descriptor_proto list -> + ?enum_type:enum_descriptor_proto list -> + ?extension:field_descriptor_proto list -> + unit -> + file_descriptor_proto +(** [make_file_descriptor_proto … ()] is a builder for type [file_descriptor_proto] *) + +val copy_file_descriptor_proto : file_descriptor_proto -> file_descriptor_proto + +val file_descriptor_proto_has_name : file_descriptor_proto -> bool + (** presence of field "name" in [file_descriptor_proto] *) + +val file_descriptor_proto_set_name : file_descriptor_proto -> string -> unit + (** set field name in file_descriptor_proto *) + +val file_descriptor_proto_has_package : file_descriptor_proto -> bool + (** presence of field "package" in [file_descriptor_proto] *) + +val file_descriptor_proto_set_package : file_descriptor_proto -> string -> unit + (** set field package in file_descriptor_proto *) + +val file_descriptor_proto_set_dependency : file_descriptor_proto -> string list -> unit + (** set field dependency in file_descriptor_proto *) + +val file_descriptor_proto_set_public_dependency : file_descriptor_proto -> int32 list -> unit + (** set field public_dependency in file_descriptor_proto *) + +val file_descriptor_proto_set_weak_dependency : file_descriptor_proto -> int32 list -> unit + (** set field weak_dependency in file_descriptor_proto *) + +val file_descriptor_proto_set_message_type : file_descriptor_proto -> descriptor_proto list -> unit + (** set field message_type in file_descriptor_proto *) + +val file_descriptor_proto_set_enum_type : file_descriptor_proto -> enum_descriptor_proto list -> unit + (** set field enum_type in file_descriptor_proto *) + +val file_descriptor_proto_set_extension : file_descriptor_proto -> field_descriptor_proto list -> unit + (** set field extension in file_descriptor_proto *) + +val make_file_descriptor_set : + ?file:file_descriptor_proto list -> + unit -> + file_descriptor_set +(** [make_file_descriptor_set … ()] is a builder for type [file_descriptor_set] *) + +val copy_file_descriptor_set : file_descriptor_set -> file_descriptor_set + +val file_descriptor_set_set_file : file_descriptor_set -> file_descriptor_proto list -> unit + (** set field file in file_descriptor_set *) + +val make_extension_descriptor : + ?extension_set:file_descriptor_set -> + unit -> + extension_descriptor +(** [make_extension_descriptor … ()] is a builder for type [extension_descriptor] *) + +val copy_extension_descriptor : extension_descriptor -> extension_descriptor + +val extension_descriptor_set_extension_set : extension_descriptor -> file_descriptor_set -> unit + (** set field extension_set in extension_descriptor *) + +val make_inode_file_map_entry : + ?inode_number:int64 -> + ?paths:string list -> + ?type_:inode_file_map_entry_type -> + unit -> + inode_file_map_entry +(** [make_inode_file_map_entry … ()] is a builder for type [inode_file_map_entry] *) + +val copy_inode_file_map_entry : inode_file_map_entry -> inode_file_map_entry + +val inode_file_map_entry_has_inode_number : inode_file_map_entry -> bool + (** presence of field "inode_number" in [inode_file_map_entry] *) + +val inode_file_map_entry_set_inode_number : inode_file_map_entry -> int64 -> unit + (** set field inode_number in inode_file_map_entry *) + +val inode_file_map_entry_set_paths : inode_file_map_entry -> string list -> unit + (** set field paths in inode_file_map_entry *) + +val inode_file_map_entry_has_type_ : inode_file_map_entry -> bool + (** presence of field "type_" in [inode_file_map_entry] *) + +val inode_file_map_entry_set_type_ : inode_file_map_entry -> inode_file_map_entry_type -> unit + (** set field type_ in inode_file_map_entry *) + +val make_inode_file_map : + ?block_device_id:int64 -> + ?mount_points:string list -> + ?entries:inode_file_map_entry list -> + unit -> + inode_file_map +(** [make_inode_file_map … ()] is a builder for type [inode_file_map] *) + +val copy_inode_file_map : inode_file_map -> inode_file_map + +val inode_file_map_has_block_device_id : inode_file_map -> bool + (** presence of field "block_device_id" in [inode_file_map] *) + +val inode_file_map_set_block_device_id : inode_file_map -> int64 -> unit + (** set field block_device_id in inode_file_map *) + +val inode_file_map_set_mount_points : inode_file_map -> string list -> unit + (** set field mount_points in inode_file_map *) + +val inode_file_map_set_entries : inode_file_map -> inode_file_map_entry list -> unit + (** set field entries in inode_file_map *) + +val make_generic_kernel_cpu_frequency_event : + ?cpu:int32 -> + ?freq_hz:int64 -> + unit -> + generic_kernel_cpu_frequency_event +(** [make_generic_kernel_cpu_frequency_event … ()] is a builder for type [generic_kernel_cpu_frequency_event] *) + +val copy_generic_kernel_cpu_frequency_event : generic_kernel_cpu_frequency_event -> generic_kernel_cpu_frequency_event + +val generic_kernel_cpu_frequency_event_has_cpu : generic_kernel_cpu_frequency_event -> bool + (** presence of field "cpu" in [generic_kernel_cpu_frequency_event] *) + +val generic_kernel_cpu_frequency_event_set_cpu : generic_kernel_cpu_frequency_event -> int32 -> unit + (** set field cpu in generic_kernel_cpu_frequency_event *) + +val generic_kernel_cpu_frequency_event_has_freq_hz : generic_kernel_cpu_frequency_event -> bool + (** presence of field "freq_hz" in [generic_kernel_cpu_frequency_event] *) + +val generic_kernel_cpu_frequency_event_set_freq_hz : generic_kernel_cpu_frequency_event -> int64 -> unit + (** set field freq_hz in generic_kernel_cpu_frequency_event *) + +val make_generic_kernel_task_state_event : + ?cpu:int32 -> + ?comm:string -> + ?tid:int64 -> + ?state:generic_kernel_task_state_event_task_state_enum -> + ?prio:int32 -> + unit -> + generic_kernel_task_state_event +(** [make_generic_kernel_task_state_event … ()] is a builder for type [generic_kernel_task_state_event] *) + +val copy_generic_kernel_task_state_event : generic_kernel_task_state_event -> generic_kernel_task_state_event + +val generic_kernel_task_state_event_has_cpu : generic_kernel_task_state_event -> bool + (** presence of field "cpu" in [generic_kernel_task_state_event] *) + +val generic_kernel_task_state_event_set_cpu : generic_kernel_task_state_event -> int32 -> unit + (** set field cpu in generic_kernel_task_state_event *) + +val generic_kernel_task_state_event_has_comm : generic_kernel_task_state_event -> bool + (** presence of field "comm" in [generic_kernel_task_state_event] *) + +val generic_kernel_task_state_event_set_comm : generic_kernel_task_state_event -> string -> unit + (** set field comm in generic_kernel_task_state_event *) + +val generic_kernel_task_state_event_has_tid : generic_kernel_task_state_event -> bool + (** presence of field "tid" in [generic_kernel_task_state_event] *) + +val generic_kernel_task_state_event_set_tid : generic_kernel_task_state_event -> int64 -> unit + (** set field tid in generic_kernel_task_state_event *) + +val generic_kernel_task_state_event_has_state : generic_kernel_task_state_event -> bool + (** presence of field "state" in [generic_kernel_task_state_event] *) + +val generic_kernel_task_state_event_set_state : generic_kernel_task_state_event -> generic_kernel_task_state_event_task_state_enum -> unit + (** set field state in generic_kernel_task_state_event *) + +val generic_kernel_task_state_event_has_prio : generic_kernel_task_state_event -> bool + (** presence of field "prio" in [generic_kernel_task_state_event] *) + +val generic_kernel_task_state_event_set_prio : generic_kernel_task_state_event -> int32 -> unit + (** set field prio in generic_kernel_task_state_event *) + +val make_generic_kernel_task_rename_event : + ?tid:int64 -> + ?comm:string -> + unit -> + generic_kernel_task_rename_event +(** [make_generic_kernel_task_rename_event … ()] is a builder for type [generic_kernel_task_rename_event] *) + +val copy_generic_kernel_task_rename_event : generic_kernel_task_rename_event -> generic_kernel_task_rename_event + +val generic_kernel_task_rename_event_has_tid : generic_kernel_task_rename_event -> bool + (** presence of field "tid" in [generic_kernel_task_rename_event] *) + +val generic_kernel_task_rename_event_set_tid : generic_kernel_task_rename_event -> int64 -> unit + (** set field tid in generic_kernel_task_rename_event *) + +val generic_kernel_task_rename_event_has_comm : generic_kernel_task_rename_event -> bool + (** presence of field "comm" in [generic_kernel_task_rename_event] *) + +val generic_kernel_task_rename_event_set_comm : generic_kernel_task_rename_event -> string -> unit + (** set field comm in generic_kernel_task_rename_event *) + +val make_generic_kernel_process_tree_thread : + ?tid:int64 -> + ?pid:int64 -> + ?comm:string -> + ?is_main_thread:bool -> + unit -> + generic_kernel_process_tree_thread +(** [make_generic_kernel_process_tree_thread … ()] is a builder for type [generic_kernel_process_tree_thread] *) + +val copy_generic_kernel_process_tree_thread : generic_kernel_process_tree_thread -> generic_kernel_process_tree_thread + +val generic_kernel_process_tree_thread_has_tid : generic_kernel_process_tree_thread -> bool + (** presence of field "tid" in [generic_kernel_process_tree_thread] *) + +val generic_kernel_process_tree_thread_set_tid : generic_kernel_process_tree_thread -> int64 -> unit + (** set field tid in generic_kernel_process_tree_thread *) + +val generic_kernel_process_tree_thread_has_pid : generic_kernel_process_tree_thread -> bool + (** presence of field "pid" in [generic_kernel_process_tree_thread] *) + +val generic_kernel_process_tree_thread_set_pid : generic_kernel_process_tree_thread -> int64 -> unit + (** set field pid in generic_kernel_process_tree_thread *) + +val generic_kernel_process_tree_thread_has_comm : generic_kernel_process_tree_thread -> bool + (** presence of field "comm" in [generic_kernel_process_tree_thread] *) + +val generic_kernel_process_tree_thread_set_comm : generic_kernel_process_tree_thread -> string -> unit + (** set field comm in generic_kernel_process_tree_thread *) + +val generic_kernel_process_tree_thread_has_is_main_thread : generic_kernel_process_tree_thread -> bool + (** presence of field "is_main_thread" in [generic_kernel_process_tree_thread] *) + +val generic_kernel_process_tree_thread_set_is_main_thread : generic_kernel_process_tree_thread -> bool -> unit + (** set field is_main_thread in generic_kernel_process_tree_thread *) + +val make_generic_kernel_process_tree_process : + ?pid:int64 -> + ?ppid:int64 -> + ?cmdline:string -> + unit -> + generic_kernel_process_tree_process +(** [make_generic_kernel_process_tree_process … ()] is a builder for type [generic_kernel_process_tree_process] *) + +val copy_generic_kernel_process_tree_process : generic_kernel_process_tree_process -> generic_kernel_process_tree_process + +val generic_kernel_process_tree_process_has_pid : generic_kernel_process_tree_process -> bool + (** presence of field "pid" in [generic_kernel_process_tree_process] *) + +val generic_kernel_process_tree_process_set_pid : generic_kernel_process_tree_process -> int64 -> unit + (** set field pid in generic_kernel_process_tree_process *) + +val generic_kernel_process_tree_process_has_ppid : generic_kernel_process_tree_process -> bool + (** presence of field "ppid" in [generic_kernel_process_tree_process] *) + +val generic_kernel_process_tree_process_set_ppid : generic_kernel_process_tree_process -> int64 -> unit + (** set field ppid in generic_kernel_process_tree_process *) + +val generic_kernel_process_tree_process_has_cmdline : generic_kernel_process_tree_process -> bool + (** presence of field "cmdline" in [generic_kernel_process_tree_process] *) + +val generic_kernel_process_tree_process_set_cmdline : generic_kernel_process_tree_process -> string -> unit + (** set field cmdline in generic_kernel_process_tree_process *) + +val make_generic_kernel_process_tree : + ?processes:generic_kernel_process_tree_process list -> + ?threads:generic_kernel_process_tree_thread list -> + unit -> + generic_kernel_process_tree +(** [make_generic_kernel_process_tree … ()] is a builder for type [generic_kernel_process_tree] *) + +val copy_generic_kernel_process_tree : generic_kernel_process_tree -> generic_kernel_process_tree + +val generic_kernel_process_tree_set_processes : generic_kernel_process_tree -> generic_kernel_process_tree_process list -> unit + (** set field processes in generic_kernel_process_tree *) + +val generic_kernel_process_tree_set_threads : generic_kernel_process_tree -> generic_kernel_process_tree_thread list -> unit + (** set field threads in generic_kernel_process_tree *) + +val make_gpu_counter_event_gpu_counter : + ?counter_id:int32 -> + ?value:gpu_counter_event_gpu_counter_value -> + unit -> + gpu_counter_event_gpu_counter +(** [make_gpu_counter_event_gpu_counter … ()] is a builder for type [gpu_counter_event_gpu_counter] *) + +val copy_gpu_counter_event_gpu_counter : gpu_counter_event_gpu_counter -> gpu_counter_event_gpu_counter + +val gpu_counter_event_gpu_counter_has_counter_id : gpu_counter_event_gpu_counter -> bool + (** presence of field "counter_id" in [gpu_counter_event_gpu_counter] *) + +val gpu_counter_event_gpu_counter_set_counter_id : gpu_counter_event_gpu_counter -> int32 -> unit + (** set field counter_id in gpu_counter_event_gpu_counter *) + +val gpu_counter_event_gpu_counter_set_value : gpu_counter_event_gpu_counter -> gpu_counter_event_gpu_counter_value -> unit + (** set field value in gpu_counter_event_gpu_counter *) + +val make_gpu_counter_event : + ?counter_descriptor:gpu_counter_descriptor -> + ?counters:gpu_counter_event_gpu_counter list -> + ?gpu_id:int32 -> + unit -> + gpu_counter_event +(** [make_gpu_counter_event … ()] is a builder for type [gpu_counter_event] *) + +val copy_gpu_counter_event : gpu_counter_event -> gpu_counter_event + +val gpu_counter_event_set_counter_descriptor : gpu_counter_event -> gpu_counter_descriptor -> unit + (** set field counter_descriptor in gpu_counter_event *) + +val gpu_counter_event_set_counters : gpu_counter_event -> gpu_counter_event_gpu_counter list -> unit + (** set field counters in gpu_counter_event *) + +val gpu_counter_event_has_gpu_id : gpu_counter_event -> bool + (** presence of field "gpu_id" in [gpu_counter_event] *) + +val gpu_counter_event_set_gpu_id : gpu_counter_event -> int32 -> unit + (** set field gpu_id in gpu_counter_event *) + +val make_gpu_log : + ?severity:gpu_log_severity -> + ?tag:string -> + ?log_message:string -> + unit -> + gpu_log +(** [make_gpu_log … ()] is a builder for type [gpu_log] *) + +val copy_gpu_log : gpu_log -> gpu_log + +val gpu_log_has_severity : gpu_log -> bool + (** presence of field "severity" in [gpu_log] *) + +val gpu_log_set_severity : gpu_log -> gpu_log_severity -> unit + (** set field severity in gpu_log *) + +val gpu_log_has_tag : gpu_log -> bool + (** presence of field "tag" in [gpu_log] *) + +val gpu_log_set_tag : gpu_log -> string -> unit + (** set field tag in gpu_log *) + +val gpu_log_has_log_message : gpu_log -> bool + (** presence of field "log_message" in [gpu_log] *) + +val gpu_log_set_log_message : gpu_log -> string -> unit + (** set field log_message in gpu_log *) + +val make_gpu_render_stage_event_extra_data : + ?name:string -> + ?value:string -> + unit -> + gpu_render_stage_event_extra_data +(** [make_gpu_render_stage_event_extra_data … ()] is a builder for type [gpu_render_stage_event_extra_data] *) + +val copy_gpu_render_stage_event_extra_data : gpu_render_stage_event_extra_data -> gpu_render_stage_event_extra_data + +val gpu_render_stage_event_extra_data_has_name : gpu_render_stage_event_extra_data -> bool + (** presence of field "name" in [gpu_render_stage_event_extra_data] *) + +val gpu_render_stage_event_extra_data_set_name : gpu_render_stage_event_extra_data -> string -> unit + (** set field name in gpu_render_stage_event_extra_data *) + +val gpu_render_stage_event_extra_data_has_value : gpu_render_stage_event_extra_data -> bool + (** presence of field "value" in [gpu_render_stage_event_extra_data] *) + +val gpu_render_stage_event_extra_data_set_value : gpu_render_stage_event_extra_data -> string -> unit + (** set field value in gpu_render_stage_event_extra_data *) + +val make_gpu_render_stage_event_specifications_context_spec : + ?context:int64 -> + ?pid:int32 -> + unit -> + gpu_render_stage_event_specifications_context_spec +(** [make_gpu_render_stage_event_specifications_context_spec … ()] is a builder for type [gpu_render_stage_event_specifications_context_spec] *) + +val copy_gpu_render_stage_event_specifications_context_spec : gpu_render_stage_event_specifications_context_spec -> gpu_render_stage_event_specifications_context_spec + +val gpu_render_stage_event_specifications_context_spec_has_context : gpu_render_stage_event_specifications_context_spec -> bool + (** presence of field "context" in [gpu_render_stage_event_specifications_context_spec] *) + +val gpu_render_stage_event_specifications_context_spec_set_context : gpu_render_stage_event_specifications_context_spec -> int64 -> unit + (** set field context in gpu_render_stage_event_specifications_context_spec *) + +val gpu_render_stage_event_specifications_context_spec_has_pid : gpu_render_stage_event_specifications_context_spec -> bool + (** presence of field "pid" in [gpu_render_stage_event_specifications_context_spec] *) + +val gpu_render_stage_event_specifications_context_spec_set_pid : gpu_render_stage_event_specifications_context_spec -> int32 -> unit + (** set field pid in gpu_render_stage_event_specifications_context_spec *) + +val make_gpu_render_stage_event_specifications_description : + ?name:string -> + ?description:string -> + unit -> + gpu_render_stage_event_specifications_description +(** [make_gpu_render_stage_event_specifications_description … ()] is a builder for type [gpu_render_stage_event_specifications_description] *) + +val copy_gpu_render_stage_event_specifications_description : gpu_render_stage_event_specifications_description -> gpu_render_stage_event_specifications_description + +val gpu_render_stage_event_specifications_description_has_name : gpu_render_stage_event_specifications_description -> bool + (** presence of field "name" in [gpu_render_stage_event_specifications_description] *) + +val gpu_render_stage_event_specifications_description_set_name : gpu_render_stage_event_specifications_description -> string -> unit + (** set field name in gpu_render_stage_event_specifications_description *) + +val gpu_render_stage_event_specifications_description_has_description : gpu_render_stage_event_specifications_description -> bool + (** presence of field "description" in [gpu_render_stage_event_specifications_description] *) + +val gpu_render_stage_event_specifications_description_set_description : gpu_render_stage_event_specifications_description -> string -> unit + (** set field description in gpu_render_stage_event_specifications_description *) + +val make_gpu_render_stage_event_specifications : + ?context_spec:gpu_render_stage_event_specifications_context_spec -> + ?hw_queue:gpu_render_stage_event_specifications_description list -> + ?stage:gpu_render_stage_event_specifications_description list -> + unit -> + gpu_render_stage_event_specifications +(** [make_gpu_render_stage_event_specifications … ()] is a builder for type [gpu_render_stage_event_specifications] *) + +val copy_gpu_render_stage_event_specifications : gpu_render_stage_event_specifications -> gpu_render_stage_event_specifications + +val gpu_render_stage_event_specifications_set_context_spec : gpu_render_stage_event_specifications -> gpu_render_stage_event_specifications_context_spec -> unit + (** set field context_spec in gpu_render_stage_event_specifications *) + +val gpu_render_stage_event_specifications_set_hw_queue : gpu_render_stage_event_specifications -> gpu_render_stage_event_specifications_description list -> unit + (** set field hw_queue in gpu_render_stage_event_specifications *) + +val gpu_render_stage_event_specifications_set_stage : gpu_render_stage_event_specifications -> gpu_render_stage_event_specifications_description list -> unit + (** set field stage in gpu_render_stage_event_specifications *) + +val make_gpu_render_stage_event : + ?event_id:int64 -> + ?duration:int64 -> + ?hw_queue_iid:int64 -> + ?stage_iid:int64 -> + ?gpu_id:int32 -> + ?context:int64 -> + ?render_target_handle:int64 -> + ?submission_id:int32 -> + ?extra_data:gpu_render_stage_event_extra_data list -> + ?render_pass_handle:int64 -> + ?render_pass_instance_id:int64 -> + ?render_subpass_index_mask:int64 list -> + ?command_buffer_handle:int64 -> + ?specifications:gpu_render_stage_event_specifications -> + ?hw_queue_id:int32 -> + ?stage_id:int32 -> + unit -> + gpu_render_stage_event +(** [make_gpu_render_stage_event … ()] is a builder for type [gpu_render_stage_event] *) + +val copy_gpu_render_stage_event : gpu_render_stage_event -> gpu_render_stage_event + +val gpu_render_stage_event_has_event_id : gpu_render_stage_event -> bool + (** presence of field "event_id" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_event_id : gpu_render_stage_event -> int64 -> unit + (** set field event_id in gpu_render_stage_event *) + +val gpu_render_stage_event_has_duration : gpu_render_stage_event -> bool + (** presence of field "duration" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_duration : gpu_render_stage_event -> int64 -> unit + (** set field duration in gpu_render_stage_event *) + +val gpu_render_stage_event_has_hw_queue_iid : gpu_render_stage_event -> bool + (** presence of field "hw_queue_iid" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_hw_queue_iid : gpu_render_stage_event -> int64 -> unit + (** set field hw_queue_iid in gpu_render_stage_event *) + +val gpu_render_stage_event_has_stage_iid : gpu_render_stage_event -> bool + (** presence of field "stage_iid" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_stage_iid : gpu_render_stage_event -> int64 -> unit + (** set field stage_iid in gpu_render_stage_event *) + +val gpu_render_stage_event_has_gpu_id : gpu_render_stage_event -> bool + (** presence of field "gpu_id" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_gpu_id : gpu_render_stage_event -> int32 -> unit + (** set field gpu_id in gpu_render_stage_event *) + +val gpu_render_stage_event_has_context : gpu_render_stage_event -> bool + (** presence of field "context" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_context : gpu_render_stage_event -> int64 -> unit + (** set field context in gpu_render_stage_event *) + +val gpu_render_stage_event_has_render_target_handle : gpu_render_stage_event -> bool + (** presence of field "render_target_handle" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_render_target_handle : gpu_render_stage_event -> int64 -> unit + (** set field render_target_handle in gpu_render_stage_event *) + +val gpu_render_stage_event_has_submission_id : gpu_render_stage_event -> bool + (** presence of field "submission_id" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_submission_id : gpu_render_stage_event -> int32 -> unit + (** set field submission_id in gpu_render_stage_event *) + +val gpu_render_stage_event_set_extra_data : gpu_render_stage_event -> gpu_render_stage_event_extra_data list -> unit + (** set field extra_data in gpu_render_stage_event *) + +val gpu_render_stage_event_has_render_pass_handle : gpu_render_stage_event -> bool + (** presence of field "render_pass_handle" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_render_pass_handle : gpu_render_stage_event -> int64 -> unit + (** set field render_pass_handle in gpu_render_stage_event *) + +val gpu_render_stage_event_has_render_pass_instance_id : gpu_render_stage_event -> bool + (** presence of field "render_pass_instance_id" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_render_pass_instance_id : gpu_render_stage_event -> int64 -> unit + (** set field render_pass_instance_id in gpu_render_stage_event *) + +val gpu_render_stage_event_set_render_subpass_index_mask : gpu_render_stage_event -> int64 list -> unit + (** set field render_subpass_index_mask in gpu_render_stage_event *) + +val gpu_render_stage_event_has_command_buffer_handle : gpu_render_stage_event -> bool + (** presence of field "command_buffer_handle" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_command_buffer_handle : gpu_render_stage_event -> int64 -> unit + (** set field command_buffer_handle in gpu_render_stage_event *) + +val gpu_render_stage_event_set_specifications : gpu_render_stage_event -> gpu_render_stage_event_specifications -> unit + (** set field specifications in gpu_render_stage_event *) + +val gpu_render_stage_event_has_hw_queue_id : gpu_render_stage_event -> bool + (** presence of field "hw_queue_id" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_hw_queue_id : gpu_render_stage_event -> int32 -> unit + (** set field hw_queue_id in gpu_render_stage_event *) + +val gpu_render_stage_event_has_stage_id : gpu_render_stage_event -> bool + (** presence of field "stage_id" in [gpu_render_stage_event] *) + +val gpu_render_stage_event_set_stage_id : gpu_render_stage_event -> int32 -> unit + (** set field stage_id in gpu_render_stage_event *) + +val make_interned_graphics_context : + ?iid:int64 -> + ?pid:int32 -> + ?api:interned_graphics_context_api -> + unit -> + interned_graphics_context +(** [make_interned_graphics_context … ()] is a builder for type [interned_graphics_context] *) + +val copy_interned_graphics_context : interned_graphics_context -> interned_graphics_context + +val interned_graphics_context_has_iid : interned_graphics_context -> bool + (** presence of field "iid" in [interned_graphics_context] *) + +val interned_graphics_context_set_iid : interned_graphics_context -> int64 -> unit + (** set field iid in interned_graphics_context *) + +val interned_graphics_context_has_pid : interned_graphics_context -> bool + (** presence of field "pid" in [interned_graphics_context] *) + +val interned_graphics_context_set_pid : interned_graphics_context -> int32 -> unit + (** set field pid in interned_graphics_context *) + +val interned_graphics_context_has_api : interned_graphics_context -> bool + (** presence of field "api" in [interned_graphics_context] *) + +val interned_graphics_context_set_api : interned_graphics_context -> interned_graphics_context_api -> unit + (** set field api in interned_graphics_context *) + +val make_interned_gpu_render_stage_specification : + ?iid:int64 -> + ?name:string -> + ?description:string -> + ?category:interned_gpu_render_stage_specification_render_stage_category -> + unit -> + interned_gpu_render_stage_specification +(** [make_interned_gpu_render_stage_specification … ()] is a builder for type [interned_gpu_render_stage_specification] *) + +val copy_interned_gpu_render_stage_specification : interned_gpu_render_stage_specification -> interned_gpu_render_stage_specification + +val interned_gpu_render_stage_specification_has_iid : interned_gpu_render_stage_specification -> bool + (** presence of field "iid" in [interned_gpu_render_stage_specification] *) + +val interned_gpu_render_stage_specification_set_iid : interned_gpu_render_stage_specification -> int64 -> unit + (** set field iid in interned_gpu_render_stage_specification *) + +val interned_gpu_render_stage_specification_has_name : interned_gpu_render_stage_specification -> bool + (** presence of field "name" in [interned_gpu_render_stage_specification] *) + +val interned_gpu_render_stage_specification_set_name : interned_gpu_render_stage_specification -> string -> unit + (** set field name in interned_gpu_render_stage_specification *) + +val interned_gpu_render_stage_specification_has_description : interned_gpu_render_stage_specification -> bool + (** presence of field "description" in [interned_gpu_render_stage_specification] *) + +val interned_gpu_render_stage_specification_set_description : interned_gpu_render_stage_specification -> string -> unit + (** set field description in interned_gpu_render_stage_specification *) + +val interned_gpu_render_stage_specification_has_category : interned_gpu_render_stage_specification -> bool + (** presence of field "category" in [interned_gpu_render_stage_specification] *) + +val interned_gpu_render_stage_specification_set_category : interned_gpu_render_stage_specification -> interned_gpu_render_stage_specification_render_stage_category -> unit + (** set field category in interned_gpu_render_stage_specification *) + +val make_vulkan_api_event_vk_debug_utils_object_name : + ?pid:int32 -> + ?vk_device:int64 -> + ?object_type:int32 -> + ?object_:int64 -> + ?object_name:string -> + unit -> + vulkan_api_event_vk_debug_utils_object_name +(** [make_vulkan_api_event_vk_debug_utils_object_name … ()] is a builder for type [vulkan_api_event_vk_debug_utils_object_name] *) + +val copy_vulkan_api_event_vk_debug_utils_object_name : vulkan_api_event_vk_debug_utils_object_name -> vulkan_api_event_vk_debug_utils_object_name + +val vulkan_api_event_vk_debug_utils_object_name_has_pid : vulkan_api_event_vk_debug_utils_object_name -> bool + (** presence of field "pid" in [vulkan_api_event_vk_debug_utils_object_name] *) + +val vulkan_api_event_vk_debug_utils_object_name_set_pid : vulkan_api_event_vk_debug_utils_object_name -> int32 -> unit + (** set field pid in vulkan_api_event_vk_debug_utils_object_name *) + +val vulkan_api_event_vk_debug_utils_object_name_has_vk_device : vulkan_api_event_vk_debug_utils_object_name -> bool + (** presence of field "vk_device" in [vulkan_api_event_vk_debug_utils_object_name] *) + +val vulkan_api_event_vk_debug_utils_object_name_set_vk_device : vulkan_api_event_vk_debug_utils_object_name -> int64 -> unit + (** set field vk_device in vulkan_api_event_vk_debug_utils_object_name *) + +val vulkan_api_event_vk_debug_utils_object_name_has_object_type : vulkan_api_event_vk_debug_utils_object_name -> bool + (** presence of field "object_type" in [vulkan_api_event_vk_debug_utils_object_name] *) + +val vulkan_api_event_vk_debug_utils_object_name_set_object_type : vulkan_api_event_vk_debug_utils_object_name -> int32 -> unit + (** set field object_type in vulkan_api_event_vk_debug_utils_object_name *) + +val vulkan_api_event_vk_debug_utils_object_name_has_object_ : vulkan_api_event_vk_debug_utils_object_name -> bool + (** presence of field "object_" in [vulkan_api_event_vk_debug_utils_object_name] *) + +val vulkan_api_event_vk_debug_utils_object_name_set_object_ : vulkan_api_event_vk_debug_utils_object_name -> int64 -> unit + (** set field object_ in vulkan_api_event_vk_debug_utils_object_name *) + +val vulkan_api_event_vk_debug_utils_object_name_has_object_name : vulkan_api_event_vk_debug_utils_object_name -> bool + (** presence of field "object_name" in [vulkan_api_event_vk_debug_utils_object_name] *) + +val vulkan_api_event_vk_debug_utils_object_name_set_object_name : vulkan_api_event_vk_debug_utils_object_name -> string -> unit + (** set field object_name in vulkan_api_event_vk_debug_utils_object_name *) + +val make_vulkan_api_event_vk_queue_submit : + ?duration_ns:int64 -> + ?pid:int32 -> + ?tid:int32 -> + ?vk_queue:int64 -> + ?vk_command_buffers:int64 list -> + ?submission_id:int32 -> + unit -> + vulkan_api_event_vk_queue_submit +(** [make_vulkan_api_event_vk_queue_submit … ()] is a builder for type [vulkan_api_event_vk_queue_submit] *) + +val copy_vulkan_api_event_vk_queue_submit : vulkan_api_event_vk_queue_submit -> vulkan_api_event_vk_queue_submit + +val vulkan_api_event_vk_queue_submit_has_duration_ns : vulkan_api_event_vk_queue_submit -> bool + (** presence of field "duration_ns" in [vulkan_api_event_vk_queue_submit] *) + +val vulkan_api_event_vk_queue_submit_set_duration_ns : vulkan_api_event_vk_queue_submit -> int64 -> unit + (** set field duration_ns in vulkan_api_event_vk_queue_submit *) + +val vulkan_api_event_vk_queue_submit_has_pid : vulkan_api_event_vk_queue_submit -> bool + (** presence of field "pid" in [vulkan_api_event_vk_queue_submit] *) + +val vulkan_api_event_vk_queue_submit_set_pid : vulkan_api_event_vk_queue_submit -> int32 -> unit + (** set field pid in vulkan_api_event_vk_queue_submit *) + +val vulkan_api_event_vk_queue_submit_has_tid : vulkan_api_event_vk_queue_submit -> bool + (** presence of field "tid" in [vulkan_api_event_vk_queue_submit] *) + +val vulkan_api_event_vk_queue_submit_set_tid : vulkan_api_event_vk_queue_submit -> int32 -> unit + (** set field tid in vulkan_api_event_vk_queue_submit *) + +val vulkan_api_event_vk_queue_submit_has_vk_queue : vulkan_api_event_vk_queue_submit -> bool + (** presence of field "vk_queue" in [vulkan_api_event_vk_queue_submit] *) + +val vulkan_api_event_vk_queue_submit_set_vk_queue : vulkan_api_event_vk_queue_submit -> int64 -> unit + (** set field vk_queue in vulkan_api_event_vk_queue_submit *) + +val vulkan_api_event_vk_queue_submit_set_vk_command_buffers : vulkan_api_event_vk_queue_submit -> int64 list -> unit + (** set field vk_command_buffers in vulkan_api_event_vk_queue_submit *) + +val vulkan_api_event_vk_queue_submit_has_submission_id : vulkan_api_event_vk_queue_submit -> bool + (** presence of field "submission_id" in [vulkan_api_event_vk_queue_submit] *) + +val vulkan_api_event_vk_queue_submit_set_submission_id : vulkan_api_event_vk_queue_submit -> int32 -> unit + (** set field submission_id in vulkan_api_event_vk_queue_submit *) + +val make_vulkan_memory_event_annotation : + ?key_iid:int64 -> + ?value:vulkan_memory_event_annotation_value -> + unit -> + vulkan_memory_event_annotation +(** [make_vulkan_memory_event_annotation … ()] is a builder for type [vulkan_memory_event_annotation] *) + +val copy_vulkan_memory_event_annotation : vulkan_memory_event_annotation -> vulkan_memory_event_annotation + +val vulkan_memory_event_annotation_has_key_iid : vulkan_memory_event_annotation -> bool + (** presence of field "key_iid" in [vulkan_memory_event_annotation] *) + +val vulkan_memory_event_annotation_set_key_iid : vulkan_memory_event_annotation -> int64 -> unit + (** set field key_iid in vulkan_memory_event_annotation *) + +val vulkan_memory_event_annotation_set_value : vulkan_memory_event_annotation -> vulkan_memory_event_annotation_value -> unit + (** set field value in vulkan_memory_event_annotation *) + +val make_vulkan_memory_event : + ?source:vulkan_memory_event_source -> + ?operation:vulkan_memory_event_operation -> + ?timestamp:int64 -> + ?pid:int32 -> + ?memory_address:int64 -> + ?memory_size:int64 -> + ?caller_iid:int64 -> + ?allocation_scope:vulkan_memory_event_allocation_scope -> + ?annotations:vulkan_memory_event_annotation list -> + ?device:int64 -> + ?device_memory:int64 -> + ?memory_type:int32 -> + ?heap:int32 -> + ?object_handle:int64 -> + unit -> + vulkan_memory_event +(** [make_vulkan_memory_event … ()] is a builder for type [vulkan_memory_event] *) + +val copy_vulkan_memory_event : vulkan_memory_event -> vulkan_memory_event + +val vulkan_memory_event_has_source : vulkan_memory_event -> bool + (** presence of field "source" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_source : vulkan_memory_event -> vulkan_memory_event_source -> unit + (** set field source in vulkan_memory_event *) + +val vulkan_memory_event_has_operation : vulkan_memory_event -> bool + (** presence of field "operation" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_operation : vulkan_memory_event -> vulkan_memory_event_operation -> unit + (** set field operation in vulkan_memory_event *) + +val vulkan_memory_event_has_timestamp : vulkan_memory_event -> bool + (** presence of field "timestamp" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_timestamp : vulkan_memory_event -> int64 -> unit + (** set field timestamp in vulkan_memory_event *) + +val vulkan_memory_event_has_pid : vulkan_memory_event -> bool + (** presence of field "pid" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_pid : vulkan_memory_event -> int32 -> unit + (** set field pid in vulkan_memory_event *) + +val vulkan_memory_event_has_memory_address : vulkan_memory_event -> bool + (** presence of field "memory_address" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_memory_address : vulkan_memory_event -> int64 -> unit + (** set field memory_address in vulkan_memory_event *) + +val vulkan_memory_event_has_memory_size : vulkan_memory_event -> bool + (** presence of field "memory_size" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_memory_size : vulkan_memory_event -> int64 -> unit + (** set field memory_size in vulkan_memory_event *) + +val vulkan_memory_event_has_caller_iid : vulkan_memory_event -> bool + (** presence of field "caller_iid" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_caller_iid : vulkan_memory_event -> int64 -> unit + (** set field caller_iid in vulkan_memory_event *) + +val vulkan_memory_event_has_allocation_scope : vulkan_memory_event -> bool + (** presence of field "allocation_scope" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_allocation_scope : vulkan_memory_event -> vulkan_memory_event_allocation_scope -> unit + (** set field allocation_scope in vulkan_memory_event *) + +val vulkan_memory_event_set_annotations : vulkan_memory_event -> vulkan_memory_event_annotation list -> unit + (** set field annotations in vulkan_memory_event *) + +val vulkan_memory_event_has_device : vulkan_memory_event -> bool + (** presence of field "device" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_device : vulkan_memory_event -> int64 -> unit + (** set field device in vulkan_memory_event *) + +val vulkan_memory_event_has_device_memory : vulkan_memory_event -> bool + (** presence of field "device_memory" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_device_memory : vulkan_memory_event -> int64 -> unit + (** set field device_memory in vulkan_memory_event *) + +val vulkan_memory_event_has_memory_type : vulkan_memory_event -> bool + (** presence of field "memory_type" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_memory_type : vulkan_memory_event -> int32 -> unit + (** set field memory_type in vulkan_memory_event *) + +val vulkan_memory_event_has_heap : vulkan_memory_event -> bool + (** presence of field "heap" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_heap : vulkan_memory_event -> int32 -> unit + (** set field heap in vulkan_memory_event *) + +val vulkan_memory_event_has_object_handle : vulkan_memory_event -> bool + (** presence of field "object_handle" in [vulkan_memory_event] *) + +val vulkan_memory_event_set_object_handle : vulkan_memory_event -> int64 -> unit + (** set field object_handle in vulkan_memory_event *) + +val make_interned_string : + ?iid:int64 -> + ?str:bytes -> + unit -> + interned_string +(** [make_interned_string … ()] is a builder for type [interned_string] *) + +val copy_interned_string : interned_string -> interned_string + +val interned_string_has_iid : interned_string -> bool + (** presence of field "iid" in [interned_string] *) + +val interned_string_set_iid : interned_string -> int64 -> unit + (** set field iid in interned_string *) + +val interned_string_has_str : interned_string -> bool + (** presence of field "str" in [interned_string] *) + +val interned_string_set_str : interned_string -> bytes -> unit + (** set field str in interned_string *) + +val make_line : + ?function_name:string -> + ?source_file_name:string -> + ?line_number:int32 -> + unit -> + line +(** [make_line … ()] is a builder for type [line] *) + +val copy_line : line -> line + +val line_has_function_name : line -> bool + (** presence of field "function_name" in [line] *) + +val line_set_function_name : line -> string -> unit + (** set field function_name in line *) + +val line_has_source_file_name : line -> bool + (** presence of field "source_file_name" in [line] *) + +val line_set_source_file_name : line -> string -> unit + (** set field source_file_name in line *) + +val line_has_line_number : line -> bool + (** presence of field "line_number" in [line] *) + +val line_set_line_number : line -> int32 -> unit + (** set field line_number in line *) + +val make_address_symbols : + ?address:int64 -> + ?lines:line list -> + unit -> + address_symbols +(** [make_address_symbols … ()] is a builder for type [address_symbols] *) + +val copy_address_symbols : address_symbols -> address_symbols + +val address_symbols_has_address : address_symbols -> bool + (** presence of field "address" in [address_symbols] *) + +val address_symbols_set_address : address_symbols -> int64 -> unit + (** set field address in address_symbols *) + +val address_symbols_set_lines : address_symbols -> line list -> unit + (** set field lines in address_symbols *) + +val make_module_symbols : + ?path:string -> + ?build_id:string -> + ?address_symbols:address_symbols list -> + unit -> + module_symbols +(** [make_module_symbols … ()] is a builder for type [module_symbols] *) + +val copy_module_symbols : module_symbols -> module_symbols + +val module_symbols_has_path : module_symbols -> bool + (** presence of field "path" in [module_symbols] *) + +val module_symbols_set_path : module_symbols -> string -> unit + (** set field path in module_symbols *) + +val module_symbols_has_build_id : module_symbols -> bool + (** presence of field "build_id" in [module_symbols] *) + +val module_symbols_set_build_id : module_symbols -> string -> unit + (** set field build_id in module_symbols *) + +val module_symbols_set_address_symbols : module_symbols -> address_symbols list -> unit + (** set field address_symbols in module_symbols *) + +val make_mapping : + ?iid:int64 -> + ?build_id:int64 -> + ?exact_offset:int64 -> + ?start_offset:int64 -> + ?start:int64 -> + ?end_:int64 -> + ?load_bias:int64 -> + ?path_string_ids:int64 list -> + unit -> + mapping +(** [make_mapping … ()] is a builder for type [mapping] *) + +val copy_mapping : mapping -> mapping + +val mapping_has_iid : mapping -> bool + (** presence of field "iid" in [mapping] *) + +val mapping_set_iid : mapping -> int64 -> unit + (** set field iid in mapping *) + +val mapping_has_build_id : mapping -> bool + (** presence of field "build_id" in [mapping] *) + +val mapping_set_build_id : mapping -> int64 -> unit + (** set field build_id in mapping *) + +val mapping_has_exact_offset : mapping -> bool + (** presence of field "exact_offset" in [mapping] *) + +val mapping_set_exact_offset : mapping -> int64 -> unit + (** set field exact_offset in mapping *) + +val mapping_has_start_offset : mapping -> bool + (** presence of field "start_offset" in [mapping] *) + +val mapping_set_start_offset : mapping -> int64 -> unit + (** set field start_offset in mapping *) + +val mapping_has_start : mapping -> bool + (** presence of field "start" in [mapping] *) + +val mapping_set_start : mapping -> int64 -> unit + (** set field start in mapping *) + +val mapping_has_end_ : mapping -> bool + (** presence of field "end_" in [mapping] *) + +val mapping_set_end_ : mapping -> int64 -> unit + (** set field end_ in mapping *) + +val mapping_has_load_bias : mapping -> bool + (** presence of field "load_bias" in [mapping] *) + +val mapping_set_load_bias : mapping -> int64 -> unit + (** set field load_bias in mapping *) + +val mapping_set_path_string_ids : mapping -> int64 list -> unit + (** set field path_string_ids in mapping *) + +val make_frame : + ?iid:int64 -> + ?function_name_id:int64 -> + ?mapping_id:int64 -> + ?rel_pc:int64 -> + ?source_path_iid:int64 -> + ?line_number:int32 -> + unit -> + frame +(** [make_frame … ()] is a builder for type [frame] *) + +val copy_frame : frame -> frame + +val frame_has_iid : frame -> bool + (** presence of field "iid" in [frame] *) + +val frame_set_iid : frame -> int64 -> unit + (** set field iid in frame *) + +val frame_has_function_name_id : frame -> bool + (** presence of field "function_name_id" in [frame] *) + +val frame_set_function_name_id : frame -> int64 -> unit + (** set field function_name_id in frame *) + +val frame_has_mapping_id : frame -> bool + (** presence of field "mapping_id" in [frame] *) + +val frame_set_mapping_id : frame -> int64 -> unit + (** set field mapping_id in frame *) + +val frame_has_rel_pc : frame -> bool + (** presence of field "rel_pc" in [frame] *) + +val frame_set_rel_pc : frame -> int64 -> unit + (** set field rel_pc in frame *) + +val frame_has_source_path_iid : frame -> bool + (** presence of field "source_path_iid" in [frame] *) + +val frame_set_source_path_iid : frame -> int64 -> unit + (** set field source_path_iid in frame *) + +val frame_has_line_number : frame -> bool + (** presence of field "line_number" in [frame] *) + +val frame_set_line_number : frame -> int32 -> unit + (** set field line_number in frame *) + +val make_callstack : + ?iid:int64 -> + ?frame_ids:int64 list -> + unit -> + callstack +(** [make_callstack … ()] is a builder for type [callstack] *) + +val copy_callstack : callstack -> callstack + +val callstack_has_iid : callstack -> bool + (** presence of field "iid" in [callstack] *) + +val callstack_set_iid : callstack -> int64 -> unit + (** set field iid in callstack *) + +val callstack_set_frame_ids : callstack -> int64 list -> unit + (** set field frame_ids in callstack *) + +val make_histogram_name : + ?iid:int64 -> + ?name:string -> + unit -> + histogram_name +(** [make_histogram_name … ()] is a builder for type [histogram_name] *) + +val copy_histogram_name : histogram_name -> histogram_name + +val histogram_name_has_iid : histogram_name -> bool + (** presence of field "iid" in [histogram_name] *) + +val histogram_name_set_iid : histogram_name -> int64 -> unit + (** set field iid in histogram_name *) + +val histogram_name_has_name : histogram_name -> bool + (** presence of field "name" in [histogram_name] *) + +val histogram_name_set_name : histogram_name -> string -> unit + (** set field name in histogram_name *) + +val make_chrome_histogram_sample : + ?name_hash:int64 -> + ?name:string -> + ?sample:int64 -> + ?name_iid:int64 -> + unit -> + chrome_histogram_sample +(** [make_chrome_histogram_sample … ()] is a builder for type [chrome_histogram_sample] *) + +val copy_chrome_histogram_sample : chrome_histogram_sample -> chrome_histogram_sample + +val chrome_histogram_sample_has_name_hash : chrome_histogram_sample -> bool + (** presence of field "name_hash" in [chrome_histogram_sample] *) + +val chrome_histogram_sample_set_name_hash : chrome_histogram_sample -> int64 -> unit + (** set field name_hash in chrome_histogram_sample *) + +val chrome_histogram_sample_has_name : chrome_histogram_sample -> bool + (** presence of field "name" in [chrome_histogram_sample] *) + +val chrome_histogram_sample_set_name : chrome_histogram_sample -> string -> unit + (** set field name in chrome_histogram_sample *) + +val chrome_histogram_sample_has_sample : chrome_histogram_sample -> bool + (** presence of field "sample" in [chrome_histogram_sample] *) + +val chrome_histogram_sample_set_sample : chrome_histogram_sample -> int64 -> unit + (** set field sample in chrome_histogram_sample *) + +val chrome_histogram_sample_has_name_iid : chrome_histogram_sample -> bool + (** presence of field "name_iid" in [chrome_histogram_sample] *) + +val chrome_histogram_sample_set_name_iid : chrome_histogram_sample -> int64 -> unit + (** set field name_iid in chrome_histogram_sample *) + +val make_debug_annotation_nested_value : + ?nested_type:debug_annotation_nested_value_nested_type -> + ?dict_keys:string list -> + ?dict_values:debug_annotation_nested_value list -> + ?array_values:debug_annotation_nested_value list -> + ?int_value:int64 -> + ?double_value:float -> + ?bool_value:bool -> + ?string_value:string -> + unit -> + debug_annotation_nested_value +(** [make_debug_annotation_nested_value … ()] is a builder for type [debug_annotation_nested_value] *) + +val copy_debug_annotation_nested_value : debug_annotation_nested_value -> debug_annotation_nested_value + +val debug_annotation_nested_value_has_nested_type : debug_annotation_nested_value -> bool + (** presence of field "nested_type" in [debug_annotation_nested_value] *) + +val debug_annotation_nested_value_set_nested_type : debug_annotation_nested_value -> debug_annotation_nested_value_nested_type -> unit + (** set field nested_type in debug_annotation_nested_value *) + +val debug_annotation_nested_value_set_dict_keys : debug_annotation_nested_value -> string list -> unit + (** set field dict_keys in debug_annotation_nested_value *) + +val debug_annotation_nested_value_set_dict_values : debug_annotation_nested_value -> debug_annotation_nested_value list -> unit + (** set field dict_values in debug_annotation_nested_value *) + +val debug_annotation_nested_value_set_array_values : debug_annotation_nested_value -> debug_annotation_nested_value list -> unit + (** set field array_values in debug_annotation_nested_value *) + +val debug_annotation_nested_value_has_int_value : debug_annotation_nested_value -> bool + (** presence of field "int_value" in [debug_annotation_nested_value] *) + +val debug_annotation_nested_value_set_int_value : debug_annotation_nested_value -> int64 -> unit + (** set field int_value in debug_annotation_nested_value *) + +val debug_annotation_nested_value_has_double_value : debug_annotation_nested_value -> bool + (** presence of field "double_value" in [debug_annotation_nested_value] *) + +val debug_annotation_nested_value_set_double_value : debug_annotation_nested_value -> float -> unit + (** set field double_value in debug_annotation_nested_value *) + +val debug_annotation_nested_value_has_bool_value : debug_annotation_nested_value -> bool + (** presence of field "bool_value" in [debug_annotation_nested_value] *) + +val debug_annotation_nested_value_set_bool_value : debug_annotation_nested_value -> bool -> unit + (** set field bool_value in debug_annotation_nested_value *) + +val debug_annotation_nested_value_has_string_value : debug_annotation_nested_value -> bool + (** presence of field "string_value" in [debug_annotation_nested_value] *) + +val debug_annotation_nested_value_set_string_value : debug_annotation_nested_value -> string -> unit + (** set field string_value in debug_annotation_nested_value *) + +val make_debug_annotation : + ?name_field:debug_annotation_name_field -> + ?value:debug_annotation_value -> + ?proto_type_descriptor:debug_annotation_proto_type_descriptor -> + ?proto_value:bytes -> + ?dict_entries:debug_annotation list -> + ?array_values:debug_annotation list -> + unit -> + debug_annotation +(** [make_debug_annotation … ()] is a builder for type [debug_annotation] *) + +val copy_debug_annotation : debug_annotation -> debug_annotation + +val debug_annotation_set_name_field : debug_annotation -> debug_annotation_name_field -> unit + (** set field name_field in debug_annotation *) + +val debug_annotation_set_value : debug_annotation -> debug_annotation_value -> unit + (** set field value in debug_annotation *) + +val debug_annotation_set_proto_type_descriptor : debug_annotation -> debug_annotation_proto_type_descriptor -> unit + (** set field proto_type_descriptor in debug_annotation *) + +val debug_annotation_has_proto_value : debug_annotation -> bool + (** presence of field "proto_value" in [debug_annotation] *) + +val debug_annotation_set_proto_value : debug_annotation -> bytes -> unit + (** set field proto_value in debug_annotation *) + +val debug_annotation_set_dict_entries : debug_annotation -> debug_annotation list -> unit + (** set field dict_entries in debug_annotation *) + +val debug_annotation_set_array_values : debug_annotation -> debug_annotation list -> unit + (** set field array_values in debug_annotation *) + +val make_debug_annotation_name : + ?iid:int64 -> + ?name:string -> + unit -> + debug_annotation_name +(** [make_debug_annotation_name … ()] is a builder for type [debug_annotation_name] *) + +val copy_debug_annotation_name : debug_annotation_name -> debug_annotation_name + +val debug_annotation_name_has_iid : debug_annotation_name -> bool + (** presence of field "iid" in [debug_annotation_name] *) + +val debug_annotation_name_set_iid : debug_annotation_name -> int64 -> unit + (** set field iid in debug_annotation_name *) + +val debug_annotation_name_has_name : debug_annotation_name -> bool + (** presence of field "name" in [debug_annotation_name] *) + +val debug_annotation_name_set_name : debug_annotation_name -> string -> unit + (** set field name in debug_annotation_name *) + +val make_debug_annotation_value_type_name : + ?iid:int64 -> + ?name:string -> + unit -> + debug_annotation_value_type_name +(** [make_debug_annotation_value_type_name … ()] is a builder for type [debug_annotation_value_type_name] *) + +val copy_debug_annotation_value_type_name : debug_annotation_value_type_name -> debug_annotation_value_type_name + +val debug_annotation_value_type_name_has_iid : debug_annotation_value_type_name -> bool + (** presence of field "iid" in [debug_annotation_value_type_name] *) + +val debug_annotation_value_type_name_set_iid : debug_annotation_value_type_name -> int64 -> unit + (** set field iid in debug_annotation_value_type_name *) + +val debug_annotation_value_type_name_has_name : debug_annotation_value_type_name -> bool + (** presence of field "name" in [debug_annotation_value_type_name] *) + +val debug_annotation_value_type_name_set_name : debug_annotation_value_type_name -> string -> unit + (** set field name in debug_annotation_value_type_name *) + +val make_log_message : + ?source_location_iid:int64 -> + ?body_iid:int64 -> + ?prio:log_message_priority -> + unit -> + log_message +(** [make_log_message … ()] is a builder for type [log_message] *) + +val copy_log_message : log_message -> log_message + +val log_message_has_source_location_iid : log_message -> bool + (** presence of field "source_location_iid" in [log_message] *) + +val log_message_set_source_location_iid : log_message -> int64 -> unit + (** set field source_location_iid in log_message *) + +val log_message_has_body_iid : log_message -> bool + (** presence of field "body_iid" in [log_message] *) + +val log_message_set_body_iid : log_message -> int64 -> unit + (** set field body_iid in log_message *) + +val log_message_has_prio : log_message -> bool + (** presence of field "prio" in [log_message] *) + +val log_message_set_prio : log_message -> log_message_priority -> unit + (** set field prio in log_message *) + +val make_log_message_body : + ?iid:int64 -> + ?body:string -> + unit -> + log_message_body +(** [make_log_message_body … ()] is a builder for type [log_message_body] *) + +val copy_log_message_body : log_message_body -> log_message_body + +val log_message_body_has_iid : log_message_body -> bool + (** presence of field "iid" in [log_message_body] *) + +val log_message_body_set_iid : log_message_body -> int64 -> unit + (** set field iid in log_message_body *) + +val log_message_body_has_body : log_message_body -> bool + (** presence of field "body" in [log_message_body] *) + +val log_message_body_set_body : log_message_body -> string -> unit + (** set field body in log_message_body *) + +val make_unsymbolized_source_location : + ?iid:int64 -> + ?mapping_id:int64 -> + ?rel_pc:int64 -> + unit -> + unsymbolized_source_location +(** [make_unsymbolized_source_location … ()] is a builder for type [unsymbolized_source_location] *) + +val copy_unsymbolized_source_location : unsymbolized_source_location -> unsymbolized_source_location + +val unsymbolized_source_location_has_iid : unsymbolized_source_location -> bool + (** presence of field "iid" in [unsymbolized_source_location] *) + +val unsymbolized_source_location_set_iid : unsymbolized_source_location -> int64 -> unit + (** set field iid in unsymbolized_source_location *) + +val unsymbolized_source_location_has_mapping_id : unsymbolized_source_location -> bool + (** presence of field "mapping_id" in [unsymbolized_source_location] *) + +val unsymbolized_source_location_set_mapping_id : unsymbolized_source_location -> int64 -> unit + (** set field mapping_id in unsymbolized_source_location *) + +val unsymbolized_source_location_has_rel_pc : unsymbolized_source_location -> bool + (** presence of field "rel_pc" in [unsymbolized_source_location] *) + +val unsymbolized_source_location_set_rel_pc : unsymbolized_source_location -> int64 -> unit + (** set field rel_pc in unsymbolized_source_location *) + +val make_source_location : + ?iid:int64 -> + ?file_name:string -> + ?function_name:string -> + ?line_number:int32 -> + unit -> + source_location +(** [make_source_location … ()] is a builder for type [source_location] *) + +val copy_source_location : source_location -> source_location + +val source_location_has_iid : source_location -> bool + (** presence of field "iid" in [source_location] *) + +val source_location_set_iid : source_location -> int64 -> unit + (** set field iid in source_location *) + +val source_location_has_file_name : source_location -> bool + (** presence of field "file_name" in [source_location] *) + +val source_location_set_file_name : source_location -> string -> unit + (** set field file_name in source_location *) + +val source_location_has_function_name : source_location -> bool + (** presence of field "function_name" in [source_location] *) + +val source_location_set_function_name : source_location -> string -> unit + (** set field function_name in source_location *) + +val source_location_has_line_number : source_location -> bool + (** presence of field "line_number" in [source_location] *) + +val source_location_set_line_number : source_location -> int32 -> unit + (** set field line_number in source_location *) + +val make_chrome_active_processes : + ?pid:int32 list -> + unit -> + chrome_active_processes +(** [make_chrome_active_processes … ()] is a builder for type [chrome_active_processes] *) + +val copy_chrome_active_processes : chrome_active_processes -> chrome_active_processes + +val chrome_active_processes_set_pid : chrome_active_processes -> int32 list -> unit + (** set field pid in chrome_active_processes *) + +val make_chrome_application_state_info : + ?application_state:chrome_application_state_info_chrome_application_state -> + unit -> + chrome_application_state_info +(** [make_chrome_application_state_info … ()] is a builder for type [chrome_application_state_info] *) + +val copy_chrome_application_state_info : chrome_application_state_info -> chrome_application_state_info + +val chrome_application_state_info_has_application_state : chrome_application_state_info -> bool + (** presence of field "application_state" in [chrome_application_state_info] *) + +val chrome_application_state_info_set_application_state : chrome_application_state_info -> chrome_application_state_info_chrome_application_state -> unit + (** set field application_state in chrome_application_state_info *) + +val make_chrome_compositor_state_machine_major_state : + ?next_action:chrome_compositor_scheduler_action -> + ?begin_impl_frame_state:chrome_compositor_state_machine_major_state_begin_impl_frame_state -> + ?begin_main_frame_state:chrome_compositor_state_machine_major_state_begin_main_frame_state -> + ?layer_tree_frame_sink_state:chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state -> + ?forced_redraw_state:chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state -> + unit -> + chrome_compositor_state_machine_major_state +(** [make_chrome_compositor_state_machine_major_state … ()] is a builder for type [chrome_compositor_state_machine_major_state] *) + +val copy_chrome_compositor_state_machine_major_state : chrome_compositor_state_machine_major_state -> chrome_compositor_state_machine_major_state + +val chrome_compositor_state_machine_major_state_has_next_action : chrome_compositor_state_machine_major_state -> bool + (** presence of field "next_action" in [chrome_compositor_state_machine_major_state] *) + +val chrome_compositor_state_machine_major_state_set_next_action : chrome_compositor_state_machine_major_state -> chrome_compositor_scheduler_action -> unit + (** set field next_action in chrome_compositor_state_machine_major_state *) + +val chrome_compositor_state_machine_major_state_has_begin_impl_frame_state : chrome_compositor_state_machine_major_state -> bool + (** presence of field "begin_impl_frame_state" in [chrome_compositor_state_machine_major_state] *) + +val chrome_compositor_state_machine_major_state_set_begin_impl_frame_state : chrome_compositor_state_machine_major_state -> chrome_compositor_state_machine_major_state_begin_impl_frame_state -> unit + (** set field begin_impl_frame_state in chrome_compositor_state_machine_major_state *) + +val chrome_compositor_state_machine_major_state_has_begin_main_frame_state : chrome_compositor_state_machine_major_state -> bool + (** presence of field "begin_main_frame_state" in [chrome_compositor_state_machine_major_state] *) + +val chrome_compositor_state_machine_major_state_set_begin_main_frame_state : chrome_compositor_state_machine_major_state -> chrome_compositor_state_machine_major_state_begin_main_frame_state -> unit + (** set field begin_main_frame_state in chrome_compositor_state_machine_major_state *) + +val chrome_compositor_state_machine_major_state_has_layer_tree_frame_sink_state : chrome_compositor_state_machine_major_state -> bool + (** presence of field "layer_tree_frame_sink_state" in [chrome_compositor_state_machine_major_state] *) + +val chrome_compositor_state_machine_major_state_set_layer_tree_frame_sink_state : chrome_compositor_state_machine_major_state -> chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state -> unit + (** set field layer_tree_frame_sink_state in chrome_compositor_state_machine_major_state *) + +val chrome_compositor_state_machine_major_state_has_forced_redraw_state : chrome_compositor_state_machine_major_state -> bool + (** presence of field "forced_redraw_state" in [chrome_compositor_state_machine_major_state] *) + +val chrome_compositor_state_machine_major_state_set_forced_redraw_state : chrome_compositor_state_machine_major_state -> chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state -> unit + (** set field forced_redraw_state in chrome_compositor_state_machine_major_state *) + +val make_chrome_compositor_state_machine_minor_state : + ?commit_count:int32 -> + ?current_frame_number:int32 -> + ?last_frame_number_submit_performed:int32 -> + ?last_frame_number_draw_performed:int32 -> + ?last_frame_number_begin_main_frame_sent:int32 -> + ?did_draw:bool -> + ?did_send_begin_main_frame_for_current_frame:bool -> + ?did_notify_begin_main_frame_not_expected_until:bool -> + ?did_notify_begin_main_frame_not_expected_soon:bool -> + ?wants_begin_main_frame_not_expected:bool -> + ?did_commit_during_frame:bool -> + ?did_invalidate_layer_tree_frame_sink:bool -> + ?did_perform_impl_side_invalidaion:bool -> + ?did_prepare_tiles:bool -> + ?consecutive_checkerboard_animations:int32 -> + ?pending_submit_frames:int32 -> + ?submit_frames_with_current_layer_tree_frame_sink:int32 -> + ?needs_redraw:bool -> + ?needs_prepare_tiles:bool -> + ?needs_begin_main_frame:bool -> + ?needs_one_begin_impl_frame:bool -> + ?visible:bool -> + ?begin_frame_source_paused:bool -> + ?can_draw:bool -> + ?resourceless_draw:bool -> + ?has_pending_tree:bool -> + ?pending_tree_is_ready_for_activation:bool -> + ?active_tree_needs_first_draw:bool -> + ?active_tree_is_ready_to_draw:bool -> + ?did_create_and_initialize_first_layer_tree_frame_sink:bool -> + ?tree_priority:chrome_compositor_state_machine_minor_state_tree_priority -> + ?scroll_handler_state:chrome_compositor_state_machine_minor_state_scroll_handler_state -> + ?critical_begin_main_frame_to_activate_is_fast:bool -> + ?main_thread_missed_last_deadline:bool -> + ?video_needs_begin_frames:bool -> + ?defer_begin_main_frame:bool -> + ?last_commit_had_no_updates:bool -> + ?did_draw_in_last_frame:bool -> + ?did_submit_in_last_frame:bool -> + ?needs_impl_side_invalidation:bool -> + ?current_pending_tree_is_impl_side:bool -> + ?previous_pending_tree_was_impl_side:bool -> + ?processing_animation_worklets_for_active_tree:bool -> + ?processing_animation_worklets_for_pending_tree:bool -> + ?processing_paint_worklets_for_pending_tree:bool -> + unit -> + chrome_compositor_state_machine_minor_state +(** [make_chrome_compositor_state_machine_minor_state … ()] is a builder for type [chrome_compositor_state_machine_minor_state] *) + +val copy_chrome_compositor_state_machine_minor_state : chrome_compositor_state_machine_minor_state -> chrome_compositor_state_machine_minor_state + +val chrome_compositor_state_machine_minor_state_has_commit_count : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "commit_count" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_commit_count : chrome_compositor_state_machine_minor_state -> int32 -> unit + (** set field commit_count in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_current_frame_number : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "current_frame_number" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_current_frame_number : chrome_compositor_state_machine_minor_state -> int32 -> unit + (** set field current_frame_number in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_last_frame_number_submit_performed : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "last_frame_number_submit_performed" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_last_frame_number_submit_performed : chrome_compositor_state_machine_minor_state -> int32 -> unit + (** set field last_frame_number_submit_performed in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_last_frame_number_draw_performed : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "last_frame_number_draw_performed" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_last_frame_number_draw_performed : chrome_compositor_state_machine_minor_state -> int32 -> unit + (** set field last_frame_number_draw_performed in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_last_frame_number_begin_main_frame_sent : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "last_frame_number_begin_main_frame_sent" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_last_frame_number_begin_main_frame_sent : chrome_compositor_state_machine_minor_state -> int32 -> unit + (** set field last_frame_number_begin_main_frame_sent in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_draw : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_draw" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_draw : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_draw in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_send_begin_main_frame_for_current_frame : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_send_begin_main_frame_for_current_frame" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_send_begin_main_frame_for_current_frame : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_send_begin_main_frame_for_current_frame in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_notify_begin_main_frame_not_expected_until : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_notify_begin_main_frame_not_expected_until" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_notify_begin_main_frame_not_expected_until : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_notify_begin_main_frame_not_expected_until in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_notify_begin_main_frame_not_expected_soon : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_notify_begin_main_frame_not_expected_soon" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_notify_begin_main_frame_not_expected_soon : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_notify_begin_main_frame_not_expected_soon in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_wants_begin_main_frame_not_expected : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "wants_begin_main_frame_not_expected" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_wants_begin_main_frame_not_expected : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field wants_begin_main_frame_not_expected in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_commit_during_frame : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_commit_during_frame" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_commit_during_frame : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_commit_during_frame in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_invalidate_layer_tree_frame_sink : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_invalidate_layer_tree_frame_sink" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_invalidate_layer_tree_frame_sink : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_invalidate_layer_tree_frame_sink in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_perform_impl_side_invalidaion : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_perform_impl_side_invalidaion" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_perform_impl_side_invalidaion : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_perform_impl_side_invalidaion in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_prepare_tiles : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_prepare_tiles" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_prepare_tiles : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_prepare_tiles in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_consecutive_checkerboard_animations : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "consecutive_checkerboard_animations" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_consecutive_checkerboard_animations : chrome_compositor_state_machine_minor_state -> int32 -> unit + (** set field consecutive_checkerboard_animations in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_pending_submit_frames : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "pending_submit_frames" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_pending_submit_frames : chrome_compositor_state_machine_minor_state -> int32 -> unit + (** set field pending_submit_frames in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_submit_frames_with_current_layer_tree_frame_sink : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "submit_frames_with_current_layer_tree_frame_sink" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_submit_frames_with_current_layer_tree_frame_sink : chrome_compositor_state_machine_minor_state -> int32 -> unit + (** set field submit_frames_with_current_layer_tree_frame_sink in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_needs_redraw : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "needs_redraw" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_needs_redraw : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field needs_redraw in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_needs_prepare_tiles : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "needs_prepare_tiles" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_needs_prepare_tiles : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field needs_prepare_tiles in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_needs_begin_main_frame : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "needs_begin_main_frame" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_needs_begin_main_frame : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field needs_begin_main_frame in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_needs_one_begin_impl_frame : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "needs_one_begin_impl_frame" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_needs_one_begin_impl_frame : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field needs_one_begin_impl_frame in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_visible : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "visible" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_visible : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field visible in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_begin_frame_source_paused : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "begin_frame_source_paused" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_begin_frame_source_paused : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field begin_frame_source_paused in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_can_draw : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "can_draw" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_can_draw : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field can_draw in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_resourceless_draw : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "resourceless_draw" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_resourceless_draw : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field resourceless_draw in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_has_pending_tree : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "has_pending_tree" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_has_pending_tree : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field has_pending_tree in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_pending_tree_is_ready_for_activation : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "pending_tree_is_ready_for_activation" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_pending_tree_is_ready_for_activation : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field pending_tree_is_ready_for_activation in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_active_tree_needs_first_draw : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "active_tree_needs_first_draw" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_active_tree_needs_first_draw : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field active_tree_needs_first_draw in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_active_tree_is_ready_to_draw : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "active_tree_is_ready_to_draw" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_active_tree_is_ready_to_draw : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field active_tree_is_ready_to_draw in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_create_and_initialize_first_layer_tree_frame_sink : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_create_and_initialize_first_layer_tree_frame_sink" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_create_and_initialize_first_layer_tree_frame_sink : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_create_and_initialize_first_layer_tree_frame_sink in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_tree_priority : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "tree_priority" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_tree_priority : chrome_compositor_state_machine_minor_state -> chrome_compositor_state_machine_minor_state_tree_priority -> unit + (** set field tree_priority in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_scroll_handler_state : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "scroll_handler_state" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_scroll_handler_state : chrome_compositor_state_machine_minor_state -> chrome_compositor_state_machine_minor_state_scroll_handler_state -> unit + (** set field scroll_handler_state in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_critical_begin_main_frame_to_activate_is_fast : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "critical_begin_main_frame_to_activate_is_fast" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_critical_begin_main_frame_to_activate_is_fast : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field critical_begin_main_frame_to_activate_is_fast in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_main_thread_missed_last_deadline : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "main_thread_missed_last_deadline" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_main_thread_missed_last_deadline : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field main_thread_missed_last_deadline in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_video_needs_begin_frames : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "video_needs_begin_frames" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_video_needs_begin_frames : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field video_needs_begin_frames in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_defer_begin_main_frame : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "defer_begin_main_frame" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_defer_begin_main_frame : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field defer_begin_main_frame in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_last_commit_had_no_updates : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "last_commit_had_no_updates" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_last_commit_had_no_updates : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field last_commit_had_no_updates in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_draw_in_last_frame : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_draw_in_last_frame" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_draw_in_last_frame : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_draw_in_last_frame in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_did_submit_in_last_frame : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "did_submit_in_last_frame" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_did_submit_in_last_frame : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field did_submit_in_last_frame in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_needs_impl_side_invalidation : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "needs_impl_side_invalidation" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_needs_impl_side_invalidation : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field needs_impl_side_invalidation in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_current_pending_tree_is_impl_side : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "current_pending_tree_is_impl_side" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_current_pending_tree_is_impl_side : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field current_pending_tree_is_impl_side in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_previous_pending_tree_was_impl_side : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "previous_pending_tree_was_impl_side" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_previous_pending_tree_was_impl_side : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field previous_pending_tree_was_impl_side in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_processing_animation_worklets_for_active_tree : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "processing_animation_worklets_for_active_tree" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_processing_animation_worklets_for_active_tree : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field processing_animation_worklets_for_active_tree in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_processing_animation_worklets_for_pending_tree : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "processing_animation_worklets_for_pending_tree" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_processing_animation_worklets_for_pending_tree : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field processing_animation_worklets_for_pending_tree in chrome_compositor_state_machine_minor_state *) + +val chrome_compositor_state_machine_minor_state_has_processing_paint_worklets_for_pending_tree : chrome_compositor_state_machine_minor_state -> bool + (** presence of field "processing_paint_worklets_for_pending_tree" in [chrome_compositor_state_machine_minor_state] *) + +val chrome_compositor_state_machine_minor_state_set_processing_paint_worklets_for_pending_tree : chrome_compositor_state_machine_minor_state -> bool -> unit + (** set field processing_paint_worklets_for_pending_tree in chrome_compositor_state_machine_minor_state *) + +val make_chrome_compositor_state_machine : + ?major_state:chrome_compositor_state_machine_major_state -> + ?minor_state:chrome_compositor_state_machine_minor_state -> + unit -> + chrome_compositor_state_machine +(** [make_chrome_compositor_state_machine … ()] is a builder for type [chrome_compositor_state_machine] *) + +val copy_chrome_compositor_state_machine : chrome_compositor_state_machine -> chrome_compositor_state_machine + +val chrome_compositor_state_machine_set_major_state : chrome_compositor_state_machine -> chrome_compositor_state_machine_major_state -> unit + (** set field major_state in chrome_compositor_state_machine *) + +val chrome_compositor_state_machine_set_minor_state : chrome_compositor_state_machine -> chrome_compositor_state_machine_minor_state -> unit + (** set field minor_state in chrome_compositor_state_machine *) + +val make_begin_frame_args : + ?type_:begin_frame_args_begin_frame_args_type -> + ?source_id:int64 -> + ?sequence_number:int64 -> + ?frame_time_us:int64 -> + ?deadline_us:int64 -> + ?interval_delta_us:int64 -> + ?on_critical_path:bool -> + ?animate_only:bool -> + ?created_from:begin_frame_args_created_from -> + ?frames_throttled_since_last:int64 -> + unit -> + begin_frame_args +(** [make_begin_frame_args … ()] is a builder for type [begin_frame_args] *) + +val copy_begin_frame_args : begin_frame_args -> begin_frame_args + +val begin_frame_args_has_type_ : begin_frame_args -> bool + (** presence of field "type_" in [begin_frame_args] *) + +val begin_frame_args_set_type_ : begin_frame_args -> begin_frame_args_begin_frame_args_type -> unit + (** set field type_ in begin_frame_args *) + +val begin_frame_args_has_source_id : begin_frame_args -> bool + (** presence of field "source_id" in [begin_frame_args] *) + +val begin_frame_args_set_source_id : begin_frame_args -> int64 -> unit + (** set field source_id in begin_frame_args *) + +val begin_frame_args_has_sequence_number : begin_frame_args -> bool + (** presence of field "sequence_number" in [begin_frame_args] *) + +val begin_frame_args_set_sequence_number : begin_frame_args -> int64 -> unit + (** set field sequence_number in begin_frame_args *) + +val begin_frame_args_has_frame_time_us : begin_frame_args -> bool + (** presence of field "frame_time_us" in [begin_frame_args] *) + +val begin_frame_args_set_frame_time_us : begin_frame_args -> int64 -> unit + (** set field frame_time_us in begin_frame_args *) + +val begin_frame_args_has_deadline_us : begin_frame_args -> bool + (** presence of field "deadline_us" in [begin_frame_args] *) + +val begin_frame_args_set_deadline_us : begin_frame_args -> int64 -> unit + (** set field deadline_us in begin_frame_args *) + +val begin_frame_args_has_interval_delta_us : begin_frame_args -> bool + (** presence of field "interval_delta_us" in [begin_frame_args] *) + +val begin_frame_args_set_interval_delta_us : begin_frame_args -> int64 -> unit + (** set field interval_delta_us in begin_frame_args *) + +val begin_frame_args_has_on_critical_path : begin_frame_args -> bool + (** presence of field "on_critical_path" in [begin_frame_args] *) + +val begin_frame_args_set_on_critical_path : begin_frame_args -> bool -> unit + (** set field on_critical_path in begin_frame_args *) + +val begin_frame_args_has_animate_only : begin_frame_args -> bool + (** presence of field "animate_only" in [begin_frame_args] *) + +val begin_frame_args_set_animate_only : begin_frame_args -> bool -> unit + (** set field animate_only in begin_frame_args *) + +val begin_frame_args_set_created_from : begin_frame_args -> begin_frame_args_created_from -> unit + (** set field created_from in begin_frame_args *) + +val begin_frame_args_has_frames_throttled_since_last : begin_frame_args -> bool + (** presence of field "frames_throttled_since_last" in [begin_frame_args] *) + +val begin_frame_args_set_frames_throttled_since_last : begin_frame_args -> int64 -> unit + (** set field frames_throttled_since_last in begin_frame_args *) + +val make_begin_impl_frame_args_timestamps_in_us : + ?interval_delta:int64 -> + ?now_to_deadline_delta:int64 -> + ?frame_time_to_now_delta:int64 -> + ?frame_time_to_deadline_delta:int64 -> + ?now:int64 -> + ?frame_time:int64 -> + ?deadline:int64 -> + unit -> + begin_impl_frame_args_timestamps_in_us +(** [make_begin_impl_frame_args_timestamps_in_us … ()] is a builder for type [begin_impl_frame_args_timestamps_in_us] *) + +val copy_begin_impl_frame_args_timestamps_in_us : begin_impl_frame_args_timestamps_in_us -> begin_impl_frame_args_timestamps_in_us + +val begin_impl_frame_args_timestamps_in_us_has_interval_delta : begin_impl_frame_args_timestamps_in_us -> bool + (** presence of field "interval_delta" in [begin_impl_frame_args_timestamps_in_us] *) + +val begin_impl_frame_args_timestamps_in_us_set_interval_delta : begin_impl_frame_args_timestamps_in_us -> int64 -> unit + (** set field interval_delta in begin_impl_frame_args_timestamps_in_us *) + +val begin_impl_frame_args_timestamps_in_us_has_now_to_deadline_delta : begin_impl_frame_args_timestamps_in_us -> bool + (** presence of field "now_to_deadline_delta" in [begin_impl_frame_args_timestamps_in_us] *) + +val begin_impl_frame_args_timestamps_in_us_set_now_to_deadline_delta : begin_impl_frame_args_timestamps_in_us -> int64 -> unit + (** set field now_to_deadline_delta in begin_impl_frame_args_timestamps_in_us *) + +val begin_impl_frame_args_timestamps_in_us_has_frame_time_to_now_delta : begin_impl_frame_args_timestamps_in_us -> bool + (** presence of field "frame_time_to_now_delta" in [begin_impl_frame_args_timestamps_in_us] *) + +val begin_impl_frame_args_timestamps_in_us_set_frame_time_to_now_delta : begin_impl_frame_args_timestamps_in_us -> int64 -> unit + (** set field frame_time_to_now_delta in begin_impl_frame_args_timestamps_in_us *) + +val begin_impl_frame_args_timestamps_in_us_has_frame_time_to_deadline_delta : begin_impl_frame_args_timestamps_in_us -> bool + (** presence of field "frame_time_to_deadline_delta" in [begin_impl_frame_args_timestamps_in_us] *) + +val begin_impl_frame_args_timestamps_in_us_set_frame_time_to_deadline_delta : begin_impl_frame_args_timestamps_in_us -> int64 -> unit + (** set field frame_time_to_deadline_delta in begin_impl_frame_args_timestamps_in_us *) + +val begin_impl_frame_args_timestamps_in_us_has_now : begin_impl_frame_args_timestamps_in_us -> bool + (** presence of field "now" in [begin_impl_frame_args_timestamps_in_us] *) + +val begin_impl_frame_args_timestamps_in_us_set_now : begin_impl_frame_args_timestamps_in_us -> int64 -> unit + (** set field now in begin_impl_frame_args_timestamps_in_us *) + +val begin_impl_frame_args_timestamps_in_us_has_frame_time : begin_impl_frame_args_timestamps_in_us -> bool + (** presence of field "frame_time" in [begin_impl_frame_args_timestamps_in_us] *) + +val begin_impl_frame_args_timestamps_in_us_set_frame_time : begin_impl_frame_args_timestamps_in_us -> int64 -> unit + (** set field frame_time in begin_impl_frame_args_timestamps_in_us *) + +val begin_impl_frame_args_timestamps_in_us_has_deadline : begin_impl_frame_args_timestamps_in_us -> bool + (** presence of field "deadline" in [begin_impl_frame_args_timestamps_in_us] *) + +val begin_impl_frame_args_timestamps_in_us_set_deadline : begin_impl_frame_args_timestamps_in_us -> int64 -> unit + (** set field deadline in begin_impl_frame_args_timestamps_in_us *) + +val make_begin_impl_frame_args : + ?updated_at_us:int64 -> + ?finished_at_us:int64 -> + ?state:begin_impl_frame_args_state -> + ?args:begin_impl_frame_args_args -> + ?timestamps_in_us:begin_impl_frame_args_timestamps_in_us -> + unit -> + begin_impl_frame_args +(** [make_begin_impl_frame_args … ()] is a builder for type [begin_impl_frame_args] *) + +val copy_begin_impl_frame_args : begin_impl_frame_args -> begin_impl_frame_args + +val begin_impl_frame_args_has_updated_at_us : begin_impl_frame_args -> bool + (** presence of field "updated_at_us" in [begin_impl_frame_args] *) + +val begin_impl_frame_args_set_updated_at_us : begin_impl_frame_args -> int64 -> unit + (** set field updated_at_us in begin_impl_frame_args *) + +val begin_impl_frame_args_has_finished_at_us : begin_impl_frame_args -> bool + (** presence of field "finished_at_us" in [begin_impl_frame_args] *) + +val begin_impl_frame_args_set_finished_at_us : begin_impl_frame_args -> int64 -> unit + (** set field finished_at_us in begin_impl_frame_args *) + +val begin_impl_frame_args_has_state : begin_impl_frame_args -> bool + (** presence of field "state" in [begin_impl_frame_args] *) + +val begin_impl_frame_args_set_state : begin_impl_frame_args -> begin_impl_frame_args_state -> unit + (** set field state in begin_impl_frame_args *) + +val begin_impl_frame_args_set_args : begin_impl_frame_args -> begin_impl_frame_args_args -> unit + (** set field args in begin_impl_frame_args *) + +val begin_impl_frame_args_set_timestamps_in_us : begin_impl_frame_args -> begin_impl_frame_args_timestamps_in_us -> unit + (** set field timestamps_in_us in begin_impl_frame_args *) + +val make_begin_frame_observer_state : + ?dropped_begin_frame_args:int64 -> + ?last_begin_frame_args:begin_frame_args -> + unit -> + begin_frame_observer_state +(** [make_begin_frame_observer_state … ()] is a builder for type [begin_frame_observer_state] *) + +val copy_begin_frame_observer_state : begin_frame_observer_state -> begin_frame_observer_state + +val begin_frame_observer_state_has_dropped_begin_frame_args : begin_frame_observer_state -> bool + (** presence of field "dropped_begin_frame_args" in [begin_frame_observer_state] *) + +val begin_frame_observer_state_set_dropped_begin_frame_args : begin_frame_observer_state -> int64 -> unit + (** set field dropped_begin_frame_args in begin_frame_observer_state *) + +val begin_frame_observer_state_set_last_begin_frame_args : begin_frame_observer_state -> begin_frame_args -> unit + (** set field last_begin_frame_args in begin_frame_observer_state *) + +val make_begin_frame_source_state : + ?source_id:int32 -> + ?paused:bool -> + ?num_observers:int32 -> + ?last_begin_frame_args:begin_frame_args -> + unit -> + begin_frame_source_state +(** [make_begin_frame_source_state … ()] is a builder for type [begin_frame_source_state] *) + +val copy_begin_frame_source_state : begin_frame_source_state -> begin_frame_source_state + +val begin_frame_source_state_has_source_id : begin_frame_source_state -> bool + (** presence of field "source_id" in [begin_frame_source_state] *) + +val begin_frame_source_state_set_source_id : begin_frame_source_state -> int32 -> unit + (** set field source_id in begin_frame_source_state *) + +val begin_frame_source_state_has_paused : begin_frame_source_state -> bool + (** presence of field "paused" in [begin_frame_source_state] *) + +val begin_frame_source_state_set_paused : begin_frame_source_state -> bool -> unit + (** set field paused in begin_frame_source_state *) + +val begin_frame_source_state_has_num_observers : begin_frame_source_state -> bool + (** presence of field "num_observers" in [begin_frame_source_state] *) + +val begin_frame_source_state_set_num_observers : begin_frame_source_state -> int32 -> unit + (** set field num_observers in begin_frame_source_state *) + +val begin_frame_source_state_set_last_begin_frame_args : begin_frame_source_state -> begin_frame_args -> unit + (** set field last_begin_frame_args in begin_frame_source_state *) + +val make_compositor_timing_history : + ?begin_main_frame_queue_critical_estimate_delta_us:int64 -> + ?begin_main_frame_queue_not_critical_estimate_delta_us:int64 -> + ?begin_main_frame_start_to_ready_to_commit_estimate_delta_us:int64 -> + ?commit_to_ready_to_activate_estimate_delta_us:int64 -> + ?prepare_tiles_estimate_delta_us:int64 -> + ?activate_estimate_delta_us:int64 -> + ?draw_estimate_delta_us:int64 -> + unit -> + compositor_timing_history +(** [make_compositor_timing_history … ()] is a builder for type [compositor_timing_history] *) + +val copy_compositor_timing_history : compositor_timing_history -> compositor_timing_history + +val compositor_timing_history_has_begin_main_frame_queue_critical_estimate_delta_us : compositor_timing_history -> bool + (** presence of field "begin_main_frame_queue_critical_estimate_delta_us" in [compositor_timing_history] *) + +val compositor_timing_history_set_begin_main_frame_queue_critical_estimate_delta_us : compositor_timing_history -> int64 -> unit + (** set field begin_main_frame_queue_critical_estimate_delta_us in compositor_timing_history *) + +val compositor_timing_history_has_begin_main_frame_queue_not_critical_estimate_delta_us : compositor_timing_history -> bool + (** presence of field "begin_main_frame_queue_not_critical_estimate_delta_us" in [compositor_timing_history] *) + +val compositor_timing_history_set_begin_main_frame_queue_not_critical_estimate_delta_us : compositor_timing_history -> int64 -> unit + (** set field begin_main_frame_queue_not_critical_estimate_delta_us in compositor_timing_history *) + +val compositor_timing_history_has_begin_main_frame_start_to_ready_to_commit_estimate_delta_us : compositor_timing_history -> bool + (** presence of field "begin_main_frame_start_to_ready_to_commit_estimate_delta_us" in [compositor_timing_history] *) + +val compositor_timing_history_set_begin_main_frame_start_to_ready_to_commit_estimate_delta_us : compositor_timing_history -> int64 -> unit + (** set field begin_main_frame_start_to_ready_to_commit_estimate_delta_us in compositor_timing_history *) + +val compositor_timing_history_has_commit_to_ready_to_activate_estimate_delta_us : compositor_timing_history -> bool + (** presence of field "commit_to_ready_to_activate_estimate_delta_us" in [compositor_timing_history] *) + +val compositor_timing_history_set_commit_to_ready_to_activate_estimate_delta_us : compositor_timing_history -> int64 -> unit + (** set field commit_to_ready_to_activate_estimate_delta_us in compositor_timing_history *) + +val compositor_timing_history_has_prepare_tiles_estimate_delta_us : compositor_timing_history -> bool + (** presence of field "prepare_tiles_estimate_delta_us" in [compositor_timing_history] *) + +val compositor_timing_history_set_prepare_tiles_estimate_delta_us : compositor_timing_history -> int64 -> unit + (** set field prepare_tiles_estimate_delta_us in compositor_timing_history *) + +val compositor_timing_history_has_activate_estimate_delta_us : compositor_timing_history -> bool + (** presence of field "activate_estimate_delta_us" in [compositor_timing_history] *) + +val compositor_timing_history_set_activate_estimate_delta_us : compositor_timing_history -> int64 -> unit + (** set field activate_estimate_delta_us in compositor_timing_history *) + +val compositor_timing_history_has_draw_estimate_delta_us : compositor_timing_history -> bool + (** presence of field "draw_estimate_delta_us" in [compositor_timing_history] *) + +val compositor_timing_history_set_draw_estimate_delta_us : compositor_timing_history -> int64 -> unit + (** set field draw_estimate_delta_us in compositor_timing_history *) + +val make_chrome_compositor_scheduler_state : + ?state_machine:chrome_compositor_state_machine -> + ?observing_begin_frame_source:bool -> + ?begin_impl_frame_deadline_task:bool -> + ?pending_begin_frame_task:bool -> + ?skipped_last_frame_missed_exceeded_deadline:bool -> + ?inside_action:chrome_compositor_scheduler_action -> + ?deadline_mode:chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode -> + ?deadline_us:int64 -> + ?deadline_scheduled_at_us:int64 -> + ?now_us:int64 -> + ?now_to_deadline_delta_us:int64 -> + ?now_to_deadline_scheduled_at_delta_us:int64 -> + ?begin_impl_frame_args:begin_impl_frame_args -> + ?begin_frame_observer_state:begin_frame_observer_state -> + ?begin_frame_source_state:begin_frame_source_state -> + ?compositor_timing_history:compositor_timing_history -> + unit -> + chrome_compositor_scheduler_state +(** [make_chrome_compositor_scheduler_state … ()] is a builder for type [chrome_compositor_scheduler_state] *) + +val copy_chrome_compositor_scheduler_state : chrome_compositor_scheduler_state -> chrome_compositor_scheduler_state + +val chrome_compositor_scheduler_state_set_state_machine : chrome_compositor_scheduler_state -> chrome_compositor_state_machine -> unit + (** set field state_machine in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_observing_begin_frame_source : chrome_compositor_scheduler_state -> bool + (** presence of field "observing_begin_frame_source" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_observing_begin_frame_source : chrome_compositor_scheduler_state -> bool -> unit + (** set field observing_begin_frame_source in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_begin_impl_frame_deadline_task : chrome_compositor_scheduler_state -> bool + (** presence of field "begin_impl_frame_deadline_task" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_begin_impl_frame_deadline_task : chrome_compositor_scheduler_state -> bool -> unit + (** set field begin_impl_frame_deadline_task in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_pending_begin_frame_task : chrome_compositor_scheduler_state -> bool + (** presence of field "pending_begin_frame_task" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_pending_begin_frame_task : chrome_compositor_scheduler_state -> bool -> unit + (** set field pending_begin_frame_task in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_skipped_last_frame_missed_exceeded_deadline : chrome_compositor_scheduler_state -> bool + (** presence of field "skipped_last_frame_missed_exceeded_deadline" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_skipped_last_frame_missed_exceeded_deadline : chrome_compositor_scheduler_state -> bool -> unit + (** set field skipped_last_frame_missed_exceeded_deadline in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_inside_action : chrome_compositor_scheduler_state -> bool + (** presence of field "inside_action" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_inside_action : chrome_compositor_scheduler_state -> chrome_compositor_scheduler_action -> unit + (** set field inside_action in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_deadline_mode : chrome_compositor_scheduler_state -> bool + (** presence of field "deadline_mode" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_deadline_mode : chrome_compositor_scheduler_state -> chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode -> unit + (** set field deadline_mode in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_deadline_us : chrome_compositor_scheduler_state -> bool + (** presence of field "deadline_us" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_deadline_us : chrome_compositor_scheduler_state -> int64 -> unit + (** set field deadline_us in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_deadline_scheduled_at_us : chrome_compositor_scheduler_state -> bool + (** presence of field "deadline_scheduled_at_us" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_deadline_scheduled_at_us : chrome_compositor_scheduler_state -> int64 -> unit + (** set field deadline_scheduled_at_us in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_now_us : chrome_compositor_scheduler_state -> bool + (** presence of field "now_us" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_now_us : chrome_compositor_scheduler_state -> int64 -> unit + (** set field now_us in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_now_to_deadline_delta_us : chrome_compositor_scheduler_state -> bool + (** presence of field "now_to_deadline_delta_us" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_now_to_deadline_delta_us : chrome_compositor_scheduler_state -> int64 -> unit + (** set field now_to_deadline_delta_us in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_has_now_to_deadline_scheduled_at_delta_us : chrome_compositor_scheduler_state -> bool + (** presence of field "now_to_deadline_scheduled_at_delta_us" in [chrome_compositor_scheduler_state] *) + +val chrome_compositor_scheduler_state_set_now_to_deadline_scheduled_at_delta_us : chrome_compositor_scheduler_state -> int64 -> unit + (** set field now_to_deadline_scheduled_at_delta_us in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_set_begin_impl_frame_args : chrome_compositor_scheduler_state -> begin_impl_frame_args -> unit + (** set field begin_impl_frame_args in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_set_begin_frame_observer_state : chrome_compositor_scheduler_state -> begin_frame_observer_state -> unit + (** set field begin_frame_observer_state in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_set_begin_frame_source_state : chrome_compositor_scheduler_state -> begin_frame_source_state -> unit + (** set field begin_frame_source_state in chrome_compositor_scheduler_state *) + +val chrome_compositor_scheduler_state_set_compositor_timing_history : chrome_compositor_scheduler_state -> compositor_timing_history -> unit + (** set field compositor_timing_history in chrome_compositor_scheduler_state *) + +val make_chrome_content_settings_event_info : + ?number_of_exceptions:int32 -> + unit -> + chrome_content_settings_event_info +(** [make_chrome_content_settings_event_info … ()] is a builder for type [chrome_content_settings_event_info] *) + +val copy_chrome_content_settings_event_info : chrome_content_settings_event_info -> chrome_content_settings_event_info + +val chrome_content_settings_event_info_has_number_of_exceptions : chrome_content_settings_event_info -> bool + (** presence of field "number_of_exceptions" in [chrome_content_settings_event_info] *) + +val chrome_content_settings_event_info_set_number_of_exceptions : chrome_content_settings_event_info -> int32 -> unit + (** set field number_of_exceptions in chrome_content_settings_event_info *) + +val make_chrome_frame_reporter : + ?state:chrome_frame_reporter_state -> + ?reason:chrome_frame_reporter_frame_drop_reason -> + ?frame_source:int64 -> + ?frame_sequence:int64 -> + ?affects_smoothness:bool -> + ?scroll_state:chrome_frame_reporter_scroll_state -> + ?has_main_animation:bool -> + ?has_compositor_animation:bool -> + ?has_smooth_input_main:bool -> + ?has_missing_content:bool -> + ?layer_tree_host_id:int64 -> + ?has_high_latency:bool -> + ?frame_type:chrome_frame_reporter_frame_type -> + ?high_latency_contribution_stage:string list -> + ?checkerboarded_needs_raster:bool -> + ?checkerboarded_needs_record:bool -> + ?surface_frame_trace_id:int64 -> + ?display_trace_id:int64 -> + unit -> + chrome_frame_reporter +(** [make_chrome_frame_reporter … ()] is a builder for type [chrome_frame_reporter] *) + +val copy_chrome_frame_reporter : chrome_frame_reporter -> chrome_frame_reporter + +val chrome_frame_reporter_has_state : chrome_frame_reporter -> bool + (** presence of field "state" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_state : chrome_frame_reporter -> chrome_frame_reporter_state -> unit + (** set field state in chrome_frame_reporter *) + +val chrome_frame_reporter_has_reason : chrome_frame_reporter -> bool + (** presence of field "reason" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_reason : chrome_frame_reporter -> chrome_frame_reporter_frame_drop_reason -> unit + (** set field reason in chrome_frame_reporter *) + +val chrome_frame_reporter_has_frame_source : chrome_frame_reporter -> bool + (** presence of field "frame_source" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_frame_source : chrome_frame_reporter -> int64 -> unit + (** set field frame_source in chrome_frame_reporter *) + +val chrome_frame_reporter_has_frame_sequence : chrome_frame_reporter -> bool + (** presence of field "frame_sequence" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_frame_sequence : chrome_frame_reporter -> int64 -> unit + (** set field frame_sequence in chrome_frame_reporter *) + +val chrome_frame_reporter_has_affects_smoothness : chrome_frame_reporter -> bool + (** presence of field "affects_smoothness" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_affects_smoothness : chrome_frame_reporter -> bool -> unit + (** set field affects_smoothness in chrome_frame_reporter *) + +val chrome_frame_reporter_has_scroll_state : chrome_frame_reporter -> bool + (** presence of field "scroll_state" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_scroll_state : chrome_frame_reporter -> chrome_frame_reporter_scroll_state -> unit + (** set field scroll_state in chrome_frame_reporter *) + +val chrome_frame_reporter_has_has_main_animation : chrome_frame_reporter -> bool + (** presence of field "has_main_animation" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_has_main_animation : chrome_frame_reporter -> bool -> unit + (** set field has_main_animation in chrome_frame_reporter *) + +val chrome_frame_reporter_has_has_compositor_animation : chrome_frame_reporter -> bool + (** presence of field "has_compositor_animation" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_has_compositor_animation : chrome_frame_reporter -> bool -> unit + (** set field has_compositor_animation in chrome_frame_reporter *) + +val chrome_frame_reporter_has_has_smooth_input_main : chrome_frame_reporter -> bool + (** presence of field "has_smooth_input_main" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_has_smooth_input_main : chrome_frame_reporter -> bool -> unit + (** set field has_smooth_input_main in chrome_frame_reporter *) + +val chrome_frame_reporter_has_has_missing_content : chrome_frame_reporter -> bool + (** presence of field "has_missing_content" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_has_missing_content : chrome_frame_reporter -> bool -> unit + (** set field has_missing_content in chrome_frame_reporter *) + +val chrome_frame_reporter_has_layer_tree_host_id : chrome_frame_reporter -> bool + (** presence of field "layer_tree_host_id" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_layer_tree_host_id : chrome_frame_reporter -> int64 -> unit + (** set field layer_tree_host_id in chrome_frame_reporter *) + +val chrome_frame_reporter_has_has_high_latency : chrome_frame_reporter -> bool + (** presence of field "has_high_latency" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_has_high_latency : chrome_frame_reporter -> bool -> unit + (** set field has_high_latency in chrome_frame_reporter *) + +val chrome_frame_reporter_has_frame_type : chrome_frame_reporter -> bool + (** presence of field "frame_type" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_frame_type : chrome_frame_reporter -> chrome_frame_reporter_frame_type -> unit + (** set field frame_type in chrome_frame_reporter *) + +val chrome_frame_reporter_set_high_latency_contribution_stage : chrome_frame_reporter -> string list -> unit + (** set field high_latency_contribution_stage in chrome_frame_reporter *) + +val chrome_frame_reporter_has_checkerboarded_needs_raster : chrome_frame_reporter -> bool + (** presence of field "checkerboarded_needs_raster" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_checkerboarded_needs_raster : chrome_frame_reporter -> bool -> unit + (** set field checkerboarded_needs_raster in chrome_frame_reporter *) + +val chrome_frame_reporter_has_checkerboarded_needs_record : chrome_frame_reporter -> bool + (** presence of field "checkerboarded_needs_record" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_checkerboarded_needs_record : chrome_frame_reporter -> bool -> unit + (** set field checkerboarded_needs_record in chrome_frame_reporter *) + +val chrome_frame_reporter_has_surface_frame_trace_id : chrome_frame_reporter -> bool + (** presence of field "surface_frame_trace_id" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_surface_frame_trace_id : chrome_frame_reporter -> int64 -> unit + (** set field surface_frame_trace_id in chrome_frame_reporter *) + +val chrome_frame_reporter_has_display_trace_id : chrome_frame_reporter -> bool + (** presence of field "display_trace_id" in [chrome_frame_reporter] *) + +val chrome_frame_reporter_set_display_trace_id : chrome_frame_reporter -> int64 -> unit + (** set field display_trace_id in chrome_frame_reporter *) + +val make_chrome_keyed_service : + ?name:string -> + unit -> + chrome_keyed_service +(** [make_chrome_keyed_service … ()] is a builder for type [chrome_keyed_service] *) + +val copy_chrome_keyed_service : chrome_keyed_service -> chrome_keyed_service + +val chrome_keyed_service_has_name : chrome_keyed_service -> bool + (** presence of field "name" in [chrome_keyed_service] *) + +val chrome_keyed_service_set_name : chrome_keyed_service -> string -> unit + (** set field name in chrome_keyed_service *) + +val make_chrome_latency_info_component_info : + ?component_type:chrome_latency_info_latency_component_type -> + ?time_us:int64 -> + unit -> + chrome_latency_info_component_info +(** [make_chrome_latency_info_component_info … ()] is a builder for type [chrome_latency_info_component_info] *) + +val copy_chrome_latency_info_component_info : chrome_latency_info_component_info -> chrome_latency_info_component_info + +val chrome_latency_info_component_info_has_component_type : chrome_latency_info_component_info -> bool + (** presence of field "component_type" in [chrome_latency_info_component_info] *) + +val chrome_latency_info_component_info_set_component_type : chrome_latency_info_component_info -> chrome_latency_info_latency_component_type -> unit + (** set field component_type in chrome_latency_info_component_info *) + +val chrome_latency_info_component_info_has_time_us : chrome_latency_info_component_info -> bool + (** presence of field "time_us" in [chrome_latency_info_component_info] *) + +val chrome_latency_info_component_info_set_time_us : chrome_latency_info_component_info -> int64 -> unit + (** set field time_us in chrome_latency_info_component_info *) + +val make_chrome_latency_info : + ?trace_id:int64 -> + ?step:chrome_latency_info_step -> + ?frame_tree_node_id:int32 -> + ?component_info:chrome_latency_info_component_info list -> + ?is_coalesced:bool -> + ?gesture_scroll_id:int64 -> + ?touch_id:int64 -> + ?input_type:chrome_latency_info_input_type -> + unit -> + chrome_latency_info +(** [make_chrome_latency_info … ()] is a builder for type [chrome_latency_info] *) + +val copy_chrome_latency_info : chrome_latency_info -> chrome_latency_info + +val chrome_latency_info_has_trace_id : chrome_latency_info -> bool + (** presence of field "trace_id" in [chrome_latency_info] *) + +val chrome_latency_info_set_trace_id : chrome_latency_info -> int64 -> unit + (** set field trace_id in chrome_latency_info *) + +val chrome_latency_info_has_step : chrome_latency_info -> bool + (** presence of field "step" in [chrome_latency_info] *) + +val chrome_latency_info_set_step : chrome_latency_info -> chrome_latency_info_step -> unit + (** set field step in chrome_latency_info *) + +val chrome_latency_info_has_frame_tree_node_id : chrome_latency_info -> bool + (** presence of field "frame_tree_node_id" in [chrome_latency_info] *) + +val chrome_latency_info_set_frame_tree_node_id : chrome_latency_info -> int32 -> unit + (** set field frame_tree_node_id in chrome_latency_info *) + +val chrome_latency_info_set_component_info : chrome_latency_info -> chrome_latency_info_component_info list -> unit + (** set field component_info in chrome_latency_info *) + +val chrome_latency_info_has_is_coalesced : chrome_latency_info -> bool + (** presence of field "is_coalesced" in [chrome_latency_info] *) + +val chrome_latency_info_set_is_coalesced : chrome_latency_info -> bool -> unit + (** set field is_coalesced in chrome_latency_info *) + +val chrome_latency_info_has_gesture_scroll_id : chrome_latency_info -> bool + (** presence of field "gesture_scroll_id" in [chrome_latency_info] *) + +val chrome_latency_info_set_gesture_scroll_id : chrome_latency_info -> int64 -> unit + (** set field gesture_scroll_id in chrome_latency_info *) + +val chrome_latency_info_has_touch_id : chrome_latency_info -> bool + (** presence of field "touch_id" in [chrome_latency_info] *) + +val chrome_latency_info_set_touch_id : chrome_latency_info -> int64 -> unit + (** set field touch_id in chrome_latency_info *) + +val chrome_latency_info_has_input_type : chrome_latency_info -> bool + (** presence of field "input_type" in [chrome_latency_info] *) + +val chrome_latency_info_set_input_type : chrome_latency_info -> chrome_latency_info_input_type -> unit + (** set field input_type in chrome_latency_info *) + +val make_chrome_legacy_ipc : + ?message_class:chrome_legacy_ipc_message_class -> + ?message_line:int32 -> + unit -> + chrome_legacy_ipc +(** [make_chrome_legacy_ipc … ()] is a builder for type [chrome_legacy_ipc] *) + +val copy_chrome_legacy_ipc : chrome_legacy_ipc -> chrome_legacy_ipc + +val chrome_legacy_ipc_has_message_class : chrome_legacy_ipc -> bool + (** presence of field "message_class" in [chrome_legacy_ipc] *) + +val chrome_legacy_ipc_set_message_class : chrome_legacy_ipc -> chrome_legacy_ipc_message_class -> unit + (** set field message_class in chrome_legacy_ipc *) + +val chrome_legacy_ipc_has_message_line : chrome_legacy_ipc -> bool + (** presence of field "message_line" in [chrome_legacy_ipc] *) + +val chrome_legacy_ipc_set_message_line : chrome_legacy_ipc -> int32 -> unit + (** set field message_line in chrome_legacy_ipc *) + +val make_chrome_message_pump : + ?sent_messages_in_queue:bool -> + ?io_handler_location_iid:int64 -> + unit -> + chrome_message_pump +(** [make_chrome_message_pump … ()] is a builder for type [chrome_message_pump] *) + +val copy_chrome_message_pump : chrome_message_pump -> chrome_message_pump + +val chrome_message_pump_has_sent_messages_in_queue : chrome_message_pump -> bool + (** presence of field "sent_messages_in_queue" in [chrome_message_pump] *) + +val chrome_message_pump_set_sent_messages_in_queue : chrome_message_pump -> bool -> unit + (** set field sent_messages_in_queue in chrome_message_pump *) + +val chrome_message_pump_has_io_handler_location_iid : chrome_message_pump -> bool + (** presence of field "io_handler_location_iid" in [chrome_message_pump] *) + +val chrome_message_pump_set_io_handler_location_iid : chrome_message_pump -> int64 -> unit + (** set field io_handler_location_iid in chrome_message_pump *) + +val make_chrome_mojo_event_info : + ?watcher_notify_interface_tag:string -> + ?ipc_hash:int32 -> + ?mojo_interface_tag:string -> + ?mojo_interface_method_iid:int64 -> + ?is_reply:bool -> + ?payload_size:int64 -> + ?data_num_bytes:int64 -> + unit -> + chrome_mojo_event_info +(** [make_chrome_mojo_event_info … ()] is a builder for type [chrome_mojo_event_info] *) + +val copy_chrome_mojo_event_info : chrome_mojo_event_info -> chrome_mojo_event_info + +val chrome_mojo_event_info_has_watcher_notify_interface_tag : chrome_mojo_event_info -> bool + (** presence of field "watcher_notify_interface_tag" in [chrome_mojo_event_info] *) + +val chrome_mojo_event_info_set_watcher_notify_interface_tag : chrome_mojo_event_info -> string -> unit + (** set field watcher_notify_interface_tag in chrome_mojo_event_info *) + +val chrome_mojo_event_info_has_ipc_hash : chrome_mojo_event_info -> bool + (** presence of field "ipc_hash" in [chrome_mojo_event_info] *) + +val chrome_mojo_event_info_set_ipc_hash : chrome_mojo_event_info -> int32 -> unit + (** set field ipc_hash in chrome_mojo_event_info *) + +val chrome_mojo_event_info_has_mojo_interface_tag : chrome_mojo_event_info -> bool + (** presence of field "mojo_interface_tag" in [chrome_mojo_event_info] *) + +val chrome_mojo_event_info_set_mojo_interface_tag : chrome_mojo_event_info -> string -> unit + (** set field mojo_interface_tag in chrome_mojo_event_info *) + +val chrome_mojo_event_info_has_mojo_interface_method_iid : chrome_mojo_event_info -> bool + (** presence of field "mojo_interface_method_iid" in [chrome_mojo_event_info] *) + +val chrome_mojo_event_info_set_mojo_interface_method_iid : chrome_mojo_event_info -> int64 -> unit + (** set field mojo_interface_method_iid in chrome_mojo_event_info *) + +val chrome_mojo_event_info_has_is_reply : chrome_mojo_event_info -> bool + (** presence of field "is_reply" in [chrome_mojo_event_info] *) + +val chrome_mojo_event_info_set_is_reply : chrome_mojo_event_info -> bool -> unit + (** set field is_reply in chrome_mojo_event_info *) + +val chrome_mojo_event_info_has_payload_size : chrome_mojo_event_info -> bool + (** presence of field "payload_size" in [chrome_mojo_event_info] *) + +val chrome_mojo_event_info_set_payload_size : chrome_mojo_event_info -> int64 -> unit + (** set field payload_size in chrome_mojo_event_info *) + +val chrome_mojo_event_info_has_data_num_bytes : chrome_mojo_event_info -> bool + (** presence of field "data_num_bytes" in [chrome_mojo_event_info] *) + +val chrome_mojo_event_info_set_data_num_bytes : chrome_mojo_event_info -> int64 -> unit + (** set field data_num_bytes in chrome_mojo_event_info *) + +val make_chrome_renderer_scheduler_state : + ?rail_mode:chrome_railmode -> + ?is_backgrounded:bool -> + ?is_hidden:bool -> + unit -> + chrome_renderer_scheduler_state +(** [make_chrome_renderer_scheduler_state … ()] is a builder for type [chrome_renderer_scheduler_state] *) + +val copy_chrome_renderer_scheduler_state : chrome_renderer_scheduler_state -> chrome_renderer_scheduler_state + +val chrome_renderer_scheduler_state_has_rail_mode : chrome_renderer_scheduler_state -> bool + (** presence of field "rail_mode" in [chrome_renderer_scheduler_state] *) + +val chrome_renderer_scheduler_state_set_rail_mode : chrome_renderer_scheduler_state -> chrome_railmode -> unit + (** set field rail_mode in chrome_renderer_scheduler_state *) + +val chrome_renderer_scheduler_state_has_is_backgrounded : chrome_renderer_scheduler_state -> bool + (** presence of field "is_backgrounded" in [chrome_renderer_scheduler_state] *) + +val chrome_renderer_scheduler_state_set_is_backgrounded : chrome_renderer_scheduler_state -> bool -> unit + (** set field is_backgrounded in chrome_renderer_scheduler_state *) + +val chrome_renderer_scheduler_state_has_is_hidden : chrome_renderer_scheduler_state -> bool + (** presence of field "is_hidden" in [chrome_renderer_scheduler_state] *) + +val chrome_renderer_scheduler_state_set_is_hidden : chrome_renderer_scheduler_state -> bool -> unit + (** set field is_hidden in chrome_renderer_scheduler_state *) + +val make_chrome_user_event : + ?action:string -> + ?action_hash:int64 -> + unit -> + chrome_user_event +(** [make_chrome_user_event … ()] is a builder for type [chrome_user_event] *) + +val copy_chrome_user_event : chrome_user_event -> chrome_user_event + +val chrome_user_event_has_action : chrome_user_event -> bool + (** presence of field "action" in [chrome_user_event] *) + +val chrome_user_event_set_action : chrome_user_event -> string -> unit + (** set field action in chrome_user_event *) + +val chrome_user_event_has_action_hash : chrome_user_event -> bool + (** presence of field "action_hash" in [chrome_user_event] *) + +val chrome_user_event_set_action_hash : chrome_user_event -> int64 -> unit + (** set field action_hash in chrome_user_event *) + +val make_chrome_window_handle_event_info : + ?dpi:int32 -> + ?message_id:int32 -> + ?hwnd_ptr:int64 -> + unit -> + chrome_window_handle_event_info +(** [make_chrome_window_handle_event_info … ()] is a builder for type [chrome_window_handle_event_info] *) + +val copy_chrome_window_handle_event_info : chrome_window_handle_event_info -> chrome_window_handle_event_info + +val chrome_window_handle_event_info_has_dpi : chrome_window_handle_event_info -> bool + (** presence of field "dpi" in [chrome_window_handle_event_info] *) + +val chrome_window_handle_event_info_set_dpi : chrome_window_handle_event_info -> int32 -> unit + (** set field dpi in chrome_window_handle_event_info *) + +val chrome_window_handle_event_info_has_message_id : chrome_window_handle_event_info -> bool + (** presence of field "message_id" in [chrome_window_handle_event_info] *) + +val chrome_window_handle_event_info_set_message_id : chrome_window_handle_event_info -> int32 -> unit + (** set field message_id in chrome_window_handle_event_info *) + +val chrome_window_handle_event_info_has_hwnd_ptr : chrome_window_handle_event_info -> bool + (** presence of field "hwnd_ptr" in [chrome_window_handle_event_info] *) + +val chrome_window_handle_event_info_set_hwnd_ptr : chrome_window_handle_event_info -> int64 -> unit + (** set field hwnd_ptr in chrome_window_handle_event_info *) + +val make_screenshot : + ?jpg_image:bytes -> + unit -> + screenshot +(** [make_screenshot … ()] is a builder for type [screenshot] *) + +val copy_screenshot : screenshot -> screenshot + +val screenshot_has_jpg_image : screenshot -> bool + (** presence of field "jpg_image" in [screenshot] *) + +val screenshot_set_jpg_image : screenshot -> bytes -> unit + (** set field jpg_image in screenshot *) + +val make_task_execution : + ?posted_from_iid:int64 -> + unit -> + task_execution +(** [make_task_execution … ()] is a builder for type [task_execution] *) + +val copy_task_execution : task_execution -> task_execution + +val task_execution_has_posted_from_iid : task_execution -> bool + (** presence of field "posted_from_iid" in [task_execution] *) + +val task_execution_set_posted_from_iid : task_execution -> int64 -> unit + (** set field posted_from_iid in task_execution *) + +val make_track_event_callstack_frame : + ?function_name:string -> + ?source_file:string -> + ?line_number:int32 -> + unit -> + track_event_callstack_frame +(** [make_track_event_callstack_frame … ()] is a builder for type [track_event_callstack_frame] *) + +val copy_track_event_callstack_frame : track_event_callstack_frame -> track_event_callstack_frame + +val track_event_callstack_frame_has_function_name : track_event_callstack_frame -> bool + (** presence of field "function_name" in [track_event_callstack_frame] *) + +val track_event_callstack_frame_set_function_name : track_event_callstack_frame -> string -> unit + (** set field function_name in track_event_callstack_frame *) + +val track_event_callstack_frame_has_source_file : track_event_callstack_frame -> bool + (** presence of field "source_file" in [track_event_callstack_frame] *) + +val track_event_callstack_frame_set_source_file : track_event_callstack_frame -> string -> unit + (** set field source_file in track_event_callstack_frame *) + +val track_event_callstack_frame_has_line_number : track_event_callstack_frame -> bool + (** presence of field "line_number" in [track_event_callstack_frame] *) + +val track_event_callstack_frame_set_line_number : track_event_callstack_frame -> int32 -> unit + (** set field line_number in track_event_callstack_frame *) + +val make_track_event_callstack : + ?frames:track_event_callstack_frame list -> + unit -> + track_event_callstack +(** [make_track_event_callstack … ()] is a builder for type [track_event_callstack] *) + +val copy_track_event_callstack : track_event_callstack -> track_event_callstack + +val track_event_callstack_set_frames : track_event_callstack -> track_event_callstack_frame list -> unit + (** set field frames in track_event_callstack *) + +val make_track_event_legacy_event : + ?name_iid:int64 -> + ?phase:int32 -> + ?duration_us:int64 -> + ?thread_duration_us:int64 -> + ?thread_instruction_delta:int64 -> + ?id:track_event_legacy_event_id -> + ?id_scope:string -> + ?use_async_tts:bool -> + ?bind_id:int64 -> + ?bind_to_enclosing:bool -> + ?flow_direction:track_event_legacy_event_flow_direction -> + ?instant_event_scope:track_event_legacy_event_instant_event_scope -> + ?pid_override:int32 -> + ?tid_override:int32 -> + unit -> + track_event_legacy_event +(** [make_track_event_legacy_event … ()] is a builder for type [track_event_legacy_event] *) + +val copy_track_event_legacy_event : track_event_legacy_event -> track_event_legacy_event + +val track_event_legacy_event_has_name_iid : track_event_legacy_event -> bool + (** presence of field "name_iid" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_name_iid : track_event_legacy_event -> int64 -> unit + (** set field name_iid in track_event_legacy_event *) + +val track_event_legacy_event_has_phase : track_event_legacy_event -> bool + (** presence of field "phase" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_phase : track_event_legacy_event -> int32 -> unit + (** set field phase in track_event_legacy_event *) + +val track_event_legacy_event_has_duration_us : track_event_legacy_event -> bool + (** presence of field "duration_us" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_duration_us : track_event_legacy_event -> int64 -> unit + (** set field duration_us in track_event_legacy_event *) + +val track_event_legacy_event_has_thread_duration_us : track_event_legacy_event -> bool + (** presence of field "thread_duration_us" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_thread_duration_us : track_event_legacy_event -> int64 -> unit + (** set field thread_duration_us in track_event_legacy_event *) + +val track_event_legacy_event_has_thread_instruction_delta : track_event_legacy_event -> bool + (** presence of field "thread_instruction_delta" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_thread_instruction_delta : track_event_legacy_event -> int64 -> unit + (** set field thread_instruction_delta in track_event_legacy_event *) + +val track_event_legacy_event_set_id : track_event_legacy_event -> track_event_legacy_event_id -> unit + (** set field id in track_event_legacy_event *) + +val track_event_legacy_event_has_id_scope : track_event_legacy_event -> bool + (** presence of field "id_scope" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_id_scope : track_event_legacy_event -> string -> unit + (** set field id_scope in track_event_legacy_event *) + +val track_event_legacy_event_has_use_async_tts : track_event_legacy_event -> bool + (** presence of field "use_async_tts" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_use_async_tts : track_event_legacy_event -> bool -> unit + (** set field use_async_tts in track_event_legacy_event *) + +val track_event_legacy_event_has_bind_id : track_event_legacy_event -> bool + (** presence of field "bind_id" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_bind_id : track_event_legacy_event -> int64 -> unit + (** set field bind_id in track_event_legacy_event *) + +val track_event_legacy_event_has_bind_to_enclosing : track_event_legacy_event -> bool + (** presence of field "bind_to_enclosing" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_bind_to_enclosing : track_event_legacy_event -> bool -> unit + (** set field bind_to_enclosing in track_event_legacy_event *) + +val track_event_legacy_event_has_flow_direction : track_event_legacy_event -> bool + (** presence of field "flow_direction" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_flow_direction : track_event_legacy_event -> track_event_legacy_event_flow_direction -> unit + (** set field flow_direction in track_event_legacy_event *) + +val track_event_legacy_event_has_instant_event_scope : track_event_legacy_event -> bool + (** presence of field "instant_event_scope" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_instant_event_scope : track_event_legacy_event -> track_event_legacy_event_instant_event_scope -> unit + (** set field instant_event_scope in track_event_legacy_event *) + +val track_event_legacy_event_has_pid_override : track_event_legacy_event -> bool + (** presence of field "pid_override" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_pid_override : track_event_legacy_event -> int32 -> unit + (** set field pid_override in track_event_legacy_event *) + +val track_event_legacy_event_has_tid_override : track_event_legacy_event -> bool + (** presence of field "tid_override" in [track_event_legacy_event] *) + +val track_event_legacy_event_set_tid_override : track_event_legacy_event -> int32 -> unit + (** set field tid_override in track_event_legacy_event *) + +val make_track_event : + ?category_iids:int64 list -> + ?categories:string list -> + ?name_field:track_event_name_field -> + ?type_:track_event_type -> + ?track_uuid:int64 -> + ?counter_value_field:track_event_counter_value_field -> + ?extra_counter_track_uuids:int64 list -> + ?extra_counter_values:int64 list -> + ?extra_double_counter_track_uuids:int64 list -> + ?extra_double_counter_values:float list -> + ?flow_ids_old:int64 list -> + ?flow_ids:int64 list -> + ?terminating_flow_ids_old:int64 list -> + ?terminating_flow_ids:int64 list -> + ?correlation_id_field:track_event_correlation_id_field -> + ?callstack_field:track_event_callstack_field -> + ?debug_annotations:debug_annotation list -> + ?task_execution:task_execution -> + ?log_message:log_message -> + ?cc_scheduler_state:chrome_compositor_scheduler_state -> + ?chrome_user_event:chrome_user_event -> + ?chrome_keyed_service:chrome_keyed_service -> + ?chrome_legacy_ipc:chrome_legacy_ipc -> + ?chrome_histogram_sample:chrome_histogram_sample -> + ?chrome_latency_info:chrome_latency_info -> + ?chrome_frame_reporter:chrome_frame_reporter -> + ?chrome_application_state_info:chrome_application_state_info -> + ?chrome_renderer_scheduler_state:chrome_renderer_scheduler_state -> + ?chrome_window_handle_event_info:chrome_window_handle_event_info -> + ?chrome_content_settings_event_info:chrome_content_settings_event_info -> + ?chrome_active_processes:chrome_active_processes -> + ?screenshot:screenshot -> + ?source_location_field:track_event_source_location_field -> + ?chrome_message_pump:chrome_message_pump -> + ?chrome_mojo_event_info:chrome_mojo_event_info -> + ?timestamp:track_event_timestamp -> + ?thread_time:track_event_thread_time -> + ?thread_instruction_count:track_event_thread_instruction_count -> + ?legacy_event:track_event_legacy_event -> + unit -> + track_event +(** [make_track_event … ()] is a builder for type [track_event] *) + +val copy_track_event : track_event -> track_event + +val track_event_set_category_iids : track_event -> int64 list -> unit + (** set field category_iids in track_event *) + +val track_event_set_categories : track_event -> string list -> unit + (** set field categories in track_event *) + +val track_event_set_name_field : track_event -> track_event_name_field -> unit + (** set field name_field in track_event *) + +val track_event_has_type_ : track_event -> bool + (** presence of field "type_" in [track_event] *) + +val track_event_set_type_ : track_event -> track_event_type -> unit + (** set field type_ in track_event *) + +val track_event_has_track_uuid : track_event -> bool + (** presence of field "track_uuid" in [track_event] *) + +val track_event_set_track_uuid : track_event -> int64 -> unit + (** set field track_uuid in track_event *) + +val track_event_set_counter_value_field : track_event -> track_event_counter_value_field -> unit + (** set field counter_value_field in track_event *) + +val track_event_set_extra_counter_track_uuids : track_event -> int64 list -> unit + (** set field extra_counter_track_uuids in track_event *) + +val track_event_set_extra_counter_values : track_event -> int64 list -> unit + (** set field extra_counter_values in track_event *) + +val track_event_set_extra_double_counter_track_uuids : track_event -> int64 list -> unit + (** set field extra_double_counter_track_uuids in track_event *) + +val track_event_set_extra_double_counter_values : track_event -> float list -> unit + (** set field extra_double_counter_values in track_event *) + +val track_event_set_flow_ids_old : track_event -> int64 list -> unit + (** set field flow_ids_old in track_event *) + +val track_event_set_flow_ids : track_event -> int64 list -> unit + (** set field flow_ids in track_event *) + +val track_event_set_terminating_flow_ids_old : track_event -> int64 list -> unit + (** set field terminating_flow_ids_old in track_event *) + +val track_event_set_terminating_flow_ids : track_event -> int64 list -> unit + (** set field terminating_flow_ids in track_event *) + +val track_event_set_correlation_id_field : track_event -> track_event_correlation_id_field -> unit + (** set field correlation_id_field in track_event *) + +val track_event_set_callstack_field : track_event -> track_event_callstack_field -> unit + (** set field callstack_field in track_event *) + +val track_event_set_debug_annotations : track_event -> debug_annotation list -> unit + (** set field debug_annotations in track_event *) + +val track_event_set_task_execution : track_event -> task_execution -> unit + (** set field task_execution in track_event *) + +val track_event_set_log_message : track_event -> log_message -> unit + (** set field log_message in track_event *) + +val track_event_set_cc_scheduler_state : track_event -> chrome_compositor_scheduler_state -> unit + (** set field cc_scheduler_state in track_event *) + +val track_event_set_chrome_user_event : track_event -> chrome_user_event -> unit + (** set field chrome_user_event in track_event *) + +val track_event_set_chrome_keyed_service : track_event -> chrome_keyed_service -> unit + (** set field chrome_keyed_service in track_event *) + +val track_event_set_chrome_legacy_ipc : track_event -> chrome_legacy_ipc -> unit + (** set field chrome_legacy_ipc in track_event *) + +val track_event_set_chrome_histogram_sample : track_event -> chrome_histogram_sample -> unit + (** set field chrome_histogram_sample in track_event *) + +val track_event_set_chrome_latency_info : track_event -> chrome_latency_info -> unit + (** set field chrome_latency_info in track_event *) + +val track_event_set_chrome_frame_reporter : track_event -> chrome_frame_reporter -> unit + (** set field chrome_frame_reporter in track_event *) + +val track_event_set_chrome_application_state_info : track_event -> chrome_application_state_info -> unit + (** set field chrome_application_state_info in track_event *) + +val track_event_set_chrome_renderer_scheduler_state : track_event -> chrome_renderer_scheduler_state -> unit + (** set field chrome_renderer_scheduler_state in track_event *) + +val track_event_set_chrome_window_handle_event_info : track_event -> chrome_window_handle_event_info -> unit + (** set field chrome_window_handle_event_info in track_event *) + +val track_event_set_chrome_content_settings_event_info : track_event -> chrome_content_settings_event_info -> unit + (** set field chrome_content_settings_event_info in track_event *) + +val track_event_set_chrome_active_processes : track_event -> chrome_active_processes -> unit + (** set field chrome_active_processes in track_event *) + +val track_event_set_screenshot : track_event -> screenshot -> unit + (** set field screenshot in track_event *) + +val track_event_set_source_location_field : track_event -> track_event_source_location_field -> unit + (** set field source_location_field in track_event *) + +val track_event_set_chrome_message_pump : track_event -> chrome_message_pump -> unit + (** set field chrome_message_pump in track_event *) + +val track_event_set_chrome_mojo_event_info : track_event -> chrome_mojo_event_info -> unit + (** set field chrome_mojo_event_info in track_event *) + +val track_event_set_timestamp : track_event -> track_event_timestamp -> unit + (** set field timestamp in track_event *) + +val track_event_set_thread_time : track_event -> track_event_thread_time -> unit + (** set field thread_time in track_event *) + +val track_event_set_thread_instruction_count : track_event -> track_event_thread_instruction_count -> unit + (** set field thread_instruction_count in track_event *) + +val track_event_set_legacy_event : track_event -> track_event_legacy_event -> unit + (** set field legacy_event in track_event *) + +val make_track_event_defaults : + ?track_uuid:int64 -> + ?extra_counter_track_uuids:int64 list -> + ?extra_double_counter_track_uuids:int64 list -> + unit -> + track_event_defaults +(** [make_track_event_defaults … ()] is a builder for type [track_event_defaults] *) + +val copy_track_event_defaults : track_event_defaults -> track_event_defaults + +val track_event_defaults_has_track_uuid : track_event_defaults -> bool + (** presence of field "track_uuid" in [track_event_defaults] *) + +val track_event_defaults_set_track_uuid : track_event_defaults -> int64 -> unit + (** set field track_uuid in track_event_defaults *) + +val track_event_defaults_set_extra_counter_track_uuids : track_event_defaults -> int64 list -> unit + (** set field extra_counter_track_uuids in track_event_defaults *) + +val track_event_defaults_set_extra_double_counter_track_uuids : track_event_defaults -> int64 list -> unit + (** set field extra_double_counter_track_uuids in track_event_defaults *) + +val make_event_category : + ?iid:int64 -> + ?name:string -> + unit -> + event_category +(** [make_event_category … ()] is a builder for type [event_category] *) + +val copy_event_category : event_category -> event_category + +val event_category_has_iid : event_category -> bool + (** presence of field "iid" in [event_category] *) + +val event_category_set_iid : event_category -> int64 -> unit + (** set field iid in event_category *) + +val event_category_has_name : event_category -> bool + (** presence of field "name" in [event_category] *) + +val event_category_set_name : event_category -> string -> unit + (** set field name in event_category *) + +val make_event_name : + ?iid:int64 -> + ?name:string -> + unit -> + event_name +(** [make_event_name … ()] is a builder for type [event_name] *) + +val copy_event_name : event_name -> event_name + +val event_name_has_iid : event_name -> bool + (** presence of field "iid" in [event_name] *) + +val event_name_set_iid : event_name -> int64 -> unit + (** set field iid in event_name *) + +val event_name_has_name : event_name -> bool + (** presence of field "name" in [event_name] *) + +val event_name_set_name : event_name -> string -> unit + (** set field name in event_name *) + +val make_interned_data : + ?event_categories:event_category list -> + ?event_names:event_name list -> + ?debug_annotation_names:debug_annotation_name list -> + ?debug_annotation_value_type_names:debug_annotation_value_type_name list -> + ?source_locations:source_location list -> + ?unsymbolized_source_locations:unsymbolized_source_location list -> + ?log_message_body:log_message_body list -> + ?histogram_names:histogram_name list -> + ?build_ids:interned_string list -> + ?mapping_paths:interned_string list -> + ?source_paths:interned_string list -> + ?function_names:interned_string list -> + ?mappings:mapping list -> + ?frames:frame list -> + ?callstacks:callstack list -> + ?vulkan_memory_keys:interned_string list -> + ?graphics_contexts:interned_graphics_context list -> + ?gpu_specifications:interned_gpu_render_stage_specification list -> + ?kernel_symbols:interned_string list -> + ?debug_annotation_string_values:interned_string list -> + ?packet_context:network_packet_context list -> + ?v8_js_function_name:interned_v8_string list -> + ?v8_js_function:interned_v8_js_function list -> + ?v8_js_script:interned_v8_js_script list -> + ?v8_wasm_script:interned_v8_wasm_script list -> + ?v8_isolate:interned_v8_isolate list -> + ?protolog_string_args:interned_string list -> + ?protolog_stacktrace:interned_string list -> + ?viewcapture_package_name:interned_string list -> + ?viewcapture_window_name:interned_string list -> + ?viewcapture_view_id:interned_string list -> + ?viewcapture_class_name:interned_string list -> + ?app_wakelock_info:app_wakelock_info list -> + ?correlation_id_str:interned_string list -> + unit -> + interned_data +(** [make_interned_data … ()] is a builder for type [interned_data] *) + +val copy_interned_data : interned_data -> interned_data + +val interned_data_set_event_categories : interned_data -> event_category list -> unit + (** set field event_categories in interned_data *) + +val interned_data_set_event_names : interned_data -> event_name list -> unit + (** set field event_names in interned_data *) + +val interned_data_set_debug_annotation_names : interned_data -> debug_annotation_name list -> unit + (** set field debug_annotation_names in interned_data *) + +val interned_data_set_debug_annotation_value_type_names : interned_data -> debug_annotation_value_type_name list -> unit + (** set field debug_annotation_value_type_names in interned_data *) + +val interned_data_set_source_locations : interned_data -> source_location list -> unit + (** set field source_locations in interned_data *) + +val interned_data_set_unsymbolized_source_locations : interned_data -> unsymbolized_source_location list -> unit + (** set field unsymbolized_source_locations in interned_data *) + +val interned_data_set_log_message_body : interned_data -> log_message_body list -> unit + (** set field log_message_body in interned_data *) + +val interned_data_set_histogram_names : interned_data -> histogram_name list -> unit + (** set field histogram_names in interned_data *) + +val interned_data_set_build_ids : interned_data -> interned_string list -> unit + (** set field build_ids in interned_data *) + +val interned_data_set_mapping_paths : interned_data -> interned_string list -> unit + (** set field mapping_paths in interned_data *) + +val interned_data_set_source_paths : interned_data -> interned_string list -> unit + (** set field source_paths in interned_data *) + +val interned_data_set_function_names : interned_data -> interned_string list -> unit + (** set field function_names in interned_data *) + +val interned_data_set_mappings : interned_data -> mapping list -> unit + (** set field mappings in interned_data *) + +val interned_data_set_frames : interned_data -> frame list -> unit + (** set field frames in interned_data *) + +val interned_data_set_callstacks : interned_data -> callstack list -> unit + (** set field callstacks in interned_data *) + +val interned_data_set_vulkan_memory_keys : interned_data -> interned_string list -> unit + (** set field vulkan_memory_keys in interned_data *) + +val interned_data_set_graphics_contexts : interned_data -> interned_graphics_context list -> unit + (** set field graphics_contexts in interned_data *) + +val interned_data_set_gpu_specifications : interned_data -> interned_gpu_render_stage_specification list -> unit + (** set field gpu_specifications in interned_data *) + +val interned_data_set_kernel_symbols : interned_data -> interned_string list -> unit + (** set field kernel_symbols in interned_data *) + +val interned_data_set_debug_annotation_string_values : interned_data -> interned_string list -> unit + (** set field debug_annotation_string_values in interned_data *) + +val interned_data_set_packet_context : interned_data -> network_packet_context list -> unit + (** set field packet_context in interned_data *) + +val interned_data_set_v8_js_function_name : interned_data -> interned_v8_string list -> unit + (** set field v8_js_function_name in interned_data *) + +val interned_data_set_v8_js_function : interned_data -> interned_v8_js_function list -> unit + (** set field v8_js_function in interned_data *) + +val interned_data_set_v8_js_script : interned_data -> interned_v8_js_script list -> unit + (** set field v8_js_script in interned_data *) + +val interned_data_set_v8_wasm_script : interned_data -> interned_v8_wasm_script list -> unit + (** set field v8_wasm_script in interned_data *) + +val interned_data_set_v8_isolate : interned_data -> interned_v8_isolate list -> unit + (** set field v8_isolate in interned_data *) + +val interned_data_set_protolog_string_args : interned_data -> interned_string list -> unit + (** set field protolog_string_args in interned_data *) + +val interned_data_set_protolog_stacktrace : interned_data -> interned_string list -> unit + (** set field protolog_stacktrace in interned_data *) + +val interned_data_set_viewcapture_package_name : interned_data -> interned_string list -> unit + (** set field viewcapture_package_name in interned_data *) + +val interned_data_set_viewcapture_window_name : interned_data -> interned_string list -> unit + (** set field viewcapture_window_name in interned_data *) + +val interned_data_set_viewcapture_view_id : interned_data -> interned_string list -> unit + (** set field viewcapture_view_id in interned_data *) + +val interned_data_set_viewcapture_class_name : interned_data -> interned_string list -> unit + (** set field viewcapture_class_name in interned_data *) + +val interned_data_set_app_wakelock_info : interned_data -> app_wakelock_info list -> unit + (** set field app_wakelock_info in interned_data *) + +val interned_data_set_correlation_id_str : interned_data -> interned_string list -> unit + (** set field correlation_id_str in interned_data *) + +val make_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry : + ?name:string -> + ?units:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units -> + ?value_uint64:int64 -> + ?value_string:string -> + unit -> + memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry +(** [make_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry … ()] is a builder for type [memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry] *) + +val copy_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry + +val memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_name : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> bool + (** presence of field "name" in [memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry] *) + +val memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_name : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> string -> unit + (** set field name in memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry *) + +val memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_units : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> bool + (** presence of field "units" in [memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry] *) + +val memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_units : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units -> unit + (** set field units in memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry *) + +val memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_value_uint64 : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> bool + (** presence of field "value_uint64" in [memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry] *) + +val memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_value_uint64 : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> int64 -> unit + (** set field value_uint64 in memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry *) + +val memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_has_value_string : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> bool + (** presence of field "value_string" in [memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry] *) + +val memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_set_value_string : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> string -> unit + (** set field value_string in memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry *) + +val make_memory_tracker_snapshot_process_snapshot_memory_node : + ?id:int64 -> + ?absolute_name:string -> + ?weak:bool -> + ?size_bytes:int64 -> + ?entries:memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry list -> + unit -> + memory_tracker_snapshot_process_snapshot_memory_node +(** [make_memory_tracker_snapshot_process_snapshot_memory_node … ()] is a builder for type [memory_tracker_snapshot_process_snapshot_memory_node] *) + +val copy_memory_tracker_snapshot_process_snapshot_memory_node : memory_tracker_snapshot_process_snapshot_memory_node -> memory_tracker_snapshot_process_snapshot_memory_node + +val memory_tracker_snapshot_process_snapshot_memory_node_has_id : memory_tracker_snapshot_process_snapshot_memory_node -> bool + (** presence of field "id" in [memory_tracker_snapshot_process_snapshot_memory_node] *) + +val memory_tracker_snapshot_process_snapshot_memory_node_set_id : memory_tracker_snapshot_process_snapshot_memory_node -> int64 -> unit + (** set field id in memory_tracker_snapshot_process_snapshot_memory_node *) + +val memory_tracker_snapshot_process_snapshot_memory_node_has_absolute_name : memory_tracker_snapshot_process_snapshot_memory_node -> bool + (** presence of field "absolute_name" in [memory_tracker_snapshot_process_snapshot_memory_node] *) + +val memory_tracker_snapshot_process_snapshot_memory_node_set_absolute_name : memory_tracker_snapshot_process_snapshot_memory_node -> string -> unit + (** set field absolute_name in memory_tracker_snapshot_process_snapshot_memory_node *) + +val memory_tracker_snapshot_process_snapshot_memory_node_has_weak : memory_tracker_snapshot_process_snapshot_memory_node -> bool + (** presence of field "weak" in [memory_tracker_snapshot_process_snapshot_memory_node] *) + +val memory_tracker_snapshot_process_snapshot_memory_node_set_weak : memory_tracker_snapshot_process_snapshot_memory_node -> bool -> unit + (** set field weak in memory_tracker_snapshot_process_snapshot_memory_node *) + +val memory_tracker_snapshot_process_snapshot_memory_node_has_size_bytes : memory_tracker_snapshot_process_snapshot_memory_node -> bool + (** presence of field "size_bytes" in [memory_tracker_snapshot_process_snapshot_memory_node] *) + +val memory_tracker_snapshot_process_snapshot_memory_node_set_size_bytes : memory_tracker_snapshot_process_snapshot_memory_node -> int64 -> unit + (** set field size_bytes in memory_tracker_snapshot_process_snapshot_memory_node *) + +val memory_tracker_snapshot_process_snapshot_memory_node_set_entries : memory_tracker_snapshot_process_snapshot_memory_node -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry list -> unit + (** set field entries in memory_tracker_snapshot_process_snapshot_memory_node *) + +val make_memory_tracker_snapshot_process_snapshot_memory_edge : + ?source_id:int64 -> + ?target_id:int64 -> + ?importance:int32 -> + ?overridable:bool -> + unit -> + memory_tracker_snapshot_process_snapshot_memory_edge +(** [make_memory_tracker_snapshot_process_snapshot_memory_edge … ()] is a builder for type [memory_tracker_snapshot_process_snapshot_memory_edge] *) + +val copy_memory_tracker_snapshot_process_snapshot_memory_edge : memory_tracker_snapshot_process_snapshot_memory_edge -> memory_tracker_snapshot_process_snapshot_memory_edge + +val memory_tracker_snapshot_process_snapshot_memory_edge_has_source_id : memory_tracker_snapshot_process_snapshot_memory_edge -> bool + (** presence of field "source_id" in [memory_tracker_snapshot_process_snapshot_memory_edge] *) + +val memory_tracker_snapshot_process_snapshot_memory_edge_set_source_id : memory_tracker_snapshot_process_snapshot_memory_edge -> int64 -> unit + (** set field source_id in memory_tracker_snapshot_process_snapshot_memory_edge *) + +val memory_tracker_snapshot_process_snapshot_memory_edge_has_target_id : memory_tracker_snapshot_process_snapshot_memory_edge -> bool + (** presence of field "target_id" in [memory_tracker_snapshot_process_snapshot_memory_edge] *) + +val memory_tracker_snapshot_process_snapshot_memory_edge_set_target_id : memory_tracker_snapshot_process_snapshot_memory_edge -> int64 -> unit + (** set field target_id in memory_tracker_snapshot_process_snapshot_memory_edge *) + +val memory_tracker_snapshot_process_snapshot_memory_edge_has_importance : memory_tracker_snapshot_process_snapshot_memory_edge -> bool + (** presence of field "importance" in [memory_tracker_snapshot_process_snapshot_memory_edge] *) + +val memory_tracker_snapshot_process_snapshot_memory_edge_set_importance : memory_tracker_snapshot_process_snapshot_memory_edge -> int32 -> unit + (** set field importance in memory_tracker_snapshot_process_snapshot_memory_edge *) + +val memory_tracker_snapshot_process_snapshot_memory_edge_has_overridable : memory_tracker_snapshot_process_snapshot_memory_edge -> bool + (** presence of field "overridable" in [memory_tracker_snapshot_process_snapshot_memory_edge] *) + +val memory_tracker_snapshot_process_snapshot_memory_edge_set_overridable : memory_tracker_snapshot_process_snapshot_memory_edge -> bool -> unit + (** set field overridable in memory_tracker_snapshot_process_snapshot_memory_edge *) + +val make_memory_tracker_snapshot_process_snapshot : + ?pid:int32 -> + ?allocator_dumps:memory_tracker_snapshot_process_snapshot_memory_node list -> + ?memory_edges:memory_tracker_snapshot_process_snapshot_memory_edge list -> + unit -> + memory_tracker_snapshot_process_snapshot +(** [make_memory_tracker_snapshot_process_snapshot … ()] is a builder for type [memory_tracker_snapshot_process_snapshot] *) + +val copy_memory_tracker_snapshot_process_snapshot : memory_tracker_snapshot_process_snapshot -> memory_tracker_snapshot_process_snapshot + +val memory_tracker_snapshot_process_snapshot_has_pid : memory_tracker_snapshot_process_snapshot -> bool + (** presence of field "pid" in [memory_tracker_snapshot_process_snapshot] *) + +val memory_tracker_snapshot_process_snapshot_set_pid : memory_tracker_snapshot_process_snapshot -> int32 -> unit + (** set field pid in memory_tracker_snapshot_process_snapshot *) + +val memory_tracker_snapshot_process_snapshot_set_allocator_dumps : memory_tracker_snapshot_process_snapshot -> memory_tracker_snapshot_process_snapshot_memory_node list -> unit + (** set field allocator_dumps in memory_tracker_snapshot_process_snapshot *) + +val memory_tracker_snapshot_process_snapshot_set_memory_edges : memory_tracker_snapshot_process_snapshot -> memory_tracker_snapshot_process_snapshot_memory_edge list -> unit + (** set field memory_edges in memory_tracker_snapshot_process_snapshot *) + +val make_memory_tracker_snapshot : + ?global_dump_id:int64 -> + ?level_of_detail:memory_tracker_snapshot_level_of_detail -> + ?process_memory_dumps:memory_tracker_snapshot_process_snapshot list -> + unit -> + memory_tracker_snapshot +(** [make_memory_tracker_snapshot … ()] is a builder for type [memory_tracker_snapshot] *) + +val copy_memory_tracker_snapshot : memory_tracker_snapshot -> memory_tracker_snapshot + +val memory_tracker_snapshot_has_global_dump_id : memory_tracker_snapshot -> bool + (** presence of field "global_dump_id" in [memory_tracker_snapshot] *) + +val memory_tracker_snapshot_set_global_dump_id : memory_tracker_snapshot -> int64 -> unit + (** set field global_dump_id in memory_tracker_snapshot *) + +val memory_tracker_snapshot_has_level_of_detail : memory_tracker_snapshot -> bool + (** presence of field "level_of_detail" in [memory_tracker_snapshot] *) + +val memory_tracker_snapshot_set_level_of_detail : memory_tracker_snapshot -> memory_tracker_snapshot_level_of_detail -> unit + (** set field level_of_detail in memory_tracker_snapshot *) + +val memory_tracker_snapshot_set_process_memory_dumps : memory_tracker_snapshot -> memory_tracker_snapshot_process_snapshot list -> unit + (** set field process_memory_dumps in memory_tracker_snapshot *) + +val make_perfetto_metatrace_arg : + ?key_or_interned_key:perfetto_metatrace_arg_key_or_interned_key -> + ?value_or_interned_value:perfetto_metatrace_arg_value_or_interned_value -> + unit -> + perfetto_metatrace_arg +(** [make_perfetto_metatrace_arg … ()] is a builder for type [perfetto_metatrace_arg] *) + +val copy_perfetto_metatrace_arg : perfetto_metatrace_arg -> perfetto_metatrace_arg + +val perfetto_metatrace_arg_set_key_or_interned_key : perfetto_metatrace_arg -> perfetto_metatrace_arg_key_or_interned_key -> unit + (** set field key_or_interned_key in perfetto_metatrace_arg *) + +val perfetto_metatrace_arg_set_value_or_interned_value : perfetto_metatrace_arg -> perfetto_metatrace_arg_value_or_interned_value -> unit + (** set field value_or_interned_value in perfetto_metatrace_arg *) + +val make_perfetto_metatrace_interned_string : + ?iid:int64 -> + ?value:string -> + unit -> + perfetto_metatrace_interned_string +(** [make_perfetto_metatrace_interned_string … ()] is a builder for type [perfetto_metatrace_interned_string] *) + +val copy_perfetto_metatrace_interned_string : perfetto_metatrace_interned_string -> perfetto_metatrace_interned_string + +val perfetto_metatrace_interned_string_has_iid : perfetto_metatrace_interned_string -> bool + (** presence of field "iid" in [perfetto_metatrace_interned_string] *) + +val perfetto_metatrace_interned_string_set_iid : perfetto_metatrace_interned_string -> int64 -> unit + (** set field iid in perfetto_metatrace_interned_string *) + +val perfetto_metatrace_interned_string_has_value : perfetto_metatrace_interned_string -> bool + (** presence of field "value" in [perfetto_metatrace_interned_string] *) + +val perfetto_metatrace_interned_string_set_value : perfetto_metatrace_interned_string -> string -> unit + (** set field value in perfetto_metatrace_interned_string *) + +val make_perfetto_metatrace : + ?record_type:perfetto_metatrace_record_type -> + ?event_duration_ns:int64 -> + ?counter_value:int32 -> + ?thread_id:int32 -> + ?has_overruns:bool -> + ?args:perfetto_metatrace_arg list -> + ?interned_strings:perfetto_metatrace_interned_string list -> + unit -> + perfetto_metatrace +(** [make_perfetto_metatrace … ()] is a builder for type [perfetto_metatrace] *) + +val copy_perfetto_metatrace : perfetto_metatrace -> perfetto_metatrace + +val perfetto_metatrace_set_record_type : perfetto_metatrace -> perfetto_metatrace_record_type -> unit + (** set field record_type in perfetto_metatrace *) + +val perfetto_metatrace_has_event_duration_ns : perfetto_metatrace -> bool + (** presence of field "event_duration_ns" in [perfetto_metatrace] *) + +val perfetto_metatrace_set_event_duration_ns : perfetto_metatrace -> int64 -> unit + (** set field event_duration_ns in perfetto_metatrace *) + +val perfetto_metatrace_has_counter_value : perfetto_metatrace -> bool + (** presence of field "counter_value" in [perfetto_metatrace] *) + +val perfetto_metatrace_set_counter_value : perfetto_metatrace -> int32 -> unit + (** set field counter_value in perfetto_metatrace *) + +val perfetto_metatrace_has_thread_id : perfetto_metatrace -> bool + (** presence of field "thread_id" in [perfetto_metatrace] *) + +val perfetto_metatrace_set_thread_id : perfetto_metatrace -> int32 -> unit + (** set field thread_id in perfetto_metatrace *) + +val perfetto_metatrace_has_has_overruns : perfetto_metatrace -> bool + (** presence of field "has_overruns" in [perfetto_metatrace] *) + +val perfetto_metatrace_set_has_overruns : perfetto_metatrace -> bool -> unit + (** set field has_overruns in perfetto_metatrace *) + +val perfetto_metatrace_set_args : perfetto_metatrace -> perfetto_metatrace_arg list -> unit + (** set field args in perfetto_metatrace *) + +val perfetto_metatrace_set_interned_strings : perfetto_metatrace -> perfetto_metatrace_interned_string list -> unit + (** set field interned_strings in perfetto_metatrace *) + +val make_tracing_service_event_data_sources_data_source : + ?producer_name:string -> + ?data_source_name:string -> + unit -> + tracing_service_event_data_sources_data_source +(** [make_tracing_service_event_data_sources_data_source … ()] is a builder for type [tracing_service_event_data_sources_data_source] *) + +val copy_tracing_service_event_data_sources_data_source : tracing_service_event_data_sources_data_source -> tracing_service_event_data_sources_data_source + +val tracing_service_event_data_sources_data_source_has_producer_name : tracing_service_event_data_sources_data_source -> bool + (** presence of field "producer_name" in [tracing_service_event_data_sources_data_source] *) + +val tracing_service_event_data_sources_data_source_set_producer_name : tracing_service_event_data_sources_data_source -> string -> unit + (** set field producer_name in tracing_service_event_data_sources_data_source *) + +val tracing_service_event_data_sources_data_source_has_data_source_name : tracing_service_event_data_sources_data_source -> bool + (** presence of field "data_source_name" in [tracing_service_event_data_sources_data_source] *) + +val tracing_service_event_data_sources_data_source_set_data_source_name : tracing_service_event_data_sources_data_source -> string -> unit + (** set field data_source_name in tracing_service_event_data_sources_data_source *) + +val make_tracing_service_event_data_sources : + ?data_source:tracing_service_event_data_sources_data_source list -> + unit -> + tracing_service_event_data_sources +(** [make_tracing_service_event_data_sources … ()] is a builder for type [tracing_service_event_data_sources] *) + +val copy_tracing_service_event_data_sources : tracing_service_event_data_sources -> tracing_service_event_data_sources + +val tracing_service_event_data_sources_set_data_source : tracing_service_event_data_sources -> tracing_service_event_data_sources_data_source list -> unit + (** set field data_source in tracing_service_event_data_sources *) + +val make_android_energy_consumer : + ?energy_consumer_id:int32 -> + ?ordinal:int32 -> + ?type_:string -> + ?name:string -> + unit -> + android_energy_consumer +(** [make_android_energy_consumer … ()] is a builder for type [android_energy_consumer] *) + +val copy_android_energy_consumer : android_energy_consumer -> android_energy_consumer + +val android_energy_consumer_has_energy_consumer_id : android_energy_consumer -> bool + (** presence of field "energy_consumer_id" in [android_energy_consumer] *) + +val android_energy_consumer_set_energy_consumer_id : android_energy_consumer -> int32 -> unit + (** set field energy_consumer_id in android_energy_consumer *) + +val android_energy_consumer_has_ordinal : android_energy_consumer -> bool + (** presence of field "ordinal" in [android_energy_consumer] *) + +val android_energy_consumer_set_ordinal : android_energy_consumer -> int32 -> unit + (** set field ordinal in android_energy_consumer *) + +val android_energy_consumer_has_type_ : android_energy_consumer -> bool + (** presence of field "type_" in [android_energy_consumer] *) + +val android_energy_consumer_set_type_ : android_energy_consumer -> string -> unit + (** set field type_ in android_energy_consumer *) + +val android_energy_consumer_has_name : android_energy_consumer -> bool + (** presence of field "name" in [android_energy_consumer] *) + +val android_energy_consumer_set_name : android_energy_consumer -> string -> unit + (** set field name in android_energy_consumer *) + +val make_android_energy_consumer_descriptor : + ?energy_consumers:android_energy_consumer list -> + unit -> + android_energy_consumer_descriptor +(** [make_android_energy_consumer_descriptor … ()] is a builder for type [android_energy_consumer_descriptor] *) + +val copy_android_energy_consumer_descriptor : android_energy_consumer_descriptor -> android_energy_consumer_descriptor + +val android_energy_consumer_descriptor_set_energy_consumers : android_energy_consumer_descriptor -> android_energy_consumer list -> unit + (** set field energy_consumers in android_energy_consumer_descriptor *) + +val make_android_energy_estimation_breakdown_energy_uid_breakdown : + ?uid:int32 -> + ?energy_uws:int64 -> + unit -> + android_energy_estimation_breakdown_energy_uid_breakdown +(** [make_android_energy_estimation_breakdown_energy_uid_breakdown … ()] is a builder for type [android_energy_estimation_breakdown_energy_uid_breakdown] *) + +val copy_android_energy_estimation_breakdown_energy_uid_breakdown : android_energy_estimation_breakdown_energy_uid_breakdown -> android_energy_estimation_breakdown_energy_uid_breakdown + +val android_energy_estimation_breakdown_energy_uid_breakdown_has_uid : android_energy_estimation_breakdown_energy_uid_breakdown -> bool + (** presence of field "uid" in [android_energy_estimation_breakdown_energy_uid_breakdown] *) + +val android_energy_estimation_breakdown_energy_uid_breakdown_set_uid : android_energy_estimation_breakdown_energy_uid_breakdown -> int32 -> unit + (** set field uid in android_energy_estimation_breakdown_energy_uid_breakdown *) + +val android_energy_estimation_breakdown_energy_uid_breakdown_has_energy_uws : android_energy_estimation_breakdown_energy_uid_breakdown -> bool + (** presence of field "energy_uws" in [android_energy_estimation_breakdown_energy_uid_breakdown] *) + +val android_energy_estimation_breakdown_energy_uid_breakdown_set_energy_uws : android_energy_estimation_breakdown_energy_uid_breakdown -> int64 -> unit + (** set field energy_uws in android_energy_estimation_breakdown_energy_uid_breakdown *) + +val make_android_energy_estimation_breakdown : + ?energy_consumer_descriptor:android_energy_consumer_descriptor -> + ?energy_consumer_id:int32 -> + ?energy_uws:int64 -> + ?per_uid_breakdown:android_energy_estimation_breakdown_energy_uid_breakdown list -> + unit -> + android_energy_estimation_breakdown +(** [make_android_energy_estimation_breakdown … ()] is a builder for type [android_energy_estimation_breakdown] *) + +val copy_android_energy_estimation_breakdown : android_energy_estimation_breakdown -> android_energy_estimation_breakdown + +val android_energy_estimation_breakdown_set_energy_consumer_descriptor : android_energy_estimation_breakdown -> android_energy_consumer_descriptor -> unit + (** set field energy_consumer_descriptor in android_energy_estimation_breakdown *) + +val android_energy_estimation_breakdown_has_energy_consumer_id : android_energy_estimation_breakdown -> bool + (** presence of field "energy_consumer_id" in [android_energy_estimation_breakdown] *) + +val android_energy_estimation_breakdown_set_energy_consumer_id : android_energy_estimation_breakdown -> int32 -> unit + (** set field energy_consumer_id in android_energy_estimation_breakdown *) + +val android_energy_estimation_breakdown_has_energy_uws : android_energy_estimation_breakdown -> bool + (** presence of field "energy_uws" in [android_energy_estimation_breakdown] *) + +val android_energy_estimation_breakdown_set_energy_uws : android_energy_estimation_breakdown -> int64 -> unit + (** set field energy_uws in android_energy_estimation_breakdown *) + +val android_energy_estimation_breakdown_set_per_uid_breakdown : android_energy_estimation_breakdown -> android_energy_estimation_breakdown_energy_uid_breakdown list -> unit + (** set field per_uid_breakdown in android_energy_estimation_breakdown *) + +val make_entity_state_residency_power_entity_state : + ?entity_index:int32 -> + ?state_index:int32 -> + ?entity_name:string -> + ?state_name:string -> + unit -> + entity_state_residency_power_entity_state +(** [make_entity_state_residency_power_entity_state … ()] is a builder for type [entity_state_residency_power_entity_state] *) + +val copy_entity_state_residency_power_entity_state : entity_state_residency_power_entity_state -> entity_state_residency_power_entity_state + +val entity_state_residency_power_entity_state_has_entity_index : entity_state_residency_power_entity_state -> bool + (** presence of field "entity_index" in [entity_state_residency_power_entity_state] *) + +val entity_state_residency_power_entity_state_set_entity_index : entity_state_residency_power_entity_state -> int32 -> unit + (** set field entity_index in entity_state_residency_power_entity_state *) + +val entity_state_residency_power_entity_state_has_state_index : entity_state_residency_power_entity_state -> bool + (** presence of field "state_index" in [entity_state_residency_power_entity_state] *) + +val entity_state_residency_power_entity_state_set_state_index : entity_state_residency_power_entity_state -> int32 -> unit + (** set field state_index in entity_state_residency_power_entity_state *) + +val entity_state_residency_power_entity_state_has_entity_name : entity_state_residency_power_entity_state -> bool + (** presence of field "entity_name" in [entity_state_residency_power_entity_state] *) + +val entity_state_residency_power_entity_state_set_entity_name : entity_state_residency_power_entity_state -> string -> unit + (** set field entity_name in entity_state_residency_power_entity_state *) + +val entity_state_residency_power_entity_state_has_state_name : entity_state_residency_power_entity_state -> bool + (** presence of field "state_name" in [entity_state_residency_power_entity_state] *) + +val entity_state_residency_power_entity_state_set_state_name : entity_state_residency_power_entity_state -> string -> unit + (** set field state_name in entity_state_residency_power_entity_state *) + +val make_entity_state_residency_state_residency : + ?entity_index:int32 -> + ?state_index:int32 -> + ?total_time_in_state_ms:int64 -> + ?total_state_entry_count:int64 -> + ?last_entry_timestamp_ms:int64 -> + unit -> + entity_state_residency_state_residency +(** [make_entity_state_residency_state_residency … ()] is a builder for type [entity_state_residency_state_residency] *) + +val copy_entity_state_residency_state_residency : entity_state_residency_state_residency -> entity_state_residency_state_residency + +val entity_state_residency_state_residency_has_entity_index : entity_state_residency_state_residency -> bool + (** presence of field "entity_index" in [entity_state_residency_state_residency] *) + +val entity_state_residency_state_residency_set_entity_index : entity_state_residency_state_residency -> int32 -> unit + (** set field entity_index in entity_state_residency_state_residency *) + +val entity_state_residency_state_residency_has_state_index : entity_state_residency_state_residency -> bool + (** presence of field "state_index" in [entity_state_residency_state_residency] *) + +val entity_state_residency_state_residency_set_state_index : entity_state_residency_state_residency -> int32 -> unit + (** set field state_index in entity_state_residency_state_residency *) + +val entity_state_residency_state_residency_has_total_time_in_state_ms : entity_state_residency_state_residency -> bool + (** presence of field "total_time_in_state_ms" in [entity_state_residency_state_residency] *) + +val entity_state_residency_state_residency_set_total_time_in_state_ms : entity_state_residency_state_residency -> int64 -> unit + (** set field total_time_in_state_ms in entity_state_residency_state_residency *) + +val entity_state_residency_state_residency_has_total_state_entry_count : entity_state_residency_state_residency -> bool + (** presence of field "total_state_entry_count" in [entity_state_residency_state_residency] *) + +val entity_state_residency_state_residency_set_total_state_entry_count : entity_state_residency_state_residency -> int64 -> unit + (** set field total_state_entry_count in entity_state_residency_state_residency *) + +val entity_state_residency_state_residency_has_last_entry_timestamp_ms : entity_state_residency_state_residency -> bool + (** presence of field "last_entry_timestamp_ms" in [entity_state_residency_state_residency] *) + +val entity_state_residency_state_residency_set_last_entry_timestamp_ms : entity_state_residency_state_residency -> int64 -> unit + (** set field last_entry_timestamp_ms in entity_state_residency_state_residency *) + +val make_entity_state_residency : + ?power_entity_state:entity_state_residency_power_entity_state list -> + ?residency:entity_state_residency_state_residency list -> + unit -> + entity_state_residency +(** [make_entity_state_residency … ()] is a builder for type [entity_state_residency] *) + +val copy_entity_state_residency : entity_state_residency -> entity_state_residency + +val entity_state_residency_set_power_entity_state : entity_state_residency -> entity_state_residency_power_entity_state list -> unit + (** set field power_entity_state in entity_state_residency *) + +val entity_state_residency_set_residency : entity_state_residency -> entity_state_residency_state_residency list -> unit + (** set field residency in entity_state_residency *) + +val make_battery_counters : + ?charge_counter_uah:int64 -> + ?capacity_percent:float -> + ?current_ua:int64 -> + ?current_avg_ua:int64 -> + ?name:string -> + ?energy_counter_uwh:int64 -> + ?voltage_uv:int64 -> + unit -> + battery_counters +(** [make_battery_counters … ()] is a builder for type [battery_counters] *) + +val copy_battery_counters : battery_counters -> battery_counters + +val battery_counters_has_charge_counter_uah : battery_counters -> bool + (** presence of field "charge_counter_uah" in [battery_counters] *) + +val battery_counters_set_charge_counter_uah : battery_counters -> int64 -> unit + (** set field charge_counter_uah in battery_counters *) + +val battery_counters_has_capacity_percent : battery_counters -> bool + (** presence of field "capacity_percent" in [battery_counters] *) + +val battery_counters_set_capacity_percent : battery_counters -> float -> unit + (** set field capacity_percent in battery_counters *) + +val battery_counters_has_current_ua : battery_counters -> bool + (** presence of field "current_ua" in [battery_counters] *) + +val battery_counters_set_current_ua : battery_counters -> int64 -> unit + (** set field current_ua in battery_counters *) + +val battery_counters_has_current_avg_ua : battery_counters -> bool + (** presence of field "current_avg_ua" in [battery_counters] *) + +val battery_counters_set_current_avg_ua : battery_counters -> int64 -> unit + (** set field current_avg_ua in battery_counters *) + +val battery_counters_has_name : battery_counters -> bool + (** presence of field "name" in [battery_counters] *) + +val battery_counters_set_name : battery_counters -> string -> unit + (** set field name in battery_counters *) + +val battery_counters_has_energy_counter_uwh : battery_counters -> bool + (** presence of field "energy_counter_uwh" in [battery_counters] *) + +val battery_counters_set_energy_counter_uwh : battery_counters -> int64 -> unit + (** set field energy_counter_uwh in battery_counters *) + +val battery_counters_has_voltage_uv : battery_counters -> bool + (** presence of field "voltage_uv" in [battery_counters] *) + +val battery_counters_set_voltage_uv : battery_counters -> int64 -> unit + (** set field voltage_uv in battery_counters *) + +val make_power_rails_rail_descriptor : + ?index:int32 -> + ?rail_name:string -> + ?subsys_name:string -> + ?sampling_rate:int32 -> + unit -> + power_rails_rail_descriptor +(** [make_power_rails_rail_descriptor … ()] is a builder for type [power_rails_rail_descriptor] *) + +val copy_power_rails_rail_descriptor : power_rails_rail_descriptor -> power_rails_rail_descriptor + +val power_rails_rail_descriptor_has_index : power_rails_rail_descriptor -> bool + (** presence of field "index" in [power_rails_rail_descriptor] *) + +val power_rails_rail_descriptor_set_index : power_rails_rail_descriptor -> int32 -> unit + (** set field index in power_rails_rail_descriptor *) + +val power_rails_rail_descriptor_has_rail_name : power_rails_rail_descriptor -> bool + (** presence of field "rail_name" in [power_rails_rail_descriptor] *) + +val power_rails_rail_descriptor_set_rail_name : power_rails_rail_descriptor -> string -> unit + (** set field rail_name in power_rails_rail_descriptor *) + +val power_rails_rail_descriptor_has_subsys_name : power_rails_rail_descriptor -> bool + (** presence of field "subsys_name" in [power_rails_rail_descriptor] *) + +val power_rails_rail_descriptor_set_subsys_name : power_rails_rail_descriptor -> string -> unit + (** set field subsys_name in power_rails_rail_descriptor *) + +val power_rails_rail_descriptor_has_sampling_rate : power_rails_rail_descriptor -> bool + (** presence of field "sampling_rate" in [power_rails_rail_descriptor] *) + +val power_rails_rail_descriptor_set_sampling_rate : power_rails_rail_descriptor -> int32 -> unit + (** set field sampling_rate in power_rails_rail_descriptor *) + +val make_power_rails_energy_data : + ?index:int32 -> + ?timestamp_ms:int64 -> + ?energy:int64 -> + unit -> + power_rails_energy_data +(** [make_power_rails_energy_data … ()] is a builder for type [power_rails_energy_data] *) + +val copy_power_rails_energy_data : power_rails_energy_data -> power_rails_energy_data + +val power_rails_energy_data_has_index : power_rails_energy_data -> bool + (** presence of field "index" in [power_rails_energy_data] *) + +val power_rails_energy_data_set_index : power_rails_energy_data -> int32 -> unit + (** set field index in power_rails_energy_data *) + +val power_rails_energy_data_has_timestamp_ms : power_rails_energy_data -> bool + (** presence of field "timestamp_ms" in [power_rails_energy_data] *) + +val power_rails_energy_data_set_timestamp_ms : power_rails_energy_data -> int64 -> unit + (** set field timestamp_ms in power_rails_energy_data *) + +val power_rails_energy_data_has_energy : power_rails_energy_data -> bool + (** presence of field "energy" in [power_rails_energy_data] *) + +val power_rails_energy_data_set_energy : power_rails_energy_data -> int64 -> unit + (** set field energy in power_rails_energy_data *) + +val make_power_rails : + ?rail_descriptor:power_rails_rail_descriptor list -> + ?energy_data:power_rails_energy_data list -> + ?session_uuid:int64 -> + unit -> + power_rails +(** [make_power_rails … ()] is a builder for type [power_rails] *) + +val copy_power_rails : power_rails -> power_rails + +val power_rails_set_rail_descriptor : power_rails -> power_rails_rail_descriptor list -> unit + (** set field rail_descriptor in power_rails *) + +val power_rails_set_energy_data : power_rails -> power_rails_energy_data list -> unit + (** set field energy_data in power_rails *) + +val power_rails_has_session_uuid : power_rails -> bool + (** presence of field "session_uuid" in [power_rails] *) + +val power_rails_set_session_uuid : power_rails -> int64 -> unit + (** set field session_uuid in power_rails *) + +val make_obfuscated_member : + ?obfuscated_name:string -> + ?deobfuscated_name:string -> + unit -> + obfuscated_member +(** [make_obfuscated_member … ()] is a builder for type [obfuscated_member] *) + +val copy_obfuscated_member : obfuscated_member -> obfuscated_member + +val obfuscated_member_has_obfuscated_name : obfuscated_member -> bool + (** presence of field "obfuscated_name" in [obfuscated_member] *) + +val obfuscated_member_set_obfuscated_name : obfuscated_member -> string -> unit + (** set field obfuscated_name in obfuscated_member *) + +val obfuscated_member_has_deobfuscated_name : obfuscated_member -> bool + (** presence of field "deobfuscated_name" in [obfuscated_member] *) + +val obfuscated_member_set_deobfuscated_name : obfuscated_member -> string -> unit + (** set field deobfuscated_name in obfuscated_member *) + +val make_obfuscated_class : + ?obfuscated_name:string -> + ?deobfuscated_name:string -> + ?obfuscated_members:obfuscated_member list -> + ?obfuscated_methods:obfuscated_member list -> + unit -> + obfuscated_class +(** [make_obfuscated_class … ()] is a builder for type [obfuscated_class] *) + +val copy_obfuscated_class : obfuscated_class -> obfuscated_class + +val obfuscated_class_has_obfuscated_name : obfuscated_class -> bool + (** presence of field "obfuscated_name" in [obfuscated_class] *) + +val obfuscated_class_set_obfuscated_name : obfuscated_class -> string -> unit + (** set field obfuscated_name in obfuscated_class *) + +val obfuscated_class_has_deobfuscated_name : obfuscated_class -> bool + (** presence of field "deobfuscated_name" in [obfuscated_class] *) + +val obfuscated_class_set_deobfuscated_name : obfuscated_class -> string -> unit + (** set field deobfuscated_name in obfuscated_class *) + +val obfuscated_class_set_obfuscated_members : obfuscated_class -> obfuscated_member list -> unit + (** set field obfuscated_members in obfuscated_class *) + +val obfuscated_class_set_obfuscated_methods : obfuscated_class -> obfuscated_member list -> unit + (** set field obfuscated_methods in obfuscated_class *) + +val make_deobfuscation_mapping : + ?package_name:string -> + ?version_code:int64 -> + ?obfuscated_classes:obfuscated_class list -> + unit -> + deobfuscation_mapping +(** [make_deobfuscation_mapping … ()] is a builder for type [deobfuscation_mapping] *) + +val copy_deobfuscation_mapping : deobfuscation_mapping -> deobfuscation_mapping + +val deobfuscation_mapping_has_package_name : deobfuscation_mapping -> bool + (** presence of field "package_name" in [deobfuscation_mapping] *) + +val deobfuscation_mapping_set_package_name : deobfuscation_mapping -> string -> unit + (** set field package_name in deobfuscation_mapping *) + +val deobfuscation_mapping_has_version_code : deobfuscation_mapping -> bool + (** presence of field "version_code" in [deobfuscation_mapping] *) + +val deobfuscation_mapping_set_version_code : deobfuscation_mapping -> int64 -> unit + (** set field version_code in deobfuscation_mapping *) + +val deobfuscation_mapping_set_obfuscated_classes : deobfuscation_mapping -> obfuscated_class list -> unit + (** set field obfuscated_classes in deobfuscation_mapping *) + +val make_heap_graph_root : + ?object_ids:int64 list -> + ?root_type:heap_graph_root_type -> + unit -> + heap_graph_root +(** [make_heap_graph_root … ()] is a builder for type [heap_graph_root] *) + +val copy_heap_graph_root : heap_graph_root -> heap_graph_root + +val heap_graph_root_set_object_ids : heap_graph_root -> int64 list -> unit + (** set field object_ids in heap_graph_root *) + +val heap_graph_root_has_root_type : heap_graph_root -> bool + (** presence of field "root_type" in [heap_graph_root] *) + +val heap_graph_root_set_root_type : heap_graph_root -> heap_graph_root_type -> unit + (** set field root_type in heap_graph_root *) + +val make_heap_graph_type : + ?id:int64 -> + ?location_id:int64 -> + ?class_name:string -> + ?object_size:int64 -> + ?superclass_id:int64 -> + ?reference_field_id:int64 list -> + ?kind:heap_graph_type_kind -> + ?classloader_id:int64 -> + unit -> + heap_graph_type +(** [make_heap_graph_type … ()] is a builder for type [heap_graph_type] *) + +val copy_heap_graph_type : heap_graph_type -> heap_graph_type + +val heap_graph_type_has_id : heap_graph_type -> bool + (** presence of field "id" in [heap_graph_type] *) + +val heap_graph_type_set_id : heap_graph_type -> int64 -> unit + (** set field id in heap_graph_type *) + +val heap_graph_type_has_location_id : heap_graph_type -> bool + (** presence of field "location_id" in [heap_graph_type] *) + +val heap_graph_type_set_location_id : heap_graph_type -> int64 -> unit + (** set field location_id in heap_graph_type *) + +val heap_graph_type_has_class_name : heap_graph_type -> bool + (** presence of field "class_name" in [heap_graph_type] *) + +val heap_graph_type_set_class_name : heap_graph_type -> string -> unit + (** set field class_name in heap_graph_type *) + +val heap_graph_type_has_object_size : heap_graph_type -> bool + (** presence of field "object_size" in [heap_graph_type] *) + +val heap_graph_type_set_object_size : heap_graph_type -> int64 -> unit + (** set field object_size in heap_graph_type *) + +val heap_graph_type_has_superclass_id : heap_graph_type -> bool + (** presence of field "superclass_id" in [heap_graph_type] *) + +val heap_graph_type_set_superclass_id : heap_graph_type -> int64 -> unit + (** set field superclass_id in heap_graph_type *) + +val heap_graph_type_set_reference_field_id : heap_graph_type -> int64 list -> unit + (** set field reference_field_id in heap_graph_type *) + +val heap_graph_type_has_kind : heap_graph_type -> bool + (** presence of field "kind" in [heap_graph_type] *) + +val heap_graph_type_set_kind : heap_graph_type -> heap_graph_type_kind -> unit + (** set field kind in heap_graph_type *) + +val heap_graph_type_has_classloader_id : heap_graph_type -> bool + (** presence of field "classloader_id" in [heap_graph_type] *) + +val heap_graph_type_set_classloader_id : heap_graph_type -> int64 -> unit + (** set field classloader_id in heap_graph_type *) + +val make_heap_graph_object : + ?identifier:heap_graph_object_identifier -> + ?type_id:int64 -> + ?self_size:int64 -> + ?reference_field_id_base:int64 -> + ?reference_field_id:int64 list -> + ?reference_object_id:int64 list -> + ?native_allocation_registry_size_field:int64 -> + ?heap_type_delta:heap_graph_object_heap_type -> + ?runtime_internal_object_id:int64 list -> + unit -> + heap_graph_object +(** [make_heap_graph_object … ()] is a builder for type [heap_graph_object] *) + +val copy_heap_graph_object : heap_graph_object -> heap_graph_object + +val heap_graph_object_set_identifier : heap_graph_object -> heap_graph_object_identifier -> unit + (** set field identifier in heap_graph_object *) + +val heap_graph_object_has_type_id : heap_graph_object -> bool + (** presence of field "type_id" in [heap_graph_object] *) + +val heap_graph_object_set_type_id : heap_graph_object -> int64 -> unit + (** set field type_id in heap_graph_object *) + +val heap_graph_object_has_self_size : heap_graph_object -> bool + (** presence of field "self_size" in [heap_graph_object] *) + +val heap_graph_object_set_self_size : heap_graph_object -> int64 -> unit + (** set field self_size in heap_graph_object *) + +val heap_graph_object_has_reference_field_id_base : heap_graph_object -> bool + (** presence of field "reference_field_id_base" in [heap_graph_object] *) + +val heap_graph_object_set_reference_field_id_base : heap_graph_object -> int64 -> unit + (** set field reference_field_id_base in heap_graph_object *) + +val heap_graph_object_set_reference_field_id : heap_graph_object -> int64 list -> unit + (** set field reference_field_id in heap_graph_object *) + +val heap_graph_object_set_reference_object_id : heap_graph_object -> int64 list -> unit + (** set field reference_object_id in heap_graph_object *) + +val heap_graph_object_has_native_allocation_registry_size_field : heap_graph_object -> bool + (** presence of field "native_allocation_registry_size_field" in [heap_graph_object] *) + +val heap_graph_object_set_native_allocation_registry_size_field : heap_graph_object -> int64 -> unit + (** set field native_allocation_registry_size_field in heap_graph_object *) + +val heap_graph_object_has_heap_type_delta : heap_graph_object -> bool + (** presence of field "heap_type_delta" in [heap_graph_object] *) + +val heap_graph_object_set_heap_type_delta : heap_graph_object -> heap_graph_object_heap_type -> unit + (** set field heap_type_delta in heap_graph_object *) + +val heap_graph_object_set_runtime_internal_object_id : heap_graph_object -> int64 list -> unit + (** set field runtime_internal_object_id in heap_graph_object *) + +val make_heap_graph : + ?pid:int32 -> + ?objects:heap_graph_object list -> + ?roots:heap_graph_root list -> + ?types:heap_graph_type list -> + ?field_names:interned_string list -> + ?location_names:interned_string list -> + ?continued:bool -> + ?index:int64 -> + unit -> + heap_graph +(** [make_heap_graph … ()] is a builder for type [heap_graph] *) + +val copy_heap_graph : heap_graph -> heap_graph + +val heap_graph_has_pid : heap_graph -> bool + (** presence of field "pid" in [heap_graph] *) + +val heap_graph_set_pid : heap_graph -> int32 -> unit + (** set field pid in heap_graph *) + +val heap_graph_set_objects : heap_graph -> heap_graph_object list -> unit + (** set field objects in heap_graph *) + +val heap_graph_set_roots : heap_graph -> heap_graph_root list -> unit + (** set field roots in heap_graph *) + +val heap_graph_set_types : heap_graph -> heap_graph_type list -> unit + (** set field types in heap_graph *) + +val heap_graph_set_field_names : heap_graph -> interned_string list -> unit + (** set field field_names in heap_graph *) + +val heap_graph_set_location_names : heap_graph -> interned_string list -> unit + (** set field location_names in heap_graph *) + +val heap_graph_has_continued : heap_graph -> bool + (** presence of field "continued" in [heap_graph] *) + +val heap_graph_set_continued : heap_graph -> bool -> unit + (** set field continued in heap_graph *) + +val heap_graph_has_index : heap_graph -> bool + (** presence of field "index" in [heap_graph] *) + +val heap_graph_set_index : heap_graph -> int64 -> unit + (** set field index in heap_graph *) + +val make_profile_packet_heap_sample : + ?callstack_id:int64 -> + ?self_allocated:int64 -> + ?self_freed:int64 -> + ?self_max:int64 -> + ?self_max_count:int64 -> + ?timestamp:int64 -> + ?alloc_count:int64 -> + ?free_count:int64 -> + unit -> + profile_packet_heap_sample +(** [make_profile_packet_heap_sample … ()] is a builder for type [profile_packet_heap_sample] *) + +val copy_profile_packet_heap_sample : profile_packet_heap_sample -> profile_packet_heap_sample + +val profile_packet_heap_sample_has_callstack_id : profile_packet_heap_sample -> bool + (** presence of field "callstack_id" in [profile_packet_heap_sample] *) + +val profile_packet_heap_sample_set_callstack_id : profile_packet_heap_sample -> int64 -> unit + (** set field callstack_id in profile_packet_heap_sample *) + +val profile_packet_heap_sample_has_self_allocated : profile_packet_heap_sample -> bool + (** presence of field "self_allocated" in [profile_packet_heap_sample] *) + +val profile_packet_heap_sample_set_self_allocated : profile_packet_heap_sample -> int64 -> unit + (** set field self_allocated in profile_packet_heap_sample *) + +val profile_packet_heap_sample_has_self_freed : profile_packet_heap_sample -> bool + (** presence of field "self_freed" in [profile_packet_heap_sample] *) + +val profile_packet_heap_sample_set_self_freed : profile_packet_heap_sample -> int64 -> unit + (** set field self_freed in profile_packet_heap_sample *) + +val profile_packet_heap_sample_has_self_max : profile_packet_heap_sample -> bool + (** presence of field "self_max" in [profile_packet_heap_sample] *) + +val profile_packet_heap_sample_set_self_max : profile_packet_heap_sample -> int64 -> unit + (** set field self_max in profile_packet_heap_sample *) + +val profile_packet_heap_sample_has_self_max_count : profile_packet_heap_sample -> bool + (** presence of field "self_max_count" in [profile_packet_heap_sample] *) + +val profile_packet_heap_sample_set_self_max_count : profile_packet_heap_sample -> int64 -> unit + (** set field self_max_count in profile_packet_heap_sample *) + +val profile_packet_heap_sample_has_timestamp : profile_packet_heap_sample -> bool + (** presence of field "timestamp" in [profile_packet_heap_sample] *) + +val profile_packet_heap_sample_set_timestamp : profile_packet_heap_sample -> int64 -> unit + (** set field timestamp in profile_packet_heap_sample *) + +val profile_packet_heap_sample_has_alloc_count : profile_packet_heap_sample -> bool + (** presence of field "alloc_count" in [profile_packet_heap_sample] *) + +val profile_packet_heap_sample_set_alloc_count : profile_packet_heap_sample -> int64 -> unit + (** set field alloc_count in profile_packet_heap_sample *) + +val profile_packet_heap_sample_has_free_count : profile_packet_heap_sample -> bool + (** presence of field "free_count" in [profile_packet_heap_sample] *) + +val profile_packet_heap_sample_set_free_count : profile_packet_heap_sample -> int64 -> unit + (** set field free_count in profile_packet_heap_sample *) + +val make_profile_packet_histogram_bucket : + ?upper_limit:int64 -> + ?max_bucket:bool -> + ?count:int64 -> + unit -> + profile_packet_histogram_bucket +(** [make_profile_packet_histogram_bucket … ()] is a builder for type [profile_packet_histogram_bucket] *) + +val copy_profile_packet_histogram_bucket : profile_packet_histogram_bucket -> profile_packet_histogram_bucket + +val profile_packet_histogram_bucket_has_upper_limit : profile_packet_histogram_bucket -> bool + (** presence of field "upper_limit" in [profile_packet_histogram_bucket] *) + +val profile_packet_histogram_bucket_set_upper_limit : profile_packet_histogram_bucket -> int64 -> unit + (** set field upper_limit in profile_packet_histogram_bucket *) + +val profile_packet_histogram_bucket_has_max_bucket : profile_packet_histogram_bucket -> bool + (** presence of field "max_bucket" in [profile_packet_histogram_bucket] *) + +val profile_packet_histogram_bucket_set_max_bucket : profile_packet_histogram_bucket -> bool -> unit + (** set field max_bucket in profile_packet_histogram_bucket *) + +val profile_packet_histogram_bucket_has_count : profile_packet_histogram_bucket -> bool + (** presence of field "count" in [profile_packet_histogram_bucket] *) + +val profile_packet_histogram_bucket_set_count : profile_packet_histogram_bucket -> int64 -> unit + (** set field count in profile_packet_histogram_bucket *) + +val make_profile_packet_histogram : + ?buckets:profile_packet_histogram_bucket list -> + unit -> + profile_packet_histogram +(** [make_profile_packet_histogram … ()] is a builder for type [profile_packet_histogram] *) + +val copy_profile_packet_histogram : profile_packet_histogram -> profile_packet_histogram + +val profile_packet_histogram_set_buckets : profile_packet_histogram -> profile_packet_histogram_bucket list -> unit + (** set field buckets in profile_packet_histogram *) + +val make_profile_packet_process_stats : + ?unwinding_errors:int64 -> + ?heap_samples:int64 -> + ?map_reparses:int64 -> + ?unwinding_time_us:profile_packet_histogram -> + ?total_unwinding_time_us:int64 -> + ?client_spinlock_blocked_us:int64 -> + unit -> + profile_packet_process_stats +(** [make_profile_packet_process_stats … ()] is a builder for type [profile_packet_process_stats] *) + +val copy_profile_packet_process_stats : profile_packet_process_stats -> profile_packet_process_stats + +val profile_packet_process_stats_has_unwinding_errors : profile_packet_process_stats -> bool + (** presence of field "unwinding_errors" in [profile_packet_process_stats] *) + +val profile_packet_process_stats_set_unwinding_errors : profile_packet_process_stats -> int64 -> unit + (** set field unwinding_errors in profile_packet_process_stats *) + +val profile_packet_process_stats_has_heap_samples : profile_packet_process_stats -> bool + (** presence of field "heap_samples" in [profile_packet_process_stats] *) + +val profile_packet_process_stats_set_heap_samples : profile_packet_process_stats -> int64 -> unit + (** set field heap_samples in profile_packet_process_stats *) + +val profile_packet_process_stats_has_map_reparses : profile_packet_process_stats -> bool + (** presence of field "map_reparses" in [profile_packet_process_stats] *) + +val profile_packet_process_stats_set_map_reparses : profile_packet_process_stats -> int64 -> unit + (** set field map_reparses in profile_packet_process_stats *) + +val profile_packet_process_stats_set_unwinding_time_us : profile_packet_process_stats -> profile_packet_histogram -> unit + (** set field unwinding_time_us in profile_packet_process_stats *) + +val profile_packet_process_stats_has_total_unwinding_time_us : profile_packet_process_stats -> bool + (** presence of field "total_unwinding_time_us" in [profile_packet_process_stats] *) + +val profile_packet_process_stats_set_total_unwinding_time_us : profile_packet_process_stats -> int64 -> unit + (** set field total_unwinding_time_us in profile_packet_process_stats *) + +val profile_packet_process_stats_has_client_spinlock_blocked_us : profile_packet_process_stats -> bool + (** presence of field "client_spinlock_blocked_us" in [profile_packet_process_stats] *) + +val profile_packet_process_stats_set_client_spinlock_blocked_us : profile_packet_process_stats -> int64 -> unit + (** set field client_spinlock_blocked_us in profile_packet_process_stats *) + +val make_profile_packet_process_heap_samples : + ?pid:int64 -> + ?from_startup:bool -> + ?rejected_concurrent:bool -> + ?disconnected:bool -> + ?buffer_overran:bool -> + ?client_error:profile_packet_process_heap_samples_client_error -> + ?buffer_corrupted:bool -> + ?hit_guardrail:bool -> + ?heap_name:string -> + ?sampling_interval_bytes:int64 -> + ?orig_sampling_interval_bytes:int64 -> + ?timestamp:int64 -> + ?stats:profile_packet_process_stats -> + ?samples:profile_packet_heap_sample list -> + unit -> + profile_packet_process_heap_samples +(** [make_profile_packet_process_heap_samples … ()] is a builder for type [profile_packet_process_heap_samples] *) + +val copy_profile_packet_process_heap_samples : profile_packet_process_heap_samples -> profile_packet_process_heap_samples + +val profile_packet_process_heap_samples_has_pid : profile_packet_process_heap_samples -> bool + (** presence of field "pid" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_pid : profile_packet_process_heap_samples -> int64 -> unit + (** set field pid in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_from_startup : profile_packet_process_heap_samples -> bool + (** presence of field "from_startup" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_from_startup : profile_packet_process_heap_samples -> bool -> unit + (** set field from_startup in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_rejected_concurrent : profile_packet_process_heap_samples -> bool + (** presence of field "rejected_concurrent" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_rejected_concurrent : profile_packet_process_heap_samples -> bool -> unit + (** set field rejected_concurrent in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_disconnected : profile_packet_process_heap_samples -> bool + (** presence of field "disconnected" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_disconnected : profile_packet_process_heap_samples -> bool -> unit + (** set field disconnected in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_buffer_overran : profile_packet_process_heap_samples -> bool + (** presence of field "buffer_overran" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_buffer_overran : profile_packet_process_heap_samples -> bool -> unit + (** set field buffer_overran in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_client_error : profile_packet_process_heap_samples -> bool + (** presence of field "client_error" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_client_error : profile_packet_process_heap_samples -> profile_packet_process_heap_samples_client_error -> unit + (** set field client_error in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_buffer_corrupted : profile_packet_process_heap_samples -> bool + (** presence of field "buffer_corrupted" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_buffer_corrupted : profile_packet_process_heap_samples -> bool -> unit + (** set field buffer_corrupted in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_hit_guardrail : profile_packet_process_heap_samples -> bool + (** presence of field "hit_guardrail" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_hit_guardrail : profile_packet_process_heap_samples -> bool -> unit + (** set field hit_guardrail in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_heap_name : profile_packet_process_heap_samples -> bool + (** presence of field "heap_name" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_heap_name : profile_packet_process_heap_samples -> string -> unit + (** set field heap_name in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_sampling_interval_bytes : profile_packet_process_heap_samples -> bool + (** presence of field "sampling_interval_bytes" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_sampling_interval_bytes : profile_packet_process_heap_samples -> int64 -> unit + (** set field sampling_interval_bytes in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_orig_sampling_interval_bytes : profile_packet_process_heap_samples -> bool + (** presence of field "orig_sampling_interval_bytes" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_orig_sampling_interval_bytes : profile_packet_process_heap_samples -> int64 -> unit + (** set field orig_sampling_interval_bytes in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_has_timestamp : profile_packet_process_heap_samples -> bool + (** presence of field "timestamp" in [profile_packet_process_heap_samples] *) + +val profile_packet_process_heap_samples_set_timestamp : profile_packet_process_heap_samples -> int64 -> unit + (** set field timestamp in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_set_stats : profile_packet_process_heap_samples -> profile_packet_process_stats -> unit + (** set field stats in profile_packet_process_heap_samples *) + +val profile_packet_process_heap_samples_set_samples : profile_packet_process_heap_samples -> profile_packet_heap_sample list -> unit + (** set field samples in profile_packet_process_heap_samples *) + +val make_profile_packet : + ?strings:interned_string list -> + ?mappings:mapping list -> + ?frames:frame list -> + ?callstacks:callstack list -> + ?process_dumps:profile_packet_process_heap_samples list -> + ?continued:bool -> + ?index:int64 -> + unit -> + profile_packet +(** [make_profile_packet … ()] is a builder for type [profile_packet] *) + +val copy_profile_packet : profile_packet -> profile_packet + +val profile_packet_set_strings : profile_packet -> interned_string list -> unit + (** set field strings in profile_packet *) + +val profile_packet_set_mappings : profile_packet -> mapping list -> unit + (** set field mappings in profile_packet *) + +val profile_packet_set_frames : profile_packet -> frame list -> unit + (** set field frames in profile_packet *) + +val profile_packet_set_callstacks : profile_packet -> callstack list -> unit + (** set field callstacks in profile_packet *) + +val profile_packet_set_process_dumps : profile_packet -> profile_packet_process_heap_samples list -> unit + (** set field process_dumps in profile_packet *) + +val profile_packet_has_continued : profile_packet -> bool + (** presence of field "continued" in [profile_packet] *) + +val profile_packet_set_continued : profile_packet -> bool -> unit + (** set field continued in profile_packet *) + +val profile_packet_has_index : profile_packet -> bool + (** presence of field "index" in [profile_packet] *) + +val profile_packet_set_index : profile_packet -> int64 -> unit + (** set field index in profile_packet *) + +val make_streaming_allocation : + ?address:int64 list -> + ?size:int64 list -> + ?sample_size:int64 list -> + ?clock_monotonic_coarse_timestamp:int64 list -> + ?heap_id:int32 list -> + ?sequence_number:int64 list -> + unit -> + streaming_allocation +(** [make_streaming_allocation … ()] is a builder for type [streaming_allocation] *) + +val copy_streaming_allocation : streaming_allocation -> streaming_allocation + +val streaming_allocation_set_address : streaming_allocation -> int64 list -> unit + (** set field address in streaming_allocation *) + +val streaming_allocation_set_size : streaming_allocation -> int64 list -> unit + (** set field size in streaming_allocation *) + +val streaming_allocation_set_sample_size : streaming_allocation -> int64 list -> unit + (** set field sample_size in streaming_allocation *) + +val streaming_allocation_set_clock_monotonic_coarse_timestamp : streaming_allocation -> int64 list -> unit + (** set field clock_monotonic_coarse_timestamp in streaming_allocation *) + +val streaming_allocation_set_heap_id : streaming_allocation -> int32 list -> unit + (** set field heap_id in streaming_allocation *) + +val streaming_allocation_set_sequence_number : streaming_allocation -> int64 list -> unit + (** set field sequence_number in streaming_allocation *) + +val make_streaming_free : + ?address:int64 list -> + ?heap_id:int32 list -> + ?sequence_number:int64 list -> + unit -> + streaming_free +(** [make_streaming_free … ()] is a builder for type [streaming_free] *) + +val copy_streaming_free : streaming_free -> streaming_free + +val streaming_free_set_address : streaming_free -> int64 list -> unit + (** set field address in streaming_free *) + +val streaming_free_set_heap_id : streaming_free -> int32 list -> unit + (** set field heap_id in streaming_free *) + +val streaming_free_set_sequence_number : streaming_free -> int64 list -> unit + (** set field sequence_number in streaming_free *) + +val make_streaming_profile_packet : + ?callstack_iid:int64 list -> + ?timestamp_delta_us:int64 list -> + ?process_priority:int32 -> + unit -> + streaming_profile_packet +(** [make_streaming_profile_packet … ()] is a builder for type [streaming_profile_packet] *) + +val copy_streaming_profile_packet : streaming_profile_packet -> streaming_profile_packet + +val streaming_profile_packet_set_callstack_iid : streaming_profile_packet -> int64 list -> unit + (** set field callstack_iid in streaming_profile_packet *) + +val streaming_profile_packet_set_timestamp_delta_us : streaming_profile_packet -> int64 list -> unit + (** set field timestamp_delta_us in streaming_profile_packet *) + +val streaming_profile_packet_has_process_priority : streaming_profile_packet -> bool + (** presence of field "process_priority" in [streaming_profile_packet] *) + +val streaming_profile_packet_set_process_priority : streaming_profile_packet -> int32 -> unit + (** set field process_priority in streaming_profile_packet *) + +val make_perf_sample : + ?cpu:int32 -> + ?pid:int32 -> + ?tid:int32 -> + ?cpu_mode:profiling_cpu_mode -> + ?timebase_count:int64 -> + ?follower_counts:int64 list -> + ?callstack_iid:int64 -> + ?optional_unwind_error:perf_sample_optional_unwind_error -> + ?kernel_records_lost:int64 -> + ?optional_sample_skipped_reason:perf_sample_optional_sample_skipped_reason -> + ?producer_event:perf_sample_producer_event -> + unit -> + perf_sample +(** [make_perf_sample … ()] is a builder for type [perf_sample] *) + +val copy_perf_sample : perf_sample -> perf_sample + +val perf_sample_has_cpu : perf_sample -> bool + (** presence of field "cpu" in [perf_sample] *) + +val perf_sample_set_cpu : perf_sample -> int32 -> unit + (** set field cpu in perf_sample *) + +val perf_sample_has_pid : perf_sample -> bool + (** presence of field "pid" in [perf_sample] *) + +val perf_sample_set_pid : perf_sample -> int32 -> unit + (** set field pid in perf_sample *) + +val perf_sample_has_tid : perf_sample -> bool + (** presence of field "tid" in [perf_sample] *) + +val perf_sample_set_tid : perf_sample -> int32 -> unit + (** set field tid in perf_sample *) + +val perf_sample_has_cpu_mode : perf_sample -> bool + (** presence of field "cpu_mode" in [perf_sample] *) + +val perf_sample_set_cpu_mode : perf_sample -> profiling_cpu_mode -> unit + (** set field cpu_mode in perf_sample *) + +val perf_sample_has_timebase_count : perf_sample -> bool + (** presence of field "timebase_count" in [perf_sample] *) + +val perf_sample_set_timebase_count : perf_sample -> int64 -> unit + (** set field timebase_count in perf_sample *) + +val perf_sample_set_follower_counts : perf_sample -> int64 list -> unit + (** set field follower_counts in perf_sample *) + +val perf_sample_has_callstack_iid : perf_sample -> bool + (** presence of field "callstack_iid" in [perf_sample] *) + +val perf_sample_set_callstack_iid : perf_sample -> int64 -> unit + (** set field callstack_iid in perf_sample *) + +val perf_sample_set_optional_unwind_error : perf_sample -> perf_sample_optional_unwind_error -> unit + (** set field optional_unwind_error in perf_sample *) + +val perf_sample_has_kernel_records_lost : perf_sample -> bool + (** presence of field "kernel_records_lost" in [perf_sample] *) + +val perf_sample_set_kernel_records_lost : perf_sample -> int64 -> unit + (** set field kernel_records_lost in perf_sample *) + +val perf_sample_set_optional_sample_skipped_reason : perf_sample -> perf_sample_optional_sample_skipped_reason -> unit + (** set field optional_sample_skipped_reason in perf_sample *) + +val perf_sample_set_producer_event : perf_sample -> perf_sample_producer_event -> unit + (** set field producer_event in perf_sample *) + +val make_smaps_entry : + ?path:string -> + ?size_kb:int64 -> + ?private_dirty_kb:int64 -> + ?swap_kb:int64 -> + ?file_name:string -> + ?start_address:int64 -> + ?module_timestamp:int64 -> + ?module_debugid:string -> + ?module_debug_path:string -> + ?protection_flags:int32 -> + ?private_clean_resident_kb:int64 -> + ?shared_dirty_resident_kb:int64 -> + ?shared_clean_resident_kb:int64 -> + ?locked_kb:int64 -> + ?proportional_resident_kb:int64 -> + unit -> + smaps_entry +(** [make_smaps_entry … ()] is a builder for type [smaps_entry] *) + +val copy_smaps_entry : smaps_entry -> smaps_entry + +val smaps_entry_has_path : smaps_entry -> bool + (** presence of field "path" in [smaps_entry] *) + +val smaps_entry_set_path : smaps_entry -> string -> unit + (** set field path in smaps_entry *) + +val smaps_entry_has_size_kb : smaps_entry -> bool + (** presence of field "size_kb" in [smaps_entry] *) + +val smaps_entry_set_size_kb : smaps_entry -> int64 -> unit + (** set field size_kb in smaps_entry *) + +val smaps_entry_has_private_dirty_kb : smaps_entry -> bool + (** presence of field "private_dirty_kb" in [smaps_entry] *) + +val smaps_entry_set_private_dirty_kb : smaps_entry -> int64 -> unit + (** set field private_dirty_kb in smaps_entry *) + +val smaps_entry_has_swap_kb : smaps_entry -> bool + (** presence of field "swap_kb" in [smaps_entry] *) + +val smaps_entry_set_swap_kb : smaps_entry -> int64 -> unit + (** set field swap_kb in smaps_entry *) + +val smaps_entry_has_file_name : smaps_entry -> bool + (** presence of field "file_name" in [smaps_entry] *) + +val smaps_entry_set_file_name : smaps_entry -> string -> unit + (** set field file_name in smaps_entry *) + +val smaps_entry_has_start_address : smaps_entry -> bool + (** presence of field "start_address" in [smaps_entry] *) + +val smaps_entry_set_start_address : smaps_entry -> int64 -> unit + (** set field start_address in smaps_entry *) + +val smaps_entry_has_module_timestamp : smaps_entry -> bool + (** presence of field "module_timestamp" in [smaps_entry] *) + +val smaps_entry_set_module_timestamp : smaps_entry -> int64 -> unit + (** set field module_timestamp in smaps_entry *) + +val smaps_entry_has_module_debugid : smaps_entry -> bool + (** presence of field "module_debugid" in [smaps_entry] *) + +val smaps_entry_set_module_debugid : smaps_entry -> string -> unit + (** set field module_debugid in smaps_entry *) + +val smaps_entry_has_module_debug_path : smaps_entry -> bool + (** presence of field "module_debug_path" in [smaps_entry] *) + +val smaps_entry_set_module_debug_path : smaps_entry -> string -> unit + (** set field module_debug_path in smaps_entry *) + +val smaps_entry_has_protection_flags : smaps_entry -> bool + (** presence of field "protection_flags" in [smaps_entry] *) + +val smaps_entry_set_protection_flags : smaps_entry -> int32 -> unit + (** set field protection_flags in smaps_entry *) + +val smaps_entry_has_private_clean_resident_kb : smaps_entry -> bool + (** presence of field "private_clean_resident_kb" in [smaps_entry] *) + +val smaps_entry_set_private_clean_resident_kb : smaps_entry -> int64 -> unit + (** set field private_clean_resident_kb in smaps_entry *) + +val smaps_entry_has_shared_dirty_resident_kb : smaps_entry -> bool + (** presence of field "shared_dirty_resident_kb" in [smaps_entry] *) + +val smaps_entry_set_shared_dirty_resident_kb : smaps_entry -> int64 -> unit + (** set field shared_dirty_resident_kb in smaps_entry *) + +val smaps_entry_has_shared_clean_resident_kb : smaps_entry -> bool + (** presence of field "shared_clean_resident_kb" in [smaps_entry] *) + +val smaps_entry_set_shared_clean_resident_kb : smaps_entry -> int64 -> unit + (** set field shared_clean_resident_kb in smaps_entry *) + +val smaps_entry_has_locked_kb : smaps_entry -> bool + (** presence of field "locked_kb" in [smaps_entry] *) + +val smaps_entry_set_locked_kb : smaps_entry -> int64 -> unit + (** set field locked_kb in smaps_entry *) + +val smaps_entry_has_proportional_resident_kb : smaps_entry -> bool + (** presence of field "proportional_resident_kb" in [smaps_entry] *) + +val smaps_entry_set_proportional_resident_kb : smaps_entry -> int64 -> unit + (** set field proportional_resident_kb in smaps_entry *) + +val make_smaps_packet : + ?pid:int32 -> + ?entries:smaps_entry list -> + unit -> + smaps_packet +(** [make_smaps_packet … ()] is a builder for type [smaps_packet] *) + +val copy_smaps_packet : smaps_packet -> smaps_packet + +val smaps_packet_has_pid : smaps_packet -> bool + (** presence of field "pid" in [smaps_packet] *) + +val smaps_packet_set_pid : smaps_packet -> int32 -> unit + (** set field pid in smaps_packet *) + +val smaps_packet_set_entries : smaps_packet -> smaps_entry list -> unit + (** set field entries in smaps_packet *) + +val make_process_stats_thread : + ?tid:int32 -> + unit -> + process_stats_thread +(** [make_process_stats_thread … ()] is a builder for type [process_stats_thread] *) + +val copy_process_stats_thread : process_stats_thread -> process_stats_thread + +val process_stats_thread_has_tid : process_stats_thread -> bool + (** presence of field "tid" in [process_stats_thread] *) + +val process_stats_thread_set_tid : process_stats_thread -> int32 -> unit + (** set field tid in process_stats_thread *) + +val make_process_stats_fdinfo : + ?fd:int64 -> + ?path:string -> + unit -> + process_stats_fdinfo +(** [make_process_stats_fdinfo … ()] is a builder for type [process_stats_fdinfo] *) + +val copy_process_stats_fdinfo : process_stats_fdinfo -> process_stats_fdinfo + +val process_stats_fdinfo_has_fd : process_stats_fdinfo -> bool + (** presence of field "fd" in [process_stats_fdinfo] *) + +val process_stats_fdinfo_set_fd : process_stats_fdinfo -> int64 -> unit + (** set field fd in process_stats_fdinfo *) + +val process_stats_fdinfo_has_path : process_stats_fdinfo -> bool + (** presence of field "path" in [process_stats_fdinfo] *) + +val process_stats_fdinfo_set_path : process_stats_fdinfo -> string -> unit + (** set field path in process_stats_fdinfo *) + +val make_process_stats_process : + ?pid:int32 -> + ?threads:process_stats_thread list -> + ?vm_size_kb:int64 -> + ?vm_rss_kb:int64 -> + ?rss_anon_kb:int64 -> + ?rss_file_kb:int64 -> + ?rss_shmem_kb:int64 -> + ?vm_swap_kb:int64 -> + ?vm_locked_kb:int64 -> + ?vm_hwm_kb:int64 -> + ?oom_score_adj:int64 -> + ?is_peak_rss_resettable:bool -> + ?chrome_private_footprint_kb:int32 -> + ?chrome_peak_resident_set_kb:int32 -> + ?fds:process_stats_fdinfo list -> + ?smr_rss_kb:int64 -> + ?smr_pss_kb:int64 -> + ?smr_pss_anon_kb:int64 -> + ?smr_pss_file_kb:int64 -> + ?smr_pss_shmem_kb:int64 -> + ?smr_swap_pss_kb:int64 -> + ?runtime_user_mode:int64 -> + ?runtime_kernel_mode:int64 -> + ?dmabuf_rss_kb:int64 -> + unit -> + process_stats_process +(** [make_process_stats_process … ()] is a builder for type [process_stats_process] *) + +val copy_process_stats_process : process_stats_process -> process_stats_process + +val process_stats_process_has_pid : process_stats_process -> bool + (** presence of field "pid" in [process_stats_process] *) + +val process_stats_process_set_pid : process_stats_process -> int32 -> unit + (** set field pid in process_stats_process *) + +val process_stats_process_set_threads : process_stats_process -> process_stats_thread list -> unit + (** set field threads in process_stats_process *) + +val process_stats_process_has_vm_size_kb : process_stats_process -> bool + (** presence of field "vm_size_kb" in [process_stats_process] *) + +val process_stats_process_set_vm_size_kb : process_stats_process -> int64 -> unit + (** set field vm_size_kb in process_stats_process *) + +val process_stats_process_has_vm_rss_kb : process_stats_process -> bool + (** presence of field "vm_rss_kb" in [process_stats_process] *) + +val process_stats_process_set_vm_rss_kb : process_stats_process -> int64 -> unit + (** set field vm_rss_kb in process_stats_process *) + +val process_stats_process_has_rss_anon_kb : process_stats_process -> bool + (** presence of field "rss_anon_kb" in [process_stats_process] *) + +val process_stats_process_set_rss_anon_kb : process_stats_process -> int64 -> unit + (** set field rss_anon_kb in process_stats_process *) + +val process_stats_process_has_rss_file_kb : process_stats_process -> bool + (** presence of field "rss_file_kb" in [process_stats_process] *) + +val process_stats_process_set_rss_file_kb : process_stats_process -> int64 -> unit + (** set field rss_file_kb in process_stats_process *) + +val process_stats_process_has_rss_shmem_kb : process_stats_process -> bool + (** presence of field "rss_shmem_kb" in [process_stats_process] *) + +val process_stats_process_set_rss_shmem_kb : process_stats_process -> int64 -> unit + (** set field rss_shmem_kb in process_stats_process *) + +val process_stats_process_has_vm_swap_kb : process_stats_process -> bool + (** presence of field "vm_swap_kb" in [process_stats_process] *) + +val process_stats_process_set_vm_swap_kb : process_stats_process -> int64 -> unit + (** set field vm_swap_kb in process_stats_process *) + +val process_stats_process_has_vm_locked_kb : process_stats_process -> bool + (** presence of field "vm_locked_kb" in [process_stats_process] *) + +val process_stats_process_set_vm_locked_kb : process_stats_process -> int64 -> unit + (** set field vm_locked_kb in process_stats_process *) + +val process_stats_process_has_vm_hwm_kb : process_stats_process -> bool + (** presence of field "vm_hwm_kb" in [process_stats_process] *) + +val process_stats_process_set_vm_hwm_kb : process_stats_process -> int64 -> unit + (** set field vm_hwm_kb in process_stats_process *) + +val process_stats_process_has_oom_score_adj : process_stats_process -> bool + (** presence of field "oom_score_adj" in [process_stats_process] *) + +val process_stats_process_set_oom_score_adj : process_stats_process -> int64 -> unit + (** set field oom_score_adj in process_stats_process *) + +val process_stats_process_has_is_peak_rss_resettable : process_stats_process -> bool + (** presence of field "is_peak_rss_resettable" in [process_stats_process] *) + +val process_stats_process_set_is_peak_rss_resettable : process_stats_process -> bool -> unit + (** set field is_peak_rss_resettable in process_stats_process *) + +val process_stats_process_has_chrome_private_footprint_kb : process_stats_process -> bool + (** presence of field "chrome_private_footprint_kb" in [process_stats_process] *) + +val process_stats_process_set_chrome_private_footprint_kb : process_stats_process -> int32 -> unit + (** set field chrome_private_footprint_kb in process_stats_process *) + +val process_stats_process_has_chrome_peak_resident_set_kb : process_stats_process -> bool + (** presence of field "chrome_peak_resident_set_kb" in [process_stats_process] *) + +val process_stats_process_set_chrome_peak_resident_set_kb : process_stats_process -> int32 -> unit + (** set field chrome_peak_resident_set_kb in process_stats_process *) + +val process_stats_process_set_fds : process_stats_process -> process_stats_fdinfo list -> unit + (** set field fds in process_stats_process *) + +val process_stats_process_has_smr_rss_kb : process_stats_process -> bool + (** presence of field "smr_rss_kb" in [process_stats_process] *) + +val process_stats_process_set_smr_rss_kb : process_stats_process -> int64 -> unit + (** set field smr_rss_kb in process_stats_process *) + +val process_stats_process_has_smr_pss_kb : process_stats_process -> bool + (** presence of field "smr_pss_kb" in [process_stats_process] *) + +val process_stats_process_set_smr_pss_kb : process_stats_process -> int64 -> unit + (** set field smr_pss_kb in process_stats_process *) + +val process_stats_process_has_smr_pss_anon_kb : process_stats_process -> bool + (** presence of field "smr_pss_anon_kb" in [process_stats_process] *) + +val process_stats_process_set_smr_pss_anon_kb : process_stats_process -> int64 -> unit + (** set field smr_pss_anon_kb in process_stats_process *) + +val process_stats_process_has_smr_pss_file_kb : process_stats_process -> bool + (** presence of field "smr_pss_file_kb" in [process_stats_process] *) + +val process_stats_process_set_smr_pss_file_kb : process_stats_process -> int64 -> unit + (** set field smr_pss_file_kb in process_stats_process *) + +val process_stats_process_has_smr_pss_shmem_kb : process_stats_process -> bool + (** presence of field "smr_pss_shmem_kb" in [process_stats_process] *) + +val process_stats_process_set_smr_pss_shmem_kb : process_stats_process -> int64 -> unit + (** set field smr_pss_shmem_kb in process_stats_process *) + +val process_stats_process_has_smr_swap_pss_kb : process_stats_process -> bool + (** presence of field "smr_swap_pss_kb" in [process_stats_process] *) + +val process_stats_process_set_smr_swap_pss_kb : process_stats_process -> int64 -> unit + (** set field smr_swap_pss_kb in process_stats_process *) + +val process_stats_process_has_runtime_user_mode : process_stats_process -> bool + (** presence of field "runtime_user_mode" in [process_stats_process] *) + +val process_stats_process_set_runtime_user_mode : process_stats_process -> int64 -> unit + (** set field runtime_user_mode in process_stats_process *) + +val process_stats_process_has_runtime_kernel_mode : process_stats_process -> bool + (** presence of field "runtime_kernel_mode" in [process_stats_process] *) + +val process_stats_process_set_runtime_kernel_mode : process_stats_process -> int64 -> unit + (** set field runtime_kernel_mode in process_stats_process *) + +val process_stats_process_has_dmabuf_rss_kb : process_stats_process -> bool + (** presence of field "dmabuf_rss_kb" in [process_stats_process] *) + +val process_stats_process_set_dmabuf_rss_kb : process_stats_process -> int64 -> unit + (** set field dmabuf_rss_kb in process_stats_process *) + +val make_process_stats : + ?processes:process_stats_process list -> + ?collection_end_timestamp:int64 -> + unit -> + process_stats +(** [make_process_stats … ()] is a builder for type [process_stats] *) + +val copy_process_stats : process_stats -> process_stats + +val process_stats_set_processes : process_stats -> process_stats_process list -> unit + (** set field processes in process_stats *) + +val process_stats_has_collection_end_timestamp : process_stats -> bool + (** presence of field "collection_end_timestamp" in [process_stats] *) + +val process_stats_set_collection_end_timestamp : process_stats -> int64 -> unit + (** set field collection_end_timestamp in process_stats *) + +val make_process_tree_thread : + ?tid:int32 -> + ?tgid:int32 -> + ?name:string -> + ?nstid:int32 list -> + unit -> + process_tree_thread +(** [make_process_tree_thread … ()] is a builder for type [process_tree_thread] *) + +val copy_process_tree_thread : process_tree_thread -> process_tree_thread + +val process_tree_thread_has_tid : process_tree_thread -> bool + (** presence of field "tid" in [process_tree_thread] *) + +val process_tree_thread_set_tid : process_tree_thread -> int32 -> unit + (** set field tid in process_tree_thread *) + +val process_tree_thread_has_tgid : process_tree_thread -> bool + (** presence of field "tgid" in [process_tree_thread] *) + +val process_tree_thread_set_tgid : process_tree_thread -> int32 -> unit + (** set field tgid in process_tree_thread *) + +val process_tree_thread_has_name : process_tree_thread -> bool + (** presence of field "name" in [process_tree_thread] *) + +val process_tree_thread_set_name : process_tree_thread -> string -> unit + (** set field name in process_tree_thread *) + +val process_tree_thread_set_nstid : process_tree_thread -> int32 list -> unit + (** set field nstid in process_tree_thread *) + +val make_process_tree_process : + ?pid:int32 -> + ?ppid:int32 -> + ?cmdline:string list -> + ?cmdline_is_comm:bool -> + ?uid:int32 -> + ?nspid:int32 list -> + ?process_start_from_boot:int64 -> + ?is_kthread:bool -> + unit -> + process_tree_process +(** [make_process_tree_process … ()] is a builder for type [process_tree_process] *) + +val copy_process_tree_process : process_tree_process -> process_tree_process + +val process_tree_process_has_pid : process_tree_process -> bool + (** presence of field "pid" in [process_tree_process] *) + +val process_tree_process_set_pid : process_tree_process -> int32 -> unit + (** set field pid in process_tree_process *) + +val process_tree_process_has_ppid : process_tree_process -> bool + (** presence of field "ppid" in [process_tree_process] *) + +val process_tree_process_set_ppid : process_tree_process -> int32 -> unit + (** set field ppid in process_tree_process *) + +val process_tree_process_set_cmdline : process_tree_process -> string list -> unit + (** set field cmdline in process_tree_process *) + +val process_tree_process_has_cmdline_is_comm : process_tree_process -> bool + (** presence of field "cmdline_is_comm" in [process_tree_process] *) + +val process_tree_process_set_cmdline_is_comm : process_tree_process -> bool -> unit + (** set field cmdline_is_comm in process_tree_process *) + +val process_tree_process_has_uid : process_tree_process -> bool + (** presence of field "uid" in [process_tree_process] *) + +val process_tree_process_set_uid : process_tree_process -> int32 -> unit + (** set field uid in process_tree_process *) + +val process_tree_process_set_nspid : process_tree_process -> int32 list -> unit + (** set field nspid in process_tree_process *) + +val process_tree_process_has_process_start_from_boot : process_tree_process -> bool + (** presence of field "process_start_from_boot" in [process_tree_process] *) + +val process_tree_process_set_process_start_from_boot : process_tree_process -> int64 -> unit + (** set field process_start_from_boot in process_tree_process *) + +val process_tree_process_has_is_kthread : process_tree_process -> bool + (** presence of field "is_kthread" in [process_tree_process] *) + +val process_tree_process_set_is_kthread : process_tree_process -> bool -> unit + (** set field is_kthread in process_tree_process *) + +val make_process_tree : + ?processes:process_tree_process list -> + ?threads:process_tree_thread list -> + ?collection_end_timestamp:int64 -> + unit -> + process_tree +(** [make_process_tree … ()] is a builder for type [process_tree] *) + +val copy_process_tree : process_tree -> process_tree + +val process_tree_set_processes : process_tree -> process_tree_process list -> unit + (** set field processes in process_tree *) + +val process_tree_set_threads : process_tree -> process_tree_thread list -> unit + (** set field threads in process_tree *) + +val process_tree_has_collection_end_timestamp : process_tree -> bool + (** presence of field "collection_end_timestamp" in [process_tree] *) + +val process_tree_set_collection_end_timestamp : process_tree -> int64 -> unit + (** set field collection_end_timestamp in process_tree *) + +val make_remote_clock_sync_synced_clocks : + ?client_clocks:clock_snapshot -> + ?host_clocks:clock_snapshot -> + unit -> + remote_clock_sync_synced_clocks +(** [make_remote_clock_sync_synced_clocks … ()] is a builder for type [remote_clock_sync_synced_clocks] *) + +val copy_remote_clock_sync_synced_clocks : remote_clock_sync_synced_clocks -> remote_clock_sync_synced_clocks + +val remote_clock_sync_synced_clocks_set_client_clocks : remote_clock_sync_synced_clocks -> clock_snapshot -> unit + (** set field client_clocks in remote_clock_sync_synced_clocks *) + +val remote_clock_sync_synced_clocks_set_host_clocks : remote_clock_sync_synced_clocks -> clock_snapshot -> unit + (** set field host_clocks in remote_clock_sync_synced_clocks *) + +val make_remote_clock_sync : + ?synced_clocks:remote_clock_sync_synced_clocks list -> + unit -> + remote_clock_sync +(** [make_remote_clock_sync … ()] is a builder for type [remote_clock_sync] *) + +val copy_remote_clock_sync : remote_clock_sync -> remote_clock_sync + +val remote_clock_sync_set_synced_clocks : remote_clock_sync -> remote_clock_sync_synced_clocks list -> unit + (** set field synced_clocks in remote_clock_sync *) + +val make_statsd_atom : + ?atom:unit list -> + ?timestamp_nanos:int64 list -> + unit -> + statsd_atom +(** [make_statsd_atom … ()] is a builder for type [statsd_atom] *) + +val copy_statsd_atom : statsd_atom -> statsd_atom + +val statsd_atom_set_atom : statsd_atom -> unit list -> unit + (** set field atom in statsd_atom *) + +val statsd_atom_set_timestamp_nanos : statsd_atom -> int64 list -> unit + (** set field timestamp_nanos in statsd_atom *) + +val make_sys_stats_meminfo_value : + ?key:meminfo_counters -> + ?value:int64 -> + unit -> + sys_stats_meminfo_value +(** [make_sys_stats_meminfo_value … ()] is a builder for type [sys_stats_meminfo_value] *) + +val copy_sys_stats_meminfo_value : sys_stats_meminfo_value -> sys_stats_meminfo_value + +val sys_stats_meminfo_value_has_key : sys_stats_meminfo_value -> bool + (** presence of field "key" in [sys_stats_meminfo_value] *) + +val sys_stats_meminfo_value_set_key : sys_stats_meminfo_value -> meminfo_counters -> unit + (** set field key in sys_stats_meminfo_value *) + +val sys_stats_meminfo_value_has_value : sys_stats_meminfo_value -> bool + (** presence of field "value" in [sys_stats_meminfo_value] *) + +val sys_stats_meminfo_value_set_value : sys_stats_meminfo_value -> int64 -> unit + (** set field value in sys_stats_meminfo_value *) + +val make_sys_stats_vmstat_value : + ?key:vmstat_counters -> + ?value:int64 -> + unit -> + sys_stats_vmstat_value +(** [make_sys_stats_vmstat_value … ()] is a builder for type [sys_stats_vmstat_value] *) + +val copy_sys_stats_vmstat_value : sys_stats_vmstat_value -> sys_stats_vmstat_value + +val sys_stats_vmstat_value_has_key : sys_stats_vmstat_value -> bool + (** presence of field "key" in [sys_stats_vmstat_value] *) + +val sys_stats_vmstat_value_set_key : sys_stats_vmstat_value -> vmstat_counters -> unit + (** set field key in sys_stats_vmstat_value *) + +val sys_stats_vmstat_value_has_value : sys_stats_vmstat_value -> bool + (** presence of field "value" in [sys_stats_vmstat_value] *) + +val sys_stats_vmstat_value_set_value : sys_stats_vmstat_value -> int64 -> unit + (** set field value in sys_stats_vmstat_value *) + +val make_sys_stats_cpu_times : + ?cpu_id:int32 -> + ?user_ns:int64 -> + ?user_nice_ns:int64 -> + ?system_mode_ns:int64 -> + ?idle_ns:int64 -> + ?io_wait_ns:int64 -> + ?irq_ns:int64 -> + ?softirq_ns:int64 -> + ?steal_ns:int64 -> + unit -> + sys_stats_cpu_times +(** [make_sys_stats_cpu_times … ()] is a builder for type [sys_stats_cpu_times] *) + +val copy_sys_stats_cpu_times : sys_stats_cpu_times -> sys_stats_cpu_times + +val sys_stats_cpu_times_has_cpu_id : sys_stats_cpu_times -> bool + (** presence of field "cpu_id" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_cpu_id : sys_stats_cpu_times -> int32 -> unit + (** set field cpu_id in sys_stats_cpu_times *) + +val sys_stats_cpu_times_has_user_ns : sys_stats_cpu_times -> bool + (** presence of field "user_ns" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_user_ns : sys_stats_cpu_times -> int64 -> unit + (** set field user_ns in sys_stats_cpu_times *) + +val sys_stats_cpu_times_has_user_nice_ns : sys_stats_cpu_times -> bool + (** presence of field "user_nice_ns" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_user_nice_ns : sys_stats_cpu_times -> int64 -> unit + (** set field user_nice_ns in sys_stats_cpu_times *) + +val sys_stats_cpu_times_has_system_mode_ns : sys_stats_cpu_times -> bool + (** presence of field "system_mode_ns" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_system_mode_ns : sys_stats_cpu_times -> int64 -> unit + (** set field system_mode_ns in sys_stats_cpu_times *) + +val sys_stats_cpu_times_has_idle_ns : sys_stats_cpu_times -> bool + (** presence of field "idle_ns" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_idle_ns : sys_stats_cpu_times -> int64 -> unit + (** set field idle_ns in sys_stats_cpu_times *) + +val sys_stats_cpu_times_has_io_wait_ns : sys_stats_cpu_times -> bool + (** presence of field "io_wait_ns" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_io_wait_ns : sys_stats_cpu_times -> int64 -> unit + (** set field io_wait_ns in sys_stats_cpu_times *) + +val sys_stats_cpu_times_has_irq_ns : sys_stats_cpu_times -> bool + (** presence of field "irq_ns" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_irq_ns : sys_stats_cpu_times -> int64 -> unit + (** set field irq_ns in sys_stats_cpu_times *) + +val sys_stats_cpu_times_has_softirq_ns : sys_stats_cpu_times -> bool + (** presence of field "softirq_ns" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_softirq_ns : sys_stats_cpu_times -> int64 -> unit + (** set field softirq_ns in sys_stats_cpu_times *) + +val sys_stats_cpu_times_has_steal_ns : sys_stats_cpu_times -> bool + (** presence of field "steal_ns" in [sys_stats_cpu_times] *) + +val sys_stats_cpu_times_set_steal_ns : sys_stats_cpu_times -> int64 -> unit + (** set field steal_ns in sys_stats_cpu_times *) + +val make_sys_stats_interrupt_count : + ?irq:int32 -> + ?count:int64 -> + unit -> + sys_stats_interrupt_count +(** [make_sys_stats_interrupt_count … ()] is a builder for type [sys_stats_interrupt_count] *) + +val copy_sys_stats_interrupt_count : sys_stats_interrupt_count -> sys_stats_interrupt_count + +val sys_stats_interrupt_count_has_irq : sys_stats_interrupt_count -> bool + (** presence of field "irq" in [sys_stats_interrupt_count] *) + +val sys_stats_interrupt_count_set_irq : sys_stats_interrupt_count -> int32 -> unit + (** set field irq in sys_stats_interrupt_count *) + +val sys_stats_interrupt_count_has_count : sys_stats_interrupt_count -> bool + (** presence of field "count" in [sys_stats_interrupt_count] *) + +val sys_stats_interrupt_count_set_count : sys_stats_interrupt_count -> int64 -> unit + (** set field count in sys_stats_interrupt_count *) + +val make_sys_stats_devfreq_value : + ?key:string -> + ?value:int64 -> + unit -> + sys_stats_devfreq_value +(** [make_sys_stats_devfreq_value … ()] is a builder for type [sys_stats_devfreq_value] *) + +val copy_sys_stats_devfreq_value : sys_stats_devfreq_value -> sys_stats_devfreq_value + +val sys_stats_devfreq_value_has_key : sys_stats_devfreq_value -> bool + (** presence of field "key" in [sys_stats_devfreq_value] *) + +val sys_stats_devfreq_value_set_key : sys_stats_devfreq_value -> string -> unit + (** set field key in sys_stats_devfreq_value *) + +val sys_stats_devfreq_value_has_value : sys_stats_devfreq_value -> bool + (** presence of field "value" in [sys_stats_devfreq_value] *) + +val sys_stats_devfreq_value_set_value : sys_stats_devfreq_value -> int64 -> unit + (** set field value in sys_stats_devfreq_value *) + +val make_sys_stats_buddy_info : + ?node:string -> + ?zone:string -> + ?order_pages:int32 list -> + unit -> + sys_stats_buddy_info +(** [make_sys_stats_buddy_info … ()] is a builder for type [sys_stats_buddy_info] *) + +val copy_sys_stats_buddy_info : sys_stats_buddy_info -> sys_stats_buddy_info + +val sys_stats_buddy_info_has_node : sys_stats_buddy_info -> bool + (** presence of field "node" in [sys_stats_buddy_info] *) + +val sys_stats_buddy_info_set_node : sys_stats_buddy_info -> string -> unit + (** set field node in sys_stats_buddy_info *) + +val sys_stats_buddy_info_has_zone : sys_stats_buddy_info -> bool + (** presence of field "zone" in [sys_stats_buddy_info] *) + +val sys_stats_buddy_info_set_zone : sys_stats_buddy_info -> string -> unit + (** set field zone in sys_stats_buddy_info *) + +val sys_stats_buddy_info_set_order_pages : sys_stats_buddy_info -> int32 list -> unit + (** set field order_pages in sys_stats_buddy_info *) + +val make_sys_stats_disk_stat : + ?device_name:string -> + ?read_sectors:int64 -> + ?read_time_ms:int64 -> + ?write_sectors:int64 -> + ?write_time_ms:int64 -> + ?discard_sectors:int64 -> + ?discard_time_ms:int64 -> + ?flush_count:int64 -> + ?flush_time_ms:int64 -> + unit -> + sys_stats_disk_stat +(** [make_sys_stats_disk_stat … ()] is a builder for type [sys_stats_disk_stat] *) + +val copy_sys_stats_disk_stat : sys_stats_disk_stat -> sys_stats_disk_stat + +val sys_stats_disk_stat_has_device_name : sys_stats_disk_stat -> bool + (** presence of field "device_name" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_device_name : sys_stats_disk_stat -> string -> unit + (** set field device_name in sys_stats_disk_stat *) + +val sys_stats_disk_stat_has_read_sectors : sys_stats_disk_stat -> bool + (** presence of field "read_sectors" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_read_sectors : sys_stats_disk_stat -> int64 -> unit + (** set field read_sectors in sys_stats_disk_stat *) + +val sys_stats_disk_stat_has_read_time_ms : sys_stats_disk_stat -> bool + (** presence of field "read_time_ms" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_read_time_ms : sys_stats_disk_stat -> int64 -> unit + (** set field read_time_ms in sys_stats_disk_stat *) + +val sys_stats_disk_stat_has_write_sectors : sys_stats_disk_stat -> bool + (** presence of field "write_sectors" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_write_sectors : sys_stats_disk_stat -> int64 -> unit + (** set field write_sectors in sys_stats_disk_stat *) + +val sys_stats_disk_stat_has_write_time_ms : sys_stats_disk_stat -> bool + (** presence of field "write_time_ms" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_write_time_ms : sys_stats_disk_stat -> int64 -> unit + (** set field write_time_ms in sys_stats_disk_stat *) + +val sys_stats_disk_stat_has_discard_sectors : sys_stats_disk_stat -> bool + (** presence of field "discard_sectors" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_discard_sectors : sys_stats_disk_stat -> int64 -> unit + (** set field discard_sectors in sys_stats_disk_stat *) + +val sys_stats_disk_stat_has_discard_time_ms : sys_stats_disk_stat -> bool + (** presence of field "discard_time_ms" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_discard_time_ms : sys_stats_disk_stat -> int64 -> unit + (** set field discard_time_ms in sys_stats_disk_stat *) + +val sys_stats_disk_stat_has_flush_count : sys_stats_disk_stat -> bool + (** presence of field "flush_count" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_flush_count : sys_stats_disk_stat -> int64 -> unit + (** set field flush_count in sys_stats_disk_stat *) + +val sys_stats_disk_stat_has_flush_time_ms : sys_stats_disk_stat -> bool + (** presence of field "flush_time_ms" in [sys_stats_disk_stat] *) + +val sys_stats_disk_stat_set_flush_time_ms : sys_stats_disk_stat -> int64 -> unit + (** set field flush_time_ms in sys_stats_disk_stat *) + +val make_sys_stats_psi_sample : + ?resource:sys_stats_psi_sample_psi_resource -> + ?total_ns:int64 -> + unit -> + sys_stats_psi_sample +(** [make_sys_stats_psi_sample … ()] is a builder for type [sys_stats_psi_sample] *) + +val copy_sys_stats_psi_sample : sys_stats_psi_sample -> sys_stats_psi_sample + +val sys_stats_psi_sample_has_resource : sys_stats_psi_sample -> bool + (** presence of field "resource" in [sys_stats_psi_sample] *) + +val sys_stats_psi_sample_set_resource : sys_stats_psi_sample -> sys_stats_psi_sample_psi_resource -> unit + (** set field resource in sys_stats_psi_sample *) + +val sys_stats_psi_sample_has_total_ns : sys_stats_psi_sample -> bool + (** presence of field "total_ns" in [sys_stats_psi_sample] *) + +val sys_stats_psi_sample_set_total_ns : sys_stats_psi_sample -> int64 -> unit + (** set field total_ns in sys_stats_psi_sample *) + +val make_sys_stats_thermal_zone : + ?name:string -> + ?temp:int64 -> + ?type_:string -> + unit -> + sys_stats_thermal_zone +(** [make_sys_stats_thermal_zone … ()] is a builder for type [sys_stats_thermal_zone] *) + +val copy_sys_stats_thermal_zone : sys_stats_thermal_zone -> sys_stats_thermal_zone + +val sys_stats_thermal_zone_has_name : sys_stats_thermal_zone -> bool + (** presence of field "name" in [sys_stats_thermal_zone] *) + +val sys_stats_thermal_zone_set_name : sys_stats_thermal_zone -> string -> unit + (** set field name in sys_stats_thermal_zone *) + +val sys_stats_thermal_zone_has_temp : sys_stats_thermal_zone -> bool + (** presence of field "temp" in [sys_stats_thermal_zone] *) + +val sys_stats_thermal_zone_set_temp : sys_stats_thermal_zone -> int64 -> unit + (** set field temp in sys_stats_thermal_zone *) + +val sys_stats_thermal_zone_has_type_ : sys_stats_thermal_zone -> bool + (** presence of field "type_" in [sys_stats_thermal_zone] *) + +val sys_stats_thermal_zone_set_type_ : sys_stats_thermal_zone -> string -> unit + (** set field type_ in sys_stats_thermal_zone *) + +val make_sys_stats_cpu_idle_state_entry : + ?state:string -> + ?duration_us:int64 -> + unit -> + sys_stats_cpu_idle_state_entry +(** [make_sys_stats_cpu_idle_state_entry … ()] is a builder for type [sys_stats_cpu_idle_state_entry] *) + +val copy_sys_stats_cpu_idle_state_entry : sys_stats_cpu_idle_state_entry -> sys_stats_cpu_idle_state_entry + +val sys_stats_cpu_idle_state_entry_has_state : sys_stats_cpu_idle_state_entry -> bool + (** presence of field "state" in [sys_stats_cpu_idle_state_entry] *) + +val sys_stats_cpu_idle_state_entry_set_state : sys_stats_cpu_idle_state_entry -> string -> unit + (** set field state in sys_stats_cpu_idle_state_entry *) + +val sys_stats_cpu_idle_state_entry_has_duration_us : sys_stats_cpu_idle_state_entry -> bool + (** presence of field "duration_us" in [sys_stats_cpu_idle_state_entry] *) + +val sys_stats_cpu_idle_state_entry_set_duration_us : sys_stats_cpu_idle_state_entry -> int64 -> unit + (** set field duration_us in sys_stats_cpu_idle_state_entry *) + +val make_sys_stats_cpu_idle_state : + ?cpu_id:int32 -> + ?cpuidle_state_entry:sys_stats_cpu_idle_state_entry list -> + unit -> + sys_stats_cpu_idle_state +(** [make_sys_stats_cpu_idle_state … ()] is a builder for type [sys_stats_cpu_idle_state] *) + +val copy_sys_stats_cpu_idle_state : sys_stats_cpu_idle_state -> sys_stats_cpu_idle_state + +val sys_stats_cpu_idle_state_has_cpu_id : sys_stats_cpu_idle_state -> bool + (** presence of field "cpu_id" in [sys_stats_cpu_idle_state] *) + +val sys_stats_cpu_idle_state_set_cpu_id : sys_stats_cpu_idle_state -> int32 -> unit + (** set field cpu_id in sys_stats_cpu_idle_state *) + +val sys_stats_cpu_idle_state_set_cpuidle_state_entry : sys_stats_cpu_idle_state -> sys_stats_cpu_idle_state_entry list -> unit + (** set field cpuidle_state_entry in sys_stats_cpu_idle_state *) + +val make_sys_stats : + ?meminfo:sys_stats_meminfo_value list -> + ?vmstat:sys_stats_vmstat_value list -> + ?cpu_stat:sys_stats_cpu_times list -> + ?num_forks:int64 -> + ?num_irq_total:int64 -> + ?num_irq:sys_stats_interrupt_count list -> + ?num_softirq_total:int64 -> + ?num_softirq:sys_stats_interrupt_count list -> + ?collection_end_timestamp:int64 -> + ?devfreq:sys_stats_devfreq_value list -> + ?cpufreq_khz:int32 list -> + ?buddy_info:sys_stats_buddy_info list -> + ?disk_stat:sys_stats_disk_stat list -> + ?psi:sys_stats_psi_sample list -> + ?thermal_zone:sys_stats_thermal_zone list -> + ?cpuidle_state:sys_stats_cpu_idle_state list -> + ?gpufreq_mhz:int64 list -> + unit -> + sys_stats +(** [make_sys_stats … ()] is a builder for type [sys_stats] *) + +val copy_sys_stats : sys_stats -> sys_stats + +val sys_stats_set_meminfo : sys_stats -> sys_stats_meminfo_value list -> unit + (** set field meminfo in sys_stats *) + +val sys_stats_set_vmstat : sys_stats -> sys_stats_vmstat_value list -> unit + (** set field vmstat in sys_stats *) + +val sys_stats_set_cpu_stat : sys_stats -> sys_stats_cpu_times list -> unit + (** set field cpu_stat in sys_stats *) + +val sys_stats_has_num_forks : sys_stats -> bool + (** presence of field "num_forks" in [sys_stats] *) + +val sys_stats_set_num_forks : sys_stats -> int64 -> unit + (** set field num_forks in sys_stats *) + +val sys_stats_has_num_irq_total : sys_stats -> bool + (** presence of field "num_irq_total" in [sys_stats] *) + +val sys_stats_set_num_irq_total : sys_stats -> int64 -> unit + (** set field num_irq_total in sys_stats *) + +val sys_stats_set_num_irq : sys_stats -> sys_stats_interrupt_count list -> unit + (** set field num_irq in sys_stats *) + +val sys_stats_has_num_softirq_total : sys_stats -> bool + (** presence of field "num_softirq_total" in [sys_stats] *) + +val sys_stats_set_num_softirq_total : sys_stats -> int64 -> unit + (** set field num_softirq_total in sys_stats *) + +val sys_stats_set_num_softirq : sys_stats -> sys_stats_interrupt_count list -> unit + (** set field num_softirq in sys_stats *) + +val sys_stats_has_collection_end_timestamp : sys_stats -> bool + (** presence of field "collection_end_timestamp" in [sys_stats] *) + +val sys_stats_set_collection_end_timestamp : sys_stats -> int64 -> unit + (** set field collection_end_timestamp in sys_stats *) + +val sys_stats_set_devfreq : sys_stats -> sys_stats_devfreq_value list -> unit + (** set field devfreq in sys_stats *) + +val sys_stats_set_cpufreq_khz : sys_stats -> int32 list -> unit + (** set field cpufreq_khz in sys_stats *) + +val sys_stats_set_buddy_info : sys_stats -> sys_stats_buddy_info list -> unit + (** set field buddy_info in sys_stats *) + +val sys_stats_set_disk_stat : sys_stats -> sys_stats_disk_stat list -> unit + (** set field disk_stat in sys_stats *) + +val sys_stats_set_psi : sys_stats -> sys_stats_psi_sample list -> unit + (** set field psi in sys_stats *) + +val sys_stats_set_thermal_zone : sys_stats -> sys_stats_thermal_zone list -> unit + (** set field thermal_zone in sys_stats *) + +val sys_stats_set_cpuidle_state : sys_stats -> sys_stats_cpu_idle_state list -> unit + (** set field cpuidle_state in sys_stats *) + +val sys_stats_set_gpufreq_mhz : sys_stats -> int64 list -> unit + (** set field gpufreq_mhz in sys_stats *) + +val make_cpu_info_arm_cpu_identifier : + ?implementer:int32 -> + ?architecture:int32 -> + ?variant:int32 -> + ?part:int32 -> + ?revision:int32 -> + unit -> + cpu_info_arm_cpu_identifier +(** [make_cpu_info_arm_cpu_identifier … ()] is a builder for type [cpu_info_arm_cpu_identifier] *) + +val copy_cpu_info_arm_cpu_identifier : cpu_info_arm_cpu_identifier -> cpu_info_arm_cpu_identifier + +val cpu_info_arm_cpu_identifier_has_implementer : cpu_info_arm_cpu_identifier -> bool + (** presence of field "implementer" in [cpu_info_arm_cpu_identifier] *) + +val cpu_info_arm_cpu_identifier_set_implementer : cpu_info_arm_cpu_identifier -> int32 -> unit + (** set field implementer in cpu_info_arm_cpu_identifier *) + +val cpu_info_arm_cpu_identifier_has_architecture : cpu_info_arm_cpu_identifier -> bool + (** presence of field "architecture" in [cpu_info_arm_cpu_identifier] *) + +val cpu_info_arm_cpu_identifier_set_architecture : cpu_info_arm_cpu_identifier -> int32 -> unit + (** set field architecture in cpu_info_arm_cpu_identifier *) + +val cpu_info_arm_cpu_identifier_has_variant : cpu_info_arm_cpu_identifier -> bool + (** presence of field "variant" in [cpu_info_arm_cpu_identifier] *) + +val cpu_info_arm_cpu_identifier_set_variant : cpu_info_arm_cpu_identifier -> int32 -> unit + (** set field variant in cpu_info_arm_cpu_identifier *) + +val cpu_info_arm_cpu_identifier_has_part : cpu_info_arm_cpu_identifier -> bool + (** presence of field "part" in [cpu_info_arm_cpu_identifier] *) + +val cpu_info_arm_cpu_identifier_set_part : cpu_info_arm_cpu_identifier -> int32 -> unit + (** set field part in cpu_info_arm_cpu_identifier *) + +val cpu_info_arm_cpu_identifier_has_revision : cpu_info_arm_cpu_identifier -> bool + (** presence of field "revision" in [cpu_info_arm_cpu_identifier] *) + +val cpu_info_arm_cpu_identifier_set_revision : cpu_info_arm_cpu_identifier -> int32 -> unit + (** set field revision in cpu_info_arm_cpu_identifier *) + +val make_cpu_info_cpu : + ?processor:string -> + ?frequencies:int32 list -> + ?capacity:int32 -> + ?identifier:cpu_info_cpu_identifier -> + ?features:int64 -> + unit -> + cpu_info_cpu +(** [make_cpu_info_cpu … ()] is a builder for type [cpu_info_cpu] *) + +val copy_cpu_info_cpu : cpu_info_cpu -> cpu_info_cpu + +val cpu_info_cpu_has_processor : cpu_info_cpu -> bool + (** presence of field "processor" in [cpu_info_cpu] *) + +val cpu_info_cpu_set_processor : cpu_info_cpu -> string -> unit + (** set field processor in cpu_info_cpu *) + +val cpu_info_cpu_set_frequencies : cpu_info_cpu -> int32 list -> unit + (** set field frequencies in cpu_info_cpu *) + +val cpu_info_cpu_has_capacity : cpu_info_cpu -> bool + (** presence of field "capacity" in [cpu_info_cpu] *) + +val cpu_info_cpu_set_capacity : cpu_info_cpu -> int32 -> unit + (** set field capacity in cpu_info_cpu *) + +val cpu_info_cpu_set_identifier : cpu_info_cpu -> cpu_info_cpu_identifier -> unit + (** set field identifier in cpu_info_cpu *) + +val cpu_info_cpu_has_features : cpu_info_cpu -> bool + (** presence of field "features" in [cpu_info_cpu] *) + +val cpu_info_cpu_set_features : cpu_info_cpu -> int64 -> unit + (** set field features in cpu_info_cpu *) + +val make_cpu_info : + ?cpus:cpu_info_cpu list -> + unit -> + cpu_info +(** [make_cpu_info … ()] is a builder for type [cpu_info] *) + +val copy_cpu_info : cpu_info -> cpu_info + +val cpu_info_set_cpus : cpu_info -> cpu_info_cpu list -> unit + (** set field cpus in cpu_info *) + +val make_test_event_test_payload : + ?str:string list -> + ?nested:test_event_test_payload list -> + ?single_string:string -> + ?single_int:int32 -> + ?repeated_ints:int32 list -> + ?remaining_nesting_depth:int32 -> + ?debug_annotations:debug_annotation list -> + unit -> + test_event_test_payload +(** [make_test_event_test_payload … ()] is a builder for type [test_event_test_payload] *) + +val copy_test_event_test_payload : test_event_test_payload -> test_event_test_payload + +val test_event_test_payload_set_str : test_event_test_payload -> string list -> unit + (** set field str in test_event_test_payload *) + +val test_event_test_payload_set_nested : test_event_test_payload -> test_event_test_payload list -> unit + (** set field nested in test_event_test_payload *) + +val test_event_test_payload_has_single_string : test_event_test_payload -> bool + (** presence of field "single_string" in [test_event_test_payload] *) + +val test_event_test_payload_set_single_string : test_event_test_payload -> string -> unit + (** set field single_string in test_event_test_payload *) + +val test_event_test_payload_has_single_int : test_event_test_payload -> bool + (** presence of field "single_int" in [test_event_test_payload] *) + +val test_event_test_payload_set_single_int : test_event_test_payload -> int32 -> unit + (** set field single_int in test_event_test_payload *) + +val test_event_test_payload_set_repeated_ints : test_event_test_payload -> int32 list -> unit + (** set field repeated_ints in test_event_test_payload *) + +val test_event_test_payload_has_remaining_nesting_depth : test_event_test_payload -> bool + (** presence of field "remaining_nesting_depth" in [test_event_test_payload] *) + +val test_event_test_payload_set_remaining_nesting_depth : test_event_test_payload -> int32 -> unit + (** set field remaining_nesting_depth in test_event_test_payload *) + +val test_event_test_payload_set_debug_annotations : test_event_test_payload -> debug_annotation list -> unit + (** set field debug_annotations in test_event_test_payload *) + +val make_test_event : + ?str:string -> + ?seq_value:int32 -> + ?counter:int64 -> + ?is_last:bool -> + ?payload:test_event_test_payload -> + unit -> + test_event +(** [make_test_event … ()] is a builder for type [test_event] *) + +val copy_test_event : test_event -> test_event + +val test_event_has_str : test_event -> bool + (** presence of field "str" in [test_event] *) + +val test_event_set_str : test_event -> string -> unit + (** set field str in test_event *) + +val test_event_has_seq_value : test_event -> bool + (** presence of field "seq_value" in [test_event] *) + +val test_event_set_seq_value : test_event -> int32 -> unit + (** set field seq_value in test_event *) + +val test_event_has_counter : test_event -> bool + (** presence of field "counter" in [test_event] *) + +val test_event_set_counter : test_event -> int64 -> unit + (** set field counter in test_event *) + +val test_event_has_is_last : test_event -> bool + (** presence of field "is_last" in [test_event] *) + +val test_event_set_is_last : test_event -> bool -> unit + (** set field is_last in test_event *) + +val test_event_set_payload : test_event -> test_event_test_payload -> unit + (** set field payload in test_event *) + +val make_trace_packet_defaults : + ?timestamp_clock_id:int32 -> + ?track_event_defaults:track_event_defaults -> + ?v8_code_defaults:v8_code_defaults -> + unit -> + trace_packet_defaults +(** [make_trace_packet_defaults … ()] is a builder for type [trace_packet_defaults] *) + +val copy_trace_packet_defaults : trace_packet_defaults -> trace_packet_defaults + +val trace_packet_defaults_has_timestamp_clock_id : trace_packet_defaults -> bool + (** presence of field "timestamp_clock_id" in [trace_packet_defaults] *) + +val trace_packet_defaults_set_timestamp_clock_id : trace_packet_defaults -> int32 -> unit + (** set field timestamp_clock_id in trace_packet_defaults *) + +val trace_packet_defaults_set_track_event_defaults : trace_packet_defaults -> track_event_defaults -> unit + (** set field track_event_defaults in trace_packet_defaults *) + +val trace_packet_defaults_set_v8_code_defaults : trace_packet_defaults -> v8_code_defaults -> unit + (** set field v8_code_defaults in trace_packet_defaults *) + +val make_trace_uuid : + ?msb:int64 -> + ?lsb:int64 -> + unit -> + trace_uuid +(** [make_trace_uuid … ()] is a builder for type [trace_uuid] *) + +val copy_trace_uuid : trace_uuid -> trace_uuid + +val trace_uuid_has_msb : trace_uuid -> bool + (** presence of field "msb" in [trace_uuid] *) + +val trace_uuid_set_msb : trace_uuid -> int64 -> unit + (** set field msb in trace_uuid *) + +val trace_uuid_has_lsb : trace_uuid -> bool + (** presence of field "lsb" in [trace_uuid] *) + +val trace_uuid_set_lsb : trace_uuid -> int64 -> unit + (** set field lsb in trace_uuid *) + +val make_process_descriptor : + ?pid:int32 -> + ?cmdline:string list -> + ?process_name:string -> + ?process_priority:int32 -> + ?start_timestamp_ns:int64 -> + ?chrome_process_type:process_descriptor_chrome_process_type -> + ?legacy_sort_index:int32 -> + ?process_labels:string list -> + unit -> + process_descriptor +(** [make_process_descriptor … ()] is a builder for type [process_descriptor] *) + +val copy_process_descriptor : process_descriptor -> process_descriptor + +val process_descriptor_has_pid : process_descriptor -> bool + (** presence of field "pid" in [process_descriptor] *) + +val process_descriptor_set_pid : process_descriptor -> int32 -> unit + (** set field pid in process_descriptor *) + +val process_descriptor_set_cmdline : process_descriptor -> string list -> unit + (** set field cmdline in process_descriptor *) + +val process_descriptor_has_process_name : process_descriptor -> bool + (** presence of field "process_name" in [process_descriptor] *) + +val process_descriptor_set_process_name : process_descriptor -> string -> unit + (** set field process_name in process_descriptor *) + +val process_descriptor_has_process_priority : process_descriptor -> bool + (** presence of field "process_priority" in [process_descriptor] *) + +val process_descriptor_set_process_priority : process_descriptor -> int32 -> unit + (** set field process_priority in process_descriptor *) + +val process_descriptor_has_start_timestamp_ns : process_descriptor -> bool + (** presence of field "start_timestamp_ns" in [process_descriptor] *) + +val process_descriptor_set_start_timestamp_ns : process_descriptor -> int64 -> unit + (** set field start_timestamp_ns in process_descriptor *) + +val process_descriptor_has_chrome_process_type : process_descriptor -> bool + (** presence of field "chrome_process_type" in [process_descriptor] *) + +val process_descriptor_set_chrome_process_type : process_descriptor -> process_descriptor_chrome_process_type -> unit + (** set field chrome_process_type in process_descriptor *) + +val process_descriptor_has_legacy_sort_index : process_descriptor -> bool + (** presence of field "legacy_sort_index" in [process_descriptor] *) + +val process_descriptor_set_legacy_sort_index : process_descriptor -> int32 -> unit + (** set field legacy_sort_index in process_descriptor *) + +val process_descriptor_set_process_labels : process_descriptor -> string list -> unit + (** set field process_labels in process_descriptor *) + +val make_track_event_range_of_interest : + ?start_us:int64 -> + unit -> + track_event_range_of_interest +(** [make_track_event_range_of_interest … ()] is a builder for type [track_event_range_of_interest] *) + +val copy_track_event_range_of_interest : track_event_range_of_interest -> track_event_range_of_interest + +val track_event_range_of_interest_has_start_us : track_event_range_of_interest -> bool + (** presence of field "start_us" in [track_event_range_of_interest] *) + +val track_event_range_of_interest_set_start_us : track_event_range_of_interest -> int64 -> unit + (** set field start_us in track_event_range_of_interest *) + +val make_thread_descriptor : + ?pid:int32 -> + ?tid:int32 -> + ?thread_name:string -> + ?chrome_thread_type:thread_descriptor_chrome_thread_type -> + ?reference_timestamp_us:int64 -> + ?reference_thread_time_us:int64 -> + ?reference_thread_instruction_count:int64 -> + ?legacy_sort_index:int32 -> + unit -> + thread_descriptor +(** [make_thread_descriptor … ()] is a builder for type [thread_descriptor] *) + +val copy_thread_descriptor : thread_descriptor -> thread_descriptor + +val thread_descriptor_has_pid : thread_descriptor -> bool + (** presence of field "pid" in [thread_descriptor] *) + +val thread_descriptor_set_pid : thread_descriptor -> int32 -> unit + (** set field pid in thread_descriptor *) + +val thread_descriptor_has_tid : thread_descriptor -> bool + (** presence of field "tid" in [thread_descriptor] *) + +val thread_descriptor_set_tid : thread_descriptor -> int32 -> unit + (** set field tid in thread_descriptor *) + +val thread_descriptor_has_thread_name : thread_descriptor -> bool + (** presence of field "thread_name" in [thread_descriptor] *) + +val thread_descriptor_set_thread_name : thread_descriptor -> string -> unit + (** set field thread_name in thread_descriptor *) + +val thread_descriptor_has_chrome_thread_type : thread_descriptor -> bool + (** presence of field "chrome_thread_type" in [thread_descriptor] *) + +val thread_descriptor_set_chrome_thread_type : thread_descriptor -> thread_descriptor_chrome_thread_type -> unit + (** set field chrome_thread_type in thread_descriptor *) + +val thread_descriptor_has_reference_timestamp_us : thread_descriptor -> bool + (** presence of field "reference_timestamp_us" in [thread_descriptor] *) + +val thread_descriptor_set_reference_timestamp_us : thread_descriptor -> int64 -> unit + (** set field reference_timestamp_us in thread_descriptor *) + +val thread_descriptor_has_reference_thread_time_us : thread_descriptor -> bool + (** presence of field "reference_thread_time_us" in [thread_descriptor] *) + +val thread_descriptor_set_reference_thread_time_us : thread_descriptor -> int64 -> unit + (** set field reference_thread_time_us in thread_descriptor *) + +val thread_descriptor_has_reference_thread_instruction_count : thread_descriptor -> bool + (** presence of field "reference_thread_instruction_count" in [thread_descriptor] *) + +val thread_descriptor_set_reference_thread_instruction_count : thread_descriptor -> int64 -> unit + (** set field reference_thread_instruction_count in thread_descriptor *) + +val thread_descriptor_has_legacy_sort_index : thread_descriptor -> bool + (** presence of field "legacy_sort_index" in [thread_descriptor] *) + +val thread_descriptor_set_legacy_sort_index : thread_descriptor -> int32 -> unit + (** set field legacy_sort_index in thread_descriptor *) + +val make_chrome_process_descriptor : + ?process_type:int32 -> + ?process_priority:int32 -> + ?legacy_sort_index:int32 -> + ?host_app_package_name:string -> + ?crash_trace_id:int64 -> + unit -> + chrome_process_descriptor +(** [make_chrome_process_descriptor … ()] is a builder for type [chrome_process_descriptor] *) + +val copy_chrome_process_descriptor : chrome_process_descriptor -> chrome_process_descriptor + +val chrome_process_descriptor_has_process_type : chrome_process_descriptor -> bool + (** presence of field "process_type" in [chrome_process_descriptor] *) + +val chrome_process_descriptor_set_process_type : chrome_process_descriptor -> int32 -> unit + (** set field process_type in chrome_process_descriptor *) + +val chrome_process_descriptor_has_process_priority : chrome_process_descriptor -> bool + (** presence of field "process_priority" in [chrome_process_descriptor] *) + +val chrome_process_descriptor_set_process_priority : chrome_process_descriptor -> int32 -> unit + (** set field process_priority in chrome_process_descriptor *) + +val chrome_process_descriptor_has_legacy_sort_index : chrome_process_descriptor -> bool + (** presence of field "legacy_sort_index" in [chrome_process_descriptor] *) + +val chrome_process_descriptor_set_legacy_sort_index : chrome_process_descriptor -> int32 -> unit + (** set field legacy_sort_index in chrome_process_descriptor *) + +val chrome_process_descriptor_has_host_app_package_name : chrome_process_descriptor -> bool + (** presence of field "host_app_package_name" in [chrome_process_descriptor] *) + +val chrome_process_descriptor_set_host_app_package_name : chrome_process_descriptor -> string -> unit + (** set field host_app_package_name in chrome_process_descriptor *) + +val chrome_process_descriptor_has_crash_trace_id : chrome_process_descriptor -> bool + (** presence of field "crash_trace_id" in [chrome_process_descriptor] *) + +val chrome_process_descriptor_set_crash_trace_id : chrome_process_descriptor -> int64 -> unit + (** set field crash_trace_id in chrome_process_descriptor *) + +val make_chrome_thread_descriptor : + ?thread_type:int32 -> + ?legacy_sort_index:int32 -> + ?is_sandboxed_tid:bool -> + unit -> + chrome_thread_descriptor +(** [make_chrome_thread_descriptor … ()] is a builder for type [chrome_thread_descriptor] *) + +val copy_chrome_thread_descriptor : chrome_thread_descriptor -> chrome_thread_descriptor + +val chrome_thread_descriptor_has_thread_type : chrome_thread_descriptor -> bool + (** presence of field "thread_type" in [chrome_thread_descriptor] *) + +val chrome_thread_descriptor_set_thread_type : chrome_thread_descriptor -> int32 -> unit + (** set field thread_type in chrome_thread_descriptor *) + +val chrome_thread_descriptor_has_legacy_sort_index : chrome_thread_descriptor -> bool + (** presence of field "legacy_sort_index" in [chrome_thread_descriptor] *) + +val chrome_thread_descriptor_set_legacy_sort_index : chrome_thread_descriptor -> int32 -> unit + (** set field legacy_sort_index in chrome_thread_descriptor *) + +val chrome_thread_descriptor_has_is_sandboxed_tid : chrome_thread_descriptor -> bool + (** presence of field "is_sandboxed_tid" in [chrome_thread_descriptor] *) + +val chrome_thread_descriptor_set_is_sandboxed_tid : chrome_thread_descriptor -> bool -> unit + (** set field is_sandboxed_tid in chrome_thread_descriptor *) + +val make_counter_descriptor : + ?type_:counter_descriptor_builtin_counter_type -> + ?categories:string list -> + ?unit_:counter_descriptor_unit -> + ?unit_name:string -> + ?unit_multiplier:int64 -> + ?is_incremental:bool -> + ?y_axis_share_key:string -> + unit -> + counter_descriptor +(** [make_counter_descriptor … ()] is a builder for type [counter_descriptor] *) + +val copy_counter_descriptor : counter_descriptor -> counter_descriptor + +val counter_descriptor_has_type_ : counter_descriptor -> bool + (** presence of field "type_" in [counter_descriptor] *) + +val counter_descriptor_set_type_ : counter_descriptor -> counter_descriptor_builtin_counter_type -> unit + (** set field type_ in counter_descriptor *) + +val counter_descriptor_set_categories : counter_descriptor -> string list -> unit + (** set field categories in counter_descriptor *) + +val counter_descriptor_has_unit_ : counter_descriptor -> bool + (** presence of field "unit_" in [counter_descriptor] *) + +val counter_descriptor_set_unit_ : counter_descriptor -> counter_descriptor_unit -> unit + (** set field unit_ in counter_descriptor *) + +val counter_descriptor_has_unit_name : counter_descriptor -> bool + (** presence of field "unit_name" in [counter_descriptor] *) + +val counter_descriptor_set_unit_name : counter_descriptor -> string -> unit + (** set field unit_name in counter_descriptor *) + +val counter_descriptor_has_unit_multiplier : counter_descriptor -> bool + (** presence of field "unit_multiplier" in [counter_descriptor] *) + +val counter_descriptor_set_unit_multiplier : counter_descriptor -> int64 -> unit + (** set field unit_multiplier in counter_descriptor *) + +val counter_descriptor_has_is_incremental : counter_descriptor -> bool + (** presence of field "is_incremental" in [counter_descriptor] *) + +val counter_descriptor_set_is_incremental : counter_descriptor -> bool -> unit + (** set field is_incremental in counter_descriptor *) + +val counter_descriptor_has_y_axis_share_key : counter_descriptor -> bool + (** presence of field "y_axis_share_key" in [counter_descriptor] *) + +val counter_descriptor_set_y_axis_share_key : counter_descriptor -> string -> unit + (** set field y_axis_share_key in counter_descriptor *) + +val make_track_descriptor : + ?uuid:int64 -> + ?parent_uuid:int64 -> + ?static_or_dynamic_name:track_descriptor_static_or_dynamic_name -> + ?description:string -> + ?process:process_descriptor -> + ?chrome_process:chrome_process_descriptor -> + ?thread:thread_descriptor -> + ?chrome_thread:chrome_thread_descriptor -> + ?counter:counter_descriptor -> + ?disallow_merging_with_system_tracks:bool -> + ?child_ordering:track_descriptor_child_tracks_ordering -> + ?sibling_order_rank:int32 -> + ?sibling_merge_behavior:track_descriptor_sibling_merge_behavior -> + ?sibling_merge_key_field:track_descriptor_sibling_merge_key_field -> + unit -> + track_descriptor +(** [make_track_descriptor … ()] is a builder for type [track_descriptor] *) + +val copy_track_descriptor : track_descriptor -> track_descriptor + +val track_descriptor_has_uuid : track_descriptor -> bool + (** presence of field "uuid" in [track_descriptor] *) + +val track_descriptor_set_uuid : track_descriptor -> int64 -> unit + (** set field uuid in track_descriptor *) + +val track_descriptor_has_parent_uuid : track_descriptor -> bool + (** presence of field "parent_uuid" in [track_descriptor] *) + +val track_descriptor_set_parent_uuid : track_descriptor -> int64 -> unit + (** set field parent_uuid in track_descriptor *) + +val track_descriptor_set_static_or_dynamic_name : track_descriptor -> track_descriptor_static_or_dynamic_name -> unit + (** set field static_or_dynamic_name in track_descriptor *) + +val track_descriptor_has_description : track_descriptor -> bool + (** presence of field "description" in [track_descriptor] *) + +val track_descriptor_set_description : track_descriptor -> string -> unit + (** set field description in track_descriptor *) + +val track_descriptor_set_process : track_descriptor -> process_descriptor -> unit + (** set field process in track_descriptor *) + +val track_descriptor_set_chrome_process : track_descriptor -> chrome_process_descriptor -> unit + (** set field chrome_process in track_descriptor *) + +val track_descriptor_set_thread : track_descriptor -> thread_descriptor -> unit + (** set field thread in track_descriptor *) + +val track_descriptor_set_chrome_thread : track_descriptor -> chrome_thread_descriptor -> unit + (** set field chrome_thread in track_descriptor *) + +val track_descriptor_set_counter : track_descriptor -> counter_descriptor -> unit + (** set field counter in track_descriptor *) + +val track_descriptor_has_disallow_merging_with_system_tracks : track_descriptor -> bool + (** presence of field "disallow_merging_with_system_tracks" in [track_descriptor] *) + +val track_descriptor_set_disallow_merging_with_system_tracks : track_descriptor -> bool -> unit + (** set field disallow_merging_with_system_tracks in track_descriptor *) + +val track_descriptor_has_child_ordering : track_descriptor -> bool + (** presence of field "child_ordering" in [track_descriptor] *) + +val track_descriptor_set_child_ordering : track_descriptor -> track_descriptor_child_tracks_ordering -> unit + (** set field child_ordering in track_descriptor *) + +val track_descriptor_has_sibling_order_rank : track_descriptor -> bool + (** presence of field "sibling_order_rank" in [track_descriptor] *) + +val track_descriptor_set_sibling_order_rank : track_descriptor -> int32 -> unit + (** set field sibling_order_rank in track_descriptor *) + +val track_descriptor_has_sibling_merge_behavior : track_descriptor -> bool + (** presence of field "sibling_merge_behavior" in [track_descriptor] *) + +val track_descriptor_set_sibling_merge_behavior : track_descriptor -> track_descriptor_sibling_merge_behavior -> unit + (** set field sibling_merge_behavior in track_descriptor *) + +val track_descriptor_set_sibling_merge_key_field : track_descriptor -> track_descriptor_sibling_merge_key_field -> unit + (** set field sibling_merge_key_field in track_descriptor *) + +val make_chrome_historgram_translation_table : + ?hash_to_name:(int64 * string) list -> + unit -> + chrome_historgram_translation_table +(** [make_chrome_historgram_translation_table … ()] is a builder for type [chrome_historgram_translation_table] *) + +val copy_chrome_historgram_translation_table : chrome_historgram_translation_table -> chrome_historgram_translation_table + +val chrome_historgram_translation_table_set_hash_to_name : chrome_historgram_translation_table -> (int64 * string) list -> unit + (** set field hash_to_name in chrome_historgram_translation_table *) + +val make_chrome_user_event_translation_table : + ?action_hash_to_name:(int64 * string) list -> + unit -> + chrome_user_event_translation_table +(** [make_chrome_user_event_translation_table … ()] is a builder for type [chrome_user_event_translation_table] *) + +val copy_chrome_user_event_translation_table : chrome_user_event_translation_table -> chrome_user_event_translation_table + +val chrome_user_event_translation_table_set_action_hash_to_name : chrome_user_event_translation_table -> (int64 * string) list -> unit + (** set field action_hash_to_name in chrome_user_event_translation_table *) + +val make_chrome_performance_mark_translation_table : + ?site_hash_to_name:(int32 * string) list -> + ?mark_hash_to_name:(int32 * string) list -> + unit -> + chrome_performance_mark_translation_table +(** [make_chrome_performance_mark_translation_table … ()] is a builder for type [chrome_performance_mark_translation_table] *) + +val copy_chrome_performance_mark_translation_table : chrome_performance_mark_translation_table -> chrome_performance_mark_translation_table + +val chrome_performance_mark_translation_table_set_site_hash_to_name : chrome_performance_mark_translation_table -> (int32 * string) list -> unit + (** set field site_hash_to_name in chrome_performance_mark_translation_table *) + +val chrome_performance_mark_translation_table_set_mark_hash_to_name : chrome_performance_mark_translation_table -> (int32 * string) list -> unit + (** set field mark_hash_to_name in chrome_performance_mark_translation_table *) + +val make_slice_name_translation_table : + ?raw_to_deobfuscated_name:(string * string) list -> + unit -> + slice_name_translation_table +(** [make_slice_name_translation_table … ()] is a builder for type [slice_name_translation_table] *) + +val copy_slice_name_translation_table : slice_name_translation_table -> slice_name_translation_table + +val slice_name_translation_table_set_raw_to_deobfuscated_name : slice_name_translation_table -> (string * string) list -> unit + (** set field raw_to_deobfuscated_name in slice_name_translation_table *) + +val make_process_track_name_translation_table : + ?raw_to_deobfuscated_name:(string * string) list -> + unit -> + process_track_name_translation_table +(** [make_process_track_name_translation_table … ()] is a builder for type [process_track_name_translation_table] *) + +val copy_process_track_name_translation_table : process_track_name_translation_table -> process_track_name_translation_table + +val process_track_name_translation_table_set_raw_to_deobfuscated_name : process_track_name_translation_table -> (string * string) list -> unit + (** set field raw_to_deobfuscated_name in process_track_name_translation_table *) + +val make_chrome_study_translation_table : + ?hash_to_name:(int64 * string) list -> + unit -> + chrome_study_translation_table +(** [make_chrome_study_translation_table … ()] is a builder for type [chrome_study_translation_table] *) + +val copy_chrome_study_translation_table : chrome_study_translation_table -> chrome_study_translation_table + +val chrome_study_translation_table_set_hash_to_name : chrome_study_translation_table -> (int64 * string) list -> unit + (** set field hash_to_name in chrome_study_translation_table *) + +val make_trigger : + ?trigger_name:string -> + ?producer_name:string -> + ?trusted_producer_uid:int32 -> + ?stop_delay_ms:int64 -> + unit -> + trigger +(** [make_trigger … ()] is a builder for type [trigger] *) + +val copy_trigger : trigger -> trigger + +val trigger_has_trigger_name : trigger -> bool + (** presence of field "trigger_name" in [trigger] *) + +val trigger_set_trigger_name : trigger -> string -> unit + (** set field trigger_name in trigger *) + +val trigger_has_producer_name : trigger -> bool + (** presence of field "producer_name" in [trigger] *) + +val trigger_set_producer_name : trigger -> string -> unit + (** set field producer_name in trigger *) + +val trigger_has_trusted_producer_uid : trigger -> bool + (** presence of field "trusted_producer_uid" in [trigger] *) + +val trigger_set_trusted_producer_uid : trigger -> int32 -> unit + (** set field trusted_producer_uid in trigger *) + +val trigger_has_stop_delay_ms : trigger -> bool + (** presence of field "stop_delay_ms" in [trigger] *) + +val trigger_set_stop_delay_ms : trigger -> int64 -> unit + (** set field stop_delay_ms in trigger *) + +val make_ui_state : + ?timeline_start_ts:int64 -> + ?timeline_end_ts:int64 -> + ?highlight_process:ui_state_highlight_process -> + unit -> + ui_state +(** [make_ui_state … ()] is a builder for type [ui_state] *) + +val copy_ui_state : ui_state -> ui_state + +val ui_state_has_timeline_start_ts : ui_state -> bool + (** presence of field "timeline_start_ts" in [ui_state] *) + +val ui_state_set_timeline_start_ts : ui_state -> int64 -> unit + (** set field timeline_start_ts in ui_state *) + +val ui_state_has_timeline_end_ts : ui_state -> bool + (** presence of field "timeline_end_ts" in [ui_state] *) + +val ui_state_set_timeline_end_ts : ui_state -> int64 -> unit + (** set field timeline_end_ts in ui_state *) + +val ui_state_set_highlight_process : ui_state -> ui_state_highlight_process -> unit + (** set field highlight_process in ui_state *) + +val make_trace_packet : + ?timestamp:int64 -> + ?timestamp_clock_id:int32 -> + ?data:trace_packet_data -> + ?optional_trusted_uid:trace_packet_optional_trusted_uid -> + ?optional_trusted_packet_sequence_id:trace_packet_optional_trusted_packet_sequence_id -> + ?trusted_pid:int32 -> + ?interned_data:interned_data -> + ?sequence_flags:int32 -> + ?incremental_state_cleared:bool -> + ?trace_packet_defaults:trace_packet_defaults -> + ?previous_packet_dropped:bool -> + ?first_packet_on_sequence:bool -> + ?machine_id:int32 -> + unit -> + trace_packet +(** [make_trace_packet … ()] is a builder for type [trace_packet] *) + +val copy_trace_packet : trace_packet -> trace_packet + +val trace_packet_has_timestamp : trace_packet -> bool + (** presence of field "timestamp" in [trace_packet] *) + +val trace_packet_set_timestamp : trace_packet -> int64 -> unit + (** set field timestamp in trace_packet *) + +val trace_packet_has_timestamp_clock_id : trace_packet -> bool + (** presence of field "timestamp_clock_id" in [trace_packet] *) + +val trace_packet_set_timestamp_clock_id : trace_packet -> int32 -> unit + (** set field timestamp_clock_id in trace_packet *) + +val trace_packet_set_data : trace_packet -> trace_packet_data -> unit + (** set field data in trace_packet *) + +val trace_packet_set_optional_trusted_uid : trace_packet -> trace_packet_optional_trusted_uid -> unit + (** set field optional_trusted_uid in trace_packet *) + +val trace_packet_set_optional_trusted_packet_sequence_id : trace_packet -> trace_packet_optional_trusted_packet_sequence_id -> unit + (** set field optional_trusted_packet_sequence_id in trace_packet *) + +val trace_packet_has_trusted_pid : trace_packet -> bool + (** presence of field "trusted_pid" in [trace_packet] *) + +val trace_packet_set_trusted_pid : trace_packet -> int32 -> unit + (** set field trusted_pid in trace_packet *) + +val trace_packet_set_interned_data : trace_packet -> interned_data -> unit + (** set field interned_data in trace_packet *) + +val trace_packet_has_sequence_flags : trace_packet -> bool + (** presence of field "sequence_flags" in [trace_packet] *) + +val trace_packet_set_sequence_flags : trace_packet -> int32 -> unit + (** set field sequence_flags in trace_packet *) + +val trace_packet_has_incremental_state_cleared : trace_packet -> bool + (** presence of field "incremental_state_cleared" in [trace_packet] *) + +val trace_packet_set_incremental_state_cleared : trace_packet -> bool -> unit + (** set field incremental_state_cleared in trace_packet *) + +val trace_packet_set_trace_packet_defaults : trace_packet -> trace_packet_defaults -> unit + (** set field trace_packet_defaults in trace_packet *) + +val trace_packet_has_previous_packet_dropped : trace_packet -> bool + (** presence of field "previous_packet_dropped" in [trace_packet] *) + +val trace_packet_set_previous_packet_dropped : trace_packet -> bool -> unit + (** set field previous_packet_dropped in trace_packet *) + +val trace_packet_has_first_packet_on_sequence : trace_packet -> bool + (** presence of field "first_packet_on_sequence" in [trace_packet] *) + +val trace_packet_set_first_packet_on_sequence : trace_packet -> bool -> unit + (** set field first_packet_on_sequence in trace_packet *) + +val trace_packet_has_machine_id : trace_packet -> bool + (** presence of field "machine_id" in [trace_packet] *) + +val trace_packet_set_machine_id : trace_packet -> int32 -> unit + (** set field machine_id in trace_packet *) + +val make_trace : + ?packet:trace_packet list -> + unit -> + trace +(** [make_trace … ()] is a builder for type [trace] *) + +val copy_trace : trace -> trace + +val trace_set_packet : trace -> trace_packet list -> unit + (** set field packet in trace *) + + +(** {2 Formatters} *) + +val pp_ftrace_descriptor_atrace_category : Format.formatter -> ftrace_descriptor_atrace_category -> unit +(** [pp_ftrace_descriptor_atrace_category v] formats v *) + +val pp_ftrace_descriptor : Format.formatter -> ftrace_descriptor -> unit +(** [pp_ftrace_descriptor v] formats v *) + +val pp_gpu_counter_descriptor_gpu_counter_group : Format.formatter -> gpu_counter_descriptor_gpu_counter_group -> unit +(** [pp_gpu_counter_descriptor_gpu_counter_group v] formats v *) + +val pp_gpu_counter_descriptor_measure_unit : Format.formatter -> gpu_counter_descriptor_measure_unit -> unit +(** [pp_gpu_counter_descriptor_measure_unit v] formats v *) + +val pp_gpu_counter_descriptor_gpu_counter_spec_peak_value : Format.formatter -> gpu_counter_descriptor_gpu_counter_spec_peak_value -> unit +(** [pp_gpu_counter_descriptor_gpu_counter_spec_peak_value v] formats v *) + +val pp_gpu_counter_descriptor_gpu_counter_spec : Format.formatter -> gpu_counter_descriptor_gpu_counter_spec -> unit +(** [pp_gpu_counter_descriptor_gpu_counter_spec v] formats v *) + +val pp_gpu_counter_descriptor_gpu_counter_block : Format.formatter -> gpu_counter_descriptor_gpu_counter_block -> unit +(** [pp_gpu_counter_descriptor_gpu_counter_block v] formats v *) + +val pp_gpu_counter_descriptor : Format.formatter -> gpu_counter_descriptor -> unit +(** [pp_gpu_counter_descriptor v] formats v *) + +val pp_track_event_category : Format.formatter -> track_event_category -> unit +(** [pp_track_event_category v] formats v *) + +val pp_track_event_descriptor : Format.formatter -> track_event_descriptor -> unit +(** [pp_track_event_descriptor v] formats v *) + +val pp_data_source_descriptor : Format.formatter -> data_source_descriptor -> unit +(** [pp_data_source_descriptor v] formats v *) + +val pp_tracing_service_state_producer : Format.formatter -> tracing_service_state_producer -> unit +(** [pp_tracing_service_state_producer v] formats v *) + +val pp_tracing_service_state_data_source : Format.formatter -> tracing_service_state_data_source -> unit +(** [pp_tracing_service_state_data_source v] formats v *) + +val pp_tracing_service_state_tracing_session : Format.formatter -> tracing_service_state_tracing_session -> unit +(** [pp_tracing_service_state_tracing_session v] formats v *) + +val pp_tracing_service_state : Format.formatter -> tracing_service_state -> unit +(** [pp_tracing_service_state v] formats v *) + +val pp_builtin_clock : Format.formatter -> builtin_clock -> unit +(** [pp_builtin_clock v] formats v *) + +val pp_android_game_intervention_list_config : Format.formatter -> android_game_intervention_list_config -> unit +(** [pp_android_game_intervention_list_config v] formats v *) + +val pp_android_input_event_config_trace_mode : Format.formatter -> android_input_event_config_trace_mode -> unit +(** [pp_android_input_event_config_trace_mode v] formats v *) + +val pp_android_input_event_config_trace_level : Format.formatter -> android_input_event_config_trace_level -> unit +(** [pp_android_input_event_config_trace_level v] formats v *) + +val pp_android_input_event_config_trace_rule : Format.formatter -> android_input_event_config_trace_rule -> unit +(** [pp_android_input_event_config_trace_rule v] formats v *) + +val pp_android_input_event_config : Format.formatter -> android_input_event_config -> unit +(** [pp_android_input_event_config v] formats v *) + +val pp_android_log_id : Format.formatter -> android_log_id -> unit +(** [pp_android_log_id v] formats v *) + +val pp_android_log_priority : Format.formatter -> android_log_priority -> unit +(** [pp_android_log_priority v] formats v *) + +val pp_android_log_config : Format.formatter -> android_log_config -> unit +(** [pp_android_log_config v] formats v *) + +val pp_android_polled_state_config : Format.formatter -> android_polled_state_config -> unit +(** [pp_android_polled_state_config v] formats v *) + +val pp_android_sdk_sysprop_guard_config : Format.formatter -> android_sdk_sysprop_guard_config -> unit +(** [pp_android_sdk_sysprop_guard_config v] formats v *) + +val pp_android_system_property_config : Format.formatter -> android_system_property_config -> unit +(** [pp_android_system_property_config v] formats v *) + +val pp_app_wakelocks_config : Format.formatter -> app_wakelocks_config -> unit +(** [pp_app_wakelocks_config v] formats v *) + +val pp_cpu_per_uid_config : Format.formatter -> cpu_per_uid_config -> unit +(** [pp_cpu_per_uid_config v] formats v *) + +val pp_kernel_wakelocks_config : Format.formatter -> kernel_wakelocks_config -> unit +(** [pp_kernel_wakelocks_config v] formats v *) + +val pp_network_packet_trace_config : Format.formatter -> network_packet_trace_config -> unit +(** [pp_network_packet_trace_config v] formats v *) + +val pp_packages_list_config : Format.formatter -> packages_list_config -> unit +(** [pp_packages_list_config v] formats v *) + +val pp_pixel_modem_config_event_group : Format.formatter -> pixel_modem_config_event_group -> unit +(** [pp_pixel_modem_config_event_group v] formats v *) + +val pp_pixel_modem_config : Format.formatter -> pixel_modem_config -> unit +(** [pp_pixel_modem_config v] formats v *) + +val pp_proto_log_level : Format.formatter -> proto_log_level -> unit +(** [pp_proto_log_level v] formats v *) + +val pp_proto_log_config_tracing_mode : Format.formatter -> proto_log_config_tracing_mode -> unit +(** [pp_proto_log_config_tracing_mode v] formats v *) + +val pp_proto_log_group : Format.formatter -> proto_log_group -> unit +(** [pp_proto_log_group v] formats v *) + +val pp_proto_log_config : Format.formatter -> proto_log_config -> unit +(** [pp_proto_log_config v] formats v *) + +val pp_surface_flinger_layers_config_mode : Format.formatter -> surface_flinger_layers_config_mode -> unit +(** [pp_surface_flinger_layers_config_mode v] formats v *) + +val pp_surface_flinger_layers_config_trace_flag : Format.formatter -> surface_flinger_layers_config_trace_flag -> unit +(** [pp_surface_flinger_layers_config_trace_flag v] formats v *) + +val pp_surface_flinger_layers_config : Format.formatter -> surface_flinger_layers_config -> unit +(** [pp_surface_flinger_layers_config v] formats v *) + +val pp_surface_flinger_transactions_config_mode : Format.formatter -> surface_flinger_transactions_config_mode -> unit +(** [pp_surface_flinger_transactions_config_mode v] formats v *) + +val pp_surface_flinger_transactions_config : Format.formatter -> surface_flinger_transactions_config -> unit +(** [pp_surface_flinger_transactions_config v] formats v *) + +val pp_window_manager_config_log_frequency : Format.formatter -> window_manager_config_log_frequency -> unit +(** [pp_window_manager_config_log_frequency v] formats v *) + +val pp_window_manager_config_log_level : Format.formatter -> window_manager_config_log_level -> unit +(** [pp_window_manager_config_log_level v] formats v *) + +val pp_window_manager_config : Format.formatter -> window_manager_config -> unit +(** [pp_window_manager_config v] formats v *) + +val pp_chrome_config_client_priority : Format.formatter -> chrome_config_client_priority -> unit +(** [pp_chrome_config_client_priority v] formats v *) + +val pp_chrome_config : Format.formatter -> chrome_config -> unit +(** [pp_chrome_config v] formats v *) + +val pp_chromium_histogram_samples_config_histogram_sample : Format.formatter -> chromium_histogram_samples_config_histogram_sample -> unit +(** [pp_chromium_histogram_samples_config_histogram_sample v] formats v *) + +val pp_chromium_histogram_samples_config : Format.formatter -> chromium_histogram_samples_config -> unit +(** [pp_chromium_histogram_samples_config v] formats v *) + +val pp_chromium_system_metrics_config : Format.formatter -> chromium_system_metrics_config -> unit +(** [pp_chromium_system_metrics_config v] formats v *) + +val pp_v8_config : Format.formatter -> v8_config -> unit +(** [pp_v8_config v] formats v *) + +val pp_etw_config_kernel_flag : Format.formatter -> etw_config_kernel_flag -> unit +(** [pp_etw_config_kernel_flag v] formats v *) + +val pp_etw_config : Format.formatter -> etw_config -> unit +(** [pp_etw_config v] formats v *) + +val pp_frozen_ftrace_config : Format.formatter -> frozen_ftrace_config -> unit +(** [pp_frozen_ftrace_config v] formats v *) + +val pp_ftrace_config_compact_sched_config : Format.formatter -> ftrace_config_compact_sched_config -> unit +(** [pp_ftrace_config_compact_sched_config v] formats v *) + +val pp_ftrace_config_print_filter_rule_atrace_message : Format.formatter -> ftrace_config_print_filter_rule_atrace_message -> unit +(** [pp_ftrace_config_print_filter_rule_atrace_message v] formats v *) + +val pp_ftrace_config_print_filter_rule_match : Format.formatter -> ftrace_config_print_filter_rule_match -> unit +(** [pp_ftrace_config_print_filter_rule_match v] formats v *) + +val pp_ftrace_config_print_filter_rule : Format.formatter -> ftrace_config_print_filter_rule -> unit +(** [pp_ftrace_config_print_filter_rule v] formats v *) + +val pp_ftrace_config_print_filter : Format.formatter -> ftrace_config_print_filter -> unit +(** [pp_ftrace_config_print_filter v] formats v *) + +val pp_ftrace_config_ksyms_mem_policy : Format.formatter -> ftrace_config_ksyms_mem_policy -> unit +(** [pp_ftrace_config_ksyms_mem_policy v] formats v *) + +val pp_ftrace_config_kprobe_event_kprobe_type : Format.formatter -> ftrace_config_kprobe_event_kprobe_type -> unit +(** [pp_ftrace_config_kprobe_event_kprobe_type v] formats v *) + +val pp_ftrace_config_kprobe_event : Format.formatter -> ftrace_config_kprobe_event -> unit +(** [pp_ftrace_config_kprobe_event v] formats v *) + +val pp_ftrace_config_tracefs_option_state : Format.formatter -> ftrace_config_tracefs_option_state -> unit +(** [pp_ftrace_config_tracefs_option_state v] formats v *) + +val pp_ftrace_config_tracefs_option : Format.formatter -> ftrace_config_tracefs_option -> unit +(** [pp_ftrace_config_tracefs_option v] formats v *) + +val pp_ftrace_config : Format.formatter -> ftrace_config -> unit +(** [pp_ftrace_config v] formats v *) + +val pp_gpu_counter_config : Format.formatter -> gpu_counter_config -> unit +(** [pp_gpu_counter_config v] formats v *) + +val pp_gpu_render_stages_config : Format.formatter -> gpu_render_stages_config -> unit +(** [pp_gpu_render_stages_config v] formats v *) + +val pp_vulkan_memory_config : Format.formatter -> vulkan_memory_config -> unit +(** [pp_vulkan_memory_config v] formats v *) + +val pp_inode_file_config_mount_point_mapping_entry : Format.formatter -> inode_file_config_mount_point_mapping_entry -> unit +(** [pp_inode_file_config_mount_point_mapping_entry v] formats v *) + +val pp_inode_file_config : Format.formatter -> inode_file_config -> unit +(** [pp_inode_file_config v] formats v *) + +val pp_console_config_output : Format.formatter -> console_config_output -> unit +(** [pp_console_config_output v] formats v *) + +val pp_console_config : Format.formatter -> console_config -> unit +(** [pp_console_config v] formats v *) + +val pp_interceptor_config : Format.formatter -> interceptor_config -> unit +(** [pp_interceptor_config v] formats v *) + +val pp_android_power_config_battery_counters : Format.formatter -> android_power_config_battery_counters -> unit +(** [pp_android_power_config_battery_counters v] formats v *) + +val pp_android_power_config : Format.formatter -> android_power_config -> unit +(** [pp_android_power_config v] formats v *) + +val pp_priority_boost_config_boost_policy : Format.formatter -> priority_boost_config_boost_policy -> unit +(** [pp_priority_boost_config_boost_policy v] formats v *) + +val pp_priority_boost_config : Format.formatter -> priority_boost_config -> unit +(** [pp_priority_boost_config v] formats v *) + +val pp_process_stats_config_quirks : Format.formatter -> process_stats_config_quirks -> unit +(** [pp_process_stats_config_quirks v] formats v *) + +val pp_process_stats_config : Format.formatter -> process_stats_config -> unit +(** [pp_process_stats_config v] formats v *) + +val pp_heapprofd_config_continuous_dump_config : Format.formatter -> heapprofd_config_continuous_dump_config -> unit +(** [pp_heapprofd_config_continuous_dump_config v] formats v *) + +val pp_heapprofd_config : Format.formatter -> heapprofd_config -> unit +(** [pp_heapprofd_config v] formats v *) + +val pp_atom_id : Format.formatter -> atom_id -> unit +(** [pp_atom_id v] formats v *) + +val pp_statsd_pull_atom_config : Format.formatter -> statsd_pull_atom_config -> unit +(** [pp_statsd_pull_atom_config v] formats v *) + +val pp_statsd_tracing_config : Format.formatter -> statsd_tracing_config -> unit +(** [pp_statsd_tracing_config v] formats v *) + +val pp_meminfo_counters : Format.formatter -> meminfo_counters -> unit +(** [pp_meminfo_counters v] formats v *) + +val pp_vmstat_counters : Format.formatter -> vmstat_counters -> unit +(** [pp_vmstat_counters v] formats v *) + +val pp_sys_stats_config_stat_counters : Format.formatter -> sys_stats_config_stat_counters -> unit +(** [pp_sys_stats_config_stat_counters v] formats v *) + +val pp_sys_stats_config : Format.formatter -> sys_stats_config -> unit +(** [pp_sys_stats_config v] formats v *) + +val pp_system_info_config : Format.formatter -> system_info_config -> unit +(** [pp_system_info_config v] formats v *) + +val pp_test_config_dummy_fields : Format.formatter -> test_config_dummy_fields -> unit +(** [pp_test_config_dummy_fields v] formats v *) + +val pp_test_config : Format.formatter -> test_config -> unit +(** [pp_test_config v] formats v *) + +val pp_track_event_config : Format.formatter -> track_event_config -> unit +(** [pp_track_event_config v] formats v *) + +val pp_data_source_config_session_initiator : Format.formatter -> data_source_config_session_initiator -> unit +(** [pp_data_source_config_session_initiator v] formats v *) + +val pp_data_source_config_buffer_exhausted_policy : Format.formatter -> data_source_config_buffer_exhausted_policy -> unit +(** [pp_data_source_config_buffer_exhausted_policy v] formats v *) + +val pp_data_source_config : Format.formatter -> data_source_config -> unit +(** [pp_data_source_config v] formats v *) + +val pp_trace_config_buffer_config_fill_policy : Format.formatter -> trace_config_buffer_config_fill_policy -> unit +(** [pp_trace_config_buffer_config_fill_policy v] formats v *) + +val pp_trace_config_buffer_config : Format.formatter -> trace_config_buffer_config -> unit +(** [pp_trace_config_buffer_config v] formats v *) + +val pp_trace_config_data_source : Format.formatter -> trace_config_data_source -> unit +(** [pp_trace_config_data_source v] formats v *) + +val pp_trace_config_builtin_data_source : Format.formatter -> trace_config_builtin_data_source -> unit +(** [pp_trace_config_builtin_data_source v] formats v *) + +val pp_trace_config_lockdown_mode_operation : Format.formatter -> trace_config_lockdown_mode_operation -> unit +(** [pp_trace_config_lockdown_mode_operation v] formats v *) + +val pp_trace_config_producer_config : Format.formatter -> trace_config_producer_config -> unit +(** [pp_trace_config_producer_config v] formats v *) + +val pp_trace_config_statsd_metadata : Format.formatter -> trace_config_statsd_metadata -> unit +(** [pp_trace_config_statsd_metadata v] formats v *) + +val pp_trace_config_guardrail_overrides : Format.formatter -> trace_config_guardrail_overrides -> unit +(** [pp_trace_config_guardrail_overrides v] formats v *) + +val pp_trace_config_trigger_config_trigger_mode : Format.formatter -> trace_config_trigger_config_trigger_mode -> unit +(** [pp_trace_config_trigger_config_trigger_mode v] formats v *) + +val pp_trace_config_trigger_config_trigger : Format.formatter -> trace_config_trigger_config_trigger -> unit +(** [pp_trace_config_trigger_config_trigger v] formats v *) + +val pp_trace_config_trigger_config : Format.formatter -> trace_config_trigger_config -> unit +(** [pp_trace_config_trigger_config v] formats v *) + +val pp_trace_config_incremental_state_config : Format.formatter -> trace_config_incremental_state_config -> unit +(** [pp_trace_config_incremental_state_config v] formats v *) + +val pp_trace_config_compression_type : Format.formatter -> trace_config_compression_type -> unit +(** [pp_trace_config_compression_type v] formats v *) + +val pp_trace_config_incident_report_config : Format.formatter -> trace_config_incident_report_config -> unit +(** [pp_trace_config_incident_report_config v] formats v *) + +val pp_trace_config_statsd_logging : Format.formatter -> trace_config_statsd_logging -> unit +(** [pp_trace_config_statsd_logging v] formats v *) + +val pp_trace_config_trace_filter_string_filter_policy : Format.formatter -> trace_config_trace_filter_string_filter_policy -> unit +(** [pp_trace_config_trace_filter_string_filter_policy v] formats v *) + +val pp_trace_config_trace_filter_string_filter_rule : Format.formatter -> trace_config_trace_filter_string_filter_rule -> unit +(** [pp_trace_config_trace_filter_string_filter_rule v] formats v *) + +val pp_trace_config_trace_filter_string_filter_chain : Format.formatter -> trace_config_trace_filter_string_filter_chain -> unit +(** [pp_trace_config_trace_filter_string_filter_chain v] formats v *) + +val pp_trace_config_trace_filter : Format.formatter -> trace_config_trace_filter -> unit +(** [pp_trace_config_trace_filter v] formats v *) + +val pp_trace_config_android_report_config : Format.formatter -> trace_config_android_report_config -> unit +(** [pp_trace_config_android_report_config v] formats v *) + +val pp_trace_config_cmd_trace_start_delay : Format.formatter -> trace_config_cmd_trace_start_delay -> unit +(** [pp_trace_config_cmd_trace_start_delay v] formats v *) + +val pp_trace_config_session_semaphore : Format.formatter -> trace_config_session_semaphore -> unit +(** [pp_trace_config_session_semaphore v] formats v *) + +val pp_trace_config : Format.formatter -> trace_config -> unit +(** [pp_trace_config v] formats v *) + +val pp_utsname : Format.formatter -> utsname -> unit +(** [pp_utsname v] formats v *) + +val pp_system_info : Format.formatter -> system_info -> unit +(** [pp_system_info v] formats v *) + +val pp_trace_stats_buffer_stats : Format.formatter -> trace_stats_buffer_stats -> unit +(** [pp_trace_stats_buffer_stats v] formats v *) + +val pp_trace_stats_writer_stats : Format.formatter -> trace_stats_writer_stats -> unit +(** [pp_trace_stats_writer_stats v] formats v *) + +val pp_trace_stats_filter_stats : Format.formatter -> trace_stats_filter_stats -> unit +(** [pp_trace_stats_filter_stats v] formats v *) + +val pp_trace_stats_final_flush_outcome : Format.formatter -> trace_stats_final_flush_outcome -> unit +(** [pp_trace_stats_final_flush_outcome v] formats v *) + +val pp_trace_stats : Format.formatter -> trace_stats -> unit +(** [pp_trace_stats v] formats v *) + +val pp_android_game_intervention_list_game_mode_info : Format.formatter -> android_game_intervention_list_game_mode_info -> unit +(** [pp_android_game_intervention_list_game_mode_info v] formats v *) + +val pp_android_game_intervention_list_game_package_info : Format.formatter -> android_game_intervention_list_game_package_info -> unit +(** [pp_android_game_intervention_list_game_package_info v] formats v *) + +val pp_android_game_intervention_list : Format.formatter -> android_game_intervention_list -> unit +(** [pp_android_game_intervention_list v] formats v *) + +val pp_android_log_packet_log_event_arg_value : Format.formatter -> android_log_packet_log_event_arg_value -> unit +(** [pp_android_log_packet_log_event_arg_value v] formats v *) + +val pp_android_log_packet_log_event_arg : Format.formatter -> android_log_packet_log_event_arg -> unit +(** [pp_android_log_packet_log_event_arg v] formats v *) + +val pp_android_log_packet_log_event : Format.formatter -> android_log_packet_log_event -> unit +(** [pp_android_log_packet_log_event v] formats v *) + +val pp_android_log_packet_stats : Format.formatter -> android_log_packet_stats -> unit +(** [pp_android_log_packet_stats v] formats v *) + +val pp_android_log_packet : Format.formatter -> android_log_packet -> unit +(** [pp_android_log_packet v] formats v *) + +val pp_android_system_property_property_value : Format.formatter -> android_system_property_property_value -> unit +(** [pp_android_system_property_property_value v] formats v *) + +val pp_android_system_property : Format.formatter -> android_system_property -> unit +(** [pp_android_system_property v] formats v *) + +val pp_app_wakelock_info : Format.formatter -> app_wakelock_info -> unit +(** [pp_app_wakelock_info v] formats v *) + +val pp_app_wakelock_bundle : Format.formatter -> app_wakelock_bundle -> unit +(** [pp_app_wakelock_bundle v] formats v *) + +val pp_bluetooth_trace_packet_type : Format.formatter -> bluetooth_trace_packet_type -> unit +(** [pp_bluetooth_trace_packet_type v] formats v *) + +val pp_bluetooth_trace_event : Format.formatter -> bluetooth_trace_event -> unit +(** [pp_bluetooth_trace_event v] formats v *) + +val pp_android_camera_frame_event_capture_result_status : Format.formatter -> android_camera_frame_event_capture_result_status -> unit +(** [pp_android_camera_frame_event_capture_result_status v] formats v *) + +val pp_android_camera_frame_event_camera_node_processing_details : Format.formatter -> android_camera_frame_event_camera_node_processing_details -> unit +(** [pp_android_camera_frame_event_camera_node_processing_details v] formats v *) + +val pp_android_camera_frame_event : Format.formatter -> android_camera_frame_event -> unit +(** [pp_android_camera_frame_event v] formats v *) + +val pp_android_camera_session_stats_camera_graph_camera_node : Format.formatter -> android_camera_session_stats_camera_graph_camera_node -> unit +(** [pp_android_camera_session_stats_camera_graph_camera_node v] formats v *) + +val pp_android_camera_session_stats_camera_graph_camera_edge : Format.formatter -> android_camera_session_stats_camera_graph_camera_edge -> unit +(** [pp_android_camera_session_stats_camera_graph_camera_edge v] formats v *) + +val pp_android_camera_session_stats_camera_graph : Format.formatter -> android_camera_session_stats_camera_graph -> unit +(** [pp_android_camera_session_stats_camera_graph v] formats v *) + +val pp_android_camera_session_stats : Format.formatter -> android_camera_session_stats -> unit +(** [pp_android_camera_session_stats v] formats v *) + +val pp_cpu_per_uid_data : Format.formatter -> cpu_per_uid_data -> unit +(** [pp_cpu_per_uid_data v] formats v *) + +val pp_frame_timeline_event_jank_type : Format.formatter -> frame_timeline_event_jank_type -> unit +(** [pp_frame_timeline_event_jank_type v] formats v *) + +val pp_frame_timeline_event_jank_severity_type : Format.formatter -> frame_timeline_event_jank_severity_type -> unit +(** [pp_frame_timeline_event_jank_severity_type v] formats v *) + +val pp_frame_timeline_event_present_type : Format.formatter -> frame_timeline_event_present_type -> unit +(** [pp_frame_timeline_event_present_type v] formats v *) + +val pp_frame_timeline_event_prediction_type : Format.formatter -> frame_timeline_event_prediction_type -> unit +(** [pp_frame_timeline_event_prediction_type v] formats v *) + +val pp_frame_timeline_event_expected_surface_frame_start : Format.formatter -> frame_timeline_event_expected_surface_frame_start -> unit +(** [pp_frame_timeline_event_expected_surface_frame_start v] formats v *) + +val pp_frame_timeline_event_actual_surface_frame_start : Format.formatter -> frame_timeline_event_actual_surface_frame_start -> unit +(** [pp_frame_timeline_event_actual_surface_frame_start v] formats v *) + +val pp_frame_timeline_event_expected_display_frame_start : Format.formatter -> frame_timeline_event_expected_display_frame_start -> unit +(** [pp_frame_timeline_event_expected_display_frame_start v] formats v *) + +val pp_frame_timeline_event_actual_display_frame_start : Format.formatter -> frame_timeline_event_actual_display_frame_start -> unit +(** [pp_frame_timeline_event_actual_display_frame_start v] formats v *) + +val pp_frame_timeline_event_frame_end : Format.formatter -> frame_timeline_event_frame_end -> unit +(** [pp_frame_timeline_event_frame_end v] formats v *) + +val pp_frame_timeline_event : Format.formatter -> frame_timeline_event -> unit +(** [pp_frame_timeline_event v] formats v *) + +val pp_gpu_mem_total_event : Format.formatter -> gpu_mem_total_event -> unit +(** [pp_gpu_mem_total_event v] formats v *) + +val pp_graphics_frame_event_buffer_event_type : Format.formatter -> graphics_frame_event_buffer_event_type -> unit +(** [pp_graphics_frame_event_buffer_event_type v] formats v *) + +val pp_graphics_frame_event_buffer_event : Format.formatter -> graphics_frame_event_buffer_event -> unit +(** [pp_graphics_frame_event_buffer_event v] formats v *) + +val pp_graphics_frame_event : Format.formatter -> graphics_frame_event -> unit +(** [pp_graphics_frame_event v] formats v *) + +val pp_initial_display_state : Format.formatter -> initial_display_state -> unit +(** [pp_initial_display_state v] formats v *) + +val pp_kernel_wakelock_data_wakelock_type : Format.formatter -> kernel_wakelock_data_wakelock_type -> unit +(** [pp_kernel_wakelock_data_wakelock_type v] formats v *) + +val pp_kernel_wakelock_data_wakelock : Format.formatter -> kernel_wakelock_data_wakelock -> unit +(** [pp_kernel_wakelock_data_wakelock v] formats v *) + +val pp_kernel_wakelock_data : Format.formatter -> kernel_wakelock_data -> unit +(** [pp_kernel_wakelock_data v] formats v *) + +val pp_traffic_direction : Format.formatter -> traffic_direction -> unit +(** [pp_traffic_direction v] formats v *) + +val pp_network_packet_event : Format.formatter -> network_packet_event -> unit +(** [pp_network_packet_event v] formats v *) + +val pp_network_packet_bundle_packet_context : Format.formatter -> network_packet_bundle_packet_context -> unit +(** [pp_network_packet_bundle_packet_context v] formats v *) + +val pp_network_packet_bundle : Format.formatter -> network_packet_bundle -> unit +(** [pp_network_packet_bundle v] formats v *) + +val pp_network_packet_context : Format.formatter -> network_packet_context -> unit +(** [pp_network_packet_context v] formats v *) + +val pp_packages_list_package_info : Format.formatter -> packages_list_package_info -> unit +(** [pp_packages_list_package_info v] formats v *) + +val pp_packages_list : Format.formatter -> packages_list -> unit +(** [pp_packages_list v] formats v *) + +val pp_pixel_modem_events : Format.formatter -> pixel_modem_events -> unit +(** [pp_pixel_modem_events v] formats v *) + +val pp_pixel_modem_token_database : Format.formatter -> pixel_modem_token_database -> unit +(** [pp_pixel_modem_token_database v] formats v *) + +val pp_proto_log_message : Format.formatter -> proto_log_message -> unit +(** [pp_proto_log_message v] formats v *) + +val pp_proto_log_viewer_config_message_data : Format.formatter -> proto_log_viewer_config_message_data -> unit +(** [pp_proto_log_viewer_config_message_data v] formats v *) + +val pp_proto_log_viewer_config_group : Format.formatter -> proto_log_viewer_config_group -> unit +(** [pp_proto_log_viewer_config_group v] formats v *) + +val pp_proto_log_viewer_config : Format.formatter -> proto_log_viewer_config -> unit +(** [pp_proto_log_viewer_config v] formats v *) + +val pp_shell_transition_target : Format.formatter -> shell_transition_target -> unit +(** [pp_shell_transition_target v] formats v *) + +val pp_shell_transition : Format.formatter -> shell_transition -> unit +(** [pp_shell_transition v] formats v *) + +val pp_shell_handler_mapping : Format.formatter -> shell_handler_mapping -> unit +(** [pp_shell_handler_mapping v] formats v *) + +val pp_shell_handler_mappings : Format.formatter -> shell_handler_mappings -> unit +(** [pp_shell_handler_mappings v] formats v *) + +val pp_rect_proto : Format.formatter -> rect_proto -> unit +(** [pp_rect_proto v] formats v *) + +val pp_region_proto : Format.formatter -> region_proto -> unit +(** [pp_region_proto v] formats v *) + +val pp_size_proto : Format.formatter -> size_proto -> unit +(** [pp_size_proto v] formats v *) + +val pp_transform_proto : Format.formatter -> transform_proto -> unit +(** [pp_transform_proto v] formats v *) + +val pp_color_proto : Format.formatter -> color_proto -> unit +(** [pp_color_proto v] formats v *) + +val pp_input_window_info_proto : Format.formatter -> input_window_info_proto -> unit +(** [pp_input_window_info_proto v] formats v *) + +val pp_blur_region : Format.formatter -> blur_region -> unit +(** [pp_blur_region v] formats v *) + +val pp_color_transform_proto : Format.formatter -> color_transform_proto -> unit +(** [pp_color_transform_proto v] formats v *) + +val pp_trusted_overlay : Format.formatter -> trusted_overlay -> unit +(** [pp_trusted_overlay v] formats v *) + +val pp_box_shadow_settings_box_shadow_params : Format.formatter -> box_shadow_settings_box_shadow_params -> unit +(** [pp_box_shadow_settings_box_shadow_params v] formats v *) + +val pp_box_shadow_settings : Format.formatter -> box_shadow_settings -> unit +(** [pp_box_shadow_settings v] formats v *) + +val pp_border_settings : Format.formatter -> border_settings -> unit +(** [pp_border_settings v] formats v *) + +val pp_layers_trace_file_proto_magic_number : Format.formatter -> layers_trace_file_proto_magic_number -> unit +(** [pp_layers_trace_file_proto_magic_number v] formats v *) + +val pp_position_proto : Format.formatter -> position_proto -> unit +(** [pp_position_proto v] formats v *) + +val pp_active_buffer_proto : Format.formatter -> active_buffer_proto -> unit +(** [pp_active_buffer_proto v] formats v *) + +val pp_float_rect_proto : Format.formatter -> float_rect_proto -> unit +(** [pp_float_rect_proto v] formats v *) + +val pp_hwc_composition_type : Format.formatter -> hwc_composition_type -> unit +(** [pp_hwc_composition_type v] formats v *) + +val pp_barrier_layer_proto : Format.formatter -> barrier_layer_proto -> unit +(** [pp_barrier_layer_proto v] formats v *) + +val pp_corner_radii_proto : Format.formatter -> corner_radii_proto -> unit +(** [pp_corner_radii_proto v] formats v *) + +val pp_layer_proto : Format.formatter -> layer_proto -> unit +(** [pp_layer_proto v] formats v *) + +val pp_layers_proto : Format.formatter -> layers_proto -> unit +(** [pp_layers_proto v] formats v *) + +val pp_display_proto : Format.formatter -> display_proto -> unit +(** [pp_display_proto v] formats v *) + +val pp_layers_snapshot_proto : Format.formatter -> layers_snapshot_proto -> unit +(** [pp_layers_snapshot_proto v] formats v *) + +val pp_layers_trace_file_proto : Format.formatter -> layers_trace_file_proto -> unit +(** [pp_layers_trace_file_proto v] formats v *) + +val pp_transaction_trace_file_magic_number : Format.formatter -> transaction_trace_file_magic_number -> unit +(** [pp_transaction_trace_file_magic_number v] formats v *) + +val pp_layer_state_matrix22 : Format.formatter -> layer_state_matrix22 -> unit +(** [pp_layer_state_matrix22 v] formats v *) + +val pp_layer_state_color3 : Format.formatter -> layer_state_color3 -> unit +(** [pp_layer_state_color3 v] formats v *) + +val pp_layer_state_buffer_data_pixel_format : Format.formatter -> layer_state_buffer_data_pixel_format -> unit +(** [pp_layer_state_buffer_data_pixel_format v] formats v *) + +val pp_layer_state_buffer_data : Format.formatter -> layer_state_buffer_data -> unit +(** [pp_layer_state_buffer_data v] formats v *) + +val pp_transform : Format.formatter -> transform -> unit +(** [pp_transform v] formats v *) + +val pp_layer_state_window_info : Format.formatter -> layer_state_window_info -> unit +(** [pp_layer_state_window_info v] formats v *) + +val pp_layer_state_drop_input_mode : Format.formatter -> layer_state_drop_input_mode -> unit +(** [pp_layer_state_drop_input_mode v] formats v *) + +val pp_layer_state_corner_radii : Format.formatter -> layer_state_corner_radii -> unit +(** [pp_layer_state_corner_radii v] formats v *) + +val pp_layer_state : Format.formatter -> layer_state -> unit +(** [pp_layer_state v] formats v *) + +val pp_display_state : Format.formatter -> display_state -> unit +(** [pp_display_state v] formats v *) + +val pp_transaction_barrier : Format.formatter -> transaction_barrier -> unit +(** [pp_transaction_barrier v] formats v *) + +val pp_transaction_state : Format.formatter -> transaction_state -> unit +(** [pp_transaction_state v] formats v *) + +val pp_layer_creation_args : Format.formatter -> layer_creation_args -> unit +(** [pp_layer_creation_args v] formats v *) + +val pp_display_info : Format.formatter -> display_info -> unit +(** [pp_display_info v] formats v *) + +val pp_transaction_trace_entry : Format.formatter -> transaction_trace_entry -> unit +(** [pp_transaction_trace_entry v] formats v *) + +val pp_transaction_trace_file : Format.formatter -> transaction_trace_file -> unit +(** [pp_transaction_trace_file v] formats v *) + +val pp_layer_state_changes_lsb : Format.formatter -> layer_state_changes_lsb -> unit +(** [pp_layer_state_changes_lsb v] formats v *) + +val pp_layer_state_changes_msb : Format.formatter -> layer_state_changes_msb -> unit +(** [pp_layer_state_changes_msb v] formats v *) + +val pp_layer_state_flags : Format.formatter -> layer_state_flags -> unit +(** [pp_layer_state_flags v] formats v *) + +val pp_layer_state_buffer_data_buffer_data_change : Format.formatter -> layer_state_buffer_data_buffer_data_change -> unit +(** [pp_layer_state_buffer_data_buffer_data_change v] formats v *) + +val pp_display_state_changes : Format.formatter -> display_state_changes -> unit +(** [pp_display_state_changes v] formats v *) + +val pp_winscope_extensions : Format.formatter -> winscope_extensions -> unit +(** [pp_winscope_extensions v] formats v *) + +val pp_chrome_benchmark_metadata : Format.formatter -> chrome_benchmark_metadata -> unit +(** [pp_chrome_benchmark_metadata v] formats v *) + +val pp_chrome_metadata_packet_finch_hash : Format.formatter -> chrome_metadata_packet_finch_hash -> unit +(** [pp_chrome_metadata_packet_finch_hash v] formats v *) + +val pp_background_tracing_metadata_trigger_rule_trigger_type : Format.formatter -> background_tracing_metadata_trigger_rule_trigger_type -> unit +(** [pp_background_tracing_metadata_trigger_rule_trigger_type v] formats v *) + +val pp_background_tracing_metadata_trigger_rule_histogram_rule : Format.formatter -> background_tracing_metadata_trigger_rule_histogram_rule -> unit +(** [pp_background_tracing_metadata_trigger_rule_histogram_rule v] formats v *) + +val pp_background_tracing_metadata_trigger_rule_named_rule_event_type : Format.formatter -> background_tracing_metadata_trigger_rule_named_rule_event_type -> unit +(** [pp_background_tracing_metadata_trigger_rule_named_rule_event_type v] formats v *) + +val pp_background_tracing_metadata_trigger_rule_named_rule : Format.formatter -> background_tracing_metadata_trigger_rule_named_rule -> unit +(** [pp_background_tracing_metadata_trigger_rule_named_rule v] formats v *) + +val pp_background_tracing_metadata_trigger_rule : Format.formatter -> background_tracing_metadata_trigger_rule -> unit +(** [pp_background_tracing_metadata_trigger_rule v] formats v *) + +val pp_background_tracing_metadata : Format.formatter -> background_tracing_metadata -> unit +(** [pp_background_tracing_metadata v] formats v *) + +val pp_chrome_metadata_packet : Format.formatter -> chrome_metadata_packet -> unit +(** [pp_chrome_metadata_packet v] formats v *) + +val pp_chrome_traced_value_nested_type : Format.formatter -> chrome_traced_value_nested_type -> unit +(** [pp_chrome_traced_value_nested_type v] formats v *) + +val pp_chrome_traced_value : Format.formatter -> chrome_traced_value -> unit +(** [pp_chrome_traced_value v] formats v *) + +val pp_chrome_string_table_entry : Format.formatter -> chrome_string_table_entry -> unit +(** [pp_chrome_string_table_entry v] formats v *) + +val pp_chrome_trace_event_arg_value : Format.formatter -> chrome_trace_event_arg_value -> unit +(** [pp_chrome_trace_event_arg_value v] formats v *) + +val pp_chrome_trace_event_arg : Format.formatter -> chrome_trace_event_arg -> unit +(** [pp_chrome_trace_event_arg v] formats v *) + +val pp_chrome_trace_event : Format.formatter -> chrome_trace_event -> unit +(** [pp_chrome_trace_event v] formats v *) + +val pp_chrome_metadata_value : Format.formatter -> chrome_metadata_value -> unit +(** [pp_chrome_metadata_value v] formats v *) + +val pp_chrome_metadata : Format.formatter -> chrome_metadata -> unit +(** [pp_chrome_metadata v] formats v *) + +val pp_chrome_legacy_json_trace_trace_type : Format.formatter -> chrome_legacy_json_trace_trace_type -> unit +(** [pp_chrome_legacy_json_trace_trace_type v] formats v *) + +val pp_chrome_legacy_json_trace : Format.formatter -> chrome_legacy_json_trace -> unit +(** [pp_chrome_legacy_json_trace v] formats v *) + +val pp_chrome_event_bundle : Format.formatter -> chrome_event_bundle -> unit +(** [pp_chrome_event_bundle v] formats v *) + +val pp_chrome_trigger : Format.formatter -> chrome_trigger -> unit +(** [pp_chrome_trigger v] formats v *) + +val pp_v8_string : Format.formatter -> v8_string -> unit +(** [pp_v8_string v] formats v *) + +val pp_interned_v8_string_encoded_string : Format.formatter -> interned_v8_string_encoded_string -> unit +(** [pp_interned_v8_string_encoded_string v] formats v *) + +val pp_interned_v8_string : Format.formatter -> interned_v8_string -> unit +(** [pp_interned_v8_string v] formats v *) + +val pp_interned_v8_js_script_type : Format.formatter -> interned_v8_js_script_type -> unit +(** [pp_interned_v8_js_script_type v] formats v *) + +val pp_interned_v8_js_script : Format.formatter -> interned_v8_js_script -> unit +(** [pp_interned_v8_js_script v] formats v *) + +val pp_interned_v8_wasm_script : Format.formatter -> interned_v8_wasm_script -> unit +(** [pp_interned_v8_wasm_script v] formats v *) + +val pp_interned_v8_js_function_kind : Format.formatter -> interned_v8_js_function_kind -> unit +(** [pp_interned_v8_js_function_kind v] formats v *) + +val pp_interned_v8_js_function : Format.formatter -> interned_v8_js_function -> unit +(** [pp_interned_v8_js_function v] formats v *) + +val pp_interned_v8_isolate_code_range : Format.formatter -> interned_v8_isolate_code_range -> unit +(** [pp_interned_v8_isolate_code_range v] formats v *) + +val pp_interned_v8_isolate : Format.formatter -> interned_v8_isolate -> unit +(** [pp_interned_v8_isolate v] formats v *) + +val pp_v8_js_code_tier : Format.formatter -> v8_js_code_tier -> unit +(** [pp_v8_js_code_tier v] formats v *) + +val pp_v8_js_code_instructions : Format.formatter -> v8_js_code_instructions -> unit +(** [pp_v8_js_code_instructions v] formats v *) + +val pp_v8_js_code : Format.formatter -> v8_js_code -> unit +(** [pp_v8_js_code v] formats v *) + +val pp_v8_internal_code_type : Format.formatter -> v8_internal_code_type -> unit +(** [pp_v8_internal_code_type v] formats v *) + +val pp_v8_internal_code : Format.formatter -> v8_internal_code -> unit +(** [pp_v8_internal_code v] formats v *) + +val pp_v8_wasm_code_tier : Format.formatter -> v8_wasm_code_tier -> unit +(** [pp_v8_wasm_code_tier v] formats v *) + +val pp_v8_wasm_code : Format.formatter -> v8_wasm_code -> unit +(** [pp_v8_wasm_code v] formats v *) + +val pp_v8_reg_exp_code : Format.formatter -> v8_reg_exp_code -> unit +(** [pp_v8_reg_exp_code v] formats v *) + +val pp_v8_code_move_to_instructions : Format.formatter -> v8_code_move_to_instructions -> unit +(** [pp_v8_code_move_to_instructions v] formats v *) + +val pp_v8_code_move : Format.formatter -> v8_code_move -> unit +(** [pp_v8_code_move v] formats v *) + +val pp_v8_code_defaults : Format.formatter -> v8_code_defaults -> unit +(** [pp_v8_code_defaults v] formats v *) + +val pp_clock_snapshot_clock_builtin_clocks : Format.formatter -> clock_snapshot_clock_builtin_clocks -> unit +(** [pp_clock_snapshot_clock_builtin_clocks v] formats v *) + +val pp_clock_snapshot_clock : Format.formatter -> clock_snapshot_clock -> unit +(** [pp_clock_snapshot_clock v] formats v *) + +val pp_clock_snapshot : Format.formatter -> clock_snapshot -> unit +(** [pp_clock_snapshot v] formats v *) + +val pp_cswitch_etw_event_old_thread_wait_reason : Format.formatter -> cswitch_etw_event_old_thread_wait_reason -> unit +(** [pp_cswitch_etw_event_old_thread_wait_reason v] formats v *) + +val pp_cswitch_etw_event_old_thread_wait_mode : Format.formatter -> cswitch_etw_event_old_thread_wait_mode -> unit +(** [pp_cswitch_etw_event_old_thread_wait_mode v] formats v *) + +val pp_cswitch_etw_event_old_thread_state : Format.formatter -> cswitch_etw_event_old_thread_state -> unit +(** [pp_cswitch_etw_event_old_thread_state v] formats v *) + +val pp_cswitch_etw_event_old_thread_wait_reason_enum_or_int : Format.formatter -> cswitch_etw_event_old_thread_wait_reason_enum_or_int -> unit +(** [pp_cswitch_etw_event_old_thread_wait_reason_enum_or_int v] formats v *) + +val pp_cswitch_etw_event_old_thread_wait_mode_enum_or_int : Format.formatter -> cswitch_etw_event_old_thread_wait_mode_enum_or_int -> unit +(** [pp_cswitch_etw_event_old_thread_wait_mode_enum_or_int v] formats v *) + +val pp_cswitch_etw_event_old_thread_state_enum_or_int : Format.formatter -> cswitch_etw_event_old_thread_state_enum_or_int -> unit +(** [pp_cswitch_etw_event_old_thread_state_enum_or_int v] formats v *) + +val pp_cswitch_etw_event : Format.formatter -> cswitch_etw_event -> unit +(** [pp_cswitch_etw_event v] formats v *) + +val pp_ready_thread_etw_event_adjust_reason : Format.formatter -> ready_thread_etw_event_adjust_reason -> unit +(** [pp_ready_thread_etw_event_adjust_reason v] formats v *) + +val pp_ready_thread_etw_event_trace_flag : Format.formatter -> ready_thread_etw_event_trace_flag -> unit +(** [pp_ready_thread_etw_event_trace_flag v] formats v *) + +val pp_ready_thread_etw_event_adjust_reason_enum_or_int : Format.formatter -> ready_thread_etw_event_adjust_reason_enum_or_int -> unit +(** [pp_ready_thread_etw_event_adjust_reason_enum_or_int v] formats v *) + +val pp_ready_thread_etw_event_flag_enum_or_int : Format.formatter -> ready_thread_etw_event_flag_enum_or_int -> unit +(** [pp_ready_thread_etw_event_flag_enum_or_int v] formats v *) + +val pp_ready_thread_etw_event : Format.formatter -> ready_thread_etw_event -> unit +(** [pp_ready_thread_etw_event v] formats v *) + +val pp_mem_info_etw_event : Format.formatter -> mem_info_etw_event -> unit +(** [pp_mem_info_etw_event v] formats v *) + +val pp_file_io_create_etw_event : Format.formatter -> file_io_create_etw_event -> unit +(** [pp_file_io_create_etw_event v] formats v *) + +val pp_file_io_dir_enum_etw_event : Format.formatter -> file_io_dir_enum_etw_event -> unit +(** [pp_file_io_dir_enum_etw_event v] formats v *) + +val pp_file_io_info_etw_event : Format.formatter -> file_io_info_etw_event -> unit +(** [pp_file_io_info_etw_event v] formats v *) + +val pp_file_io_read_write_etw_event : Format.formatter -> file_io_read_write_etw_event -> unit +(** [pp_file_io_read_write_etw_event v] formats v *) + +val pp_file_io_simple_op_etw_event : Format.formatter -> file_io_simple_op_etw_event -> unit +(** [pp_file_io_simple_op_etw_event v] formats v *) + +val pp_file_io_op_end_etw_event : Format.formatter -> file_io_op_end_etw_event -> unit +(** [pp_file_io_op_end_etw_event v] formats v *) + +val pp_etw_trace_event_event : Format.formatter -> etw_trace_event_event -> unit +(** [pp_etw_trace_event_event v] formats v *) + +val pp_etw_trace_event : Format.formatter -> etw_trace_event -> unit +(** [pp_etw_trace_event v] formats v *) + +val pp_etw_trace_event_bundle : Format.formatter -> etw_trace_event_bundle -> unit +(** [pp_etw_trace_event_bundle v] formats v *) + +val pp_evdev_event_input_event : Format.formatter -> evdev_event_input_event -> unit +(** [pp_evdev_event_input_event v] formats v *) + +val pp_evdev_event_event : Format.formatter -> evdev_event_event -> unit +(** [pp_evdev_event_event v] formats v *) + +val pp_evdev_event : Format.formatter -> evdev_event -> unit +(** [pp_evdev_event v] formats v *) + +val pp_field_descriptor_proto_label : Format.formatter -> field_descriptor_proto_label -> unit +(** [pp_field_descriptor_proto_label v] formats v *) + +val pp_field_descriptor_proto_type : Format.formatter -> field_descriptor_proto_type -> unit +(** [pp_field_descriptor_proto_type v] formats v *) + +val pp_uninterpreted_option_name_part : Format.formatter -> uninterpreted_option_name_part -> unit +(** [pp_uninterpreted_option_name_part v] formats v *) + +val pp_uninterpreted_option : Format.formatter -> uninterpreted_option -> unit +(** [pp_uninterpreted_option v] formats v *) + +val pp_field_options : Format.formatter -> field_options -> unit +(** [pp_field_options v] formats v *) + +val pp_field_descriptor_proto : Format.formatter -> field_descriptor_proto -> unit +(** [pp_field_descriptor_proto v] formats v *) + +val pp_enum_value_descriptor_proto : Format.formatter -> enum_value_descriptor_proto -> unit +(** [pp_enum_value_descriptor_proto v] formats v *) + +val pp_enum_descriptor_proto : Format.formatter -> enum_descriptor_proto -> unit +(** [pp_enum_descriptor_proto v] formats v *) + +val pp_oneof_options : Format.formatter -> oneof_options -> unit +(** [pp_oneof_options v] formats v *) + +val pp_oneof_descriptor_proto : Format.formatter -> oneof_descriptor_proto -> unit +(** [pp_oneof_descriptor_proto v] formats v *) + +val pp_descriptor_proto_reserved_range : Format.formatter -> descriptor_proto_reserved_range -> unit +(** [pp_descriptor_proto_reserved_range v] formats v *) + +val pp_descriptor_proto : Format.formatter -> descriptor_proto -> unit +(** [pp_descriptor_proto v] formats v *) + +val pp_file_descriptor_proto : Format.formatter -> file_descriptor_proto -> unit +(** [pp_file_descriptor_proto v] formats v *) + +val pp_file_descriptor_set : Format.formatter -> file_descriptor_set -> unit +(** [pp_file_descriptor_set v] formats v *) + +val pp_extension_descriptor : Format.formatter -> extension_descriptor -> unit +(** [pp_extension_descriptor v] formats v *) + +val pp_inode_file_map_entry_type : Format.formatter -> inode_file_map_entry_type -> unit +(** [pp_inode_file_map_entry_type v] formats v *) + +val pp_inode_file_map_entry : Format.formatter -> inode_file_map_entry -> unit +(** [pp_inode_file_map_entry v] formats v *) + +val pp_inode_file_map : Format.formatter -> inode_file_map -> unit +(** [pp_inode_file_map v] formats v *) + +val pp_generic_kernel_cpu_frequency_event : Format.formatter -> generic_kernel_cpu_frequency_event -> unit +(** [pp_generic_kernel_cpu_frequency_event v] formats v *) + +val pp_generic_kernel_task_state_event_task_state_enum : Format.formatter -> generic_kernel_task_state_event_task_state_enum -> unit +(** [pp_generic_kernel_task_state_event_task_state_enum v] formats v *) + +val pp_generic_kernel_task_state_event : Format.formatter -> generic_kernel_task_state_event -> unit +(** [pp_generic_kernel_task_state_event v] formats v *) + +val pp_generic_kernel_task_rename_event : Format.formatter -> generic_kernel_task_rename_event -> unit +(** [pp_generic_kernel_task_rename_event v] formats v *) + +val pp_generic_kernel_process_tree_thread : Format.formatter -> generic_kernel_process_tree_thread -> unit +(** [pp_generic_kernel_process_tree_thread v] formats v *) + +val pp_generic_kernel_process_tree_process : Format.formatter -> generic_kernel_process_tree_process -> unit +(** [pp_generic_kernel_process_tree_process v] formats v *) + +val pp_generic_kernel_process_tree : Format.formatter -> generic_kernel_process_tree -> unit +(** [pp_generic_kernel_process_tree v] formats v *) + +val pp_gpu_counter_event_gpu_counter_value : Format.formatter -> gpu_counter_event_gpu_counter_value -> unit +(** [pp_gpu_counter_event_gpu_counter_value v] formats v *) + +val pp_gpu_counter_event_gpu_counter : Format.formatter -> gpu_counter_event_gpu_counter -> unit +(** [pp_gpu_counter_event_gpu_counter v] formats v *) + +val pp_gpu_counter_event : Format.formatter -> gpu_counter_event -> unit +(** [pp_gpu_counter_event v] formats v *) + +val pp_gpu_log_severity : Format.formatter -> gpu_log_severity -> unit +(** [pp_gpu_log_severity v] formats v *) + +val pp_gpu_log : Format.formatter -> gpu_log -> unit +(** [pp_gpu_log v] formats v *) + +val pp_gpu_render_stage_event_extra_data : Format.formatter -> gpu_render_stage_event_extra_data -> unit +(** [pp_gpu_render_stage_event_extra_data v] formats v *) + +val pp_gpu_render_stage_event_specifications_context_spec : Format.formatter -> gpu_render_stage_event_specifications_context_spec -> unit +(** [pp_gpu_render_stage_event_specifications_context_spec v] formats v *) + +val pp_gpu_render_stage_event_specifications_description : Format.formatter -> gpu_render_stage_event_specifications_description -> unit +(** [pp_gpu_render_stage_event_specifications_description v] formats v *) + +val pp_gpu_render_stage_event_specifications : Format.formatter -> gpu_render_stage_event_specifications -> unit +(** [pp_gpu_render_stage_event_specifications v] formats v *) + +val pp_gpu_render_stage_event : Format.formatter -> gpu_render_stage_event -> unit +(** [pp_gpu_render_stage_event v] formats v *) + +val pp_interned_graphics_context_api : Format.formatter -> interned_graphics_context_api -> unit +(** [pp_interned_graphics_context_api v] formats v *) + +val pp_interned_graphics_context : Format.formatter -> interned_graphics_context -> unit +(** [pp_interned_graphics_context v] formats v *) + +val pp_interned_gpu_render_stage_specification_render_stage_category : Format.formatter -> interned_gpu_render_stage_specification_render_stage_category -> unit +(** [pp_interned_gpu_render_stage_specification_render_stage_category v] formats v *) + +val pp_interned_gpu_render_stage_specification : Format.formatter -> interned_gpu_render_stage_specification -> unit +(** [pp_interned_gpu_render_stage_specification v] formats v *) + +val pp_vulkan_api_event_vk_debug_utils_object_name : Format.formatter -> vulkan_api_event_vk_debug_utils_object_name -> unit +(** [pp_vulkan_api_event_vk_debug_utils_object_name v] formats v *) + +val pp_vulkan_api_event_vk_queue_submit : Format.formatter -> vulkan_api_event_vk_queue_submit -> unit +(** [pp_vulkan_api_event_vk_queue_submit v] formats v *) + +val pp_vulkan_api_event : Format.formatter -> vulkan_api_event -> unit +(** [pp_vulkan_api_event v] formats v *) + +val pp_vulkan_memory_event_annotation_value : Format.formatter -> vulkan_memory_event_annotation_value -> unit +(** [pp_vulkan_memory_event_annotation_value v] formats v *) + +val pp_vulkan_memory_event_annotation : Format.formatter -> vulkan_memory_event_annotation -> unit +(** [pp_vulkan_memory_event_annotation v] formats v *) + +val pp_vulkan_memory_event_source : Format.formatter -> vulkan_memory_event_source -> unit +(** [pp_vulkan_memory_event_source v] formats v *) + +val pp_vulkan_memory_event_operation : Format.formatter -> vulkan_memory_event_operation -> unit +(** [pp_vulkan_memory_event_operation v] formats v *) + +val pp_vulkan_memory_event_allocation_scope : Format.formatter -> vulkan_memory_event_allocation_scope -> unit +(** [pp_vulkan_memory_event_allocation_scope v] formats v *) + +val pp_vulkan_memory_event : Format.formatter -> vulkan_memory_event -> unit +(** [pp_vulkan_memory_event v] formats v *) + +val pp_interned_string : Format.formatter -> interned_string -> unit +(** [pp_interned_string v] formats v *) + +val pp_line : Format.formatter -> line -> unit +(** [pp_line v] formats v *) + +val pp_address_symbols : Format.formatter -> address_symbols -> unit +(** [pp_address_symbols v] formats v *) + +val pp_module_symbols : Format.formatter -> module_symbols -> unit +(** [pp_module_symbols v] formats v *) + +val pp_mapping : Format.formatter -> mapping -> unit +(** [pp_mapping v] formats v *) + +val pp_frame : Format.formatter -> frame -> unit +(** [pp_frame v] formats v *) + +val pp_callstack : Format.formatter -> callstack -> unit +(** [pp_callstack v] formats v *) + +val pp_histogram_name : Format.formatter -> histogram_name -> unit +(** [pp_histogram_name v] formats v *) + +val pp_chrome_histogram_sample : Format.formatter -> chrome_histogram_sample -> unit +(** [pp_chrome_histogram_sample v] formats v *) + +val pp_debug_annotation_nested_value_nested_type : Format.formatter -> debug_annotation_nested_value_nested_type -> unit +(** [pp_debug_annotation_nested_value_nested_type v] formats v *) + +val pp_debug_annotation_nested_value : Format.formatter -> debug_annotation_nested_value -> unit +(** [pp_debug_annotation_nested_value v] formats v *) + +val pp_debug_annotation_name_field : Format.formatter -> debug_annotation_name_field -> unit +(** [pp_debug_annotation_name_field v] formats v *) + +val pp_debug_annotation_value : Format.formatter -> debug_annotation_value -> unit +(** [pp_debug_annotation_value v] formats v *) + +val pp_debug_annotation_proto_type_descriptor : Format.formatter -> debug_annotation_proto_type_descriptor -> unit +(** [pp_debug_annotation_proto_type_descriptor v] formats v *) + +val pp_debug_annotation : Format.formatter -> debug_annotation -> unit +(** [pp_debug_annotation v] formats v *) + +val pp_debug_annotation_name : Format.formatter -> debug_annotation_name -> unit +(** [pp_debug_annotation_name v] formats v *) + +val pp_debug_annotation_value_type_name : Format.formatter -> debug_annotation_value_type_name -> unit +(** [pp_debug_annotation_value_type_name v] formats v *) + +val pp_log_message_priority : Format.formatter -> log_message_priority -> unit +(** [pp_log_message_priority v] formats v *) + +val pp_log_message : Format.formatter -> log_message -> unit +(** [pp_log_message v] formats v *) + +val pp_log_message_body : Format.formatter -> log_message_body -> unit +(** [pp_log_message_body v] formats v *) + +val pp_unsymbolized_source_location : Format.formatter -> unsymbolized_source_location -> unit +(** [pp_unsymbolized_source_location v] formats v *) + +val pp_source_location : Format.formatter -> source_location -> unit +(** [pp_source_location v] formats v *) + +val pp_chrome_active_processes : Format.formatter -> chrome_active_processes -> unit +(** [pp_chrome_active_processes v] formats v *) + +val pp_chrome_application_state_info_chrome_application_state : Format.formatter -> chrome_application_state_info_chrome_application_state -> unit +(** [pp_chrome_application_state_info_chrome_application_state v] formats v *) + +val pp_chrome_application_state_info : Format.formatter -> chrome_application_state_info -> unit +(** [pp_chrome_application_state_info v] formats v *) + +val pp_chrome_compositor_scheduler_action : Format.formatter -> chrome_compositor_scheduler_action -> unit +(** [pp_chrome_compositor_scheduler_action v] formats v *) + +val pp_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode : Format.formatter -> chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode -> unit +(** [pp_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode v] formats v *) + +val pp_chrome_compositor_state_machine_major_state_begin_impl_frame_state : Format.formatter -> chrome_compositor_state_machine_major_state_begin_impl_frame_state -> unit +(** [pp_chrome_compositor_state_machine_major_state_begin_impl_frame_state v] formats v *) + +val pp_chrome_compositor_state_machine_major_state_begin_main_frame_state : Format.formatter -> chrome_compositor_state_machine_major_state_begin_main_frame_state -> unit +(** [pp_chrome_compositor_state_machine_major_state_begin_main_frame_state v] formats v *) + +val pp_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state : Format.formatter -> chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state -> unit +(** [pp_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state v] formats v *) + +val pp_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state : Format.formatter -> chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state -> unit +(** [pp_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state v] formats v *) + +val pp_chrome_compositor_state_machine_major_state : Format.formatter -> chrome_compositor_state_machine_major_state -> unit +(** [pp_chrome_compositor_state_machine_major_state v] formats v *) + +val pp_chrome_compositor_state_machine_minor_state_tree_priority : Format.formatter -> chrome_compositor_state_machine_minor_state_tree_priority -> unit +(** [pp_chrome_compositor_state_machine_minor_state_tree_priority v] formats v *) + +val pp_chrome_compositor_state_machine_minor_state_scroll_handler_state : Format.formatter -> chrome_compositor_state_machine_minor_state_scroll_handler_state -> unit +(** [pp_chrome_compositor_state_machine_minor_state_scroll_handler_state v] formats v *) + +val pp_chrome_compositor_state_machine_minor_state : Format.formatter -> chrome_compositor_state_machine_minor_state -> unit +(** [pp_chrome_compositor_state_machine_minor_state v] formats v *) + +val pp_chrome_compositor_state_machine : Format.formatter -> chrome_compositor_state_machine -> unit +(** [pp_chrome_compositor_state_machine v] formats v *) + +val pp_begin_impl_frame_args_state : Format.formatter -> begin_impl_frame_args_state -> unit +(** [pp_begin_impl_frame_args_state v] formats v *) + +val pp_begin_frame_args_begin_frame_args_type : Format.formatter -> begin_frame_args_begin_frame_args_type -> unit +(** [pp_begin_frame_args_begin_frame_args_type v] formats v *) + +val pp_begin_frame_args_created_from : Format.formatter -> begin_frame_args_created_from -> unit +(** [pp_begin_frame_args_created_from v] formats v *) + +val pp_begin_frame_args : Format.formatter -> begin_frame_args -> unit +(** [pp_begin_frame_args v] formats v *) + +val pp_begin_impl_frame_args_timestamps_in_us : Format.formatter -> begin_impl_frame_args_timestamps_in_us -> unit +(** [pp_begin_impl_frame_args_timestamps_in_us v] formats v *) + +val pp_begin_impl_frame_args_args : Format.formatter -> begin_impl_frame_args_args -> unit +(** [pp_begin_impl_frame_args_args v] formats v *) + +val pp_begin_impl_frame_args : Format.formatter -> begin_impl_frame_args -> unit +(** [pp_begin_impl_frame_args v] formats v *) + +val pp_begin_frame_observer_state : Format.formatter -> begin_frame_observer_state -> unit +(** [pp_begin_frame_observer_state v] formats v *) + +val pp_begin_frame_source_state : Format.formatter -> begin_frame_source_state -> unit +(** [pp_begin_frame_source_state v] formats v *) + +val pp_compositor_timing_history : Format.formatter -> compositor_timing_history -> unit +(** [pp_compositor_timing_history v] formats v *) + +val pp_chrome_compositor_scheduler_state : Format.formatter -> chrome_compositor_scheduler_state -> unit +(** [pp_chrome_compositor_scheduler_state v] formats v *) + +val pp_chrome_content_settings_event_info : Format.formatter -> chrome_content_settings_event_info -> unit +(** [pp_chrome_content_settings_event_info v] formats v *) + +val pp_chrome_frame_reporter_state : Format.formatter -> chrome_frame_reporter_state -> unit +(** [pp_chrome_frame_reporter_state v] formats v *) + +val pp_chrome_frame_reporter_frame_drop_reason : Format.formatter -> chrome_frame_reporter_frame_drop_reason -> unit +(** [pp_chrome_frame_reporter_frame_drop_reason v] formats v *) + +val pp_chrome_frame_reporter_scroll_state : Format.formatter -> chrome_frame_reporter_scroll_state -> unit +(** [pp_chrome_frame_reporter_scroll_state v] formats v *) + +val pp_chrome_frame_reporter_frame_type : Format.formatter -> chrome_frame_reporter_frame_type -> unit +(** [pp_chrome_frame_reporter_frame_type v] formats v *) + +val pp_chrome_frame_reporter : Format.formatter -> chrome_frame_reporter -> unit +(** [pp_chrome_frame_reporter v] formats v *) + +val pp_chrome_keyed_service : Format.formatter -> chrome_keyed_service -> unit +(** [pp_chrome_keyed_service v] formats v *) + +val pp_chrome_latency_info_step : Format.formatter -> chrome_latency_info_step -> unit +(** [pp_chrome_latency_info_step v] formats v *) + +val pp_chrome_latency_info_latency_component_type : Format.formatter -> chrome_latency_info_latency_component_type -> unit +(** [pp_chrome_latency_info_latency_component_type v] formats v *) + +val pp_chrome_latency_info_component_info : Format.formatter -> chrome_latency_info_component_info -> unit +(** [pp_chrome_latency_info_component_info v] formats v *) + +val pp_chrome_latency_info_input_type : Format.formatter -> chrome_latency_info_input_type -> unit +(** [pp_chrome_latency_info_input_type v] formats v *) + +val pp_chrome_latency_info : Format.formatter -> chrome_latency_info -> unit +(** [pp_chrome_latency_info v] formats v *) + +val pp_chrome_legacy_ipc_message_class : Format.formatter -> chrome_legacy_ipc_message_class -> unit +(** [pp_chrome_legacy_ipc_message_class v] formats v *) + +val pp_chrome_legacy_ipc : Format.formatter -> chrome_legacy_ipc -> unit +(** [pp_chrome_legacy_ipc v] formats v *) + +val pp_chrome_message_pump : Format.formatter -> chrome_message_pump -> unit +(** [pp_chrome_message_pump v] formats v *) + +val pp_chrome_mojo_event_info : Format.formatter -> chrome_mojo_event_info -> unit +(** [pp_chrome_mojo_event_info v] formats v *) + +val pp_chrome_railmode : Format.formatter -> chrome_railmode -> unit +(** [pp_chrome_railmode v] formats v *) + +val pp_chrome_renderer_scheduler_state : Format.formatter -> chrome_renderer_scheduler_state -> unit +(** [pp_chrome_renderer_scheduler_state v] formats v *) + +val pp_chrome_user_event : Format.formatter -> chrome_user_event -> unit +(** [pp_chrome_user_event v] formats v *) + +val pp_chrome_window_handle_event_info : Format.formatter -> chrome_window_handle_event_info -> unit +(** [pp_chrome_window_handle_event_info v] formats v *) + +val pp_screenshot : Format.formatter -> screenshot -> unit +(** [pp_screenshot v] formats v *) + +val pp_task_execution : Format.formatter -> task_execution -> unit +(** [pp_task_execution v] formats v *) + +val pp_track_event_type : Format.formatter -> track_event_type -> unit +(** [pp_track_event_type v] formats v *) + +val pp_track_event_callstack_frame : Format.formatter -> track_event_callstack_frame -> unit +(** [pp_track_event_callstack_frame v] formats v *) + +val pp_track_event_callstack : Format.formatter -> track_event_callstack -> unit +(** [pp_track_event_callstack v] formats v *) + +val pp_track_event_legacy_event_flow_direction : Format.formatter -> track_event_legacy_event_flow_direction -> unit +(** [pp_track_event_legacy_event_flow_direction v] formats v *) + +val pp_track_event_legacy_event_instant_event_scope : Format.formatter -> track_event_legacy_event_instant_event_scope -> unit +(** [pp_track_event_legacy_event_instant_event_scope v] formats v *) + +val pp_track_event_legacy_event_id : Format.formatter -> track_event_legacy_event_id -> unit +(** [pp_track_event_legacy_event_id v] formats v *) + +val pp_track_event_legacy_event : Format.formatter -> track_event_legacy_event -> unit +(** [pp_track_event_legacy_event v] formats v *) + +val pp_track_event_name_field : Format.formatter -> track_event_name_field -> unit +(** [pp_track_event_name_field v] formats v *) + +val pp_track_event_counter_value_field : Format.formatter -> track_event_counter_value_field -> unit +(** [pp_track_event_counter_value_field v] formats v *) + +val pp_track_event_correlation_id_field : Format.formatter -> track_event_correlation_id_field -> unit +(** [pp_track_event_correlation_id_field v] formats v *) + +val pp_track_event_callstack_field : Format.formatter -> track_event_callstack_field -> unit +(** [pp_track_event_callstack_field v] formats v *) + +val pp_track_event_source_location_field : Format.formatter -> track_event_source_location_field -> unit +(** [pp_track_event_source_location_field v] formats v *) + +val pp_track_event_timestamp : Format.formatter -> track_event_timestamp -> unit +(** [pp_track_event_timestamp v] formats v *) + +val pp_track_event_thread_time : Format.formatter -> track_event_thread_time -> unit +(** [pp_track_event_thread_time v] formats v *) + +val pp_track_event_thread_instruction_count : Format.formatter -> track_event_thread_instruction_count -> unit +(** [pp_track_event_thread_instruction_count v] formats v *) + +val pp_track_event : Format.formatter -> track_event -> unit +(** [pp_track_event v] formats v *) + +val pp_track_event_defaults : Format.formatter -> track_event_defaults -> unit +(** [pp_track_event_defaults v] formats v *) + +val pp_event_category : Format.formatter -> event_category -> unit +(** [pp_event_category v] formats v *) + +val pp_event_name : Format.formatter -> event_name -> unit +(** [pp_event_name v] formats v *) + +val pp_interned_data : Format.formatter -> interned_data -> unit +(** [pp_interned_data v] formats v *) + +val pp_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units : Format.formatter -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units -> unit +(** [pp_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units v] formats v *) + +val pp_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry : Format.formatter -> memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> unit +(** [pp_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry v] formats v *) + +val pp_memory_tracker_snapshot_process_snapshot_memory_node : Format.formatter -> memory_tracker_snapshot_process_snapshot_memory_node -> unit +(** [pp_memory_tracker_snapshot_process_snapshot_memory_node v] formats v *) + +val pp_memory_tracker_snapshot_process_snapshot_memory_edge : Format.formatter -> memory_tracker_snapshot_process_snapshot_memory_edge -> unit +(** [pp_memory_tracker_snapshot_process_snapshot_memory_edge v] formats v *) + +val pp_memory_tracker_snapshot_process_snapshot : Format.formatter -> memory_tracker_snapshot_process_snapshot -> unit +(** [pp_memory_tracker_snapshot_process_snapshot v] formats v *) + +val pp_memory_tracker_snapshot_level_of_detail : Format.formatter -> memory_tracker_snapshot_level_of_detail -> unit +(** [pp_memory_tracker_snapshot_level_of_detail v] formats v *) + +val pp_memory_tracker_snapshot : Format.formatter -> memory_tracker_snapshot -> unit +(** [pp_memory_tracker_snapshot v] formats v *) + +val pp_perfetto_metatrace_arg_key_or_interned_key : Format.formatter -> perfetto_metatrace_arg_key_or_interned_key -> unit +(** [pp_perfetto_metatrace_arg_key_or_interned_key v] formats v *) + +val pp_perfetto_metatrace_arg_value_or_interned_value : Format.formatter -> perfetto_metatrace_arg_value_or_interned_value -> unit +(** [pp_perfetto_metatrace_arg_value_or_interned_value v] formats v *) + +val pp_perfetto_metatrace_arg : Format.formatter -> perfetto_metatrace_arg -> unit +(** [pp_perfetto_metatrace_arg v] formats v *) + +val pp_perfetto_metatrace_interned_string : Format.formatter -> perfetto_metatrace_interned_string -> unit +(** [pp_perfetto_metatrace_interned_string v] formats v *) + +val pp_perfetto_metatrace_record_type : Format.formatter -> perfetto_metatrace_record_type -> unit +(** [pp_perfetto_metatrace_record_type v] formats v *) + +val pp_perfetto_metatrace : Format.formatter -> perfetto_metatrace -> unit +(** [pp_perfetto_metatrace v] formats v *) + +val pp_tracing_service_event_data_sources_data_source : Format.formatter -> tracing_service_event_data_sources_data_source -> unit +(** [pp_tracing_service_event_data_sources_data_source v] formats v *) + +val pp_tracing_service_event_data_sources : Format.formatter -> tracing_service_event_data_sources -> unit +(** [pp_tracing_service_event_data_sources v] formats v *) + +val pp_tracing_service_event : Format.formatter -> tracing_service_event -> unit +(** [pp_tracing_service_event v] formats v *) + +val pp_android_energy_consumer : Format.formatter -> android_energy_consumer -> unit +(** [pp_android_energy_consumer v] formats v *) + +val pp_android_energy_consumer_descriptor : Format.formatter -> android_energy_consumer_descriptor -> unit +(** [pp_android_energy_consumer_descriptor v] formats v *) + +val pp_android_energy_estimation_breakdown_energy_uid_breakdown : Format.formatter -> android_energy_estimation_breakdown_energy_uid_breakdown -> unit +(** [pp_android_energy_estimation_breakdown_energy_uid_breakdown v] formats v *) + +val pp_android_energy_estimation_breakdown : Format.formatter -> android_energy_estimation_breakdown -> unit +(** [pp_android_energy_estimation_breakdown v] formats v *) + +val pp_entity_state_residency_power_entity_state : Format.formatter -> entity_state_residency_power_entity_state -> unit +(** [pp_entity_state_residency_power_entity_state v] formats v *) + +val pp_entity_state_residency_state_residency : Format.formatter -> entity_state_residency_state_residency -> unit +(** [pp_entity_state_residency_state_residency v] formats v *) + +val pp_entity_state_residency : Format.formatter -> entity_state_residency -> unit +(** [pp_entity_state_residency v] formats v *) + +val pp_battery_counters : Format.formatter -> battery_counters -> unit +(** [pp_battery_counters v] formats v *) + +val pp_power_rails_rail_descriptor : Format.formatter -> power_rails_rail_descriptor -> unit +(** [pp_power_rails_rail_descriptor v] formats v *) + +val pp_power_rails_energy_data : Format.formatter -> power_rails_energy_data -> unit +(** [pp_power_rails_energy_data v] formats v *) + +val pp_power_rails : Format.formatter -> power_rails -> unit +(** [pp_power_rails v] formats v *) + +val pp_obfuscated_member : Format.formatter -> obfuscated_member -> unit +(** [pp_obfuscated_member v] formats v *) + +val pp_obfuscated_class : Format.formatter -> obfuscated_class -> unit +(** [pp_obfuscated_class v] formats v *) + +val pp_deobfuscation_mapping : Format.formatter -> deobfuscation_mapping -> unit +(** [pp_deobfuscation_mapping v] formats v *) + +val pp_heap_graph_root_type : Format.formatter -> heap_graph_root_type -> unit +(** [pp_heap_graph_root_type v] formats v *) + +val pp_heap_graph_root : Format.formatter -> heap_graph_root -> unit +(** [pp_heap_graph_root v] formats v *) + +val pp_heap_graph_type_kind : Format.formatter -> heap_graph_type_kind -> unit +(** [pp_heap_graph_type_kind v] formats v *) + +val pp_heap_graph_type : Format.formatter -> heap_graph_type -> unit +(** [pp_heap_graph_type v] formats v *) + +val pp_heap_graph_object_heap_type : Format.formatter -> heap_graph_object_heap_type -> unit +(** [pp_heap_graph_object_heap_type v] formats v *) + +val pp_heap_graph_object_identifier : Format.formatter -> heap_graph_object_identifier -> unit +(** [pp_heap_graph_object_identifier v] formats v *) + +val pp_heap_graph_object : Format.formatter -> heap_graph_object -> unit +(** [pp_heap_graph_object v] formats v *) + +val pp_heap_graph : Format.formatter -> heap_graph -> unit +(** [pp_heap_graph v] formats v *) + +val pp_profile_packet_heap_sample : Format.formatter -> profile_packet_heap_sample -> unit +(** [pp_profile_packet_heap_sample v] formats v *) + +val pp_profile_packet_histogram_bucket : Format.formatter -> profile_packet_histogram_bucket -> unit +(** [pp_profile_packet_histogram_bucket v] formats v *) + +val pp_profile_packet_histogram : Format.formatter -> profile_packet_histogram -> unit +(** [pp_profile_packet_histogram v] formats v *) + +val pp_profile_packet_process_stats : Format.formatter -> profile_packet_process_stats -> unit +(** [pp_profile_packet_process_stats v] formats v *) + +val pp_profile_packet_process_heap_samples_client_error : Format.formatter -> profile_packet_process_heap_samples_client_error -> unit +(** [pp_profile_packet_process_heap_samples_client_error v] formats v *) + +val pp_profile_packet_process_heap_samples : Format.formatter -> profile_packet_process_heap_samples -> unit +(** [pp_profile_packet_process_heap_samples v] formats v *) + +val pp_profile_packet : Format.formatter -> profile_packet -> unit +(** [pp_profile_packet v] formats v *) + +val pp_streaming_allocation : Format.formatter -> streaming_allocation -> unit +(** [pp_streaming_allocation v] formats v *) + +val pp_streaming_free : Format.formatter -> streaming_free -> unit +(** [pp_streaming_free v] formats v *) + +val pp_streaming_profile_packet : Format.formatter -> streaming_profile_packet -> unit +(** [pp_streaming_profile_packet v] formats v *) + +val pp_profiling_cpu_mode : Format.formatter -> profiling_cpu_mode -> unit +(** [pp_profiling_cpu_mode v] formats v *) + +val pp_profiling_stack_unwind_error : Format.formatter -> profiling_stack_unwind_error -> unit +(** [pp_profiling_stack_unwind_error v] formats v *) + +val pp_profiling : Format.formatter -> profiling -> unit +(** [pp_profiling v] formats v *) + +val pp_perf_sample_sample_skip_reason : Format.formatter -> perf_sample_sample_skip_reason -> unit +(** [pp_perf_sample_sample_skip_reason v] formats v *) + +val pp_perf_sample_producer_event_data_source_stop_reason : Format.formatter -> perf_sample_producer_event_data_source_stop_reason -> unit +(** [pp_perf_sample_producer_event_data_source_stop_reason v] formats v *) + +val pp_perf_sample_producer_event : Format.formatter -> perf_sample_producer_event -> unit +(** [pp_perf_sample_producer_event v] formats v *) + +val pp_perf_sample_optional_unwind_error : Format.formatter -> perf_sample_optional_unwind_error -> unit +(** [pp_perf_sample_optional_unwind_error v] formats v *) + +val pp_perf_sample_optional_sample_skipped_reason : Format.formatter -> perf_sample_optional_sample_skipped_reason -> unit +(** [pp_perf_sample_optional_sample_skipped_reason v] formats v *) + +val pp_perf_sample : Format.formatter -> perf_sample -> unit +(** [pp_perf_sample v] formats v *) + +val pp_smaps_entry : Format.formatter -> smaps_entry -> unit +(** [pp_smaps_entry v] formats v *) + +val pp_smaps_packet : Format.formatter -> smaps_packet -> unit +(** [pp_smaps_packet v] formats v *) + +val pp_process_stats_thread : Format.formatter -> process_stats_thread -> unit +(** [pp_process_stats_thread v] formats v *) + +val pp_process_stats_fdinfo : Format.formatter -> process_stats_fdinfo -> unit +(** [pp_process_stats_fdinfo v] formats v *) + +val pp_process_stats_process : Format.formatter -> process_stats_process -> unit +(** [pp_process_stats_process v] formats v *) + +val pp_process_stats : Format.formatter -> process_stats -> unit +(** [pp_process_stats v] formats v *) + +val pp_process_tree_thread : Format.formatter -> process_tree_thread -> unit +(** [pp_process_tree_thread v] formats v *) + +val pp_process_tree_process : Format.formatter -> process_tree_process -> unit +(** [pp_process_tree_process v] formats v *) + +val pp_process_tree : Format.formatter -> process_tree -> unit +(** [pp_process_tree v] formats v *) + +val pp_remote_clock_sync_synced_clocks : Format.formatter -> remote_clock_sync_synced_clocks -> unit +(** [pp_remote_clock_sync_synced_clocks v] formats v *) + +val pp_remote_clock_sync : Format.formatter -> remote_clock_sync -> unit +(** [pp_remote_clock_sync v] formats v *) + +val pp_atom : Format.formatter -> atom -> unit +(** [pp_atom v] formats v *) + +val pp_statsd_atom : Format.formatter -> statsd_atom -> unit +(** [pp_statsd_atom v] formats v *) + +val pp_sys_stats_meminfo_value : Format.formatter -> sys_stats_meminfo_value -> unit +(** [pp_sys_stats_meminfo_value v] formats v *) + +val pp_sys_stats_vmstat_value : Format.formatter -> sys_stats_vmstat_value -> unit +(** [pp_sys_stats_vmstat_value v] formats v *) + +val pp_sys_stats_cpu_times : Format.formatter -> sys_stats_cpu_times -> unit +(** [pp_sys_stats_cpu_times v] formats v *) + +val pp_sys_stats_interrupt_count : Format.formatter -> sys_stats_interrupt_count -> unit +(** [pp_sys_stats_interrupt_count v] formats v *) + +val pp_sys_stats_devfreq_value : Format.formatter -> sys_stats_devfreq_value -> unit +(** [pp_sys_stats_devfreq_value v] formats v *) + +val pp_sys_stats_buddy_info : Format.formatter -> sys_stats_buddy_info -> unit +(** [pp_sys_stats_buddy_info v] formats v *) + +val pp_sys_stats_disk_stat : Format.formatter -> sys_stats_disk_stat -> unit +(** [pp_sys_stats_disk_stat v] formats v *) + +val pp_sys_stats_psi_sample_psi_resource : Format.formatter -> sys_stats_psi_sample_psi_resource -> unit +(** [pp_sys_stats_psi_sample_psi_resource v] formats v *) + +val pp_sys_stats_psi_sample : Format.formatter -> sys_stats_psi_sample -> unit +(** [pp_sys_stats_psi_sample v] formats v *) + +val pp_sys_stats_thermal_zone : Format.formatter -> sys_stats_thermal_zone -> unit +(** [pp_sys_stats_thermal_zone v] formats v *) + +val pp_sys_stats_cpu_idle_state_entry : Format.formatter -> sys_stats_cpu_idle_state_entry -> unit +(** [pp_sys_stats_cpu_idle_state_entry v] formats v *) + +val pp_sys_stats_cpu_idle_state : Format.formatter -> sys_stats_cpu_idle_state -> unit +(** [pp_sys_stats_cpu_idle_state v] formats v *) + +val pp_sys_stats : Format.formatter -> sys_stats -> unit +(** [pp_sys_stats v] formats v *) + +val pp_cpu_info_arm_cpu_identifier : Format.formatter -> cpu_info_arm_cpu_identifier -> unit +(** [pp_cpu_info_arm_cpu_identifier v] formats v *) + +val pp_cpu_info_cpu_identifier : Format.formatter -> cpu_info_cpu_identifier -> unit +(** [pp_cpu_info_cpu_identifier v] formats v *) + +val pp_cpu_info_cpu : Format.formatter -> cpu_info_cpu -> unit +(** [pp_cpu_info_cpu v] formats v *) + +val pp_cpu_info : Format.formatter -> cpu_info -> unit +(** [pp_cpu_info v] formats v *) + +val pp_test_event_test_payload : Format.formatter -> test_event_test_payload -> unit +(** [pp_test_event_test_payload v] formats v *) + +val pp_test_event : Format.formatter -> test_event -> unit +(** [pp_test_event v] formats v *) + +val pp_trace_packet_defaults : Format.formatter -> trace_packet_defaults -> unit +(** [pp_trace_packet_defaults v] formats v *) + +val pp_trace_uuid : Format.formatter -> trace_uuid -> unit +(** [pp_trace_uuid v] formats v *) + +val pp_process_descriptor_chrome_process_type : Format.formatter -> process_descriptor_chrome_process_type -> unit +(** [pp_process_descriptor_chrome_process_type v] formats v *) + +val pp_process_descriptor : Format.formatter -> process_descriptor -> unit +(** [pp_process_descriptor v] formats v *) + +val pp_track_event_range_of_interest : Format.formatter -> track_event_range_of_interest -> unit +(** [pp_track_event_range_of_interest v] formats v *) + +val pp_thread_descriptor_chrome_thread_type : Format.formatter -> thread_descriptor_chrome_thread_type -> unit +(** [pp_thread_descriptor_chrome_thread_type v] formats v *) + +val pp_thread_descriptor : Format.formatter -> thread_descriptor -> unit +(** [pp_thread_descriptor v] formats v *) + +val pp_chrome_process_descriptor : Format.formatter -> chrome_process_descriptor -> unit +(** [pp_chrome_process_descriptor v] formats v *) + +val pp_chrome_thread_descriptor : Format.formatter -> chrome_thread_descriptor -> unit +(** [pp_chrome_thread_descriptor v] formats v *) + +val pp_counter_descriptor_builtin_counter_type : Format.formatter -> counter_descriptor_builtin_counter_type -> unit +(** [pp_counter_descriptor_builtin_counter_type v] formats v *) + +val pp_counter_descriptor_unit : Format.formatter -> counter_descriptor_unit -> unit +(** [pp_counter_descriptor_unit v] formats v *) + +val pp_counter_descriptor : Format.formatter -> counter_descriptor -> unit +(** [pp_counter_descriptor v] formats v *) + +val pp_track_descriptor_child_tracks_ordering : Format.formatter -> track_descriptor_child_tracks_ordering -> unit +(** [pp_track_descriptor_child_tracks_ordering v] formats v *) + +val pp_track_descriptor_sibling_merge_behavior : Format.formatter -> track_descriptor_sibling_merge_behavior -> unit +(** [pp_track_descriptor_sibling_merge_behavior v] formats v *) + +val pp_track_descriptor_static_or_dynamic_name : Format.formatter -> track_descriptor_static_or_dynamic_name -> unit +(** [pp_track_descriptor_static_or_dynamic_name v] formats v *) + +val pp_track_descriptor_sibling_merge_key_field : Format.formatter -> track_descriptor_sibling_merge_key_field -> unit +(** [pp_track_descriptor_sibling_merge_key_field v] formats v *) + +val pp_track_descriptor : Format.formatter -> track_descriptor -> unit +(** [pp_track_descriptor v] formats v *) + +val pp_chrome_historgram_translation_table : Format.formatter -> chrome_historgram_translation_table -> unit +(** [pp_chrome_historgram_translation_table v] formats v *) + +val pp_chrome_user_event_translation_table : Format.formatter -> chrome_user_event_translation_table -> unit +(** [pp_chrome_user_event_translation_table v] formats v *) + +val pp_chrome_performance_mark_translation_table : Format.formatter -> chrome_performance_mark_translation_table -> unit +(** [pp_chrome_performance_mark_translation_table v] formats v *) + +val pp_slice_name_translation_table : Format.formatter -> slice_name_translation_table -> unit +(** [pp_slice_name_translation_table v] formats v *) + +val pp_process_track_name_translation_table : Format.formatter -> process_track_name_translation_table -> unit +(** [pp_process_track_name_translation_table v] formats v *) + +val pp_chrome_study_translation_table : Format.formatter -> chrome_study_translation_table -> unit +(** [pp_chrome_study_translation_table v] formats v *) + +val pp_translation_table : Format.formatter -> translation_table -> unit +(** [pp_translation_table v] formats v *) + +val pp_trigger : Format.formatter -> trigger -> unit +(** [pp_trigger v] formats v *) + +val pp_ui_state_highlight_process : Format.formatter -> ui_state_highlight_process -> unit +(** [pp_ui_state_highlight_process v] formats v *) + +val pp_ui_state : Format.formatter -> ui_state -> unit +(** [pp_ui_state v] formats v *) + +val pp_trace_packet_sequence_flags : Format.formatter -> trace_packet_sequence_flags -> unit +(** [pp_trace_packet_sequence_flags v] formats v *) + +val pp_trace_packet_data : Format.formatter -> trace_packet_data -> unit +(** [pp_trace_packet_data v] formats v *) + +val pp_trace_packet_optional_trusted_uid : Format.formatter -> trace_packet_optional_trusted_uid -> unit +(** [pp_trace_packet_optional_trusted_uid v] formats v *) + +val pp_trace_packet_optional_trusted_packet_sequence_id : Format.formatter -> trace_packet_optional_trusted_packet_sequence_id -> unit +(** [pp_trace_packet_optional_trusted_packet_sequence_id v] formats v *) + +val pp_trace_packet : Format.formatter -> trace_packet -> unit +(** [pp_trace_packet v] formats v *) + +val pp_trace : Format.formatter -> trace -> unit +(** [pp_trace v] formats v *) + + +(** {2 Protobuf Encoding} *) + +val encode_pb_ftrace_descriptor_atrace_category : ftrace_descriptor_atrace_category -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_descriptor_atrace_category v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_descriptor : ftrace_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_descriptor_gpu_counter_group : gpu_counter_descriptor_gpu_counter_group -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_descriptor_gpu_counter_group v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_descriptor_measure_unit : gpu_counter_descriptor_measure_unit -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_descriptor_measure_unit v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_descriptor_gpu_counter_spec_peak_value : gpu_counter_descriptor_gpu_counter_spec_peak_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_descriptor_gpu_counter_spec_peak_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_descriptor_gpu_counter_spec : gpu_counter_descriptor_gpu_counter_spec -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_descriptor_gpu_counter_spec v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_descriptor_gpu_counter_block : gpu_counter_descriptor_gpu_counter_block -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_descriptor_gpu_counter_block v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_descriptor : gpu_counter_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_category : track_event_category -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_category v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_descriptor : track_event_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_data_source_descriptor : data_source_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_data_source_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_tracing_service_state_producer : tracing_service_state_producer -> Pbrt.Encoder.t -> unit +(** [encode_pb_tracing_service_state_producer v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_tracing_service_state_data_source : tracing_service_state_data_source -> Pbrt.Encoder.t -> unit +(** [encode_pb_tracing_service_state_data_source v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_tracing_service_state_tracing_session : tracing_service_state_tracing_session -> Pbrt.Encoder.t -> unit +(** [encode_pb_tracing_service_state_tracing_session v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_tracing_service_state : tracing_service_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_tracing_service_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_builtin_clock : builtin_clock -> Pbrt.Encoder.t -> unit +(** [encode_pb_builtin_clock v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_game_intervention_list_config : android_game_intervention_list_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_game_intervention_list_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_input_event_config_trace_mode : android_input_event_config_trace_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_input_event_config_trace_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_input_event_config_trace_level : android_input_event_config_trace_level -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_input_event_config_trace_level v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_input_event_config_trace_rule : android_input_event_config_trace_rule -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_input_event_config_trace_rule v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_input_event_config : android_input_event_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_input_event_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_log_id : android_log_id -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_log_id v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_log_priority : android_log_priority -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_log_priority v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_log_config : android_log_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_log_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_polled_state_config : android_polled_state_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_polled_state_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_sdk_sysprop_guard_config : android_sdk_sysprop_guard_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_sdk_sysprop_guard_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_system_property_config : android_system_property_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_system_property_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_app_wakelocks_config : app_wakelocks_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_app_wakelocks_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cpu_per_uid_config : cpu_per_uid_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_cpu_per_uid_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_kernel_wakelocks_config : kernel_wakelocks_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_kernel_wakelocks_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_network_packet_trace_config : network_packet_trace_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_network_packet_trace_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_packages_list_config : packages_list_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_packages_list_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_pixel_modem_config_event_group : pixel_modem_config_event_group -> Pbrt.Encoder.t -> unit +(** [encode_pb_pixel_modem_config_event_group v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_pixel_modem_config : pixel_modem_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_pixel_modem_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_proto_log_level : proto_log_level -> Pbrt.Encoder.t -> unit +(** [encode_pb_proto_log_level v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_proto_log_config_tracing_mode : proto_log_config_tracing_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_proto_log_config_tracing_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_proto_log_group : proto_log_group -> Pbrt.Encoder.t -> unit +(** [encode_pb_proto_log_group v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_proto_log_config : proto_log_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_proto_log_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_surface_flinger_layers_config_mode : surface_flinger_layers_config_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_surface_flinger_layers_config_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_surface_flinger_layers_config_trace_flag : surface_flinger_layers_config_trace_flag -> Pbrt.Encoder.t -> unit +(** [encode_pb_surface_flinger_layers_config_trace_flag v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_surface_flinger_layers_config : surface_flinger_layers_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_surface_flinger_layers_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_surface_flinger_transactions_config_mode : surface_flinger_transactions_config_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_surface_flinger_transactions_config_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_surface_flinger_transactions_config : surface_flinger_transactions_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_surface_flinger_transactions_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_window_manager_config_log_frequency : window_manager_config_log_frequency -> Pbrt.Encoder.t -> unit +(** [encode_pb_window_manager_config_log_frequency v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_window_manager_config_log_level : window_manager_config_log_level -> Pbrt.Encoder.t -> unit +(** [encode_pb_window_manager_config_log_level v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_window_manager_config : window_manager_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_window_manager_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_config_client_priority : chrome_config_client_priority -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_config_client_priority v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_config : chrome_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chromium_histogram_samples_config_histogram_sample : chromium_histogram_samples_config_histogram_sample -> Pbrt.Encoder.t -> unit +(** [encode_pb_chromium_histogram_samples_config_histogram_sample v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chromium_histogram_samples_config : chromium_histogram_samples_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_chromium_histogram_samples_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chromium_system_metrics_config : chromium_system_metrics_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_chromium_system_metrics_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_config : v8_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_etw_config_kernel_flag : etw_config_kernel_flag -> Pbrt.Encoder.t -> unit +(** [encode_pb_etw_config_kernel_flag v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_etw_config : etw_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_etw_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frozen_ftrace_config : frozen_ftrace_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_frozen_ftrace_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_compact_sched_config : ftrace_config_compact_sched_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_compact_sched_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_print_filter_rule_atrace_message : ftrace_config_print_filter_rule_atrace_message -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_print_filter_rule_atrace_message v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_print_filter_rule_match : ftrace_config_print_filter_rule_match -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_print_filter_rule_match v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_print_filter_rule : ftrace_config_print_filter_rule -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_print_filter_rule v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_print_filter : ftrace_config_print_filter -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_print_filter v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_ksyms_mem_policy : ftrace_config_ksyms_mem_policy -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_ksyms_mem_policy v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_kprobe_event_kprobe_type : ftrace_config_kprobe_event_kprobe_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_kprobe_event_kprobe_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_kprobe_event : ftrace_config_kprobe_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_kprobe_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_tracefs_option_state : ftrace_config_tracefs_option_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_tracefs_option_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config_tracefs_option : ftrace_config_tracefs_option -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config_tracefs_option v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ftrace_config : ftrace_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_ftrace_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_config : gpu_counter_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_render_stages_config : gpu_render_stages_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_render_stages_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_memory_config : vulkan_memory_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_memory_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_inode_file_config_mount_point_mapping_entry : inode_file_config_mount_point_mapping_entry -> Pbrt.Encoder.t -> unit +(** [encode_pb_inode_file_config_mount_point_mapping_entry v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_inode_file_config : inode_file_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_inode_file_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_console_config_output : console_config_output -> Pbrt.Encoder.t -> unit +(** [encode_pb_console_config_output v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_console_config : console_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_console_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interceptor_config : interceptor_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_interceptor_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_power_config_battery_counters : android_power_config_battery_counters -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_power_config_battery_counters v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_power_config : android_power_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_power_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_priority_boost_config_boost_policy : priority_boost_config_boost_policy -> Pbrt.Encoder.t -> unit +(** [encode_pb_priority_boost_config_boost_policy v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_priority_boost_config : priority_boost_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_priority_boost_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_stats_config_quirks : process_stats_config_quirks -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_stats_config_quirks v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_stats_config : process_stats_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_stats_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heapprofd_config_continuous_dump_config : heapprofd_config_continuous_dump_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_heapprofd_config_continuous_dump_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heapprofd_config : heapprofd_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_heapprofd_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_atom_id : atom_id -> Pbrt.Encoder.t -> unit +(** [encode_pb_atom_id v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_statsd_pull_atom_config : statsd_pull_atom_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_statsd_pull_atom_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_statsd_tracing_config : statsd_tracing_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_statsd_tracing_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_meminfo_counters : meminfo_counters -> Pbrt.Encoder.t -> unit +(** [encode_pb_meminfo_counters v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vmstat_counters : vmstat_counters -> Pbrt.Encoder.t -> unit +(** [encode_pb_vmstat_counters v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_config_stat_counters : sys_stats_config_stat_counters -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_config_stat_counters v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_config : sys_stats_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_system_info_config : system_info_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_system_info_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_test_config_dummy_fields : test_config_dummy_fields -> Pbrt.Encoder.t -> unit +(** [encode_pb_test_config_dummy_fields v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_test_config : test_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_test_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_config : track_event_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_data_source_config_session_initiator : data_source_config_session_initiator -> Pbrt.Encoder.t -> unit +(** [encode_pb_data_source_config_session_initiator v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_data_source_config_buffer_exhausted_policy : data_source_config_buffer_exhausted_policy -> Pbrt.Encoder.t -> unit +(** [encode_pb_data_source_config_buffer_exhausted_policy v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_data_source_config : data_source_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_data_source_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_buffer_config_fill_policy : trace_config_buffer_config_fill_policy -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_buffer_config_fill_policy v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_buffer_config : trace_config_buffer_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_buffer_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_data_source : trace_config_data_source -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_data_source v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_builtin_data_source : trace_config_builtin_data_source -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_builtin_data_source v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_lockdown_mode_operation : trace_config_lockdown_mode_operation -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_lockdown_mode_operation v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_producer_config : trace_config_producer_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_producer_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_statsd_metadata : trace_config_statsd_metadata -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_statsd_metadata v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_guardrail_overrides : trace_config_guardrail_overrides -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_guardrail_overrides v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_trigger_config_trigger_mode : trace_config_trigger_config_trigger_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_trigger_config_trigger_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_trigger_config_trigger : trace_config_trigger_config_trigger -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_trigger_config_trigger v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_trigger_config : trace_config_trigger_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_trigger_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_incremental_state_config : trace_config_incremental_state_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_incremental_state_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_compression_type : trace_config_compression_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_compression_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_incident_report_config : trace_config_incident_report_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_incident_report_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_statsd_logging : trace_config_statsd_logging -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_statsd_logging v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_trace_filter_string_filter_policy : trace_config_trace_filter_string_filter_policy -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_trace_filter_string_filter_policy v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_trace_filter_string_filter_rule : trace_config_trace_filter_string_filter_rule -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_trace_filter_string_filter_rule v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_trace_filter_string_filter_chain : trace_config_trace_filter_string_filter_chain -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_trace_filter_string_filter_chain v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_trace_filter : trace_config_trace_filter -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_trace_filter v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_android_report_config : trace_config_android_report_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_android_report_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_cmd_trace_start_delay : trace_config_cmd_trace_start_delay -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_cmd_trace_start_delay v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config_session_semaphore : trace_config_session_semaphore -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config_session_semaphore v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_config : trace_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_utsname : utsname -> Pbrt.Encoder.t -> unit +(** [encode_pb_utsname v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_system_info : system_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_system_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_stats_buffer_stats : trace_stats_buffer_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_stats_buffer_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_stats_writer_stats : trace_stats_writer_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_stats_writer_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_stats_filter_stats : trace_stats_filter_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_stats_filter_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_stats_final_flush_outcome : trace_stats_final_flush_outcome -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_stats_final_flush_outcome v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_stats : trace_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_game_intervention_list_game_mode_info : android_game_intervention_list_game_mode_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_game_intervention_list_game_mode_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_game_intervention_list_game_package_info : android_game_intervention_list_game_package_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_game_intervention_list_game_package_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_game_intervention_list : android_game_intervention_list -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_game_intervention_list v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_log_packet_log_event_arg_value : android_log_packet_log_event_arg_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_log_packet_log_event_arg_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_log_packet_log_event_arg : android_log_packet_log_event_arg -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_log_packet_log_event_arg v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_log_packet_log_event : android_log_packet_log_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_log_packet_log_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_log_packet_stats : android_log_packet_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_log_packet_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_log_packet : android_log_packet -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_log_packet v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_system_property_property_value : android_system_property_property_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_system_property_property_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_system_property : android_system_property -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_system_property v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_app_wakelock_info : app_wakelock_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_app_wakelock_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_app_wakelock_bundle : app_wakelock_bundle -> Pbrt.Encoder.t -> unit +(** [encode_pb_app_wakelock_bundle v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_bluetooth_trace_packet_type : bluetooth_trace_packet_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_bluetooth_trace_packet_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_bluetooth_trace_event : bluetooth_trace_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_bluetooth_trace_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_camera_frame_event_capture_result_status : android_camera_frame_event_capture_result_status -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_camera_frame_event_capture_result_status v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_camera_frame_event_camera_node_processing_details : android_camera_frame_event_camera_node_processing_details -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_camera_frame_event_camera_node_processing_details v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_camera_frame_event : android_camera_frame_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_camera_frame_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_camera_session_stats_camera_graph_camera_node : android_camera_session_stats_camera_graph_camera_node -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_camera_session_stats_camera_graph_camera_node v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_camera_session_stats_camera_graph_camera_edge : android_camera_session_stats_camera_graph_camera_edge -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_camera_session_stats_camera_graph_camera_edge v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_camera_session_stats_camera_graph : android_camera_session_stats_camera_graph -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_camera_session_stats_camera_graph v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_camera_session_stats : android_camera_session_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_camera_session_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cpu_per_uid_data : cpu_per_uid_data -> Pbrt.Encoder.t -> unit +(** [encode_pb_cpu_per_uid_data v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_jank_type : frame_timeline_event_jank_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_jank_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_jank_severity_type : frame_timeline_event_jank_severity_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_jank_severity_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_present_type : frame_timeline_event_present_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_present_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_prediction_type : frame_timeline_event_prediction_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_prediction_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_expected_surface_frame_start : frame_timeline_event_expected_surface_frame_start -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_expected_surface_frame_start v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_actual_surface_frame_start : frame_timeline_event_actual_surface_frame_start -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_actual_surface_frame_start v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_expected_display_frame_start : frame_timeline_event_expected_display_frame_start -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_expected_display_frame_start v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_actual_display_frame_start : frame_timeline_event_actual_display_frame_start -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_actual_display_frame_start v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event_frame_end : frame_timeline_event_frame_end -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event_frame_end v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame_timeline_event : frame_timeline_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame_timeline_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_mem_total_event : gpu_mem_total_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_mem_total_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_graphics_frame_event_buffer_event_type : graphics_frame_event_buffer_event_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_graphics_frame_event_buffer_event_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_graphics_frame_event_buffer_event : graphics_frame_event_buffer_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_graphics_frame_event_buffer_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_graphics_frame_event : graphics_frame_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_graphics_frame_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_initial_display_state : initial_display_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_initial_display_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_kernel_wakelock_data_wakelock_type : kernel_wakelock_data_wakelock_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_kernel_wakelock_data_wakelock_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_kernel_wakelock_data_wakelock : kernel_wakelock_data_wakelock -> Pbrt.Encoder.t -> unit +(** [encode_pb_kernel_wakelock_data_wakelock v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_kernel_wakelock_data : kernel_wakelock_data -> Pbrt.Encoder.t -> unit +(** [encode_pb_kernel_wakelock_data v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_traffic_direction : traffic_direction -> Pbrt.Encoder.t -> unit +(** [encode_pb_traffic_direction v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_network_packet_event : network_packet_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_network_packet_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_network_packet_bundle_packet_context : network_packet_bundle_packet_context -> Pbrt.Encoder.t -> unit +(** [encode_pb_network_packet_bundle_packet_context v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_network_packet_bundle : network_packet_bundle -> Pbrt.Encoder.t -> unit +(** [encode_pb_network_packet_bundle v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_network_packet_context : network_packet_context -> Pbrt.Encoder.t -> unit +(** [encode_pb_network_packet_context v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_packages_list_package_info : packages_list_package_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_packages_list_package_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_packages_list : packages_list -> Pbrt.Encoder.t -> unit +(** [encode_pb_packages_list v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_pixel_modem_events : pixel_modem_events -> Pbrt.Encoder.t -> unit +(** [encode_pb_pixel_modem_events v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_pixel_modem_token_database : pixel_modem_token_database -> Pbrt.Encoder.t -> unit +(** [encode_pb_pixel_modem_token_database v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_proto_log_message : proto_log_message -> Pbrt.Encoder.t -> unit +(** [encode_pb_proto_log_message v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_proto_log_viewer_config_message_data : proto_log_viewer_config_message_data -> Pbrt.Encoder.t -> unit +(** [encode_pb_proto_log_viewer_config_message_data v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_proto_log_viewer_config_group : proto_log_viewer_config_group -> Pbrt.Encoder.t -> unit +(** [encode_pb_proto_log_viewer_config_group v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_proto_log_viewer_config : proto_log_viewer_config -> Pbrt.Encoder.t -> unit +(** [encode_pb_proto_log_viewer_config v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_shell_transition_target : shell_transition_target -> Pbrt.Encoder.t -> unit +(** [encode_pb_shell_transition_target v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_shell_transition : shell_transition -> Pbrt.Encoder.t -> unit +(** [encode_pb_shell_transition v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_shell_handler_mapping : shell_handler_mapping -> Pbrt.Encoder.t -> unit +(** [encode_pb_shell_handler_mapping v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_shell_handler_mappings : shell_handler_mappings -> Pbrt.Encoder.t -> unit +(** [encode_pb_shell_handler_mappings v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_rect_proto : rect_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_rect_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_region_proto : region_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_region_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_size_proto : size_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_size_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_transform_proto : transform_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_transform_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_color_proto : color_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_color_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_input_window_info_proto : input_window_info_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_input_window_info_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_blur_region : blur_region -> Pbrt.Encoder.t -> unit +(** [encode_pb_blur_region v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_color_transform_proto : color_transform_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_color_transform_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trusted_overlay : trusted_overlay -> Pbrt.Encoder.t -> unit +(** [encode_pb_trusted_overlay v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_box_shadow_settings_box_shadow_params : box_shadow_settings_box_shadow_params -> Pbrt.Encoder.t -> unit +(** [encode_pb_box_shadow_settings_box_shadow_params v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_box_shadow_settings : box_shadow_settings -> Pbrt.Encoder.t -> unit +(** [encode_pb_box_shadow_settings v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_border_settings : border_settings -> Pbrt.Encoder.t -> unit +(** [encode_pb_border_settings v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layers_trace_file_proto_magic_number : layers_trace_file_proto_magic_number -> Pbrt.Encoder.t -> unit +(** [encode_pb_layers_trace_file_proto_magic_number v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_position_proto : position_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_position_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_active_buffer_proto : active_buffer_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_active_buffer_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_float_rect_proto : float_rect_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_float_rect_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_hwc_composition_type : hwc_composition_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_hwc_composition_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_barrier_layer_proto : barrier_layer_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_barrier_layer_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_corner_radii_proto : corner_radii_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_corner_radii_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_proto : layer_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layers_proto : layers_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_layers_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_display_proto : display_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_display_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layers_snapshot_proto : layers_snapshot_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_layers_snapshot_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layers_trace_file_proto : layers_trace_file_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_layers_trace_file_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_transaction_trace_file_magic_number : transaction_trace_file_magic_number -> Pbrt.Encoder.t -> unit +(** [encode_pb_transaction_trace_file_magic_number v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_matrix22 : layer_state_matrix22 -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_matrix22 v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_color3 : layer_state_color3 -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_color3 v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_buffer_data_pixel_format : layer_state_buffer_data_pixel_format -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_buffer_data_pixel_format v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_buffer_data : layer_state_buffer_data -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_buffer_data v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_transform : transform -> Pbrt.Encoder.t -> unit +(** [encode_pb_transform v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_window_info : layer_state_window_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_window_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_drop_input_mode : layer_state_drop_input_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_drop_input_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_corner_radii : layer_state_corner_radii -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_corner_radii v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state : layer_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_display_state : display_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_display_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_transaction_barrier : transaction_barrier -> Pbrt.Encoder.t -> unit +(** [encode_pb_transaction_barrier v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_transaction_state : transaction_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_transaction_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_creation_args : layer_creation_args -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_creation_args v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_display_info : display_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_display_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_transaction_trace_entry : transaction_trace_entry -> Pbrt.Encoder.t -> unit +(** [encode_pb_transaction_trace_entry v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_transaction_trace_file : transaction_trace_file -> Pbrt.Encoder.t -> unit +(** [encode_pb_transaction_trace_file v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_changes_lsb : layer_state_changes_lsb -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_changes_lsb v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_changes_msb : layer_state_changes_msb -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_changes_msb v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_flags : layer_state_flags -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_flags v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_layer_state_buffer_data_buffer_data_change : layer_state_buffer_data_buffer_data_change -> Pbrt.Encoder.t -> unit +(** [encode_pb_layer_state_buffer_data_buffer_data_change v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_display_state_changes : display_state_changes -> Pbrt.Encoder.t -> unit +(** [encode_pb_display_state_changes v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_winscope_extensions : winscope_extensions -> Pbrt.Encoder.t -> unit +(** [encode_pb_winscope_extensions v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_benchmark_metadata : chrome_benchmark_metadata -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_benchmark_metadata v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_metadata_packet_finch_hash : chrome_metadata_packet_finch_hash -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_metadata_packet_finch_hash v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_background_tracing_metadata_trigger_rule_trigger_type : background_tracing_metadata_trigger_rule_trigger_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_background_tracing_metadata_trigger_rule_trigger_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_background_tracing_metadata_trigger_rule_histogram_rule : background_tracing_metadata_trigger_rule_histogram_rule -> Pbrt.Encoder.t -> unit +(** [encode_pb_background_tracing_metadata_trigger_rule_histogram_rule v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_background_tracing_metadata_trigger_rule_named_rule_event_type : background_tracing_metadata_trigger_rule_named_rule_event_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_background_tracing_metadata_trigger_rule_named_rule_event_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_background_tracing_metadata_trigger_rule_named_rule : background_tracing_metadata_trigger_rule_named_rule -> Pbrt.Encoder.t -> unit +(** [encode_pb_background_tracing_metadata_trigger_rule_named_rule v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_background_tracing_metadata_trigger_rule : background_tracing_metadata_trigger_rule -> Pbrt.Encoder.t -> unit +(** [encode_pb_background_tracing_metadata_trigger_rule v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_background_tracing_metadata : background_tracing_metadata -> Pbrt.Encoder.t -> unit +(** [encode_pb_background_tracing_metadata v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_metadata_packet : chrome_metadata_packet -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_metadata_packet v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_traced_value_nested_type : chrome_traced_value_nested_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_traced_value_nested_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_traced_value : chrome_traced_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_traced_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_string_table_entry : chrome_string_table_entry -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_string_table_entry v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_trace_event_arg_value : chrome_trace_event_arg_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_trace_event_arg_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_trace_event_arg : chrome_trace_event_arg -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_trace_event_arg v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_trace_event : chrome_trace_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_trace_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_metadata_value : chrome_metadata_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_metadata_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_metadata : chrome_metadata -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_metadata v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_legacy_json_trace_trace_type : chrome_legacy_json_trace_trace_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_legacy_json_trace_trace_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_legacy_json_trace : chrome_legacy_json_trace -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_legacy_json_trace v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_event_bundle : chrome_event_bundle -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_event_bundle v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_trigger : chrome_trigger -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_trigger v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_string : v8_string -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_string v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_string_encoded_string : interned_v8_string_encoded_string -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_string_encoded_string v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_string : interned_v8_string -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_string v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_js_script_type : interned_v8_js_script_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_js_script_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_js_script : interned_v8_js_script -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_js_script v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_wasm_script : interned_v8_wasm_script -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_wasm_script v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_js_function_kind : interned_v8_js_function_kind -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_js_function_kind v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_js_function : interned_v8_js_function -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_js_function v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_isolate_code_range : interned_v8_isolate_code_range -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_isolate_code_range v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_v8_isolate : interned_v8_isolate -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_v8_isolate v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_js_code_tier : v8_js_code_tier -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_js_code_tier v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_js_code_instructions : v8_js_code_instructions -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_js_code_instructions v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_js_code : v8_js_code -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_js_code v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_internal_code_type : v8_internal_code_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_internal_code_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_internal_code : v8_internal_code -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_internal_code v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_wasm_code_tier : v8_wasm_code_tier -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_wasm_code_tier v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_wasm_code : v8_wasm_code -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_wasm_code v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_reg_exp_code : v8_reg_exp_code -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_reg_exp_code v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_code_move_to_instructions : v8_code_move_to_instructions -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_code_move_to_instructions v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_code_move : v8_code_move -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_code_move v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_v8_code_defaults : v8_code_defaults -> Pbrt.Encoder.t -> unit +(** [encode_pb_v8_code_defaults v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_clock_snapshot_clock_builtin_clocks : clock_snapshot_clock_builtin_clocks -> Pbrt.Encoder.t -> unit +(** [encode_pb_clock_snapshot_clock_builtin_clocks v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_clock_snapshot_clock : clock_snapshot_clock -> Pbrt.Encoder.t -> unit +(** [encode_pb_clock_snapshot_clock v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_clock_snapshot : clock_snapshot -> Pbrt.Encoder.t -> unit +(** [encode_pb_clock_snapshot v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cswitch_etw_event_old_thread_wait_reason : cswitch_etw_event_old_thread_wait_reason -> Pbrt.Encoder.t -> unit +(** [encode_pb_cswitch_etw_event_old_thread_wait_reason v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cswitch_etw_event_old_thread_wait_mode : cswitch_etw_event_old_thread_wait_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_cswitch_etw_event_old_thread_wait_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cswitch_etw_event_old_thread_state : cswitch_etw_event_old_thread_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_cswitch_etw_event_old_thread_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cswitch_etw_event_old_thread_wait_reason_enum_or_int : cswitch_etw_event_old_thread_wait_reason_enum_or_int -> Pbrt.Encoder.t -> unit +(** [encode_pb_cswitch_etw_event_old_thread_wait_reason_enum_or_int v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cswitch_etw_event_old_thread_wait_mode_enum_or_int : cswitch_etw_event_old_thread_wait_mode_enum_or_int -> Pbrt.Encoder.t -> unit +(** [encode_pb_cswitch_etw_event_old_thread_wait_mode_enum_or_int v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cswitch_etw_event_old_thread_state_enum_or_int : cswitch_etw_event_old_thread_state_enum_or_int -> Pbrt.Encoder.t -> unit +(** [encode_pb_cswitch_etw_event_old_thread_state_enum_or_int v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cswitch_etw_event : cswitch_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_cswitch_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ready_thread_etw_event_adjust_reason : ready_thread_etw_event_adjust_reason -> Pbrt.Encoder.t -> unit +(** [encode_pb_ready_thread_etw_event_adjust_reason v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ready_thread_etw_event_trace_flag : ready_thread_etw_event_trace_flag -> Pbrt.Encoder.t -> unit +(** [encode_pb_ready_thread_etw_event_trace_flag v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ready_thread_etw_event_adjust_reason_enum_or_int : ready_thread_etw_event_adjust_reason_enum_or_int -> Pbrt.Encoder.t -> unit +(** [encode_pb_ready_thread_etw_event_adjust_reason_enum_or_int v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ready_thread_etw_event_flag_enum_or_int : ready_thread_etw_event_flag_enum_or_int -> Pbrt.Encoder.t -> unit +(** [encode_pb_ready_thread_etw_event_flag_enum_or_int v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ready_thread_etw_event : ready_thread_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_ready_thread_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_mem_info_etw_event : mem_info_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_mem_info_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_file_io_create_etw_event : file_io_create_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_file_io_create_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_file_io_dir_enum_etw_event : file_io_dir_enum_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_file_io_dir_enum_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_file_io_info_etw_event : file_io_info_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_file_io_info_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_file_io_read_write_etw_event : file_io_read_write_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_file_io_read_write_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_file_io_simple_op_etw_event : file_io_simple_op_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_file_io_simple_op_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_file_io_op_end_etw_event : file_io_op_end_etw_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_file_io_op_end_etw_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_etw_trace_event_event : etw_trace_event_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_etw_trace_event_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_etw_trace_event : etw_trace_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_etw_trace_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_etw_trace_event_bundle : etw_trace_event_bundle -> Pbrt.Encoder.t -> unit +(** [encode_pb_etw_trace_event_bundle v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_evdev_event_input_event : evdev_event_input_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_evdev_event_input_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_evdev_event_event : evdev_event_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_evdev_event_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_evdev_event : evdev_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_evdev_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_field_descriptor_proto_label : field_descriptor_proto_label -> Pbrt.Encoder.t -> unit +(** [encode_pb_field_descriptor_proto_label v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_field_descriptor_proto_type : field_descriptor_proto_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_field_descriptor_proto_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_uninterpreted_option_name_part : uninterpreted_option_name_part -> Pbrt.Encoder.t -> unit +(** [encode_pb_uninterpreted_option_name_part v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_uninterpreted_option : uninterpreted_option -> Pbrt.Encoder.t -> unit +(** [encode_pb_uninterpreted_option v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_field_options : field_options -> Pbrt.Encoder.t -> unit +(** [encode_pb_field_options v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_field_descriptor_proto : field_descriptor_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_field_descriptor_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_enum_value_descriptor_proto : enum_value_descriptor_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_enum_value_descriptor_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_enum_descriptor_proto : enum_descriptor_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_enum_descriptor_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_oneof_options : oneof_options -> Pbrt.Encoder.t -> unit +(** [encode_pb_oneof_options v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_oneof_descriptor_proto : oneof_descriptor_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_oneof_descriptor_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_descriptor_proto_reserved_range : descriptor_proto_reserved_range -> Pbrt.Encoder.t -> unit +(** [encode_pb_descriptor_proto_reserved_range v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_descriptor_proto : descriptor_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_descriptor_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_file_descriptor_proto : file_descriptor_proto -> Pbrt.Encoder.t -> unit +(** [encode_pb_file_descriptor_proto v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_file_descriptor_set : file_descriptor_set -> Pbrt.Encoder.t -> unit +(** [encode_pb_file_descriptor_set v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_extension_descriptor : extension_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_extension_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_inode_file_map_entry_type : inode_file_map_entry_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_inode_file_map_entry_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_inode_file_map_entry : inode_file_map_entry -> Pbrt.Encoder.t -> unit +(** [encode_pb_inode_file_map_entry v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_inode_file_map : inode_file_map -> Pbrt.Encoder.t -> unit +(** [encode_pb_inode_file_map v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_generic_kernel_cpu_frequency_event : generic_kernel_cpu_frequency_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_generic_kernel_cpu_frequency_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_generic_kernel_task_state_event_task_state_enum : generic_kernel_task_state_event_task_state_enum -> Pbrt.Encoder.t -> unit +(** [encode_pb_generic_kernel_task_state_event_task_state_enum v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_generic_kernel_task_state_event : generic_kernel_task_state_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_generic_kernel_task_state_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_generic_kernel_task_rename_event : generic_kernel_task_rename_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_generic_kernel_task_rename_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_generic_kernel_process_tree_thread : generic_kernel_process_tree_thread -> Pbrt.Encoder.t -> unit +(** [encode_pb_generic_kernel_process_tree_thread v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_generic_kernel_process_tree_process : generic_kernel_process_tree_process -> Pbrt.Encoder.t -> unit +(** [encode_pb_generic_kernel_process_tree_process v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_generic_kernel_process_tree : generic_kernel_process_tree -> Pbrt.Encoder.t -> unit +(** [encode_pb_generic_kernel_process_tree v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_event_gpu_counter_value : gpu_counter_event_gpu_counter_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_event_gpu_counter_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_event_gpu_counter : gpu_counter_event_gpu_counter -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_event_gpu_counter v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_counter_event : gpu_counter_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_counter_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_log_severity : gpu_log_severity -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_log_severity v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_log : gpu_log -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_log v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_render_stage_event_extra_data : gpu_render_stage_event_extra_data -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_render_stage_event_extra_data v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_render_stage_event_specifications_context_spec : gpu_render_stage_event_specifications_context_spec -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_render_stage_event_specifications_context_spec v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_render_stage_event_specifications_description : gpu_render_stage_event_specifications_description -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_render_stage_event_specifications_description v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_render_stage_event_specifications : gpu_render_stage_event_specifications -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_render_stage_event_specifications v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_gpu_render_stage_event : gpu_render_stage_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_gpu_render_stage_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_graphics_context_api : interned_graphics_context_api -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_graphics_context_api v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_graphics_context : interned_graphics_context -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_graphics_context v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_gpu_render_stage_specification_render_stage_category : interned_gpu_render_stage_specification_render_stage_category -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_gpu_render_stage_specification_render_stage_category v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_gpu_render_stage_specification : interned_gpu_render_stage_specification -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_gpu_render_stage_specification v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_api_event_vk_debug_utils_object_name : vulkan_api_event_vk_debug_utils_object_name -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_api_event_vk_debug_utils_object_name v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_api_event_vk_queue_submit : vulkan_api_event_vk_queue_submit -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_api_event_vk_queue_submit v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_api_event : vulkan_api_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_api_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_memory_event_annotation_value : vulkan_memory_event_annotation_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_memory_event_annotation_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_memory_event_annotation : vulkan_memory_event_annotation -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_memory_event_annotation v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_memory_event_source : vulkan_memory_event_source -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_memory_event_source v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_memory_event_operation : vulkan_memory_event_operation -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_memory_event_operation v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_memory_event_allocation_scope : vulkan_memory_event_allocation_scope -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_memory_event_allocation_scope v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_vulkan_memory_event : vulkan_memory_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_vulkan_memory_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_string : interned_string -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_string v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_line : line -> Pbrt.Encoder.t -> unit +(** [encode_pb_line v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_address_symbols : address_symbols -> Pbrt.Encoder.t -> unit +(** [encode_pb_address_symbols v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_module_symbols : module_symbols -> Pbrt.Encoder.t -> unit +(** [encode_pb_module_symbols v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_mapping : mapping -> Pbrt.Encoder.t -> unit +(** [encode_pb_mapping v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_frame : frame -> Pbrt.Encoder.t -> unit +(** [encode_pb_frame v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_callstack : callstack -> Pbrt.Encoder.t -> unit +(** [encode_pb_callstack v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_histogram_name : histogram_name -> Pbrt.Encoder.t -> unit +(** [encode_pb_histogram_name v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_histogram_sample : chrome_histogram_sample -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_histogram_sample v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_debug_annotation_nested_value_nested_type : debug_annotation_nested_value_nested_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_debug_annotation_nested_value_nested_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_debug_annotation_nested_value : debug_annotation_nested_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_debug_annotation_nested_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_debug_annotation_name_field : debug_annotation_name_field -> Pbrt.Encoder.t -> unit +(** [encode_pb_debug_annotation_name_field v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_debug_annotation_value : debug_annotation_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_debug_annotation_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_debug_annotation_proto_type_descriptor : debug_annotation_proto_type_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_debug_annotation_proto_type_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_debug_annotation : debug_annotation -> Pbrt.Encoder.t -> unit +(** [encode_pb_debug_annotation v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_debug_annotation_name : debug_annotation_name -> Pbrt.Encoder.t -> unit +(** [encode_pb_debug_annotation_name v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_debug_annotation_value_type_name : debug_annotation_value_type_name -> Pbrt.Encoder.t -> unit +(** [encode_pb_debug_annotation_value_type_name v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_log_message_priority : log_message_priority -> Pbrt.Encoder.t -> unit +(** [encode_pb_log_message_priority v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_log_message : log_message -> Pbrt.Encoder.t -> unit +(** [encode_pb_log_message v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_log_message_body : log_message_body -> Pbrt.Encoder.t -> unit +(** [encode_pb_log_message_body v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_unsymbolized_source_location : unsymbolized_source_location -> Pbrt.Encoder.t -> unit +(** [encode_pb_unsymbolized_source_location v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_source_location : source_location -> Pbrt.Encoder.t -> unit +(** [encode_pb_source_location v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_active_processes : chrome_active_processes -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_active_processes v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_application_state_info_chrome_application_state : chrome_application_state_info_chrome_application_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_application_state_info_chrome_application_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_application_state_info : chrome_application_state_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_application_state_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_scheduler_action : chrome_compositor_scheduler_action -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_scheduler_action v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode : chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_scheduler_state_begin_impl_frame_deadline_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine_major_state_begin_impl_frame_state : chrome_compositor_state_machine_major_state_begin_impl_frame_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine_major_state_begin_impl_frame_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine_major_state_begin_main_frame_state : chrome_compositor_state_machine_major_state_begin_main_frame_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine_major_state_begin_main_frame_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state : chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine_major_state_layer_tree_frame_sink_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state : chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine_major_state_forced_redraw_on_timeout_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine_major_state : chrome_compositor_state_machine_major_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine_major_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine_minor_state_tree_priority : chrome_compositor_state_machine_minor_state_tree_priority -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine_minor_state_tree_priority v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine_minor_state_scroll_handler_state : chrome_compositor_state_machine_minor_state_scroll_handler_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine_minor_state_scroll_handler_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine_minor_state : chrome_compositor_state_machine_minor_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine_minor_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_state_machine : chrome_compositor_state_machine -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_state_machine v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_impl_frame_args_state : begin_impl_frame_args_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_impl_frame_args_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_frame_args_begin_frame_args_type : begin_frame_args_begin_frame_args_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_frame_args_begin_frame_args_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_frame_args_created_from : begin_frame_args_created_from -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_frame_args_created_from v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_frame_args : begin_frame_args -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_frame_args v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_impl_frame_args_timestamps_in_us : begin_impl_frame_args_timestamps_in_us -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_impl_frame_args_timestamps_in_us v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_impl_frame_args_args : begin_impl_frame_args_args -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_impl_frame_args_args v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_impl_frame_args : begin_impl_frame_args -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_impl_frame_args v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_frame_observer_state : begin_frame_observer_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_frame_observer_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_begin_frame_source_state : begin_frame_source_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_begin_frame_source_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_compositor_timing_history : compositor_timing_history -> Pbrt.Encoder.t -> unit +(** [encode_pb_compositor_timing_history v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_compositor_scheduler_state : chrome_compositor_scheduler_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_compositor_scheduler_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_content_settings_event_info : chrome_content_settings_event_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_content_settings_event_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_frame_reporter_state : chrome_frame_reporter_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_frame_reporter_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_frame_reporter_frame_drop_reason : chrome_frame_reporter_frame_drop_reason -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_frame_reporter_frame_drop_reason v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_frame_reporter_scroll_state : chrome_frame_reporter_scroll_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_frame_reporter_scroll_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_frame_reporter_frame_type : chrome_frame_reporter_frame_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_frame_reporter_frame_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_frame_reporter : chrome_frame_reporter -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_frame_reporter v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_keyed_service : chrome_keyed_service -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_keyed_service v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_latency_info_step : chrome_latency_info_step -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_latency_info_step v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_latency_info_latency_component_type : chrome_latency_info_latency_component_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_latency_info_latency_component_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_latency_info_component_info : chrome_latency_info_component_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_latency_info_component_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_latency_info_input_type : chrome_latency_info_input_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_latency_info_input_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_latency_info : chrome_latency_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_latency_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_legacy_ipc_message_class : chrome_legacy_ipc_message_class -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_legacy_ipc_message_class v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_legacy_ipc : chrome_legacy_ipc -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_legacy_ipc v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_message_pump : chrome_message_pump -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_message_pump v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_mojo_event_info : chrome_mojo_event_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_mojo_event_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_railmode : chrome_railmode -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_railmode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_renderer_scheduler_state : chrome_renderer_scheduler_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_renderer_scheduler_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_user_event : chrome_user_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_user_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_window_handle_event_info : chrome_window_handle_event_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_window_handle_event_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_screenshot : screenshot -> Pbrt.Encoder.t -> unit +(** [encode_pb_screenshot v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_task_execution : task_execution -> Pbrt.Encoder.t -> unit +(** [encode_pb_task_execution v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_type : track_event_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_callstack_frame : track_event_callstack_frame -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_callstack_frame v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_callstack : track_event_callstack -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_callstack v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_legacy_event_flow_direction : track_event_legacy_event_flow_direction -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_legacy_event_flow_direction v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_legacy_event_instant_event_scope : track_event_legacy_event_instant_event_scope -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_legacy_event_instant_event_scope v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_legacy_event_id : track_event_legacy_event_id -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_legacy_event_id v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_legacy_event : track_event_legacy_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_legacy_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_name_field : track_event_name_field -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_name_field v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_counter_value_field : track_event_counter_value_field -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_counter_value_field v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_correlation_id_field : track_event_correlation_id_field -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_correlation_id_field v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_callstack_field : track_event_callstack_field -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_callstack_field v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_source_location_field : track_event_source_location_field -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_source_location_field v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_timestamp : track_event_timestamp -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_timestamp v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_thread_time : track_event_thread_time -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_thread_time v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_thread_instruction_count : track_event_thread_instruction_count -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_thread_instruction_count v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event : track_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_defaults : track_event_defaults -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_defaults v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_event_category : event_category -> Pbrt.Encoder.t -> unit +(** [encode_pb_event_category v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_event_name : event_name -> Pbrt.Encoder.t -> unit +(** [encode_pb_event_name v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_interned_data : interned_data -> Pbrt.Encoder.t -> unit +(** [encode_pb_interned_data v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units -> Pbrt.Encoder.t -> unit +(** [encode_pb_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry_units v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry : memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry -> Pbrt.Encoder.t -> unit +(** [encode_pb_memory_tracker_snapshot_process_snapshot_memory_node_memory_node_entry v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_memory_tracker_snapshot_process_snapshot_memory_node : memory_tracker_snapshot_process_snapshot_memory_node -> Pbrt.Encoder.t -> unit +(** [encode_pb_memory_tracker_snapshot_process_snapshot_memory_node v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_memory_tracker_snapshot_process_snapshot_memory_edge : memory_tracker_snapshot_process_snapshot_memory_edge -> Pbrt.Encoder.t -> unit +(** [encode_pb_memory_tracker_snapshot_process_snapshot_memory_edge v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_memory_tracker_snapshot_process_snapshot : memory_tracker_snapshot_process_snapshot -> Pbrt.Encoder.t -> unit +(** [encode_pb_memory_tracker_snapshot_process_snapshot v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_memory_tracker_snapshot_level_of_detail : memory_tracker_snapshot_level_of_detail -> Pbrt.Encoder.t -> unit +(** [encode_pb_memory_tracker_snapshot_level_of_detail v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_memory_tracker_snapshot : memory_tracker_snapshot -> Pbrt.Encoder.t -> unit +(** [encode_pb_memory_tracker_snapshot v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perfetto_metatrace_arg_key_or_interned_key : perfetto_metatrace_arg_key_or_interned_key -> Pbrt.Encoder.t -> unit +(** [encode_pb_perfetto_metatrace_arg_key_or_interned_key v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perfetto_metatrace_arg_value_or_interned_value : perfetto_metatrace_arg_value_or_interned_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_perfetto_metatrace_arg_value_or_interned_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perfetto_metatrace_arg : perfetto_metatrace_arg -> Pbrt.Encoder.t -> unit +(** [encode_pb_perfetto_metatrace_arg v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perfetto_metatrace_interned_string : perfetto_metatrace_interned_string -> Pbrt.Encoder.t -> unit +(** [encode_pb_perfetto_metatrace_interned_string v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perfetto_metatrace_record_type : perfetto_metatrace_record_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_perfetto_metatrace_record_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perfetto_metatrace : perfetto_metatrace -> Pbrt.Encoder.t -> unit +(** [encode_pb_perfetto_metatrace v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_tracing_service_event_data_sources_data_source : tracing_service_event_data_sources_data_source -> Pbrt.Encoder.t -> unit +(** [encode_pb_tracing_service_event_data_sources_data_source v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_tracing_service_event_data_sources : tracing_service_event_data_sources -> Pbrt.Encoder.t -> unit +(** [encode_pb_tracing_service_event_data_sources v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_tracing_service_event : tracing_service_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_tracing_service_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_energy_consumer : android_energy_consumer -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_energy_consumer v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_energy_consumer_descriptor : android_energy_consumer_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_energy_consumer_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_energy_estimation_breakdown_energy_uid_breakdown : android_energy_estimation_breakdown_energy_uid_breakdown -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_energy_estimation_breakdown_energy_uid_breakdown v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_android_energy_estimation_breakdown : android_energy_estimation_breakdown -> Pbrt.Encoder.t -> unit +(** [encode_pb_android_energy_estimation_breakdown v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_entity_state_residency_power_entity_state : entity_state_residency_power_entity_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_entity_state_residency_power_entity_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_entity_state_residency_state_residency : entity_state_residency_state_residency -> Pbrt.Encoder.t -> unit +(** [encode_pb_entity_state_residency_state_residency v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_entity_state_residency : entity_state_residency -> Pbrt.Encoder.t -> unit +(** [encode_pb_entity_state_residency v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_battery_counters : battery_counters -> Pbrt.Encoder.t -> unit +(** [encode_pb_battery_counters v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_power_rails_rail_descriptor : power_rails_rail_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_power_rails_rail_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_power_rails_energy_data : power_rails_energy_data -> Pbrt.Encoder.t -> unit +(** [encode_pb_power_rails_energy_data v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_power_rails : power_rails -> Pbrt.Encoder.t -> unit +(** [encode_pb_power_rails v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_obfuscated_member : obfuscated_member -> Pbrt.Encoder.t -> unit +(** [encode_pb_obfuscated_member v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_obfuscated_class : obfuscated_class -> Pbrt.Encoder.t -> unit +(** [encode_pb_obfuscated_class v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_deobfuscation_mapping : deobfuscation_mapping -> Pbrt.Encoder.t -> unit +(** [encode_pb_deobfuscation_mapping v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heap_graph_root_type : heap_graph_root_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_heap_graph_root_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heap_graph_root : heap_graph_root -> Pbrt.Encoder.t -> unit +(** [encode_pb_heap_graph_root v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heap_graph_type_kind : heap_graph_type_kind -> Pbrt.Encoder.t -> unit +(** [encode_pb_heap_graph_type_kind v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heap_graph_type : heap_graph_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_heap_graph_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heap_graph_object_heap_type : heap_graph_object_heap_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_heap_graph_object_heap_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heap_graph_object_identifier : heap_graph_object_identifier -> Pbrt.Encoder.t -> unit +(** [encode_pb_heap_graph_object_identifier v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heap_graph_object : heap_graph_object -> Pbrt.Encoder.t -> unit +(** [encode_pb_heap_graph_object v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_heap_graph : heap_graph -> Pbrt.Encoder.t -> unit +(** [encode_pb_heap_graph v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profile_packet_heap_sample : profile_packet_heap_sample -> Pbrt.Encoder.t -> unit +(** [encode_pb_profile_packet_heap_sample v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profile_packet_histogram_bucket : profile_packet_histogram_bucket -> Pbrt.Encoder.t -> unit +(** [encode_pb_profile_packet_histogram_bucket v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profile_packet_histogram : profile_packet_histogram -> Pbrt.Encoder.t -> unit +(** [encode_pb_profile_packet_histogram v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profile_packet_process_stats : profile_packet_process_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_profile_packet_process_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profile_packet_process_heap_samples_client_error : profile_packet_process_heap_samples_client_error -> Pbrt.Encoder.t -> unit +(** [encode_pb_profile_packet_process_heap_samples_client_error v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profile_packet_process_heap_samples : profile_packet_process_heap_samples -> Pbrt.Encoder.t -> unit +(** [encode_pb_profile_packet_process_heap_samples v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profile_packet : profile_packet -> Pbrt.Encoder.t -> unit +(** [encode_pb_profile_packet v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_streaming_allocation : streaming_allocation -> Pbrt.Encoder.t -> unit +(** [encode_pb_streaming_allocation v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_streaming_free : streaming_free -> Pbrt.Encoder.t -> unit +(** [encode_pb_streaming_free v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_streaming_profile_packet : streaming_profile_packet -> Pbrt.Encoder.t -> unit +(** [encode_pb_streaming_profile_packet v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profiling_cpu_mode : profiling_cpu_mode -> Pbrt.Encoder.t -> unit +(** [encode_pb_profiling_cpu_mode v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profiling_stack_unwind_error : profiling_stack_unwind_error -> Pbrt.Encoder.t -> unit +(** [encode_pb_profiling_stack_unwind_error v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_profiling : profiling -> Pbrt.Encoder.t -> unit +(** [encode_pb_profiling v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perf_sample_sample_skip_reason : perf_sample_sample_skip_reason -> Pbrt.Encoder.t -> unit +(** [encode_pb_perf_sample_sample_skip_reason v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perf_sample_producer_event_data_source_stop_reason : perf_sample_producer_event_data_source_stop_reason -> Pbrt.Encoder.t -> unit +(** [encode_pb_perf_sample_producer_event_data_source_stop_reason v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perf_sample_producer_event : perf_sample_producer_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_perf_sample_producer_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perf_sample_optional_unwind_error : perf_sample_optional_unwind_error -> Pbrt.Encoder.t -> unit +(** [encode_pb_perf_sample_optional_unwind_error v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perf_sample_optional_sample_skipped_reason : perf_sample_optional_sample_skipped_reason -> Pbrt.Encoder.t -> unit +(** [encode_pb_perf_sample_optional_sample_skipped_reason v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_perf_sample : perf_sample -> Pbrt.Encoder.t -> unit +(** [encode_pb_perf_sample v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_smaps_entry : smaps_entry -> Pbrt.Encoder.t -> unit +(** [encode_pb_smaps_entry v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_smaps_packet : smaps_packet -> Pbrt.Encoder.t -> unit +(** [encode_pb_smaps_packet v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_stats_thread : process_stats_thread -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_stats_thread v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_stats_fdinfo : process_stats_fdinfo -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_stats_fdinfo v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_stats_process : process_stats_process -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_stats_process v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_stats : process_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_tree_thread : process_tree_thread -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_tree_thread v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_tree_process : process_tree_process -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_tree_process v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_tree : process_tree -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_tree v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_remote_clock_sync_synced_clocks : remote_clock_sync_synced_clocks -> Pbrt.Encoder.t -> unit +(** [encode_pb_remote_clock_sync_synced_clocks v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_remote_clock_sync : remote_clock_sync -> Pbrt.Encoder.t -> unit +(** [encode_pb_remote_clock_sync v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_atom : atom -> Pbrt.Encoder.t -> unit +(** [encode_pb_atom v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_statsd_atom : statsd_atom -> Pbrt.Encoder.t -> unit +(** [encode_pb_statsd_atom v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_meminfo_value : sys_stats_meminfo_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_meminfo_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_vmstat_value : sys_stats_vmstat_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_vmstat_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_cpu_times : sys_stats_cpu_times -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_cpu_times v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_interrupt_count : sys_stats_interrupt_count -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_interrupt_count v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_devfreq_value : sys_stats_devfreq_value -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_devfreq_value v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_buddy_info : sys_stats_buddy_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_buddy_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_disk_stat : sys_stats_disk_stat -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_disk_stat v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_psi_sample_psi_resource : sys_stats_psi_sample_psi_resource -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_psi_sample_psi_resource v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_psi_sample : sys_stats_psi_sample -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_psi_sample v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_thermal_zone : sys_stats_thermal_zone -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_thermal_zone v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_cpu_idle_state_entry : sys_stats_cpu_idle_state_entry -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_cpu_idle_state_entry v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats_cpu_idle_state : sys_stats_cpu_idle_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats_cpu_idle_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_sys_stats : sys_stats -> Pbrt.Encoder.t -> unit +(** [encode_pb_sys_stats v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cpu_info_arm_cpu_identifier : cpu_info_arm_cpu_identifier -> Pbrt.Encoder.t -> unit +(** [encode_pb_cpu_info_arm_cpu_identifier v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cpu_info_cpu_identifier : cpu_info_cpu_identifier -> Pbrt.Encoder.t -> unit +(** [encode_pb_cpu_info_cpu_identifier v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cpu_info_cpu : cpu_info_cpu -> Pbrt.Encoder.t -> unit +(** [encode_pb_cpu_info_cpu v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_cpu_info : cpu_info -> Pbrt.Encoder.t -> unit +(** [encode_pb_cpu_info v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_test_event_test_payload : test_event_test_payload -> Pbrt.Encoder.t -> unit +(** [encode_pb_test_event_test_payload v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_test_event : test_event -> Pbrt.Encoder.t -> unit +(** [encode_pb_test_event v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_packet_defaults : trace_packet_defaults -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_packet_defaults v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_uuid : trace_uuid -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_uuid v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_descriptor_chrome_process_type : process_descriptor_chrome_process_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_descriptor_chrome_process_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_descriptor : process_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_event_range_of_interest : track_event_range_of_interest -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_event_range_of_interest v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_thread_descriptor_chrome_thread_type : thread_descriptor_chrome_thread_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_thread_descriptor_chrome_thread_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_thread_descriptor : thread_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_thread_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_process_descriptor : chrome_process_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_process_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_thread_descriptor : chrome_thread_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_thread_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_counter_descriptor_builtin_counter_type : counter_descriptor_builtin_counter_type -> Pbrt.Encoder.t -> unit +(** [encode_pb_counter_descriptor_builtin_counter_type v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_counter_descriptor_unit : counter_descriptor_unit -> Pbrt.Encoder.t -> unit +(** [encode_pb_counter_descriptor_unit v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_counter_descriptor : counter_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_counter_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_descriptor_child_tracks_ordering : track_descriptor_child_tracks_ordering -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_descriptor_child_tracks_ordering v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_descriptor_sibling_merge_behavior : track_descriptor_sibling_merge_behavior -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_descriptor_sibling_merge_behavior v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_descriptor_static_or_dynamic_name : track_descriptor_static_or_dynamic_name -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_descriptor_static_or_dynamic_name v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_descriptor_sibling_merge_key_field : track_descriptor_sibling_merge_key_field -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_descriptor_sibling_merge_key_field v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_track_descriptor : track_descriptor -> Pbrt.Encoder.t -> unit +(** [encode_pb_track_descriptor v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_historgram_translation_table : chrome_historgram_translation_table -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_historgram_translation_table v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_user_event_translation_table : chrome_user_event_translation_table -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_user_event_translation_table v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_performance_mark_translation_table : chrome_performance_mark_translation_table -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_performance_mark_translation_table v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_slice_name_translation_table : slice_name_translation_table -> Pbrt.Encoder.t -> unit +(** [encode_pb_slice_name_translation_table v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_process_track_name_translation_table : process_track_name_translation_table -> Pbrt.Encoder.t -> unit +(** [encode_pb_process_track_name_translation_table v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_chrome_study_translation_table : chrome_study_translation_table -> Pbrt.Encoder.t -> unit +(** [encode_pb_chrome_study_translation_table v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_translation_table : translation_table -> Pbrt.Encoder.t -> unit +(** [encode_pb_translation_table v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trigger : trigger -> Pbrt.Encoder.t -> unit +(** [encode_pb_trigger v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ui_state_highlight_process : ui_state_highlight_process -> Pbrt.Encoder.t -> unit +(** [encode_pb_ui_state_highlight_process v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_ui_state : ui_state -> Pbrt.Encoder.t -> unit +(** [encode_pb_ui_state v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_packet_sequence_flags : trace_packet_sequence_flags -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_packet_sequence_flags v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_packet_data : trace_packet_data -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_packet_data v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_packet_optional_trusted_uid : trace_packet_optional_trusted_uid -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_packet_optional_trusted_uid v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_packet_optional_trusted_packet_sequence_id : trace_packet_optional_trusted_packet_sequence_id -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_packet_optional_trusted_packet_sequence_id v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace_packet : trace_packet -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace_packet v encoder] encodes [v] with the given [encoder] *) + +val encode_pb_trace : trace -> Pbrt.Encoder.t -> unit +(** [encode_pb_trace v encoder] encodes [v] with the given [encoder] *) + + +(** {2 Protobuf Decoding} *) diff --git a/src/perfetto/perfetto_trace.proto b/src/perfetto/perfetto_trace.proto new file mode 100644 index 0000000..7e1433c --- /dev/null +++ b/src/perfetto/perfetto_trace.proto @@ -0,0 +1,17734 @@ + // AUTOGENERATED - DO NOT EDIT +// --------------------------- +// This file has been generated by +// AOSP://external/perfetto/tools/gen_merged_protos +// merging the perfetto config protos. +// This fused proto is intended to be copied in: +// - Android tree, for statsd. +// - Google internal repos. + +syntax = "proto2"; + +package perfetto.protos; + +option go_package = "github.com/google/perfetto/perfetto_proto"; + +// Begin of protos/perfetto/common/ftrace_descriptor.proto + +message FtraceDescriptor { + message AtraceCategory { + optional string name = 1; + optional string description = 2; + } + + // Report the available atrace categories. + // + // Used by Traceur via `perfetto --query`. + repeated AtraceCategory atrace_categories = 1; +} + +// End of protos/perfetto/common/ftrace_descriptor.proto + +// Begin of protos/perfetto/common/gpu_counter_descriptor.proto + +// Description of GPU counters. +// This message is sent by a GPU counter producer to specify the counters +// available in the hardware. +message GpuCounterDescriptor { + // Logical groups for a counter. This is used in the UI to present the + // related counters together. + enum GpuCounterGroup { + UNCLASSIFIED = 0; + SYSTEM = 1; + VERTICES = 2; + FRAGMENTS = 3; + PRIMITIVES = 4; + // Includes counters relating to caching and bandwidth. + MEMORY = 5; + COMPUTE = 6; + RAY_TRACING = 7; + } + + message GpuCounterSpec { + optional uint32 counter_id = 1; + optional string name = 2; + optional string description = 3; + // MeasureUnit unit (deprecated) + reserved 4; + oneof peak_value { + int64 int_peak_value = 5; + double double_peak_value = 6; + } + repeated MeasureUnit numerator_units = 7; + repeated MeasureUnit denominator_units = 8; + optional bool select_by_default = 9; + repeated GpuCounterGroup groups = 10; + } + repeated GpuCounterSpec specs = 1; + + // Allow producer to group counters into block to represent counter islands. + // A capacity may be specified to indicate the number of counters that can be + // enable simultaneously in that block. + message GpuCounterBlock { + // required. Unique ID for the counter group. + optional uint32 block_id = 1; + // optional. Number of counters supported by the block. No limit if unset. + optional uint32 block_capacity = 2; + // optional. Name of block. + optional string name = 3; + // optional. Description for the block. + optional string description = 4; + // list of counters that are part of the block. + repeated uint32 counter_ids = 5; + } + repeated GpuCounterBlock blocks = 2; + + // optional. Minimum sampling period supported by the producer in + // nanoseconds. + optional uint64 min_sampling_period_ns = 3; + + // optional. Maximum sampling period supported by the producer in + // nanoseconds. + optional uint64 max_sampling_period_ns = 4; + + // optional. The producer supports counter sampling by instrumenting the + // command buffer. + optional bool supports_instrumented_sampling = 5; + + // next id: 41 + enum MeasureUnit { + NONE = 0; + + BIT = 1; + KILOBIT = 2; + MEGABIT = 3; + GIGABIT = 4; + TERABIT = 5; + PETABIT = 6; + + BYTE = 7; + KILOBYTE = 8; + MEGABYTE = 9; + GIGABYTE = 10; + TERABYTE = 11; + PETABYTE = 12; + + HERTZ = 13; + KILOHERTZ = 14; + MEGAHERTZ = 15; + GIGAHERTZ = 16; + TERAHERTZ = 17; + PETAHERTZ = 18; + + NANOSECOND = 19; + MICROSECOND = 20; + MILLISECOND = 21; + SECOND = 22; + MINUTE = 23; + HOUR = 24; + + VERTEX = 25; + PIXEL = 26; + TRIANGLE = 27; + PRIMITIVE = 38; + FRAGMENT = 39; + + MILLIWATT = 28; + WATT = 29; + KILOWATT = 30; + + JOULE = 31; + VOLT = 32; + AMPERE = 33; + + CELSIUS = 34; + FAHRENHEIT = 35; + KELVIN = 36; + + // Values should be out of 100. + PERCENT = 37; + + INSTRUCTION = 40; + } +} + +// End of protos/perfetto/common/gpu_counter_descriptor.proto + +// Begin of protos/perfetto/common/track_event_descriptor.proto + +message TrackEventCategory { + optional string name = 1; + optional string description = 2; + repeated string tags = 3; +} + +message TrackEventDescriptor { + repeated TrackEventCategory available_categories = 1; +} + +// End of protos/perfetto/common/track_event_descriptor.proto + +// Begin of protos/perfetto/common/data_source_descriptor.proto + +// This message is sent from Producer(s) to the tracing Service when registering +// to advertise their capabilities. It describes the structure of tracing +// protos that will be produced by the data source and the supported filters. +message DataSourceDescriptor { + // e.g., "linux.ftrace", "chromium.tracing" + optional string name = 1; + + // When non-zero, this is a unique ID within the scope of the Producer for + // this data source (it is NOT globally unique). This is useful to + // differentiate between data sources with matching names when calling + // UpdateDataSource(). This field has been introduced in November 2021 + // (v22, Android T) and is not supported on older versions. + optional uint64 id = 7; + + // When true the data source is expected to ack the stop request through the + // NotifyDataSourceStopped() IPC. This field has been introduced after + // Android P in Jul 2018 and is not supported on older versions. + optional bool will_notify_on_stop = 2; + + // When true the data source is expected to ack the start request through the + // NotifyDataSourceStarted() IPC. This field has been introduced after + // Android P in March 2019 and is not supported on older versions. + optional bool will_notify_on_start = 3; + + // If true, opt into receiving the ClearIncrementalState() IPC. This should be + // set if the data source writes packets that refer to previous trace + // contents, and knows how to stop referring to the already-emitted data. + optional bool handles_incremental_state_clear = 4; + + // If true, indicates that the data source does nothing upon Flush. This + // allows the service to reduce the flush-related IPC traffic and better deal + // with frozen producers (see go/perfetto-frozen). This is usually the case + // for data sources like 'track_event' that don't have access to the various + // thread task runners to post a flush task and rely purely on server-side + // scraping. + // Introduced in v39 / Android V. + optional bool no_flush = 9; + + // Optional specification about available GPU counters. + optional GpuCounterDescriptor gpu_counter_descriptor = 5 [lazy = true]; + + optional TrackEventDescriptor track_event_descriptor = 6 [lazy = true]; + + optional FtraceDescriptor ftrace_descriptor = 8 [lazy = true]; +} + +// End of protos/perfetto/common/data_source_descriptor.proto + +// Begin of protos/perfetto/common/tracing_service_state.proto + +// Reports the state of the tracing service. Used to gather details about the +// data sources connected. +// See ConsumerPort::QueryServiceState(). +message TracingServiceState { + // Describes a producer process. + message Producer { + // Unique ID of the producer (monotonic counter). + optional int32 id = 1; + + // Typically matches the process name. + optional string name = 2; + + // Unix pid of the remote process. Supported only on Linux-based systems. + // Introduced in v24 / Android T. + optional int32 pid = 5; + + // Unix uid of the remote process. + optional int32 uid = 3; + + // The version of the client library used by the producer. + // This is a human readable string with and its format varies depending on + // the build system and the repo (standalone vs AOSP). + // This is intended for human debugging only. + optional string sdk_version = 4; + + // Returns true if the process appears to be frozen (Android only). + // Introduced in Perfetto V49 / Android 24Q4. + optional bool frozen = 6; + } + + // Describes a data source registered by a producer. Data sources are listed + // regardless of the fact that they are being used or not. + message DataSource { + // Descriptor passed by the data source when calling RegisterDataSource(). + optional DataSourceDescriptor ds_descriptor = 1; + + // ID of the producer, as per Producer.id. + optional int32 producer_id = 2; + } + + message TracingSession { + // The TracingSessionID. + optional uint64 id = 1; + + // The Unix uid of the consumer that started the session. + // This is meaningful only if the caller is root. In all other cases only + // tracing sessions that match the caller UID will be displayed. + optional int32 consumer_uid = 2; + + // Internal state of the tracing session. + // These strings are FYI only and subjected to change. + optional string state = 3; + + // The unique_session_name as set in the trace config (might be empty). + optional string unique_session_name = 4; + + // The number and size of each buffer. + repeated uint32 buffer_size_kb = 5; + + // Duration, as specified in the TraceConfig.duration_ms. + optional uint32 duration_ms = 6; + + // Number of data sources involved in the session. + optional uint32 num_data_sources = 7; + + // Time when the session was started, in the CLOCK_REALTIME domain. + // Available only on Linux-based systems. + optional int64 start_realtime_ns = 8; + + // The fields below have been introduced in v42. + + // The bugreport_score, as set in TraceConfig.bugreport_score. + optional int32 bugreport_score = 9; + + // As per TraceConfig.bugreport_filename. + optional string bugreport_filename = 10; + + // If true, the session is in the STARTED state. If false the session is in + // any other state (see `state` field). + optional bool is_started = 11; + } + + // Lists all the producers connected. + repeated Producer producers = 1; + + // Lists the data sources available. + repeated DataSource data_sources = 2; + + // Lists the tracing sessions active AND owned by a consumer that has the same + // UID of the caller (or all of them if the caller is root). + // Introduced in v24 / Android T. + repeated TracingSession tracing_sessions = 6; + + // This is always set to true from v24 and beyond. This flag is only used to + // tell the difference between: (1) talking to a recent service which happens + // to have no tracing session active; (2) talking to an older version of the + // service which will never report any tracing session. + optional bool supports_tracing_sessions = 7; + + // Total number of tracing sessions. + optional int32 num_sessions = 3; + + // Number of tracing sessions in the started state. Always <= num_sessions. + optional int32 num_sessions_started = 4; + + // The version of traced (the same returned by `traced --version`). + // This is a human readable string with and its format varies depending on + // the build system and the repo (standalone vs AOSP). + // This is intended for human debugging only. + optional string tracing_service_version = 5; +} + +// End of protos/perfetto/common/tracing_service_state.proto + +// Begin of protos/perfetto/common/builtin_clock.proto + +enum BuiltinClock { + BUILTIN_CLOCK_UNKNOWN = 0; + BUILTIN_CLOCK_REALTIME = 1; + BUILTIN_CLOCK_REALTIME_COARSE = 2; + BUILTIN_CLOCK_MONOTONIC = 3; + BUILTIN_CLOCK_MONOTONIC_COARSE = 4; + BUILTIN_CLOCK_MONOTONIC_RAW = 5; + BUILTIN_CLOCK_BOOTTIME = 6; + BUILTIN_CLOCK_TSC = 9; + BUILTIN_CLOCK_PERF = 10; + BUILTIN_CLOCK_MAX_ID = 63; + + reserved 7, 8; +} + +// End of protos/perfetto/common/builtin_clock.proto + +// Begin of protos/perfetto/config/android/android_game_intervention_list_config.proto + +// Data source that lists game modes and game interventions of games +// on an Android device. +message AndroidGameInterventionListConfig { + // If not empty, emit info about only the following list of package names + // (exact match, no regex). Otherwise, emit info about all packages. + repeated string package_name_filter = 1; +} + +// End of protos/perfetto/config/android/android_game_intervention_list_config.proto + +// Begin of protos/perfetto/config/android/android_input_event_config.proto + +// Custom configuration for the "android.input.inputevent" data source. +// +// NOTE: Input traces can only be taken on debuggable (userdebug/eng) builds! +// +// Next ID: 5 +message AndroidInputEventConfig { + // Trace modes are tracing presets that are included in the system. + enum TraceMode { + // Preset mode for maximal tracing. + // WARNING: This will bypass all privacy measures on debuggable builds, and + // will record all + // input events processed by the system, regardless of the context + // in which they were processed. It should only be used for tracing + // on a local device or for tests. It should NEVER be used for + // field tracing. + TRACE_MODE_TRACE_ALL = 0; + // Use the tracing rules defined in this config to specify what events to + // trace. + TRACE_MODE_USE_RULES = 1; + } + + // The tracing mode to use. If unspecified, it will default to + // TRACE_MODE_USE_RULES. + optional TraceMode mode = 1; + + // The level of tracing that should be applied to an event. + enum TraceLevel { + // Do not trace the input event. + TRACE_LEVEL_NONE = 0; + // Trace the event as a redacted event, where certain sensitive fields are + // omitted from the trace, including the coordinates of pointer events and + // the key/scan codes of key events. + TRACE_LEVEL_REDACTED = 1; + // Trace the complete event. + TRACE_LEVEL_COMPLETE = 2; + } + + // A rule that specifies the TraceLevel for an event based on matching + // conditions. All matchers in the rule are optional. To trigger this rule, an + // event must match all of its specified matchers (i.e. the matchers function + // like a series of conditions connected by a logical 'AND' operator). A rule + // with no specified matchers will match all events. Next ID: 6 + message TraceRule { + // The trace level to be used for events that trigger this rule. + // If unspecified, TRACE_LEVEL_NONE will be used by default. + optional TraceLevel trace_level = 1; + + // --- Optional Matchers --- + + // Package matchers + // + // Respectively matches if all or any of the target apps for this event are + // contained in the specified list of package names. + // + // Intended usage: + // - Use match_all_packages to selectively allow tracing for the listed + // packages. + // - Use match_any_packages to selectively deny tracing for certain + // packages. + // + // WARNING: Great care must be taken when designing rules for field tracing! + // This is because each event is almost always sent to more than + // one app. + // For example, when allowing tracing for a package that has a + // spy window + // over the display (e.g. SystemUI) using match_any_packages, + // essentially all input will be recorded on that display. This is + // because the events will be sent to the spy as well as the + // foreground app, and regardless of what the foreground app is, + // the event will end up being traced. + // Alternatively, when attempting to block tracing for specific + // packages using + // match_all_packages, no events will likely be blocked. This is + // because the event will also be sent to other apps (such as, but + // not limited to, ones with spy windows), so the matcher will not + // match unless all other targets are also listed under the + // match_all_packages list. + repeated string match_all_packages = 2; + repeated string match_any_packages = 3; + + // Matches if the event is secure, which means that at least one of the + // targets of this event is using the window flag FLAG_SECURE. + optional bool match_secure = 4; + + // Matches if there was an active IME connection while this event was being + // processed. + optional bool match_ime_connection_active = 5; + } + + // The list of rules to use to determine the trace level of events. + // Each event will be traced using the TraceLevel of the first rule that it + // triggers from this list. The rules are evaluated in the order in which they + // are specified. If an event does not match any of the rules, + // TRACE_LEVEL_NONE will be used by default. + repeated TraceRule rules = 2; + + // --- Control flags --- + + // Trace input events processed by the system as they are being dispatched + // to application windows. All trace rules will apply. + // - If this flag is used without enabling trace_dispatcher_window_dispatch, + // it will + // trace InputDispatcher's inbound events (which does not include events + // synthesized within InputDispatcher) that match the rules. + // - If used with trace_dispatcher_window_dispatch, all inbound and outbound + // events + // matching the rules, including all events synthesized within + // InputDispatcher, will be traced. + optional bool trace_dispatcher_input_events = 3; + + // Trace details about which windows the system is sending each input event + // to. All trace rules will apply. + optional bool trace_dispatcher_window_dispatch = 4; +} + +// End of protos/perfetto/config/android/android_input_event_config.proto + +// Begin of protos/perfetto/common/android_log_constants.proto + +// Values from NDK's android/log.h. +enum AndroidLogId { + // MAIN. + LID_DEFAULT = 0; + + LID_RADIO = 1; + LID_EVENTS = 2; + LID_SYSTEM = 3; + LID_CRASH = 4; + LID_STATS = 5; + LID_SECURITY = 6; + LID_KERNEL = 7; +} + +enum AndroidLogPriority { + PRIO_UNSPECIFIED = 0; + + // _DEFAULT, but should never be seen in logs. + PRIO_UNUSED = 1; + + PRIO_VERBOSE = 2; + PRIO_DEBUG = 3; + PRIO_INFO = 4; + PRIO_WARN = 5; + PRIO_ERROR = 6; + PRIO_FATAL = 7; +} + +// End of protos/perfetto/common/android_log_constants.proto + +// Begin of protos/perfetto/config/android/android_log_config.proto + +message AndroidLogConfig { + repeated AndroidLogId log_ids = 1; + + // Was |poll_ms|, deprecated. + reserved 2; + + // If set ignores all log messages whose prio is < the given value. + optional AndroidLogPriority min_prio = 3; + + // If non-empty ignores all log messages whose tag doesn't match one of the + // specified values. + repeated string filter_tags = 4; +} + +// End of protos/perfetto/config/android/android_log_config.proto + +// Begin of protos/perfetto/config/android/android_polled_state_config.proto + +// Data source that polls for display state. This should only be used for +// backward-compatibility; AndroidSystemPropertyConfig should be preferred. +message AndroidPolledStateConfig { + // Frequency of polling. If absent the state will be recorded once, at the + // start of the trace. + // This is required to be > 100ms to avoid excessive CPU usage. + optional uint32 poll_ms = 1; +} + +// End of protos/perfetto/config/android/android_polled_state_config.proto + +// Begin of protos/perfetto/config/android/android_sdk_sysprop_guard_config.proto + +// Data source that controls the system properties used to guard initialization +// of track_event producers (i.e. Skia) in apps using HWUI, and certain +// processes like SurfaceFlinger. +// +// This data source only tells Skia to initialized the Perfetto SDK and start +// routing data to the Track Event system instead of ATrace. For those events +// to actually show up in a trace, the track_event data source must be used as +// well. The Perfetto SDK cannot be de-initialized, so some long-lived apps and +// processes may need to be restarted for Skia to revert to using ATrace if +// Track Events are no longer desired. +// +// In addition to switching Skia to use Perfetto's track_event data source, +// this "guard" also controls Skia's "broad tracing", which removes Skia's +// internal tracing constraints and allows the track_event config to specify +// which categories should be traced. Filtering to the "skia.always" category +// *tag* in a track_event config can be used to re-enable the standard +// constraints typically used with ATrace. +// +// Data source name: android.sdk_sysprop_guard +// Introduced in Android 14 (U) QPR1. +// Next id: 4 +message AndroidSdkSyspropGuardConfig { + // If true, configures SurfaceFlinger to initialize Skia's Perfetto + // integration with the track_event data source in RenderEngine. + // If false or omitted, the simpler ATrace fallback is used. + // + // NOTE: once enabled, Skia will only revert to ATrace if SurfaceFlinger is + // restarted. + // + // Specifically this sets the following system properties: + // - debug.tracing.ctl.renderengine.skia_tracing_enabled + // - debug.tracing.ctl.renderengine.skia_use_perfetto_track_events + // + // Does not affect actual track_event data *collection*, which must be + // configured separately. + optional bool surfaceflinger_skia_track_events = 1; + + // If true, configures HWUI apps to initialize Skia's Perfetto integration + // with the track_event data source. hwui_package_name_filter + // can be used to control which apps are affected. + // If false or omitted, the simpler ATrace fallback is used. + // + // NOTE: once enabled, Skia will only revert to ATrace if the app is + // restarted. + // + // ATTENTION: affects ALL HWUI APPS if hwui_package_name_filter is not set! + // If filtering is NOT set, this controls these GLOBAL system properties: + // - debug.tracing.ctl.hwui.skia_tracing_enabled + // - debug.tracing.ctl.hwui.skia_use_perfetto_track_events + // If filtering IS set, this controls these APP-SPECIFIC system properties, + // for each package listed in the filter: + // - debug.tracing.ctl.hwui.skia_tracing_enabled. + // - debug.tracing.ctl.hwui.skia_use_perfetto_track_events. + // + // Does not affect actual track_event data *collection*, which must be + // configured separately. + optional bool hwui_skia_track_events = 2; + + // If non-empty, hwui_skia_track_events applies to only the packages listed. + // Otherwise, hwui_skia_track_events applies globally to all HWUI apps. + repeated string hwui_package_name_filter = 3; +} + +// End of protos/perfetto/config/android/android_sdk_sysprop_guard_config.proto + +// Begin of protos/perfetto/config/android/android_system_property_config.proto + +// Data source that polls for system properties. +message AndroidSystemPropertyConfig { + // Frequency of polling. If absent the state will be recorded once, at the + // start of the trace. + // This is required to be > 100ms to avoid excessive CPU usage. + optional uint32 poll_ms = 1; + + // Properties to poll. All property names must start with "debug.tracing.". + repeated string property_name = 2; +} + +// End of protos/perfetto/config/android/android_system_property_config.proto + +// Begin of protos/perfetto/config/android/app_wakelock_config.proto + +// Configuration for the android.app_wakelocks data source. +message AppWakelocksConfig { + // Specifies the delay (in milliseconds) after which the data source will + // attempt to write events. Writing less frequently reduces the trace size by + // making better use of the packed arrays and reducing the total number of + // TracePackets needed (which each have dozens of bytes of overhead). The + // suggested delay is 5000ms. + optional int32 write_delay_ms = 1; + + // When set, wakelocks held for less than this amount of time are filtered + // from the resulting trace. Note: duration is computed by matching wakelocks + // with identical attributes, not by tracking the underlying objects. The + // threshold should be < the trace's flush_period_ms. + optional int32 filter_duration_below_ms = 2; + + // When true, the owner_pid is dropped from the resulting output, reducing the + // size of the interning tables. + optional bool drop_owner_pid = 3; +} + +// End of protos/perfetto/config/android/app_wakelock_config.proto + +// Begin of protos/perfetto/config/android/cpu_per_uid_config.proto + +// Data source that records CPU per UID data. +message CpuPerUidConfig { + // Record at this frequency. + optional uint32 poll_ms = 1; +} + +// End of protos/perfetto/config/android/cpu_per_uid_config.proto + +// Begin of protos/perfetto/config/android/kernel_wakelocks_config.proto + +// Data source that records kernel (and native) wakelock data. +message KernelWakelocksConfig { + // Record at this frequency. + optional uint32 poll_ms = 1; +} + +// End of protos/perfetto/config/android/kernel_wakelocks_config.proto + +// Begin of protos/perfetto/config/android/network_trace_config.proto + +// Network tracing data source that records details on all packets sent or +// received by the network. +message NetworkPacketTraceConfig { + // Polling frequency in milliseconds. Network tracing writes to a fixed size + // ring buffer. The polling interval should be such that the ring buffer is + // unlikely to fill in that interval (or that filling is an acceptable risk). + // The minimum polling rate is 100ms (values below this are ignored). + // Introduced in Android 14 (U). + optional uint32 poll_ms = 1; + + // The aggregation_threshold is the number of packets at which an event will + // switch from per-packet details to aggregate details. For example, a value + // of 50 means that if a particular event (grouped by the unique combinations + // of metadata fields: {interface, direction, uid, etc}) has fewer than 50 + // packets, the exact timestamp and length are recorded for each packet. If + // there were 50 or more packets in an event, it would only record the total + // duration, packets, and length. A value of zero or unspecified will always + /// record per-packet details. A value of 1 always records aggregate details. + optional uint32 aggregation_threshold = 2; + + // Specifies the maximum number of packet contexts to intern at a time. This + // prevents the interning table from growing too large and controls whether + // interning is enabled or disabled (a value of zero disables interning and + // is the default). When a data sources interning table reaches this amount, + // packet contexts will be inlined into NetworkPacketEvents. + optional uint32 intern_limit = 3; + + // The following fields specify whether certain fields should be dropped from + // the output. Dropping fields improves normalization results, reduces the + // size of the interning table, and slightly reduces event size. + optional bool drop_local_port = 4; + optional bool drop_remote_port = 5; + optional bool drop_tcp_flags = 6; +} + +// End of protos/perfetto/config/android/network_trace_config.proto + +// Begin of protos/perfetto/config/android/packages_list_config.proto + +// Data source that lists details (such as version code) about packages on an +// Android device. +message PackagesListConfig { + // If not empty, emit info about only the following list of package names + // (exact match, no regex). Otherwise, emit info about all packages. + repeated string package_name_filter = 1; + + // If present and non-zero, the data source will periodically poll for CPU + // use by packages and only emit results for those that it sees. If absent, + // the data source will emit results for all packages at startup. The package + // name filter applies either way. + optional uint32 only_write_on_cpu_use_every_ms = 2; +} + +// End of protos/perfetto/config/android/packages_list_config.proto + +// Begin of protos/perfetto/config/android/pixel_modem_config.proto + +// Data source that records events from the modem. +message PixelModemConfig { + // Event group to record, as defined by the modem. + enum EventGroup { + EVENT_GROUP_UNKNOWN = 0; + + // Events suitable for low bandwidth tracing only. + EVENT_GROUP_LOW_BANDWIDTH = 1; + + // Events suitable for high and low bandwidth tracing. + EVENT_GROUP_HIGH_AND_LOW_BANDWIDTH = 2; + } + + optional EventGroup event_group = 1; + + // If set, record only events with these hashes. + repeated int64 pigweed_hash_allow_list = 2; + + // If set and allow_list is not set, deny events with these hashes. + repeated int64 pigweed_hash_deny_list = 3; +} + +// End of protos/perfetto/config/android/pixel_modem_config.proto + +// Begin of protos/perfetto/common/protolog_common.proto + +enum ProtoLogLevel { + PROTOLOG_LEVEL_UNDEFINED = 0; + PROTOLOG_LEVEL_DEBUG = 1; + PROTOLOG_LEVEL_VERBOSE = 2; + PROTOLOG_LEVEL_INFO = 3; + PROTOLOG_LEVEL_WARN = 4; + PROTOLOG_LEVEL_ERROR = 5; + PROTOLOG_LEVEL_WTF = 6; +} +// End of protos/perfetto/common/protolog_common.proto + +// Begin of protos/perfetto/config/android/protolog_config.proto + +// Custom configuration for the "android.protolog" data source. +// ProtoLog is a logging mechanism that is intented to be more efficient than +// logcat. This configures what logs to capture in the tracing instance. +message ProtoLogConfig { + enum TracingMode { + // When using the DEFAULT tracing mode, only log groups and levels specified + // in the group_overrides are traced. + DEFAULT = 0; + // When using the ENABLE_ALL tracing mode, all log groups and levels are + // traced, unless specified in the group_overrides. + ENABLE_ALL = 1; + } + + // Specified the configurations for each of the logging groups. If none is + // specified for a group the defaults will be used. + repeated ProtoLogGroup group_overrides = 1; + // Specified what tracing mode to use for the tracing instance. + optional TracingMode tracing_mode = 2; + // If set, any message with log level higher than this level (inclusive) will + // be traced. Group overrides take precedence over this value. + optional ProtoLogLevel default_log_from_level = 3; +} + +message ProtoLogGroup { + // The ProtoLog group name this configuration entry applies to. + optional string group_name = 1; + // Specify the level from which to start capturing protologs. + // e.g. if ProtoLogLevel.WARN is specified only warning, errors and fatal log + // message will be traced. + optional ProtoLogLevel log_from = 2; + // When set to true we will collect the stacktrace for each protolog message + // in this group that we are tracing. + optional bool collect_stacktrace = 3; +} + +// End of protos/perfetto/config/android/protolog_config.proto + +// Begin of protos/perfetto/config/android/surfaceflinger_layers_config.proto + +// Custom configuration for the "android.surfaceflinger.layers" data source. +message SurfaceFlingerLayersConfig { + enum Mode { + MODE_UNSPECIFIED = 0; + + // Trace layers snapshots. A snapshot is taken every time a layers change + // occurs. + MODE_ACTIVE = 1; + + // Generate layers snapshots from the transactions kept in the + // SurfaceFlinger's internal ring buffer. + // The layers snapshots generation occurs when this data source is flushed. + MODE_GENERATED = 2; + + // Trace a single layers snapshot. + MODE_DUMP = 3; + + // Default mode (applied by SurfaceFlinger if no mode is specified). + // Same as MODE_GENERATED, but triggers the layers snapshots generation only + // when a bugreport is taken. + MODE_GENERATED_BUGREPORT_ONLY = 4; + } + optional Mode mode = 1; + + enum TraceFlag { + TRACE_FLAG_UNSPECIFIED = 0; + TRACE_FLAG_INPUT = 0x02; + TRACE_FLAG_COMPOSITION = 0x04; + TRACE_FLAG_EXTRA = 0x08; + TRACE_FLAG_HWC = 0x10; + TRACE_FLAG_BUFFERS = 0x20; + TRACE_FLAG_VIRTUAL_DISPLAYS = 0x40; + + // INPUT | COMPOSITION | EXTRA + TRACE_FLAG_ALL = 0x0e; + } + repeated TraceFlag trace_flags = 2; +} + +// End of protos/perfetto/config/android/surfaceflinger_layers_config.proto + +// Begin of protos/perfetto/config/android/surfaceflinger_transactions_config.proto + +// Custom configuration for the "android.surfaceflinger.transactions" data +// source. +message SurfaceFlingerTransactionsConfig { + enum Mode { + MODE_UNSPECIFIED = 0; + + // Default mode (applied by SurfaceFlinger if no mode is specified). + // SurfaceFlinger writes its internal ring buffer of transactions every time + // the data source is flushed. The ring buffer contains the SurfaceFlinger's + // initial state and the latest transactions. + MODE_CONTINUOUS = 1; + + // SurfaceFlinger writes the initial state and then each incoming + // transaction until the data source is stopped. + MODE_ACTIVE = 2; + } + optional Mode mode = 1; +} + +// End of protos/perfetto/config/android/surfaceflinger_transactions_config.proto + +// Begin of protos/perfetto/config/android/windowmanager_config.proto + +// Custom configuration for the "android.windowmanager" data source. +message WindowManagerConfig { + enum LogFrequency { + LOG_FREQUENCY_UNSPECIFIED = 0; + + // Trace state snapshots when a frame is committed. + LOG_FREQUENCY_FRAME = 1; + + // Trace state snapshots every time a transaction is committed. + LOG_FREQUENCY_TRANSACTION = 2; + + // Trace single state snapshots when the data source is started. + LOG_FREQUENCY_SINGLE_DUMP = 3; + } + optional LogFrequency log_frequency = 1; + + enum LogLevel { + LOG_LEVEL_UNSPECIFIED = 0; + + // Logs all elements with maximum amount of information. + LOG_LEVEL_VERBOSE = 1; + + // Logs all elements but doesn't write all configuration data. + LOG_LEVEL_DEBUG = 2; + + // Logs only visible elements, with the minimum amount of performance + // overhead + LOG_LEVEL_CRITICAL = 3; + } + optional LogLevel log_level = 2; +} + +// End of protos/perfetto/config/android/windowmanager_config.proto + +// Begin of protos/perfetto/config/chrome/chrome_config.proto + +message ChromeConfig { + optional string trace_config = 1; + + // When enabled, the data source should only fill in fields in the output that + // are not potentially privacy sensitive. + optional bool privacy_filtering_enabled = 2; + + // Instead of emitting binary protobuf, convert the trace data to the legacy + // JSON format. Note that the trace data will still be returned as a series of + // TracePackets, but the embedded data will be JSON instead of serialized + // protobuf. + optional bool convert_to_legacy_json = 3; + + // Priority of the tracing session client. A higher priority session may + // preempt a lower priority one in configurations where concurrent sessions + // aren't supported. + enum ClientPriority { + UNKNOWN = 0; + BACKGROUND = 1; + USER_INITIATED = 2; + } + optional ClientPriority client_priority = 4; + + // Applicable only when using legacy JSON format. + // If |json_agent_label_filter| is not empty, only data pertaining to + // the specified tracing agent label (e.g. "traceEvents") will be returned. + optional string json_agent_label_filter = 5; + + // When enabled, event names should not contain package names. + optional bool event_package_name_filter_enabled = 6; +} + +// End of protos/perfetto/config/chrome/chrome_config.proto + +// Begin of protos/perfetto/config/chrome/histogram_samples.proto + +message ChromiumHistogramSamplesConfig { + // Records when a value within the specified bounds [min_value, max_value] is + // emitted into a Chrome histogram. + message HistogramSample { + optional string histogram_name = 1; + optional int64 min_value = 2; + optional int64 max_value = 3; + } + // List of histograms to record. If no histogram is specified, all histograms + // are recorded. + repeated HistogramSample histograms = 1; + + // Default: false (i.e. histogram names are NOT filtered out by default) + // When true, histogram_name will be filtered out. + optional bool filter_histogram_names = 2; +} + +// End of protos/perfetto/config/chrome/histogram_samples.proto + +// Begin of protos/perfetto/config/chrome/system_metrics.proto + +message ChromiumSystemMetricsConfig { + // Samples counters every X ms. + optional uint32 sampling_interval_ms = 1; +} + +// End of protos/perfetto/config/chrome/system_metrics.proto + +// Begin of protos/perfetto/config/chrome/v8_config.proto + +message V8Config { + // Whether to log the actual content of scripts (e.g. content of the JS file + // that was compiled to generate code). + // ATTENTION: This could considerably increase the size of the resuling trace + // file. + optional bool log_script_sources = 1; + // Whether to log the generated code for jitted functions (machine code or + // bytecode). + // ATTENTION: This could considerably increase the size of the resuling trace + // file. + optional bool log_instructions = 2; +} + +// End of protos/perfetto/config/chrome/v8_config.proto + +// Begin of protos/perfetto/config/etw/etw_config.proto + +// Proto definition based on the struct _EVENT_TRACE_PROPERTIES definition +// See: https://learn.microsoft.com/en-us/windows/win32/api/evntrace/ +// ns-evntrace-event_trace_properties +message EtwConfig { + // The KernelFlag represent list of kernel flags that we are intrested in. + // To get a more extensive list run 'xperf -providers k'. + enum KernelFlag { + CSWITCH = 0; + DISPATCHER = 1; + } + + // The kernel_flags determines the flags that will be used by the etw tracing + // session. These kernel flags have been built to expose the useful events + // captured from the kernel mode only. + repeated KernelFlag kernel_flags = 1; + + // See the list of keywords for for individual providers. + // https://learn.microsoft.com/en-us/windows/win32/etw/system-providers + + // Provides events relating to the scheduler. + repeated string scheduler_provider_events = 2; + // Provides events relating to the memory manager. + repeated string memory_provider_events = 3; + // Provides events relating to file I/O. + repeated string file_provider_events = 4; +} + +// End of protos/perfetto/config/etw/etw_config.proto + +// Begin of protos/perfetto/config/ftrace/frozen_ftrace_config.proto + +message FrozenFtraceConfig { + // The instance name which stores the previous boot ftrace data. Required. + optional string instance_name = 1; +} + +// End of protos/perfetto/config/ftrace/frozen_ftrace_config.proto + +// Begin of protos/perfetto/config/ftrace/ftrace_config.proto + +// Next id: 38 +message FtraceConfig { + // Ftrace events to record, example: "sched/sched_switch". + repeated string ftrace_events = 1; + + // Android-specific event categories: + repeated string atrace_categories = 2; + repeated string atrace_apps = 3; + // Some processes can emit data through atrace or through the perfetto SDK via + // the "track_event" data source. For these categories, the SDK will be + // preferred, if possible, for this config. + repeated string atrace_categories_prefer_sdk = 28; + // If true, do *not* add in extra ftrace events when |atrace_categories| are + // set. This skips the legacy "atrace" behaviour of adding hardcoded ftrace + // events for convenience (and the vendor-specific events on top). + // Introduced in: perfetto v52. + optional bool atrace_userspace_only = 34; + + // Size of each per-cpu kernel ftrace ring buffer. + // Not guaranteed if there are multiple concurrent tracing sessions, as the + // buffers cannot be resized without pausing recording in the kernel. + optional uint32 buffer_size_kb = 10; + + // If true, |buffer_size_kb| is interpreted as a lower bound, allowing the + // implementation to choose a bigger buffer size. + // + // Most configs for perfetto v43+ should simply leave both fields unset. + // + // If you need a config compatible with a range of perfetto builds and you + // used to set a non-default buffer_size_kb, consider setting both fields. + // Example: + // buffer_size_kb: 4096 + // buffer_size_lower_bound: true + // On older builds, the per-cpu buffers will be exactly 4 MB. + // On v43+, buffers will be at least 4 MB. + // In both cases, neither is guaranteed if there are other concurrent + // perfetto ftrace sessions, as the buffers cannot be resized without pausing + // the recording in the kernel. + // Introduced in: perfetto v43. + optional bool buffer_size_lower_bound = 27; + + // If set, specifies how often the tracing daemon reads from the kernel ring + // buffer. Not guaranteed if there are multiple concurrent tracing sessions. + // Leave unset unless you're fine-tuning a local config. + optional uint32 drain_period_ms = 11; + + // If set, the tracing daemon will read kernel ring buffers as soon as + // they're filled past this percentage of occupancy. In other words, a value + // of 50 means that a read pass is triggered as soon as any per-cpu buffer is + // half-full. Not guaranteed if there are multiple concurrent tracing + // sessions. + // Currently does nothing on Linux kernels below v6.9. + // Introduced in: perfetto v48. + optional uint32 drain_buffer_percent = 29; + + // Configuration for compact encoding of scheduler events. When enabled (and + // recording the relevant ftrace events), specific high-volume events are + // encoded in a denser format than normal. + message CompactSchedConfig { + // If true, and sched_switch or sched_waking ftrace events are enabled, + // record those events in the compact format. + // + // If the field is unset, the default is: + // * perfetto v42.0+: enabled + // * before: disabled + optional bool enabled = 1; + } + optional CompactSchedConfig compact_sched = 12; + + // Optional filter for "ftrace/print" events. + // + // The filter consists of multiple rules. As soon as a rule matches (the rules + // are processed in order), its `allow` field will be used as the outcome: if + // `allow` is true, the event will be included in the trace, otherwise it will + // be discarded. If an event does not match any rule, it will be allowed by + // default (a rule with an empty prefix and allow=false, disallows everything + // by default). + message PrintFilter { + message Rule { + // Matches an atrace message of the form: + // |pid|... + message AtraceMessage { + optional string type = 1; + optional string prefix = 2; + } + oneof match { + // This rule matches if `prefix` matches exactly with the beginning of + // the "ftrace/print" "buf" field. + string prefix = 1; + // This rule matches if the "buf" field contains an atrace-style print + // message as specified in `atrace_msg`. + AtraceMessage atrace_msg = 3; + } + optional bool allow = 2; + } + repeated Rule rules = 1; + } + optional PrintFilter print_filter = 22; + + // Enables symbol name resolution against /proc/kallsyms. + // It requires that either traced_probes is running as root or that + // kptr_restrict has been manually lowered. + // It does not disclose KASLR, symbol addresses are mangled. + optional bool symbolize_ksyms = 13; + + // When symbolize_ksyms=true, determines whether the traced_probes daemon + // should keep the symbol map in memory (and reuse it for future tracing + // sessions) or clear it (saving memory) and re-create it on each tracing + // session (wasting cpu and wall time). + // The tradeoff is roughly: + // KSYMS_RETAIN: pay a fixed ~1.2 MB cost after the first trace. + // KSYMS_CLEANUP_ON_STOP: pay a ~300-500ms cost when starting each trace. + // Default behavior: KSYMS_CLEANUP_ON_STOP. + enum KsymsMemPolicy { + KSYMS_UNSPECIFIED = 0; + KSYMS_CLEANUP_ON_STOP = 1; + KSYMS_RETAIN = 2; + } + optional KsymsMemPolicy ksyms_mem_policy = 17; + + // When this boolean is true AND the ftrace_events contains "kmem/rss_stat", + // this option causes traced_probes to enable the "kmem/rss_stat_throttled" + // event instead if present, and fall back to "kmem/rss_stat" if not present. + // The historical context for this is the following: + // - Up to Android S (12), the rss_stat was internally throttled in its + // kernel implementation. + // - A change introduced in the kernels after S has introduced a new + // "rss_stat_throttled" making the original "rss_stat" event unthrottled + // (hence very spammy). + // - Not all Android T/13 devices will receive a new kernel though, hence we + // need to deal with both cases. + // For more context: go/rss-stat-throttled. + optional bool throttle_rss_stat = 15; + + // If true, use self-describing proto messages when writing events not known + // at compile time (aka generic events). Each event bundle will have a set of + // serialised proto descriptors for events within that bundle. + // + // Default if unset: + // * v53+: true + // * before v53: false + // + // Added in: perfetto v50. + optional bool denser_generic_event_encoding = 32; + + // If true, avoid enabling events that aren't statically known by + // traced_probes. Otherwise, the default is to emit such events as + // GenericFtraceEvent protos. + // Prefer to keep this flag at its default. This was added for Android + // tracing, where atrace categories and/or atrace HAL requested events can + // expand to events that aren't of interest to the tracing user. + // Introduced in: Android T. + optional bool disable_generic_events = 16; + + // The subset of syscalls to record. To record all syscalls, leave this unset + // and add "ftrace_events: raw_syscalls/sys_{enter,exit}" to the config. + // * before perfetto v43, requires the config to also enable + // raw_syscalls/sys_{enter,exit}. + // * perfetto v43+ does the right thing if you set only this field. + // Example: ["sys_read", "sys_open"]. + // Introduced in: Android U. + repeated string syscall_events = 18; + + // If true, enable the "function_graph" kernel tracer that emits events + // whenever a kernel function is entered and exited + // (funcgraph_entry/funcgraph_exit). + // Notes on use: + // * Requires |symbolize_ksyms| for function name resolution. + // * Use |function_filters| or |function_graph_roots| to constrain the traced + // set of functions, otherwise the event bandwidth will be too high for + // practical use. + // * The data source might be rejected if there is already a concurrent + // ftrace data source that does not use function graph itself, as we do not + // support switching kernel tracers mid-trace. + // * Requires a kernel compiled with CONFIG_FUNCTION_GRAPH_TRACER. This is + // enabled if "cat /sys/kernel/tracing/available_tracers" includes + // "function_graph". + // Android: + // * Available only on debuggable builds. + // * Introduced in: Android U. + optional bool enable_function_graph = 19; + + // Constrains the set of functions traced when |enable_function_graph| is + // true. Supports globs, e.g. "sched*". You can specify multiple filters, + // in which case all matching functions will be traced. See kernel + // documentation on ftrace "set_ftrace_filter" file for more details. + // Android: + // * Available only on debuggable builds. + // * Introduced in: Android U. + repeated string function_filters = 20; + + // If |enable_function_graph| is true, trace this set of functions *and* all + // of its callees. Supports globs. Can be set together with + // |function_filters|, in which case only callees matching the filter will be + // traced. If setting both, you most likely want all roots to also be + // included in |function_filters|. + // Android: + // * Available only on debuggable builds. + // * Introduced in: Android U. + repeated string function_graph_roots = 21; + + // If |enable_function_graph| is true, only trace the specified + // number of calls down the stack. Sets the max_graph_depth value + // in sys/kernel/tracing/ + // + // Only respected for the first tracing session that enables + // function_graph tracing. + // + // Introduced in: perfetto v51. + // Supported on: Android 25Q3+. + optional uint32 function_graph_max_depth = 33; + + message KprobeEvent { + enum KprobeType { + KPROBE_TYPE_UNKNOWN = 0; + KPROBE_TYPE_KPROBE = 1; + KPROBE_TYPE_KRETPROBE = 2; + KPROBE_TYPE_BOTH = 3; + } + // Kernel function name to attach to, for example "fuse_file_write_iter" + optional string probe = 1; + optional KprobeType type = 2; + } + // Ftrace events to record, specific for kprobes and kretprobes + repeated KprobeEvent kprobe_events = 30; + + // If true, does not clear kernel ftrace buffers when starting the trace. + // This makes sense only if this is the first ftrace data source instance + // created after the daemon has been started. Can be useful for gathering boot + // traces, if ftrace has been separately configured (e.g. via kernel + // commandline). + // NB: when configuring the pre-perfetto ftrace, prefer to set + // "/sys/kernel/tracing/trace_clock" to "boot" if your trace will contain + // anything besides ftrace. Otherwise timestamps might be skewed. + optional bool preserve_ftrace_buffer = 23; + + // If true, overrides the default timestamp clock and uses a raw hardware + // based monotonic clock for getting timestamps. + // * Introduced in: Android U. + optional bool use_monotonic_raw_clock = 24; + + // If |instance_name| is not empty, then attempt to use that tracefs instance + // for event recording. Normally, this means + // `/sys/kernel/tracing/instances/$instance_name`. + // + // Names "hyp" and "hypervisor" are reserved. + // + // The instance must already exist, the tracing daemon *will not* create it + // for you as it typically doesn't have such permissions. + // Only a subset of features is guaranteed to work with non-default instances, + // at the time of writing: + // * ftrace_events + // * buffer_size_kb + optional string instance_name = 25; + + // For perfetto developer use. If true and on a debuggable android build, + // serialise raw tracing pages that the implementation cannot parse. + optional bool debug_ftrace_abi = 31; + + // ================================================= + // Exclusive single-tenant features: HERE BE DRAGONS + // ================================================= + // The features below are considered "advanced" and require an exclusive + // tracing session (as of Android 25Q3+ and Perfetto v52). + // + // These features directly manipulate the kernel's global ftrace state and + // are incompatible with concurrent ftrace sessions. They are only enabled + // if included in the *first* ftrace data source configured. Subsequent + // ftrace data sources (even those not using advanced features) will be + // rejected while a session with these features is active. + // + // To run the session in exclusive mode, see: + // https://perfetto.dev/docs/learning-more/android#exclusive-tracing-sessions. + + // Filter ftrace events by Thread ID (TID). + // This writes the TIDs to `/sys/kernel/tracing/set_event_pid`. + // + // Note: this is an exclusive feature, see: + // https://perfetto.dev/docs/learning-more/android#exclusive-tracing-sessions. + // + // Introduced in: perfetto v52. + // Supported on: Android 25Q3+. + repeated uint32 tids_to_trace = 35; + + // Tracefs options to set directly in the tracefs instance. This is a very + // niche feature since almost all of the options deal with formatting textual + // output (the /trace file), which perfetto doesn't use. + // + // The options with a known use-case: + // * event-fork: when using `tids_to_trace` above, the kernel will + // automatically add newly spawned descendant threads to the set of TIDs. + // + // Full list of options is available at + // https://docs.kernel.org/trace/ftrace.html#trace-options. + // + // Note: this is an exclusive feature, see: + // https://perfetto.dev/docs/learning-more/android#exclusive-tracing-sessions. + // + // Introduced in: perfetto v52. + // Supported on: Android 25Q3+. + message TracefsOption { + enum State { + STATE_UNKNOWN = 0; + STATE_ENABLED = 1; + STATE_DISABLED = 2; + } + // The name of the tracefs option as found in tracefs/trace_options (without + // the "no" prefix). + optional string name = 1; + optional State state = 2; + } + repeated TracefsOption tracefs_options = 36; + + // This mask restricts tracing to a specific set of CPUs using a + // comma-separated hex mask. Each hex number (up to 8 digits) represents a + // 32-bit chunk of the CPU mask. + // + // The chunks are ordered from high CPUs to low CPUs (left to right): + // - Rightmost chunk: CPUs 0-31 + // - 2nd chunk from right: CPUs 32-63 + // - ...and so on. + // + // Example (assuming NR_CPUS=128, requiring 4 chunks): + // The full mask would be in the format: "chunk3,chunk2,chunk1,chunk0" + // where chunk3 maps to CPUs 96-127, chunk2 to 64-95, chunk1 to 32-63, and + // chunk0 to 0-31. + // - "ffffffff,0,0,0": Enables CPUs 96-127 only. + // - "f,ff": Enables CPUs 0-7 (from "ff") and CPUs 32-35 (from "f"). + // + // Note: This is an exclusive feature, see: + // https://perfetto.dev/docs/learning-more/android#exclusive-tracing-sessions. + // + // Introduced in: perfetto v52. + // Supported on: Android 25Q3+. + optional string tracing_cpumask = 37; + + // No-op in perfetto v28+. Name preserved because of existing references in + // textproto configs. + optional bool initialize_ksyms_synchronously_for_testing = 14 + [deprecated = true]; + + // Previously drain_buffer_percent, perfetto v43-v47. + reserved 26; +} + +// End of protos/perfetto/config/ftrace/ftrace_config.proto + +// Begin of protos/perfetto/config/gpu/gpu_counter_config.proto + +message GpuCounterConfig { + // Desired sampling interval for counters. + optional uint64 counter_period_ns = 1; + + // List of counters to be sampled. Counter IDs correspond to the ones + // described in GpuCounterSpec in the data source descriptor. + repeated uint32 counter_ids = 2; + + // Sample counters by instrumenting command buffers. + optional bool instrumented_sampling = 3; + + // Fix gpu clock rate during trace session. + optional bool fix_gpu_clock = 4; +} + +// End of protos/perfetto/config/gpu/gpu_counter_config.proto + +// Begin of protos/perfetto/config/gpu/gpu_renderstages_config.proto + +message GpuRenderStagesConfig { + // Enable to separate the color and depth/stencil load and store stages + // into a separate stages. If disabled, the depth/stencil load and store + // stages will be combined. Disabled by default. This option has no effect if + // Low Overhead mode is enabled. + optional bool full_loadstore = 1; + + // Use the low overhead mode for traces. In this mode render stages are + // combined into a single workload stage. This provides less granular data but + // induces minimal GPU overhead. Disabled by default. + optional bool low_overhead = 2; + + // Trace metrics to capture for each render stage + repeated string trace_metrics = 3; +} + +// End of protos/perfetto/config/gpu/gpu_renderstages_config.proto + +// Begin of protos/perfetto/config/gpu/vulkan_memory_config.proto + +message VulkanMemoryConfig { + // Tracking driver memory usage events + optional bool track_driver_memory_usage = 1; + + // Tracking device memory usage events + optional bool track_device_memory_usage = 2; +} + +// End of protos/perfetto/config/gpu/vulkan_memory_config.proto + +// Begin of protos/perfetto/config/inode_file/inode_file_config.proto + +// WARNING: unmaintained and deprecated. Likely won't work at all on modern +// systems. +message InodeFileConfig { + message MountPointMappingEntry { + optional string mountpoint = 1; + repeated string scan_roots = 2; + } + + // How long to pause between batches. + optional uint32 scan_interval_ms = 1; + + // How long to wait before the first scan in order to accumulate inodes. + optional uint32 scan_delay_ms = 2; + + // How many inodes to scan in one batch. + optional uint32 scan_batch_size = 3; + + // Do not scan for inodes not found in the static map. + optional bool do_not_scan = 4; + + // If non-empty, only scan inodes corresponding to block devices named in + // this list. + repeated string scan_mount_points = 5; + + // When encountering an inode belonging to a block device corresponding + // to one of the mount points in this map, scan its scan_roots instead. + repeated MountPointMappingEntry mount_point_mapping = 6; +} + +// End of protos/perfetto/config/inode_file/inode_file_config.proto + +// Begin of protos/perfetto/config/interceptors/console_config.proto + +message ConsoleConfig { + enum Output { + OUTPUT_UNSPECIFIED = 0; + OUTPUT_STDOUT = 1; + OUTPUT_STDERR = 2; + } + optional Output output = 1; + optional bool enable_colors = 2; +} + +// End of protos/perfetto/config/interceptors/console_config.proto + +// Begin of protos/perfetto/config/interceptor_config.proto + +// Configuration for trace packet interception. Used for diverting trace data to +// non-Perfetto sources (e.g., logging to the console, ETW) when using the +// Perfetto SDK. +message InterceptorConfig { + // Matches the name given to RegisterInterceptor(). + optional string name = 1; + + optional ConsoleConfig console_config = 100; +} + +// End of protos/perfetto/config/interceptor_config.proto + +// Begin of protos/perfetto/config/power/android_power_config.proto + +message AndroidPowerConfig { + enum BatteryCounters { + BATTERY_COUNTER_UNSPECIFIED = 0; + + // Coulomb counter. + BATTERY_COUNTER_CHARGE = 1; + + // Charge (%). + BATTERY_COUNTER_CAPACITY_PERCENT = 2; + + // Instantaneous current. + BATTERY_COUNTER_CURRENT = 3; + + // Avg current. + BATTERY_COUNTER_CURRENT_AVG = 4; + + // Instantaneous voltage. + BATTERY_COUNTER_VOLTAGE = 5; + } + optional uint32 battery_poll_ms = 1; + repeated BatteryCounters battery_counters = 2; + + // Where available enables per-power-rail measurements. + optional bool collect_power_rails = 3; + + // Provides a breakdown of energy estimation for various subsystem (e.g. GPU). + // Available from Android S. + optional bool collect_energy_estimation_breakdown = 4; + + // Provides a breakdown of time in state for various subsystems. + // Available from Android U. + optional bool collect_entity_state_residency = 5; +} + +// End of protos/perfetto/config/power/android_power_config.proto + +// Begin of protos/perfetto/config/priority_boost/priority_boost_config.proto + +// Configuration that allows to boost the priority of the 'traced' or +// 'traced_probs' processes, by changing the scheduler configuration. +// Only supported on Linux and Android the boosted process must have +// 'CAP_SYS_NICE' capability. +message PriorityBoostConfig { + enum BoostPolicy { + POLICY_UNSPECIFIED = 0; + // The default policy (e.g., CFS on Linux). Priority range: [0; 20] + // priority is interpreted as -(nice), i.e., 1 is slightly higher prio + // than default 0, 20 is the highest priority. + // Note: this is the opposite semantic of the cmdline nice, and is done for + // consistency with POLICY_SCHED_FIFO, so higher number == higher prio. + POLICY_SCHED_OTHER = 1; + // The Real-time policy, Priority range: [1; 99] + POLICY_SCHED_FIFO = 2; + }; + optional BoostPolicy policy = 1; + optional uint32 priority = 2; +} +// End of protos/perfetto/config/priority_boost/priority_boost_config.proto + +// Begin of protos/perfetto/config/process_stats/process_stats_config.proto + +// Config for polling process-related information from /proc/pid/status and +// related files on Linux. +// +// Data source name: "linux.process_stats". +message ProcessStatsConfig { + enum Quirks { + QUIRKS_UNSPECIFIED = 0; + + // This has been deprecated and ignored as per 2018-05-01. Full scan at + // startup is now disabled by default and can be re-enabled using the + // |scan_all_processes_on_start| arg. + DISABLE_INITIAL_DUMP = 1 [deprecated = true]; + + // If set, disables the special interaction with "linux.ftrace" data source, + // where the process stats rescrapes any thread id seen in the ftrace + // stream. + DISABLE_ON_DEMAND = 2; + } + repeated Quirks quirks = 1; + + // If enabled all processes will be scanned and dumped when the trace starts. + optional bool scan_all_processes_on_start = 2; + + // If enabled thread names are also recoded (this is redundant if sched_switch + // is enabled). + optional bool record_thread_names = 3; + + // If > 0 samples counters (see process_stats.proto) from + // /proc/pid/status and oom_score_adj every X ms. + // This is required to be > 100ms to avoid excessive CPU usage. + optional uint32 proc_stats_poll_ms = 4; + + // id 5 never used + + // Explicit caching period during which the polling won't re-emit identical + // counter values. This is required to be either = 0 or a multiple of + // |proc_stats_poll_ms| (default: |proc_stats_poll_ms|). Non-multiples will be + // rounded down to the nearest multiple. + optional uint32 proc_stats_cache_ttl_ms = 6; + + // If true and |proc_stats_poll_ms| is set, sample memory stats from + // /proc/pid/smaps_rollup. + // + // Android: does NOT work with the system daemons by default, as it requires + // running the recording process (traced_probes or tracebox) as root. It is + // possible to avoid the root requirement, but the exact steps depend on the + // Linux distibution. The proc file requires passing a PTRACE_MODE_READ + // check, and might be further covered by the procfs "hidepid" mount option. + optional bool scan_smaps_rollup = 10; + + // If true: process descriptions will include process age (starttime in + // /proc/pid/stat). + // Introduced in: perfetto v44. + optional bool record_process_age = 11; + + // If true and |proc_stats_poll_ms| is set, process stats will include time + // spent running in user/kernel mode (utime/stime in /proc/pid/stat). + // Introduced in: perfetto v44. + optional bool record_process_runtime = 12; + + // If true obtain per-process dmabuf resident set size from + // /proc/pid/dmabuf_rss. + // This feature is not in upstream linux, and is available only on some + // Android kernels. + optional bool record_process_dmabuf_rss = 13; + + // WARNING: unmaintained and deprecated. If true this will resolve file + // descriptors for each process so these can be mapped to their actual device + // or file. Requires raw_syscalls/sys_{enter,exit} ftrace events to be enabled + // or new fds opened after initially scanning a process will not be + // recognized. + optional bool resolve_process_fds = 9; + + // record_thread_time_in_state + reserved 7; + // thread_time_in_state_cache_size + reserved 8; +} + +// End of protos/perfetto/config/process_stats/process_stats_config.proto + +// Begin of protos/perfetto/config/profiling/heapprofd_config.proto + +// Configuration for go/heapprofd. +// Next id: 28 +message HeapprofdConfig { + message ContinuousDumpConfig { + // ms to wait before first dump. + optional uint32 dump_phase_ms = 5; + // ms to wait between following dumps. + optional uint32 dump_interval_ms = 6; + } + + // Sampling rate for all heaps not specified via heap_sampling_intervals. + // + // These are: + // * All heaps if heap_sampling_intervals is empty. + // * Those profiled due to all_heaps and not named in heaps if + // heap_sampling_intervals is not empty. + // * The implicit libc.malloc heap if heaps is empty. + // + // Set to 1 for perfect accuracy. + // Otherwise, sample every sample_interval_bytes on average. + // + // See + // https://perfetto.dev/docs/data-sources/native-heap-profiler#sampling-interval + // for more details. + // + // BUGS + // Before Android 12, setting this to 0 would crash the target process. + // + // N.B. This must be explicitly set to a non-zero value for all heaps (with + // this field or with heap_sampling_intervals), otherwise the producer will + // not start. + optional uint64 sampling_interval_bytes = 1; + + // If less than the given numbers of bytes are left free in the shared + // memory buffer, increase sampling interval by a factor of two. + // Adaptive sampling is disabled when set to 0. + optional uint64 adaptive_sampling_shmem_threshold = 24; + // Stop doubling the sampling_interval once the sampling interval has reached + // this value. + optional uint64 adaptive_sampling_max_sampling_interval_bytes = 25; + + // E.g. surfaceflinger, com.android.phone + // This input is normalized in the following way: if it contains slashes, + // everything up to the last slash is discarded. If it contains "@", + // everything after the first @ is discared. + // E.g. /system/bin/surfaceflinger@1.0 normalizes to surfaceflinger. + // This transformation is also applied to the processes' command lines when + // matching. + repeated string process_cmdline = 2; + + // For watermark based triggering or local debugging. + repeated uint64 pid = 4; + + // Only profile target if it was installed by one of the packages given. + // Special values are: + // * @system: installed on the system partition + // * @product: installed on the product partition + // * @null: sideloaded + // Supported on Android 12+. + repeated string target_installed_by = 26; + + // Which heaps to sample, e.g. "libc.malloc". If left empty, only samples + // "malloc". + // + // Introduced in Android 12. + repeated string heaps = 20; + + // Which heaps not to sample, e.g. "libc.malloc". This is useful when used in + // combination with all_heaps; + // + // Introduced in Android 12. + repeated string exclude_heaps = 27; + + optional bool stream_allocations = 23; + + // If given, needs to be the same length as heaps and gives the sampling + // interval for the respective entry in heaps. + // + // Otherwise, sampling_interval_bytes is used. + // + // It is recommended to set sampling_interval_bytes to a reasonable default + // value when using this, as a value of 0 for sampling_interval_bytes will + // crash the target process before Android 12. + // + // Introduced in Android 12. + // + // All values must be non-zero or the producer will not start. + repeated uint64 heap_sampling_intervals = 22; + + // Sample all heaps registered by target process. Introduced in Android 12. + optional bool all_heaps = 21; + + // Profile all processes eligible for profiling on the system. + // See + // https://perfetto.dev/docs/data-sources/native-heap-profiler#heapprofd-targets + // for which processes are eligible. + // + // On unmodified userdebug builds, this will lead to system crashes. Zygote + // will crash when trying to launch a new process as it will have an + // unexpected open socket to heapprofd. + // + // heapprofd will likely be overloaded by the amount of data for low + // sampling intervals. + optional bool all = 5; + + // Do not profile processes whose anon RSS + swap < given value. + // Introduced in Android 11. + optional uint32 min_anonymous_memory_kb = 15; + + // Stop profile if heapprofd memory usage goes beyond the given value. + // Introduced in Android 11. + optional uint32 max_heapprofd_memory_kb = 16; + + // Stop profile if heapprofd CPU time since start of this data-source + // goes beyond given value. + // Introduced in Android 11. + optional uint64 max_heapprofd_cpu_secs = 17; + + // Do not emit function names for mappings starting with this prefix. + // E.g. /system to not emit symbols for any system libraries. + repeated string skip_symbol_prefix = 7; + + // Dump at a predefined interval. + optional ContinuousDumpConfig continuous_dump_config = 6; + + // Size of the shared memory buffer between the profiled processes and + // heapprofd. Defaults to 8 MiB. If larger than 500 MiB, truncated to 500 + // MiB. + // + // Needs to be: + // * at least 8192, + // * a power of two, + // * a multiple of 4096. + optional uint64 shmem_size_bytes = 8; + + // When the shmem buffer is full, block the client instead of ending the + // trace. Use with caution as this will significantly slow down the target + // process. + optional bool block_client = 9; + + // If set, stop the trace session after blocking the client for this + // timeout. Needs to be larger than 100 us, otherwise no retries are done. + // Introduced in Android 11. + optional uint32 block_client_timeout_us = 14; + + // Do not profile processes from startup, only match already running + // processes. + // + // Can not be set at the same time as no_running. + // Introduced in Android 11. + optional bool no_startup = 10; + + // Do not profile running processes. Only match processes on startup. + // + // Can not be set at the same time as no_startup. + // Introduced in Android 11. + optional bool no_running = 11; + + // deprecated idle_allocations. + reserved 12; + + // Cause heapprofd to emit a single dump at the end, showing the memory usage + // at the point in time when the sampled heap usage of the process was at its + // maximum. This causes ProfilePacket.HeapSample.self_max to be set, and + // self_allocated and self_freed to not be set. + // Introduced in Android 11. + optional bool dump_at_max = 13; + + // FEATURE FLAGS. THERE BE DRAGONS. + + // Escape hatch if the session is being torn down because of a forked child + // that shares memory space, but is not correctly identified as a vforked + // child. + // Introduced in Android 11. + optional bool disable_fork_teardown = 18; + + // We try to automatically detect when a target applicatation vforks but then + // does a memory allocation (or free). This auto-detection can be disabled + // with this. + // Introduced in Android 11. + optional bool disable_vfork_detection = 19; +} + +// End of protos/perfetto/config/profiling/heapprofd_config.proto + +/* COMMENTED +// Begin of protos/perfetto/config/profiling/java_hprof_config.proto + +// Configuration for managed app heap graph snapshots. +message JavaHprofConfig { + // If dump_interval_ms != 0, the following configuration is used. + message ContinuousDumpConfig { + // ms to wait before first continuous dump. + // A dump is always created at the beginning of the trace. + optional uint32 dump_phase_ms = 1; + // ms to wait between following dumps. + optional uint32 dump_interval_ms = 2; + // If true, scans all the processes to find `process_cmdline` and filter by + // `min_anonymous_memory_kb` only at data source start. Default on Android + // S-. + // + // If false, rescans all the processes to find on every dump. Default on + // Android T+. + optional bool scan_pids_only_on_start = 3; + } + + // Command line allowlist, matched against the /proc//cmdline (not the + // comm string). The semantics of this field were changed since its original + // introduction. + // + // On Android T+ (13+), this field can specify a single wildcard (*), and + // the profiler will attempt to match it in two possible ways: + // * if the pattern starts with a '/', then it is matched against the first + // segment of the cmdline (i.e. argv0). For example "/bin/e*" would match + // "/bin/echo". + // * otherwise the pattern is matched against the part of argv0 + // corresponding to the binary name (this is unrelated to /proc/pid/exe). + // For example "echo" would match "/bin/echo". + // + // On Android S (12) and below, both this pattern and /proc/pid/cmdline get + // normalized prior to an exact string comparison. Normalization is as + // follows: (1) trim everything beyond the first null or "@" byte; (2) if + // the string contains forward slashes, trim everything up to and including + // the last one. + // + // Implementation note: in either case, at most 511 characters of cmdline + // are considered. + repeated string process_cmdline = 1; + + // For watermark based triggering or local debugging. + repeated uint64 pid = 2; + + // Only profile target if it was installed by one of the packages given. + // Special values are: + // * @system: installed on the system partition + // * @product: installed on the product partition + // * @null: sideloaded + // Supported on Android 12+. + repeated string target_installed_by = 7; + + // Dump at a predefined interval. + optional ContinuousDumpConfig continuous_dump_config = 3; + + // Do not profile processes whose anon RSS + swap < given value. + optional uint32 min_anonymous_memory_kb = 4; + + // Include the process' /proc/self/smaps. + // This only shows maps that: + // * start with /system + // * start with /vendor + // * start with /data/app + // * contain "extracted in memory from Y", where Y matches any of the above + optional bool dump_smaps = 5; + + // Exclude objects of the following types from the profile. This can be + // useful if lots of uninteresting objects, e.g. "sun.misc.Cleaner". + repeated string ignored_types = 6; +} + +// End of protos/perfetto/config/profiling/java_hprof_config.proto +*/ + +/* COMMENTED +// Begin of protos/perfetto/common/perf_events.proto + +message PerfEvents { + // The primary event to count. If recording multiple events, this + // counter is the "group leader". + // Commented from the perspective of its use in |PerfEventConfig|. + // Next id: 13 + message Timebase { + // How often to snapshot the counter, along with any follower events and + // any additional sampled data such as callstacks. + // + // This choice also controls how the readings are taken: + // * With |frequency| or |period|, samples are taken by the kernel + // into a ring buffer. Analogous to `perf record`. + // * With |poll_period_ms|, the userspace periodically snapshots + // the counters using the read syscall. Analogous to `perf stat -I`. + // Prefer the sampling options unless you're recording PMUs whose + // perf drivers only support the reading mode. + // + // If unset, an implementation-defined sampling default is used. + oneof interval { + // Per-cpu sampling frequency in Hz, as requested from the kernel. Not the + // same as 1/period. + // Details: the actual sampling will still be based on a period, but the + // kernel will dynamically adjust it based on the observed event rate, to + // approximate this frequency. Works best with steady-rate events like + // timers. + // Not guaranteed to be honored as the kernel can throttle the sampling + // rate if it's too high. + uint64 frequency = 2; + + // Per-cpu sampling will occur every |period| counts of |event|. + // Prefer |frequency| by default, as it's easier to oversample with a + // fixed period. + // Not guaranteed to be honored as the kernel can throttle the sampling + // rate if it's too high. + uint64 period = 1; + + // Per-cpu values are read by the userspace every interval. If using this + // mode, only follower events are supported. Options such as + // |PerfEventConfig.CallstackSampling| are incompatible. + // The period can't be guaranteed to be exact since the readings are taken + // by userspace. + uint32 poll_period_ms = 6; + } + + // Counting event to use as the timebase. + // If unset, implies the CPU timer (SW_CPU_CLOCK) as the event, + // which is what you usually want. + oneof event { + Counter counter = 4; + Tracepoint tracepoint = 3; + RawEvent raw_event = 5; + } + + // Optional modifiers for the event. Modelled after the perftool's + // https://man7.org/linux/man-pages/man1/perf-list.1.html#EVENT_MODIFIERS + // Currently supported: count scoping such as :u, :k, :uk, ... + // Modifiers can differ between the timebase and followers. + repeated EventModifier modifiers = 12; + + // If set, samples will be timestamped with the given clock. + // If unset, the clock is chosen by the implementation. + // For software events, prefer PERF_CLOCK_BOOTTIME. However it cannot be + // used for hardware events (due to interrupt safety), for which the + // recommendation is to use one of the monotonic clocks. + optional PerfClock timestamp_clock = 11; + + // Optional arbitrary name for the event, to identify it in the parsed + // trace. Does *not* affect the profiling itself. If unset, the trace + // parser will choose a suitable name. + optional string name = 10; + } + + // Builtin counter names from the uapi header. Commented with their perf tool + // aliases. + // TODO(rsavitski): consider generating enums for cache events (should be + // finite), and generally make this list as extensive as possible. Excluding + // things like dynamic PMUs since those don't fit into a static enum. + // Next id: 21 + enum Counter { + UNKNOWN_COUNTER = 0; + + // cpu-clock + SW_CPU_CLOCK = 1; + // page-faults, faults + SW_PAGE_FAULTS = 2; + // task-clock + SW_TASK_CLOCK = 3; + // context-switches, cs + SW_CONTEXT_SWITCHES = 4; + // cpu-migrations, migrations + SW_CPU_MIGRATIONS = 5; + // minor-faults + SW_PAGE_FAULTS_MIN = 6; + // major-faults + SW_PAGE_FAULTS_MAJ = 7; + // alignment-faults + SW_ALIGNMENT_FAULTS = 8; + // emulation-faults + SW_EMULATION_FAULTS = 9; + // dummy + SW_DUMMY = 20; + + // cpu-cycles, cycles + HW_CPU_CYCLES = 10; + // instructions + HW_INSTRUCTIONS = 11; + // cache-references + HW_CACHE_REFERENCES = 12; + // cache-misses + HW_CACHE_MISSES = 13; + // branch-instructions, branches + HW_BRANCH_INSTRUCTIONS = 14; + // branch-misses + HW_BRANCH_MISSES = 15; + // bus-cycles + HW_BUS_CYCLES = 16; + // stalled-cycles-frontend, idle-cycles-frontend + HW_STALLED_CYCLES_FRONTEND = 17; + // stalled-cycles-backend, idle-cycles-backend + HW_STALLED_CYCLES_BACKEND = 18; + // ref-cycles + HW_REF_CPU_CYCLES = 19; + } + + message Tracepoint { + // Group and name for the tracepoint, acceptable forms: + // * "sched/sched_switch" + // * "sched:sched_switch" + optional string name = 1; + + // Optional field-level filter for the tracepoint. Only events matching this + // filter will be counted (and therefore contribute to the sampling period). + // Example: "prev_pid >= 42 && next_pid == 0". + // For full syntax, see kernel documentation on "Event filtering": + // https://www.kernel.org/doc/Documentation/trace/events.txt + optional string filter = 2; + } + + // Syscall-level description of the event, propagated to the perf_event_attr + // struct. Primarily for local use-cases, since the event availability and + // encoding is hardware-specific. + message RawEvent { + optional uint32 type = 1; + optional uint64 config = 2; + optional uint64 config1 = 3; + optional uint64 config2 = 4; + } + + // Subset of clocks that is supported by perf timestamping. + // CLOCK_TAI is excluded since it's not expected to be used in practice, but + // would require additions to the trace clock synchronisation logic. + enum PerfClock { + UNKNOWN_PERF_CLOCK = 0; + PERF_CLOCK_REALTIME = 1; + PERF_CLOCK_MONOTONIC = 2; + PERF_CLOCK_MONOTONIC_RAW = 3; + PERF_CLOCK_BOOTTIME = 4; + } + + enum EventModifier { + UNKNOWN_EVENT_MODIFIER = 0; + // count only while in userspace + EVENT_MODIFIER_COUNT_USERSPACE = 1; + // count only while in kernel + EVENT_MODIFIER_COUNT_KERNEL = 2; + // count only while in hypervisor + EVENT_MODIFIER_COUNT_HYPERVISOR = 3; + } +} + +// Additional events associated with a leader. +// See https://man7.org/linux/man-pages/man1/perf-list.1.html#LEADER_SAMPLING +message FollowerEvent { + oneof event { + PerfEvents.Counter counter = 1; + PerfEvents.Tracepoint tracepoint = 2; + PerfEvents.RawEvent raw_event = 3; + } + // Modifiers can differ between the timebase and followers. + repeated PerfEvents.EventModifier modifiers = 5; + // Optional arbitrary name for the event, to identify it in the parsed + // trace. Does *not* affect the profiling itself. If unset, the trace + // parser will choose a suitable name. + optional string name = 4; +} + +// End of protos/perfetto/common/perf_events.proto +*/ + +/* COMMENTED +// Begin of protos/perfetto/config/profiling/perf_event_config.proto + +// Configuration for the traced_perf profiler. +// +// Example config for basic cpu profiling: +// perf_event_config { +// timebase { +// frequency: 80 +// } +// callstack_sampling { +// scope { +// target_cmdline: "surfaceflinger" +// target_cmdline: "system_server" +// } +// kernel_frames: true +// } +// } +// +// Next id: 21 +message PerfEventConfig { + // What event to sample on, and how often. + // Defined in common/perf_events.proto. + optional PerfEvents.Timebase timebase = 15; + + // Other events associated with the leader described in the timebase. + repeated FollowerEvent followers = 19; + + // If set, the profiler will sample userspace processes' callstacks at the + // interval specified by the |timebase|. + // If unset, the profiler will record only the event counts. + optional CallstackSampling callstack_sampling = 16; + + // List of cpu indices for counting. If empty, the default is all cpus. + // + // Note: this is not inside |callstack_sampling.scope| as it also applies to + // counter-only traces. A future change will likely reorganise the options, + // but this field will continue to be supported. + // + // Available since: perfetto v50. + repeated uint32 target_cpu = 20; + + // + // Kernel <-> userspace ring buffer options: + // + + // How often the per-cpu ring buffers are read by the producer. + // If unset, an implementation-defined default is used. + optional uint32 ring_buffer_read_period_ms = 8; + + // Size (in 4k pages) of each per-cpu ring buffer that is filled by the + // kernel. If set, must be a power of two. + // If unset, an implementation-defined default is used. + optional uint32 ring_buffer_pages = 3; + + // + // Daemon's resource usage limits: + // + + // Drop samples if the heap memory held by the samples in the unwinder queue + // is above the given limit. This counts the memory across all concurrent data + // sources (not just this one's), and there is no fairness guarantee - the + // whole quota might be used up by a concurrent source. + optional uint64 max_enqueued_footprint_kb = 17; + + // Stop the data source if traced_perf's combined {RssAnon + Swap} memory + // footprint exceeds this value. + optional uint32 max_daemon_memory_kb = 13; + + // + // Niche options: + // + + // Timeout for the remote /proc//{maps,mem} file descriptors for a + // sampled process. This is primarily for Android, where this lookup is + // asynchronous. As long as the producer is waiting, the associated samples + // will be kept enqueued (putting pressure on the capacity of the shared + // unwinding queue). Once a lookup for a process expires, all associated + // samples are discarded. However, if the lookup still succeeds after the + // timeout, future samples will be handled normally. + // If unset, an implementation-defined default is used. + optional uint32 remote_descriptor_timeout_ms = 9; + + // Optional period for clearing state cached by the userspace unwinder. This + // is a heavy operation that is only necessary for traces that target a wide + // set of processes, and require the memory footprint to be reset + // periodically. To effectively disable the cache clearing, set to a value + // greater than your trace duration. + // + // Relevant only if |callstack_sampling.user_frames| is set to UNWIND_DWARF. + // + // If zero or unset: + // * before perfetto v52: no cache clearing. + // * perfetto v52+: implementation chooses an infrequent default. + optional uint32 unwind_state_clear_period_ms = 10; + + // If set, only profile target if it was installed by a package with one of + // these names. Special values: + // * "@system": installed on the system partition + // * "@product": installed on the product partition + // * "@null": sideloaded + // Supported on Android 12+. + repeated string target_installed_by = 18; + + // + // Deprecated (superseded by options above): + // + // Do not set *any* of these fields in new configs. + // + + // Note: legacy configs had to set |all_cpus| to true to pass parsing. + // We rely on this to detect such configs. + optional bool all_cpus = 1; + optional uint32 sampling_frequency = 2; + optional bool kernel_frames = 12; + repeated int32 target_pid = 4; + repeated string target_cmdline = 5; + repeated int32 exclude_pid = 6; + repeated string exclude_cmdline = 7; + optional uint32 additional_cmdline_count = 11; + // previously |tracepoint| + reserved 14; + + // + // Sub-messages (nested for generated code namespacing). + // + + message CallstackSampling { + // Defines a set of processes for which samples are retained/skipped. If + // unset, all samples are kept, but beware that it will be very heavy on the + // stack unwinder, which might start dropping samples due to overload. + optional Scope scope = 1; + + // If true, callstacks will include the kernel-space frames. Such frames can + // be identified by a magical "kernel" string as their mapping name. + // Requires traced_perf to be running as root, or kptr_restrict to have been + // manually unrestricted. On Android, the platform should do the right thing + // on debug builds. + // This does *not* disclose KASLR, as only the function names are emitted. + optional bool kernel_frames = 2; + + // Whether to record and unwind userspace callstacks. If unset, defaults to + // including userspace (UNWIND_DWARF) both for backwards compatibility and + // as the most common default (this defaulting is only applicable if the + // outer CallstackSampling message is explicitly set). + optional UnwindMode user_frames = 3; + } + + message Scope { + // Process ID (TGID) allowlist. If this list is not empty, only matching + // samples will be retained. If multiple allow/deny-lists are + // specified by the config, then all of them are evaluated for each sampled + // process. + repeated int32 target_pid = 1; + + // Command line allowlist, matched against the /proc//cmdline (not the + // comm string). The semantics of this field were changed since its original + // introduction. + // + // On Android T+ (13+), this field can specify a single wildcard (*), and + // the profiler will attempt to match it in two possible ways: + // * if the pattern starts with a '/', then it is matched against the first + // segment of the cmdline (i.e. argv0). For example "/bin/e*" would match + // "/bin/echo". + // * otherwise the pattern is matched against the part of argv0 + // corresponding to the binary name (this is unrelated to /proc/pid/exe). + // For example "echo" would match "/bin/echo". + // + // On Android S (12) and below, both this pattern and /proc/pid/cmdline get + // normalized prior to an exact string comparison. Normalization is as + // follows: (1) trim everything beyond the first null or "@" byte; (2) if + // the string contains forward slashes, trim everything up to and including + // the last one. + // + // Implementation note: in either case, at most 511 characters of cmdline + // are considered. + repeated string target_cmdline = 2; + + // List of excluded pids. + repeated int32 exclude_pid = 3; + + // List of excluded cmdlines. See description of |target_cmdline| for how + // this is handled. + repeated string exclude_cmdline = 4; + + // Niche features for systemwide callstacks: + + // Number of additional command lines to sample. Only those which are + // neither explicitly included nor excluded will be considered. Processes + // are accepted on a first come, first served basis. + optional uint32 additional_cmdline_count = 5; + + // If set to N, all encountered processes will be put into one of the N + // possible bins, and only one randomly-chosen bin will be selected for + // unwinding. The binning is simply "pid % N", under the assumption that + // low-order bits of pids are roughly uniformly distributed. Other explicit + // inclusions/exclusions in this |Scope| message are still respected. + // + // The profiler will report the chosen shard in PerfSampleDefaults, and the + // values will be queryable in trace processor under the "stats" table as + // "perf_process_shard_count" and "perf_chosen_process_shard". + // + // NB: all data sources in a config that set |process_shard_count| must set + // it to the same value. The profiler will choose one bin for all those data + // sources. + optional uint32 process_shard_count = 6; + } + + // Userspace unwinding mode. A possible future addition is kernel-unwound + // callchains for frame pointer based systems. + enum UnwindMode { + UNWIND_UNKNOWN = 0; + // Do not unwind userspace: + UNWIND_SKIP = 1; + // Use libunwindstack (default): + UNWIND_DWARF = 2; + // Use userspace frame pointer unwinder: + UNWIND_FRAME_POINTER = 3; + } +} + +// End of protos/perfetto/config/profiling/perf_event_config.proto +*/ + +// Begin of protos/perfetto/config/statsd/atom_ids.proto + +// This enum is obtained by post-processing +// AOSP/frameworks/proto_logging/stats/atoms.proto through +// AOSP/external/perfetto/tools/update-statsd-descriptor, which extracts one +// enum value for each proto field defined in the upstream atoms.proto. +enum AtomId { + ATOM_UNSPECIFIED = 0; + ATOM_BLE_SCAN_STATE_CHANGED = 2; + ATOM_PROCESS_STATE_CHANGED = 3; + ATOM_BLE_SCAN_RESULT_RECEIVED = 4; + ATOM_SENSOR_STATE_CHANGED = 5; + ATOM_GPS_SCAN_STATE_CHANGED = 6; + ATOM_SYNC_STATE_CHANGED = 7; + ATOM_SCHEDULED_JOB_STATE_CHANGED = 8; + ATOM_SCREEN_BRIGHTNESS_CHANGED = 9; + ATOM_WAKELOCK_STATE_CHANGED = 10; + ATOM_LONG_PARTIAL_WAKELOCK_STATE_CHANGED = 11; + ATOM_MOBILE_RADIO_POWER_STATE_CHANGED = 12; + ATOM_WIFI_RADIO_POWER_STATE_CHANGED = 13; + ATOM_ACTIVITY_MANAGER_SLEEP_STATE_CHANGED = 14; + ATOM_MEMORY_FACTOR_STATE_CHANGED = 15; + ATOM_EXCESSIVE_CPU_USAGE_REPORTED = 16; + ATOM_CACHED_KILL_REPORTED = 17; + ATOM_PROCESS_MEMORY_STAT_REPORTED = 18; + ATOM_LAUNCHER_EVENT = 19; + ATOM_BATTERY_SAVER_MODE_STATE_CHANGED = 20; + ATOM_DEVICE_IDLE_MODE_STATE_CHANGED = 21; + ATOM_DEVICE_IDLING_MODE_STATE_CHANGED = 22; + ATOM_AUDIO_STATE_CHANGED = 23; + ATOM_MEDIA_CODEC_STATE_CHANGED = 24; + ATOM_CAMERA_STATE_CHANGED = 25; + ATOM_FLASHLIGHT_STATE_CHANGED = 26; + ATOM_UID_PROCESS_STATE_CHANGED = 27; + ATOM_PROCESS_LIFE_CYCLE_STATE_CHANGED = 28; + ATOM_SCREEN_STATE_CHANGED = 29; + ATOM_BATTERY_LEVEL_CHANGED = 30; + ATOM_CHARGING_STATE_CHANGED = 31; + ATOM_PLUGGED_STATE_CHANGED = 32; + ATOM_INTERACTIVE_STATE_CHANGED = 33; + ATOM_TOUCH_EVENT_REPORTED = 34; + ATOM_WAKEUP_ALARM_OCCURRED = 35; + ATOM_KERNEL_WAKEUP_REPORTED = 36; + ATOM_WIFI_LOCK_STATE_CHANGED = 37; + ATOM_WIFI_SIGNAL_STRENGTH_CHANGED = 38; + ATOM_WIFI_SCAN_STATE_CHANGED = 39; + ATOM_PHONE_SIGNAL_STRENGTH_CHANGED = 40; + ATOM_SETTING_CHANGED = 41; + ATOM_ACTIVITY_FOREGROUND_STATE_CHANGED = 42; + ATOM_ISOLATED_UID_CHANGED = 43; + ATOM_PACKET_WAKEUP_OCCURRED = 44; + ATOM_WALL_CLOCK_TIME_SHIFTED = 45; + ATOM_ANOMALY_DETECTED = 46; + ATOM_APP_BREADCRUMB_REPORTED = 47; + ATOM_APP_START_OCCURRED = 48; + ATOM_APP_START_CANCELED = 49; + ATOM_APP_START_FULLY_DRAWN = 50; + ATOM_LMK_KILL_OCCURRED = 51; + ATOM_PICTURE_IN_PICTURE_STATE_CHANGED = 52; + ATOM_WIFI_MULTICAST_LOCK_STATE_CHANGED = 53; + ATOM_APP_START_MEMORY_STATE_CAPTURED = 55; + ATOM_SHUTDOWN_SEQUENCE_REPORTED = 56; + ATOM_BOOT_SEQUENCE_REPORTED = 57; + ATOM_OVERLAY_STATE_CHANGED = 59; + ATOM_FOREGROUND_SERVICE_STATE_CHANGED = 60; + ATOM_CALL_STATE_CHANGED = 61; + ATOM_KEYGUARD_STATE_CHANGED = 62; + ATOM_KEYGUARD_BOUNCER_STATE_CHANGED = 63; + ATOM_KEYGUARD_BOUNCER_PASSWORD_ENTERED = 64; + ATOM_APP_DIED = 65; + ATOM_RESOURCE_CONFIGURATION_CHANGED = 66; + ATOM_BLUETOOTH_ENABLED_STATE_CHANGED = 67; + ATOM_BLUETOOTH_CONNECTION_STATE_CHANGED = 68; + ATOM_GPS_SIGNAL_QUALITY_CHANGED = 69; + ATOM_USB_CONNECTOR_STATE_CHANGED = 70; + ATOM_SPEAKER_IMPEDANCE_REPORTED = 71; + ATOM_HARDWARE_FAILED = 72; + ATOM_PHYSICAL_DROP_DETECTED = 73; + ATOM_CHARGE_CYCLES_REPORTED = 74; + ATOM_MOBILE_CONNECTION_STATE_CHANGED = 75; + ATOM_MOBILE_RADIO_TECHNOLOGY_CHANGED = 76; + ATOM_USB_DEVICE_ATTACHED = 77; + ATOM_APP_CRASH_OCCURRED = 78; + ATOM_ANR_OCCURRED = 79; + ATOM_WTF_OCCURRED = 80; + ATOM_LOW_MEM_REPORTED = 81; + ATOM_GENERIC_ATOM = 82; + ATOM_VIBRATOR_STATE_CHANGED = 84; + ATOM_DEFERRED_JOB_STATS_REPORTED = 85; + ATOM_THERMAL_THROTTLING = 86; + ATOM_BIOMETRIC_ACQUIRED = 87; + ATOM_BIOMETRIC_AUTHENTICATED = 88; + ATOM_BIOMETRIC_ERROR_OCCURRED = 89; + ATOM_UI_EVENT_REPORTED = 90; + ATOM_BATTERY_HEALTH_SNAPSHOT = 91; + ATOM_SLOW_IO = 92; + ATOM_BATTERY_CAUSED_SHUTDOWN = 93; + ATOM_PHONE_SERVICE_STATE_CHANGED = 94; + ATOM_PHONE_STATE_CHANGED = 95; + ATOM_USER_RESTRICTION_CHANGED = 96; + ATOM_SETTINGS_UI_CHANGED = 97; + ATOM_CONNECTIVITY_STATE_CHANGED = 98; + ATOM_SERVICE_STATE_CHANGED = 99; + ATOM_SERVICE_LAUNCH_REPORTED = 100; + ATOM_FLAG_FLIP_UPDATE_OCCURRED = 101; + ATOM_BINARY_PUSH_STATE_CHANGED = 102; + ATOM_DEVICE_POLICY_EVENT = 103; + ATOM_DOCS_UI_FILE_OP_CANCELED = 104; + ATOM_DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED = 105; + ATOM_DOCS_UI_FILE_OP_FAILURE = 106; + ATOM_DOCS_UI_PROVIDER_FILE_OP = 107; + ATOM_DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST = 108; + ATOM_DOCS_UI_LAUNCH_REPORTED = 109; + ATOM_DOCS_UI_ROOT_VISITED = 110; + ATOM_DOCS_UI_STARTUP_MS = 111; + ATOM_DOCS_UI_USER_ACTION_REPORTED = 112; + ATOM_WIFI_ENABLED_STATE_CHANGED = 113; + ATOM_WIFI_RUNNING_STATE_CHANGED = 114; + ATOM_APP_COMPACTED = 115; + ATOM_NETWORK_DNS_EVENT_REPORTED = 116; + ATOM_DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED = 117; + ATOM_DOCS_UI_PICK_RESULT_REPORTED = 118; + ATOM_DOCS_UI_SEARCH_MODE_REPORTED = 119; + ATOM_DOCS_UI_SEARCH_TYPE_REPORTED = 120; + ATOM_DATA_STALL_EVENT = 121; + ATOM_RESCUE_PARTY_RESET_REPORTED = 122; + ATOM_SIGNED_CONFIG_REPORTED = 123; + ATOM_GNSS_NI_EVENT_REPORTED = 124; + ATOM_BLUETOOTH_LINK_LAYER_CONNECTION_EVENT = 125; + ATOM_BLUETOOTH_ACL_CONNECTION_STATE_CHANGED = 126; + ATOM_BLUETOOTH_SCO_CONNECTION_STATE_CHANGED = 127; + ATOM_APP_DOWNGRADED = 128; + ATOM_APP_OPTIMIZED_AFTER_DOWNGRADED = 129; + ATOM_LOW_STORAGE_STATE_CHANGED = 130; + ATOM_GNSS_NFW_NOTIFICATION_REPORTED = 131; + ATOM_GNSS_CONFIGURATION_REPORTED = 132; + ATOM_USB_PORT_OVERHEAT_EVENT_REPORTED = 133; + ATOM_NFC_ERROR_OCCURRED = 134; + ATOM_NFC_STATE_CHANGED = 135; + ATOM_NFC_BEAM_OCCURRED = 136; + ATOM_NFC_CARDEMULATION_OCCURRED = 137; + ATOM_NFC_TAG_OCCURRED = 138; + ATOM_NFC_HCE_TRANSACTION_OCCURRED = 139; + ATOM_SE_STATE_CHANGED = 140; + ATOM_SE_OMAPI_REPORTED = 141; + ATOM_BROADCAST_DISPATCH_LATENCY_REPORTED = 142; + ATOM_ATTENTION_MANAGER_SERVICE_RESULT_REPORTED = 143; + ATOM_ADB_CONNECTION_CHANGED = 144; + ATOM_SPEECH_DSP_STAT_REPORTED = 145; + ATOM_USB_CONTAMINANT_REPORTED = 146; + ATOM_WATCHDOG_ROLLBACK_OCCURRED = 147; + ATOM_BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED = 148; + ATOM_BUBBLE_UI_CHANGED = 149; + ATOM_SCHEDULED_JOB_CONSTRAINT_CHANGED = 150; + ATOM_BLUETOOTH_ACTIVE_DEVICE_CHANGED = 151; + ATOM_BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED = 152; + ATOM_BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED = 153; + ATOM_BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED = 154; + ATOM_BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED = 155; + ATOM_BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED = 156; + ATOM_BLUETOOTH_DEVICE_RSSI_REPORTED = 157; + ATOM_BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED = 158; + ATOM_BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED = 159; + ATOM_BLUETOOTH_HCI_TIMEOUT_REPORTED = 160; + ATOM_BLUETOOTH_QUALITY_REPORT_REPORTED = 161; + ATOM_BLUETOOTH_DEVICE_INFO_REPORTED = 162; + ATOM_BLUETOOTH_REMOTE_VERSION_INFO_REPORTED = 163; + ATOM_BLUETOOTH_SDP_ATTRIBUTE_REPORTED = 164; + ATOM_BLUETOOTH_BOND_STATE_CHANGED = 165; + ATOM_BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED = 166; + ATOM_BLUETOOTH_SMP_PAIRING_EVENT_REPORTED = 167; + ATOM_SCREEN_TIMEOUT_EXTENSION_REPORTED = 168; + ATOM_PROCESS_START_TIME = 169; + ATOM_PERMISSION_GRANT_REQUEST_RESULT_REPORTED = 170; + ATOM_BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED = 171; + ATOM_DEVICE_IDENTIFIER_ACCESS_DENIED = 172; + ATOM_BUBBLE_DEVELOPER_ERROR_REPORTED = 173; + ATOM_ASSIST_GESTURE_STAGE_REPORTED = 174; + ATOM_ASSIST_GESTURE_FEEDBACK_REPORTED = 175; + ATOM_ASSIST_GESTURE_PROGRESS_REPORTED = 176; + ATOM_TOUCH_GESTURE_CLASSIFIED = 177; + ATOM_HIDDEN_API_USED = 178; + ATOM_STYLE_UI_CHANGED = 179; + ATOM_PRIVACY_INDICATORS_INTERACTED = 180; + ATOM_APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED = 181; + ATOM_NETWORK_STACK_REPORTED = 182; + ATOM_APP_MOVED_STORAGE_REPORTED = 183; + ATOM_BIOMETRIC_ENROLLED = 184; + ATOM_SYSTEM_SERVER_WATCHDOG_OCCURRED = 185; + ATOM_TOMB_STONE_OCCURRED = 186; + ATOM_BLUETOOTH_CLASS_OF_DEVICE_REPORTED = 187; + ATOM_INTELLIGENCE_EVENT_REPORTED = 188; + ATOM_THERMAL_THROTTLING_SEVERITY_STATE_CHANGED = 189; + ATOM_ROLE_REQUEST_RESULT_REPORTED = 190; + ATOM_MEDIAMETRICS_AUDIOPOLICY_REPORTED = 191; + ATOM_MEDIAMETRICS_AUDIORECORD_REPORTED = 192; + ATOM_MEDIAMETRICS_AUDIOTHREAD_REPORTED = 193; + ATOM_MEDIAMETRICS_AUDIOTRACK_REPORTED = 194; + ATOM_MEDIAMETRICS_CODEC_REPORTED = 195; + ATOM_MEDIAMETRICS_DRM_WIDEVINE_REPORTED = 196; + ATOM_MEDIAMETRICS_EXTRACTOR_REPORTED = 197; + ATOM_MEDIAMETRICS_MEDIADRM_REPORTED = 198; + ATOM_MEDIAMETRICS_NUPLAYER_REPORTED = 199; + ATOM_MEDIAMETRICS_RECORDER_REPORTED = 200; + ATOM_MEDIAMETRICS_DRMMANAGER_REPORTED = 201; + ATOM_CAR_POWER_STATE_CHANGED = 203; + ATOM_GARAGE_MODE_INFO = 204; + ATOM_TEST_ATOM_REPORTED = 205; + ATOM_CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED = 206; + ATOM_CONTENT_CAPTURE_SERVICE_EVENTS = 207; + ATOM_CONTENT_CAPTURE_SESSION_EVENTS = 208; + ATOM_CONTENT_CAPTURE_FLUSHED = 209; + ATOM_LOCATION_MANAGER_API_USAGE_REPORTED = 210; + ATOM_REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED = 211; + ATOM_RUNTIME_PERMISSIONS_UPGRADE_RESULT = 212; + ATOM_GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS = 213; + ATOM_LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION = 214; + ATOM_APP_PERMISSION_FRAGMENT_ACTION_REPORTED = 215; + ATOM_APP_PERMISSION_FRAGMENT_VIEWED = 216; + ATOM_APP_PERMISSIONS_FRAGMENT_VIEWED = 217; + ATOM_PERMISSION_APPS_FRAGMENT_VIEWED = 218; + ATOM_TEXT_SELECTION_EVENT = 219; + ATOM_TEXT_LINKIFY_EVENT = 220; + ATOM_CONVERSATION_ACTIONS_EVENT = 221; + ATOM_LANGUAGE_DETECTION_EVENT = 222; + ATOM_EXCLUSION_RECT_STATE_CHANGED = 223; + ATOM_BACK_GESTURE_REPORTED_REPORTED = 224; + ATOM_UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED = 225; + ATOM_UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED = 226; + ATOM_CAMERA_ACTION_EVENT = 227; + ATOM_APP_COMPATIBILITY_CHANGE_REPORTED = 228; + ATOM_PERFETTO_UPLOADED = 229; + ATOM_VMS_CLIENT_CONNECTION_STATE_CHANGED = 230; + ATOM_MEDIA_PROVIDER_SCAN_OCCURRED = 233; + ATOM_MEDIA_CONTENT_DELETED = 234; + ATOM_MEDIA_PROVIDER_PERMISSION_REQUESTED = 235; + ATOM_MEDIA_PROVIDER_SCHEMA_CHANGED = 236; + ATOM_MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED = 237; + ATOM_REBOOT_ESCROW_RECOVERY_REPORTED = 238; + ATOM_BOOT_TIME_EVENT_DURATION_REPORTED = 239; + ATOM_BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED = 240; + ATOM_BOOT_TIME_EVENT_UTC_TIME_REPORTED = 241; + ATOM_BOOT_TIME_EVENT_ERROR_CODE_REPORTED = 242; + ATOM_USERSPACE_REBOOT_REPORTED = 243; + ATOM_NOTIFICATION_REPORTED = 244; + ATOM_NOTIFICATION_PANEL_REPORTED = 245; + ATOM_NOTIFICATION_CHANNEL_MODIFIED = 246; + ATOM_INTEGRITY_CHECK_RESULT_REPORTED = 247; + ATOM_INTEGRITY_RULES_PUSHED = 248; + ATOM_CB_MESSAGE_REPORTED = 249; + ATOM_CB_MESSAGE_ERROR = 250; + ATOM_WIFI_HEALTH_STAT_REPORTED = 251; + ATOM_WIFI_FAILURE_STAT_REPORTED = 252; + ATOM_WIFI_CONNECTION_RESULT_REPORTED = 253; + ATOM_APP_FREEZE_CHANGED = 254; + ATOM_SNAPSHOT_MERGE_REPORTED = 255; + ATOM_FOREGROUND_SERVICE_APP_OP_SESSION_ENDED = 256; + ATOM_DISPLAY_JANK_REPORTED = 257; + ATOM_APP_STANDBY_BUCKET_CHANGED = 258; + ATOM_SHARESHEET_STARTED = 259; + ATOM_RANKING_SELECTED = 260; + ATOM_TVSETTINGS_UI_INTERACTED = 261; + ATOM_LAUNCHER_SNAPSHOT = 262; + ATOM_PACKAGE_INSTALLER_V2_REPORTED = 263; + ATOM_USER_LIFECYCLE_JOURNEY_REPORTED = 264; + ATOM_USER_LIFECYCLE_EVENT_OCCURRED = 265; + ATOM_ACCESSIBILITY_SHORTCUT_REPORTED = 266; + ATOM_ACCESSIBILITY_SERVICE_REPORTED = 267; + ATOM_DOCS_UI_DRAG_AND_DROP_REPORTED = 268; + ATOM_APP_USAGE_EVENT_OCCURRED = 269; + ATOM_AUTO_REVOKE_NOTIFICATION_CLICKED = 270; + ATOM_AUTO_REVOKE_FRAGMENT_APP_VIEWED = 271; + ATOM_AUTO_REVOKED_APP_INTERACTION = 272; + ATOM_APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION = 273; + ATOM_EVS_USAGE_STATS_REPORTED = 274; + ATOM_AUDIO_POWER_USAGE_DATA_REPORTED = 275; + ATOM_TV_TUNER_STATE_CHANGED = 276; + ATOM_MEDIAOUTPUT_OP_SWITCH_REPORTED = 277; + ATOM_CB_MESSAGE_FILTERED = 278; + ATOM_TV_TUNER_DVR_STATUS = 279; + ATOM_TV_CAS_SESSION_OPEN_STATUS = 280; + ATOM_ASSISTANT_INVOCATION_REPORTED = 281; + ATOM_DISPLAY_WAKE_REPORTED = 282; + ATOM_CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED = 283; + ATOM_CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED = 284; + ATOM_CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED = 285; + ATOM_CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED = 286; + ATOM_CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED = 287; + ATOM_CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED = 288; + ATOM_CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED = 289; + ATOM_NETWORK_IP_PROVISIONING_REPORTED = 290; + ATOM_NETWORK_DHCP_RENEW_REPORTED = 291; + ATOM_NETWORK_VALIDATION_REPORTED = 292; + ATOM_NETWORK_STACK_QUIRK_REPORTED = 293; + ATOM_MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED = 294; + ATOM_MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED = 295; + ATOM_MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED = 296; + ATOM_MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED = 297; + ATOM_BLOB_COMMITTED = 298; + ATOM_BLOB_LEASED = 299; + ATOM_BLOB_OPENED = 300; + ATOM_CONTACTS_PROVIDER_STATUS_REPORTED = 301; + ATOM_KEYSTORE_KEY_EVENT_REPORTED = 302; + ATOM_NETWORK_TETHERING_REPORTED = 303; + ATOM_IME_TOUCH_REPORTED = 304; + ATOM_UI_INTERACTION_FRAME_INFO_REPORTED = 305; + ATOM_UI_ACTION_LATENCY_REPORTED = 306; + ATOM_WIFI_DISCONNECT_REPORTED = 307; + ATOM_WIFI_CONNECTION_STATE_CHANGED = 308; + ATOM_HDMI_CEC_ACTIVE_SOURCE_CHANGED = 309; + ATOM_HDMI_CEC_MESSAGE_REPORTED = 310; + ATOM_AIRPLANE_MODE = 311; + ATOM_MODEM_RESTART = 312; + ATOM_CARRIER_ID_MISMATCH_REPORTED = 313; + ATOM_CARRIER_ID_TABLE_UPDATED = 314; + ATOM_DATA_STALL_RECOVERY_REPORTED = 315; + ATOM_MEDIAMETRICS_MEDIAPARSER_REPORTED = 316; + ATOM_TLS_HANDSHAKE_REPORTED = 317; + ATOM_TEXT_CLASSIFIER_API_USAGE_REPORTED = 318; + ATOM_CAR_WATCHDOG_KILL_STATS_REPORTED = 319; + ATOM_MEDIAMETRICS_PLAYBACK_REPORTED = 320; + ATOM_MEDIA_NETWORK_INFO_CHANGED = 321; + ATOM_MEDIA_PLAYBACK_STATE_CHANGED = 322; + ATOM_MEDIA_PLAYBACK_ERROR_REPORTED = 323; + ATOM_MEDIA_PLAYBACK_TRACK_CHANGED = 324; + ATOM_WIFI_SCAN_REPORTED = 325; + ATOM_WIFI_PNO_SCAN_REPORTED = 326; + ATOM_TIF_TUNE_CHANGED = 327; + ATOM_AUTO_ROTATE_REPORTED = 328; + ATOM_PERFETTO_TRIGGER = 329; + ATOM_TRANSCODING_DATA = 330; + ATOM_IMS_SERVICE_ENTITLEMENT_UPDATED = 331; + ATOM_DEVICE_ROTATED = 333; + ATOM_SIM_SPECIFIC_SETTINGS_RESTORED = 334; + ATOM_TEXT_CLASSIFIER_DOWNLOAD_REPORTED = 335; + ATOM_PIN_STORAGE_EVENT = 336; + ATOM_FACE_DOWN_REPORTED = 337; + ATOM_BLUETOOTH_HAL_CRASH_REASON_REPORTED = 338; + ATOM_REBOOT_ESCROW_PREPARATION_REPORTED = 339; + ATOM_REBOOT_ESCROW_LSKF_CAPTURE_REPORTED = 340; + ATOM_REBOOT_ESCROW_REBOOT_REPORTED = 341; + ATOM_BINDER_LATENCY_REPORTED = 342; + ATOM_MEDIAMETRICS_AAUDIOSTREAM_REPORTED = 343; + ATOM_MEDIA_TRANSCODING_SESSION_ENDED = 344; + ATOM_MAGNIFICATION_USAGE_REPORTED = 345; + ATOM_MAGNIFICATION_MODE_WITH_IME_ON_REPORTED = 346; + ATOM_APP_SEARCH_CALL_STATS_REPORTED = 347; + ATOM_APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED = 348; + ATOM_DEVICE_CONTROL_CHANGED = 349; + ATOM_DEVICE_STATE_CHANGED = 350; + ATOM_INPUTDEVICE_REGISTERED = 351; + ATOM_SMARTSPACE_CARD_REPORTED = 352; + ATOM_AUTH_PROMPT_AUTHENTICATE_INVOKED = 353; + ATOM_AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED = 354; + ATOM_AUTH_ENROLL_ACTION_INVOKED = 355; + ATOM_AUTH_DEPRECATED_API_USED = 356; + ATOM_UNATTENDED_REBOOT_OCCURRED = 357; + ATOM_LONG_REBOOT_BLOCKING_REPORTED = 358; + ATOM_LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED = 359; + ATOM_FDTRACK_EVENT_OCCURRED = 364; + ATOM_TIMEOUT_AUTO_EXTENDED_REPORTED = 365; + ATOM_ALARM_BATCH_DELIVERED = 367; + ATOM_ALARM_SCHEDULED = 368; + ATOM_CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED = 369; + ATOM_USER_LEVEL_HIBERNATION_STATE_CHANGED = 370; + ATOM_APP_SEARCH_INITIALIZE_STATS_REPORTED = 371; + ATOM_APP_SEARCH_QUERY_STATS_REPORTED = 372; + ATOM_APP_PROCESS_DIED = 373; + ATOM_NETWORK_IP_REACHABILITY_MONITOR_REPORTED = 374; + ATOM_SLOW_INPUT_EVENT_REPORTED = 375; + ATOM_ANR_OCCURRED_PROCESSING_STARTED = 376; + ATOM_APP_SEARCH_REMOVE_STATS_REPORTED = 377; + ATOM_MEDIA_CODEC_REPORTED = 378; + ATOM_PERMISSION_USAGE_FRAGMENT_INTERACTION = 379; + ATOM_PERMISSION_DETAILS_INTERACTION = 380; + ATOM_PRIVACY_SENSOR_TOGGLE_INTERACTION = 381; + ATOM_PRIVACY_TOGGLE_DIALOG_INTERACTION = 382; + ATOM_APP_SEARCH_OPTIMIZE_STATS_REPORTED = 383; + ATOM_NON_A11Y_TOOL_SERVICE_WARNING_REPORT = 384; + ATOM_APP_COMPAT_STATE_CHANGED = 386; + ATOM_SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED = 387; + ATOM_SPLITSCREEN_UI_CHANGED = 388; + ATOM_NETWORK_DNS_HANDSHAKE_REPORTED = 389; + ATOM_BLUETOOTH_CODE_PATH_COUNTER = 390; + ATOM_BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY = 392; + ATOM_ACCESSIBILITY_FLOATING_MENU_UI_CHANGED = 393; + ATOM_NEURALNETWORKS_COMPILATION_COMPLETED = 394; + ATOM_NEURALNETWORKS_EXECUTION_COMPLETED = 395; + ATOM_NEURALNETWORKS_COMPILATION_FAILED = 396; + ATOM_NEURALNETWORKS_EXECUTION_FAILED = 397; + ATOM_CONTEXT_HUB_BOOTED = 398; + ATOM_CONTEXT_HUB_RESTARTED = 399; + ATOM_CONTEXT_HUB_LOADED_NANOAPP_SNAPSHOT_REPORTED = 400; + ATOM_CHRE_CODE_DOWNLOAD_TRANSACTED = 401; + ATOM_UWB_SESSION_INITED = 402; + ATOM_UWB_SESSION_CLOSED = 403; + ATOM_UWB_FIRST_RANGING_RECEIVED = 404; + ATOM_UWB_RANGING_MEASUREMENT_RECEIVED = 405; + ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_SCHEDULED = 406; + ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_COMPLETED = 407; + ATOM_CLIPBOARD_CLEARED = 408; + ATOM_VM_CREATION_REQUESTED = 409; + ATOM_NEARBY_DEVICE_SCAN_STATE_CHANGED = 410; + ATOM_APPLICATION_LOCALES_CHANGED = 412; + ATOM_MEDIAMETRICS_AUDIOTRACKSTATUS_REPORTED = 413; + ATOM_FOLD_STATE_DURATION_REPORTED = 414; + ATOM_LOCATION_TIME_ZONE_PROVIDER_CONTROLLER_STATE_CHANGED = 415; + ATOM_DISPLAY_HBM_STATE_CHANGED = 416; + ATOM_DISPLAY_HBM_BRIGHTNESS_CHANGED = 417; + ATOM_PERSISTENT_URI_PERMISSIONS_FLUSHED = 418; + ATOM_EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED = 419; + ATOM_VBMETA_DIGEST_REPORTED = 420; + ATOM_APEX_INFO_GATHERED = 421; + ATOM_PVM_INFO_GATHERED = 422; + ATOM_WEAR_SETTINGS_UI_INTERACTED = 423; + ATOM_TRACING_SERVICE_REPORT_EVENT = 424; + ATOM_MEDIAMETRICS_AUDIORECORDSTATUS_REPORTED = 425; + ATOM_LAUNCHER_LATENCY = 426; + ATOM_DROPBOX_ENTRY_DROPPED = 427; + ATOM_WIFI_P2P_CONNECTION_REPORTED = 428; + ATOM_GAME_STATE_CHANGED = 429; + ATOM_HOTWORD_DETECTOR_CREATE_REQUESTED = 430; + ATOM_HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED = 431; + ATOM_HOTWORD_DETECTION_SERVICE_RESTARTED = 432; + ATOM_HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED = 433; + ATOM_HOTWORD_DETECTOR_EVENTS = 434; + ATOM_BOOT_COMPLETED_BROADCAST_COMPLETION_LATENCY_REPORTED = 437; + ATOM_CONTACTS_INDEXER_UPDATE_STATS_REPORTED = 440; + ATOM_APP_BACKGROUND_RESTRICTIONS_INFO = 441; + ATOM_MMS_SMS_PROVIDER_GET_THREAD_ID_FAILED = 442; + ATOM_MMS_SMS_DATABASE_HELPER_ON_UPGRADE_FAILED = 443; + ATOM_PERMISSION_REMINDER_NOTIFICATION_INTERACTED = 444; + ATOM_RECENT_PERMISSION_DECISIONS_INTERACTED = 445; + ATOM_GNSS_PSDS_DOWNLOAD_REPORTED = 446; + ATOM_LE_AUDIO_CONNECTION_SESSION_REPORTED = 447; + ATOM_LE_AUDIO_BROADCAST_SESSION_REPORTED = 448; + ATOM_DREAM_UI_EVENT_REPORTED = 449; + ATOM_TASK_MANAGER_EVENT_REPORTED = 450; + ATOM_CDM_ASSOCIATION_ACTION = 451; + ATOM_MAGNIFICATION_TRIPLE_TAP_AND_HOLD_ACTIVATED_SESSION_REPORTED = 452; + ATOM_MAGNIFICATION_FOLLOW_TYPING_FOCUS_ACTIVATED_SESSION_REPORTED = 453; + ATOM_ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED = 454; + ATOM_WIFI_SETUP_FAILURE_CRASH_REPORTED = 455; + ATOM_UWB_DEVICE_ERROR_REPORTED = 456; + ATOM_ISOLATED_COMPILATION_SCHEDULED = 457; + ATOM_ISOLATED_COMPILATION_ENDED = 458; + ATOM_ONS_OPPORTUNISTIC_ESIM_PROVISIONING_COMPLETE = 459; + ATOM_SYSTEM_SERVER_PRE_WATCHDOG_OCCURRED = 460; + ATOM_TELEPHONY_ANOMALY_DETECTED = 461; + ATOM_LETTERBOX_POSITION_CHANGED = 462; + ATOM_REMOTE_KEY_PROVISIONING_ATTEMPT = 463; + ATOM_REMOTE_KEY_PROVISIONING_NETWORK_INFO = 464; + ATOM_REMOTE_KEY_PROVISIONING_TIMING = 465; + ATOM_MEDIAOUTPUT_OP_INTERACTION_REPORT = 466; + ATOM_SYNC_EXEMPTION_OCCURRED = 468; + ATOM_AUTOFILL_PRESENTATION_EVENT_REPORTED = 469; + ATOM_DOCK_STATE_CHANGED = 470; + ATOM_SAFETY_SOURCE_STATE_COLLECTED = 471; + ATOM_SAFETY_CENTER_SYSTEM_EVENT_REPORTED = 472; + ATOM_SAFETY_CENTER_INTERACTION_REPORTED = 473; + ATOM_SETTINGS_PROVIDER_SETTING_CHANGED = 474; + ATOM_BROADCAST_DELIVERY_EVENT_REPORTED = 475; + ATOM_SERVICE_REQUEST_EVENT_REPORTED = 476; + ATOM_PROVIDER_ACQUISITION_EVENT_REPORTED = 477; + ATOM_BLUETOOTH_DEVICE_NAME_REPORTED = 478; + ATOM_CB_CONFIG_UPDATED = 479; + ATOM_CB_MODULE_ERROR_REPORTED = 480; + ATOM_CB_SERVICE_FEATURE_CHANGED = 481; + ATOM_CB_RECEIVER_FEATURE_CHANGED = 482; + ATOM_PRIVACY_SIGNAL_NOTIFICATION_INTERACTION = 484; + ATOM_PRIVACY_SIGNAL_ISSUE_CARD_INTERACTION = 485; + ATOM_PRIVACY_SIGNALS_JOB_FAILURE = 486; + ATOM_VIBRATION_REPORTED = 487; + ATOM_UWB_RANGING_START = 489; + ATOM_APP_COMPACTED_V2 = 491; + ATOM_DISPLAY_BRIGHTNESS_CHANGED = 494; + ATOM_ACTIVITY_ACTION_BLOCKED = 495; + ATOM_NETWORK_DNS_SERVER_SUPPORT_REPORTED = 504; + ATOM_VM_BOOTED = 505; + ATOM_VM_EXITED = 506; + ATOM_AMBIENT_BRIGHTNESS_STATS_REPORTED = 507; + ATOM_MEDIAMETRICS_SPATIALIZERCAPABILITIES_REPORTED = 508; + ATOM_MEDIAMETRICS_SPATIALIZERDEVICEENABLED_REPORTED = 509; + ATOM_MEDIAMETRICS_HEADTRACKERDEVICEENABLED_REPORTED = 510; + ATOM_MEDIAMETRICS_HEADTRACKERDEVICESUPPORTED_REPORTED = 511; + ATOM_HEARING_AID_INFO_REPORTED = 513; + ATOM_DEVICE_WIDE_JOB_CONSTRAINT_CHANGED = 514; + ATOM_AMBIENT_MODE_CHANGED = 515; + ATOM_ANR_LATENCY_REPORTED = 516; + ATOM_RESOURCE_API_INFO = 517; + ATOM_SYSTEM_DEFAULT_NETWORK_CHANGED = 518; + ATOM_IWLAN_SETUP_DATA_CALL_RESULT_REPORTED = 519; + ATOM_IWLAN_PDN_DISCONNECTED_REASON_REPORTED = 520; + ATOM_AIRPLANE_MODE_SESSION_REPORTED = 521; + ATOM_VM_CPU_STATUS_REPORTED = 522; + ATOM_VM_MEM_STATUS_REPORTED = 523; + ATOM_PACKAGE_INSTALLATION_SESSION_REPORTED = 524; + ATOM_DEFAULT_NETWORK_REMATCH_INFO = 525; + ATOM_NETWORK_SELECTION_PERFORMANCE = 526; + ATOM_NETWORK_NSD_REPORTED = 527; + ATOM_BLUETOOTH_DISCONNECTION_REASON_REPORTED = 529; + ATOM_BLUETOOTH_LOCAL_VERSIONS_REPORTED = 530; + ATOM_BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED = 531; + ATOM_BLUETOOTH_LOCAL_SUPPORTED_FEATURES_REPORTED = 532; + ATOM_BLUETOOTH_GATT_APP_INFO = 533; + ATOM_BRIGHTNESS_CONFIGURATION_UPDATED = 534; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_LAUNCHED = 538; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_FINISHED = 539; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_CONNECTION_REPORTED = 540; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_DEVICE_SCAN_TRIGGERED = 541; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_FIRST_DEVICE_SCAN_LATENCY = 542; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_CONNECT_DEVICE_LATENCY = 543; + ATOM_PACKAGE_MANAGER_SNAPSHOT_REPORTED = 544; + ATOM_PACKAGE_MANAGER_APPS_FILTER_CACHE_BUILD_REPORTED = 545; + ATOM_PACKAGE_MANAGER_APPS_FILTER_CACHE_UPDATE_REPORTED = 546; + ATOM_LAUNCHER_IMPRESSION_EVENT = 547; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_ALL_DEVICES_SCAN_LATENCY = 549; + ATOM_WS_WATCH_FACE_EDITED = 551; + ATOM_WS_WATCH_FACE_FAVORITE_ACTION_REPORTED = 552; + ATOM_WS_WATCH_FACE_SET_ACTION_REPORTED = 553; + ATOM_PACKAGE_UNINSTALLATION_REPORTED = 554; + ATOM_GAME_MODE_CHANGED = 555; + ATOM_GAME_MODE_CONFIGURATION_CHANGED = 556; + ATOM_BEDTIME_MODE_STATE_CHANGED = 557; + ATOM_NETWORK_SLICE_SESSION_ENDED = 558; + ATOM_NETWORK_SLICE_DAILY_DATA_USAGE_REPORTED = 559; + ATOM_NFC_TAG_TYPE_OCCURRED = 560; + ATOM_NFC_AID_CONFLICT_OCCURRED = 561; + ATOM_NFC_READER_CONFLICT_OCCURRED = 562; + ATOM_WS_TILE_LIST_CHANGED = 563; + ATOM_GET_TYPE_ACCESSED_WITHOUT_PERMISSION = 564; + ATOM_MOBILE_BUNDLED_APP_INFO_GATHERED = 566; + ATOM_WS_WATCH_FACE_COMPLICATION_SET_CHANGED = 567; + ATOM_MEDIA_DRM_CREATED = 568; + ATOM_MEDIA_DRM_ERRORED = 569; + ATOM_MEDIA_DRM_SESSION_OPENED = 570; + ATOM_MEDIA_DRM_SESSION_CLOSED = 571; + ATOM_USER_SELECTED_RESOLUTION = 572; + ATOM_UNSAFE_INTENT_EVENT_REPORTED = 573; + ATOM_PERFORMANCE_HINT_SESSION_REPORTED = 574; + ATOM_MEDIAMETRICS_MIDI_DEVICE_CLOSE_REPORTED = 576; + ATOM_BIOMETRIC_TOUCH_REPORTED = 577; + ATOM_HOTWORD_AUDIO_EGRESS_EVENT_REPORTED = 578; + ATOM_LOCATION_ENABLED_STATE_CHANGED = 580; + ATOM_IME_REQUEST_FINISHED = 581; + ATOM_USB_COMPLIANCE_WARNINGS_REPORTED = 582; + ATOM_APP_SUPPORTED_LOCALES_CHANGED = 583; + ATOM_MEDIA_PROVIDER_VOLUME_RECOVERY_REPORTED = 586; + ATOM_BIOMETRIC_PROPERTIES_COLLECTED = 587; + ATOM_KERNEL_WAKEUP_ATTRIBUTED = 588; + ATOM_SCREEN_STATE_CHANGED_V2 = 589; + ATOM_WS_BACKUP_ACTION_REPORTED = 590; + ATOM_WS_RESTORE_ACTION_REPORTED = 591; + ATOM_DEVICE_LOG_ACCESS_EVENT_REPORTED = 592; + ATOM_MEDIA_SESSION_UPDATED = 594; + ATOM_WEAR_OOBE_STATE_CHANGED = 595; + ATOM_WS_NOTIFICATION_UPDATED = 596; + ATOM_NETWORK_VALIDATION_FAILURE_STATS_DAILY_REPORTED = 601; + ATOM_WS_COMPLICATION_TAPPED = 602; + ATOM_WS_NOTIFICATION_BLOCKING = 780; + ATOM_WS_NOTIFICATION_BRIDGEMODE_UPDATED = 822; + ATOM_WS_NOTIFICATION_DISMISSAL_ACTIONED = 823; + ATOM_WS_NOTIFICATION_ACTIONED = 824; + ATOM_WS_NOTIFICATION_LATENCY = 880; + ATOM_WIFI_BYTES_TRANSFER = 10000; + ATOM_WIFI_BYTES_TRANSFER_BY_FG_BG = 10001; + ATOM_MOBILE_BYTES_TRANSFER = 10002; + ATOM_MOBILE_BYTES_TRANSFER_BY_FG_BG = 10003; + ATOM_BLUETOOTH_BYTES_TRANSFER = 10006; + ATOM_KERNEL_WAKELOCK = 10004; + ATOM_SUBSYSTEM_SLEEP_STATE = 10005; + ATOM_CPU_TIME_PER_UID = 10009; + ATOM_CPU_TIME_PER_UID_FREQ = 10010; + ATOM_WIFI_ACTIVITY_INFO = 10011; + ATOM_MODEM_ACTIVITY_INFO = 10012; + ATOM_BLUETOOTH_ACTIVITY_INFO = 10007; + ATOM_PROCESS_MEMORY_STATE = 10013; + ATOM_SYSTEM_ELAPSED_REALTIME = 10014; + ATOM_SYSTEM_UPTIME = 10015; + ATOM_CPU_ACTIVE_TIME = 10016; + ATOM_CPU_CLUSTER_TIME = 10017; + ATOM_DISK_SPACE = 10018; + ATOM_REMAINING_BATTERY_CAPACITY = 10019; + ATOM_FULL_BATTERY_CAPACITY = 10020; + ATOM_TEMPERATURE = 10021; + ATOM_BINDER_CALLS = 10022; + ATOM_BINDER_CALLS_EXCEPTIONS = 10023; + ATOM_LOOPER_STATS = 10024; + ATOM_DISK_STATS = 10025; + ATOM_DIRECTORY_USAGE = 10026; + ATOM_APP_SIZE = 10027; + ATOM_CATEGORY_SIZE = 10028; + ATOM_PROC_STATS = 10029; + ATOM_BATTERY_VOLTAGE = 10030; + ATOM_NUM_FINGERPRINTS_ENROLLED = 10031; + ATOM_DISK_IO = 10032; + ATOM_POWER_PROFILE = 10033; + ATOM_PROC_STATS_PKG_PROC = 10034; + ATOM_PROCESS_CPU_TIME = 10035; + ATOM_CPU_TIME_PER_THREAD_FREQ = 10037; + ATOM_ON_DEVICE_POWER_MEASUREMENT = 10038; + ATOM_DEVICE_CALCULATED_POWER_USE = 10039; + ATOM_PROCESS_MEMORY_HIGH_WATER_MARK = 10042; + ATOM_BATTERY_LEVEL = 10043; + ATOM_BUILD_INFORMATION = 10044; + ATOM_BATTERY_CYCLE_COUNT = 10045; + ATOM_DEBUG_ELAPSED_CLOCK = 10046; + ATOM_DEBUG_FAILING_ELAPSED_CLOCK = 10047; + ATOM_NUM_FACES_ENROLLED = 10048; + ATOM_ROLE_HOLDER = 10049; + ATOM_DANGEROUS_PERMISSION_STATE = 10050; + ATOM_TRAIN_INFO = 10051; + ATOM_TIME_ZONE_DATA_INFO = 10052; + ATOM_EXTERNAL_STORAGE_INFO = 10053; + ATOM_GPU_STATS_GLOBAL_INFO = 10054; + ATOM_GPU_STATS_APP_INFO = 10055; + ATOM_SYSTEM_ION_HEAP_SIZE = 10056; + ATOM_APPS_ON_EXTERNAL_STORAGE_INFO = 10057; + ATOM_FACE_SETTINGS = 10058; + ATOM_COOLING_DEVICE = 10059; + ATOM_APP_OPS = 10060; + ATOM_PROCESS_SYSTEM_ION_HEAP_SIZE = 10061; + ATOM_SURFACEFLINGER_STATS_GLOBAL_INFO = 10062; + ATOM_SURFACEFLINGER_STATS_LAYER_INFO = 10063; + ATOM_PROCESS_MEMORY_SNAPSHOT = 10064; + ATOM_VMS_CLIENT_STATS = 10065; + ATOM_NOTIFICATION_REMOTE_VIEWS = 10066; + ATOM_DANGEROUS_PERMISSION_STATE_SAMPLED = 10067; + ATOM_GRAPHICS_STATS = 10068; + ATOM_RUNTIME_APP_OP_ACCESS = 10069; + ATOM_ION_HEAP_SIZE = 10070; + ATOM_PACKAGE_NOTIFICATION_PREFERENCES = 10071; + ATOM_PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES = 10072; + ATOM_PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES = 10073; + ATOM_GNSS_STATS = 10074; + ATOM_ATTRIBUTED_APP_OPS = 10075; + ATOM_VOICE_CALL_SESSION = 10076; + ATOM_VOICE_CALL_RAT_USAGE = 10077; + ATOM_SIM_SLOT_STATE = 10078; + ATOM_SUPPORTED_RADIO_ACCESS_FAMILY = 10079; + ATOM_SETTING_SNAPSHOT = 10080; + ATOM_BLOB_INFO = 10081; + ATOM_DATA_USAGE_BYTES_TRANSFER = 10082; + ATOM_BYTES_TRANSFER_BY_TAG_AND_METERED = 10083; + ATOM_DND_MODE_RULE = 10084; + ATOM_GENERAL_EXTERNAL_STORAGE_ACCESS_STATS = 10085; + ATOM_INCOMING_SMS = 10086; + ATOM_OUTGOING_SMS = 10087; + ATOM_CARRIER_ID_TABLE_VERSION = 10088; + ATOM_DATA_CALL_SESSION = 10089; + ATOM_CELLULAR_SERVICE_STATE = 10090; + ATOM_CELLULAR_DATA_SERVICE_SWITCH = 10091; + ATOM_SYSTEM_MEMORY = 10092; + ATOM_IMS_REGISTRATION_TERMINATION = 10093; + ATOM_IMS_REGISTRATION_STATS = 10094; + ATOM_CPU_TIME_PER_CLUSTER_FREQ = 10095; + ATOM_CPU_CYCLES_PER_UID_CLUSTER = 10096; + ATOM_DEVICE_ROTATED_DATA = 10097; + ATOM_CPU_CYCLES_PER_THREAD_GROUP_CLUSTER = 10098; + ATOM_MEDIA_DRM_ACTIVITY_INFO = 10099; + ATOM_OEM_MANAGED_BYTES_TRANSFER = 10100; + ATOM_GNSS_POWER_STATS = 10101; + ATOM_TIME_ZONE_DETECTOR_STATE = 10102; + ATOM_KEYSTORE2_STORAGE_STATS = 10103; + ATOM_RKP_POOL_STATS = 10104; + ATOM_PROCESS_DMABUF_MEMORY = 10105; + ATOM_PENDING_ALARM_INFO = 10106; + ATOM_USER_LEVEL_HIBERNATED_APPS = 10107; + ATOM_LAUNCHER_LAYOUT_SNAPSHOT = 10108; + ATOM_GLOBAL_HIBERNATED_APPS = 10109; + ATOM_INPUT_EVENT_LATENCY_SKETCH = 10110; + ATOM_BATTERY_USAGE_STATS_BEFORE_RESET = 10111; + ATOM_BATTERY_USAGE_STATS_SINCE_RESET = 10112; + ATOM_BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL = 10113; + ATOM_INSTALLED_INCREMENTAL_PACKAGE = 10114; + ATOM_TELEPHONY_NETWORK_REQUESTS = 10115; + ATOM_APP_SEARCH_STORAGE_INFO = 10116; + ATOM_VMSTAT = 10117; + ATOM_KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO = 10118; + ATOM_KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO = 10119; + ATOM_KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO = 10120; + ATOM_KEYSTORE2_ATOM_WITH_OVERFLOW = 10121; + ATOM_KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO = 10122; + ATOM_KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO = 10123; + ATOM_RKP_ERROR_STATS = 10124; + ATOM_KEYSTORE2_CRASH_STATS = 10125; + ATOM_VENDOR_APEX_INFO = 10126; + ATOM_ACCESSIBILITY_SHORTCUT_STATS = 10127; + ATOM_ACCESSIBILITY_FLOATING_MENU_STATS = 10128; + ATOM_DATA_USAGE_BYTES_TRANSFER_V2 = 10129; + ATOM_MEDIA_CAPABILITIES = 10130; + ATOM_CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY = 10131; + ATOM_CAR_WATCHDOG_UID_IO_USAGE_SUMMARY = 10132; + ATOM_IMS_REGISTRATION_FEATURE_TAG_STATS = 10133; + ATOM_RCS_CLIENT_PROVISIONING_STATS = 10134; + ATOM_RCS_ACS_PROVISIONING_STATS = 10135; + ATOM_SIP_DELEGATE_STATS = 10136; + ATOM_SIP_TRANSPORT_FEATURE_TAG_STATS = 10137; + ATOM_SIP_MESSAGE_RESPONSE = 10138; + ATOM_SIP_TRANSPORT_SESSION = 10139; + ATOM_IMS_DEDICATED_BEARER_LISTENER_EVENT = 10140; + ATOM_IMS_DEDICATED_BEARER_EVENT = 10141; + ATOM_IMS_REGISTRATION_SERVICE_DESC_STATS = 10142; + ATOM_UCE_EVENT_STATS = 10143; + ATOM_PRESENCE_NOTIFY_EVENT = 10144; + ATOM_GBA_EVENT = 10145; + ATOM_PER_SIM_STATUS = 10146; + ATOM_GPU_WORK_PER_UID = 10147; + ATOM_PERSISTENT_URI_PERMISSIONS_AMOUNT_PER_PACKAGE = 10148; + ATOM_SIGNED_PARTITION_INFO = 10149; + ATOM_PINNED_FILE_SIZES_PER_PACKAGE = 10150; + ATOM_PENDING_INTENTS_PER_PACKAGE = 10151; + ATOM_USER_INFO = 10152; + ATOM_TELEPHONY_NETWORK_REQUESTS_V2 = 10153; + ATOM_DEVICE_TELEPHONY_PROPERTIES = 10154; + ATOM_REMOTE_KEY_PROVISIONING_ERROR_COUNTS = 10155; + ATOM_SAFETY_STATE = 10156; + ATOM_INCOMING_MMS = 10157; + ATOM_OUTGOING_MMS = 10158; + ATOM_MULTI_USER_INFO = 10160; + ATOM_NETWORK_BPF_MAP_INFO = 10161; + ATOM_OUTGOING_SHORT_CODE_SMS = 10162; + ATOM_CONNECTIVITY_STATE_SAMPLE = 10163; + ATOM_NETWORK_SELECTION_REMATCH_REASONS_INFO = 10164; + ATOM_GAME_MODE_INFO = 10165; + ATOM_GAME_MODE_CONFIGURATION = 10166; + ATOM_GAME_MODE_LISTENER = 10167; + ATOM_NETWORK_SLICE_REQUEST_COUNT = 10168; + ATOM_WS_TILE_SNAPSHOT = 10169; + ATOM_WS_ACTIVE_WATCH_FACE_COMPLICATION_SET_SNAPSHOT = 10170; + ATOM_PROCESS_STATE = 10171; + ATOM_PROCESS_ASSOCIATION = 10172; + ATOM_ADPF_SYSTEM_COMPONENT_INFO = 10173; + ATOM_NOTIFICATION_MEMORY_USE = 10174; + ATOM_HDR_CAPABILITIES = 10175; + ATOM_WS_FAVOURITE_WATCH_FACE_LIST_SNAPSHOT = 10176; + ATOM_ACCESSIBILITY_CHECK_RESULT_REPORTED = 910; + ATOM_ADAPTIVE_AUTH_UNLOCK_AFTER_LOCK_REPORTED = 820; + ATOM_THERMAL_STATUS_CALLED = 772; + ATOM_THERMAL_HEADROOM_CALLED = 773; + ATOM_THERMAL_HEADROOM_THRESHOLDS_CALLED = 774; + ATOM_ADPF_HINT_SESSION_TID_CLEANUP = 839; + ATOM_THERMAL_HEADROOM_THRESHOLDS = 10201; + ATOM_ADPF_SESSION_SNAPSHOT = 10218; + ATOM_JSSCRIPTENGINE_LATENCY_REPORTED = 483; + ATOM_AD_SERVICES_API_CALLED = 435; + ATOM_AD_SERVICES_MESUREMENT_REPORTS_UPLOADED = 436; + ATOM_MOBILE_DATA_DOWNLOAD_FILE_GROUP_STATUS_REPORTED = 490; + ATOM_MOBILE_DATA_DOWNLOAD_DOWNLOAD_RESULT_REPORTED = 502; + ATOM_AD_SERVICES_SETTINGS_USAGE_REPORTED = 493; + ATOM_BACKGROUND_FETCH_PROCESS_REPORTED = 496; + ATOM_UPDATE_CUSTOM_AUDIENCE_PROCESS_REPORTED = 497; + ATOM_RUN_AD_BIDDING_PROCESS_REPORTED = 498; + ATOM_RUN_AD_SCORING_PROCESS_REPORTED = 499; + ATOM_RUN_AD_SELECTION_PROCESS_REPORTED = 500; + ATOM_RUN_AD_BIDDING_PER_CA_PROCESS_REPORTED = 501; + ATOM_MOBILE_DATA_DOWNLOAD_FILE_GROUP_STORAGE_STATS_REPORTED = 503; + ATOM_AD_SERVICES_MEASUREMENT_REGISTRATIONS = 512; + ATOM_AD_SERVICES_GET_TOPICS_REPORTED = 535; + ATOM_AD_SERVICES_EPOCH_COMPUTATION_GET_TOP_TOPICS_REPORTED = 536; + ATOM_AD_SERVICES_EPOCH_COMPUTATION_CLASSIFIER_REPORTED = 537; + ATOM_AD_SERVICES_BACK_COMPAT_GET_TOPICS_REPORTED = 598; + ATOM_AD_SERVICES_BACK_COMPAT_EPOCH_COMPUTATION_CLASSIFIER_REPORTED = 599; + ATOM_AD_SERVICES_MEASUREMENT_DEBUG_KEYS = 640; + ATOM_AD_SERVICES_ERROR_REPORTED = 662; + ATOM_AD_SERVICES_BACKGROUND_JOBS_EXECUTION_REPORTED = 663; + ATOM_AD_SERVICES_MEASUREMENT_DELAYED_SOURCE_REGISTRATION = 673; + ATOM_AD_SERVICES_MEASUREMENT_ATTRIBUTION = 674; + ATOM_AD_SERVICES_MEASUREMENT_JOBS = 675; + ATOM_AD_SERVICES_MEASUREMENT_WIPEOUT = 676; + ATOM_AD_SERVICES_MEASUREMENT_AD_ID_MATCH_FOR_DEBUG_KEYS = 695; + ATOM_AD_SERVICES_ENROLLMENT_DATA_STORED = 697; + ATOM_AD_SERVICES_ENROLLMENT_FILE_DOWNLOADED = 698; + ATOM_AD_SERVICES_ENROLLMENT_MATCHED = 699; + ATOM_AD_SERVICES_CONSENT_MIGRATED = 702; + ATOM_AD_SERVICES_ENROLLMENT_FAILED = 714; + ATOM_AD_SERVICES_MEASUREMENT_CLICK_VERIFICATION = 756; + ATOM_AD_SERVICES_ENCRYPTION_KEY_FETCHED = 765; + ATOM_AD_SERVICES_ENCRYPTION_KEY_DB_TRANSACTION_ENDED = 766; + ATOM_DESTINATION_REGISTERED_BEACONS = 767; + ATOM_REPORT_INTERACTION_API_CALLED = 768; + ATOM_INTERACTION_REPORTING_TABLE_CLEARED = 769; + ATOM_APP_MANIFEST_CONFIG_HELPER_CALLED = 788; + ATOM_AD_FILTERING_PROCESS_JOIN_CA_REPORTED = 793; + ATOM_AD_FILTERING_PROCESS_AD_SELECTION_REPORTED = 794; + ATOM_AD_COUNTER_HISTOGRAM_UPDATER_REPORTED = 795; + ATOM_SIGNATURE_VERIFICATION = 807; + ATOM_K_ANON_IMMEDIATE_SIGN_JOIN_STATUS_REPORTED = 808; + ATOM_K_ANON_BACKGROUND_JOB_STATUS_REPORTED = 809; + ATOM_K_ANON_INITIALIZE_STATUS_REPORTED = 810; + ATOM_K_ANON_SIGN_STATUS_REPORTED = 811; + ATOM_K_ANON_JOIN_STATUS_REPORTED = 812; + ATOM_K_ANON_KEY_ATTESTATION_STATUS_REPORTED = 813; + ATOM_GET_AD_SELECTION_DATA_API_CALLED = 814; + ATOM_GET_AD_SELECTION_DATA_BUYER_INPUT_GENERATED = 815; + ATOM_BACKGROUND_JOB_SCHEDULING_REPORTED = 834; + ATOM_TOPICS_ENCRYPTION_EPOCH_COMPUTATION_REPORTED = 840; + ATOM_TOPICS_ENCRYPTION_GET_TOPICS_REPORTED = 841; + ATOM_ADSERVICES_SHELL_COMMAND_CALLED = 842; + ATOM_UPDATE_SIGNALS_API_CALLED = 843; + ATOM_ENCODING_JOB_RUN = 844; + ATOM_ENCODING_JS_FETCH = 845; + ATOM_ENCODING_JS_EXECUTION = 846; + ATOM_PERSIST_AD_SELECTION_RESULT_CALLED = 847; + ATOM_SERVER_AUCTION_KEY_FETCH_CALLED = 848; + ATOM_SERVER_AUCTION_BACKGROUND_KEY_FETCH_ENABLED = 849; + ATOM_AD_SERVICES_MEASUREMENT_PROCESS_ODP_REGISTRATION = 864; + ATOM_AD_SERVICES_MEASUREMENT_NOTIFY_REGISTRATION_TO_ODP = 865; + ATOM_SELECT_ADS_FROM_OUTCOMES_API_CALLED = 876; + ATOM_REPORT_IMPRESSION_API_CALLED = 877; + ATOM_AD_SERVICES_ENROLLMENT_TRANSACTION_STATS = 885; + ATOM_AD_SERVICES_COBALT_LOGGER_EVENT_REPORTED = 902; + ATOM_AD_SERVICES_COBALT_PERIODIC_JOB_EVENT_REPORTED = 903; + ATOM_UPDATE_SIGNALS_PROCESS_REPORTED = 905; + ATOM_TOPICS_SCHEDULE_EPOCH_JOB_SETTING_REPORTED = 930; + ATOM_AI_WALLPAPERS_BUTTON_PRESSED = 706; + ATOM_AI_WALLPAPERS_TEMPLATE_SELECTED = 707; + ATOM_AI_WALLPAPERS_TERM_SELECTED = 708; + ATOM_AI_WALLPAPERS_WALLPAPER_SET = 709; + ATOM_AI_WALLPAPERS_SESSION_SUMMARY = 710; + ATOM_APEX_INSTALLATION_REQUESTED = 732; + ATOM_APEX_INSTALLATION_STAGED = 733; + ATOM_APEX_INSTALLATION_ENDED = 734; + ATOM_APP_SEARCH_SET_SCHEMA_STATS_REPORTED = 385; + ATOM_APP_SEARCH_SCHEMA_MIGRATION_STATS_REPORTED = 579; + ATOM_APP_SEARCH_USAGE_SEARCH_INTENT_STATS_REPORTED = 825; + ATOM_APP_SEARCH_USAGE_SEARCH_INTENT_RAW_QUERY_STATS_REPORTED = 826; + ATOM_APP_SEARCH_APPS_INDEXER_STATS_REPORTED = 909; + ATOM_ART_DATUM_REPORTED = 332; + ATOM_ART_DEVICE_DATUM_REPORTED = 550; + ATOM_ART_DATUM_DELTA_REPORTED = 565; + ATOM_ART_DEX2OAT_REPORTED = 929; + ATOM_ART_DEVICE_STATUS = 10205; + ATOM_BACKGROUND_DEXOPT_JOB_ENDED = 467; + ATOM_PREREBOOT_DEXOPT_JOB_ENDED = 883; + ATOM_ODREFRESH_REPORTED = 366; + ATOM_ODSIGN_REPORTED = 548; + ATOM_AUTOFILL_UI_EVENT_REPORTED = 603; + ATOM_AUTOFILL_FILL_REQUEST_REPORTED = 604; + ATOM_AUTOFILL_FILL_RESPONSE_REPORTED = 605; + ATOM_AUTOFILL_SAVE_EVENT_REPORTED = 606; + ATOM_AUTOFILL_SESSION_COMMITTED = 607; + ATOM_AUTOFILL_FIELD_CLASSIFICATION_EVENT_REPORTED = 659; + ATOM_CAR_RECENTS_EVENT_REPORTED = 770; + ATOM_CAR_CALM_MODE_EVENT_REPORTED = 797; + ATOM_CAR_WAKEUP_FROM_SUSPEND_REPORTED = 852; + ATOM_PLUGIN_INITIALIZED = 655; + ATOM_BLUETOOTH_HASHED_DEVICE_NAME_REPORTED = 613; + ATOM_BLUETOOTH_L2CAP_COC_CLIENT_CONNECTION = 614; + ATOM_BLUETOOTH_L2CAP_COC_SERVER_CONNECTION = 615; + ATOM_BLUETOOTH_LE_SESSION_CONNECTED = 656; + ATOM_RESTRICTED_BLUETOOTH_DEVICE_NAME_REPORTED = 666; + ATOM_BLUETOOTH_PROFILE_CONNECTION_ATTEMPTED = 696; + ATOM_BLUETOOTH_CONTENT_PROFILE_ERROR_REPORTED = 781; + ATOM_BLUETOOTH_RFCOMM_CONNECTION_ATTEMPTED = 782; + ATOM_REMOTE_DEVICE_INFORMATION_WITH_METRIC_ID = 862; + ATOM_LE_APP_SCAN_STATE_CHANGED = 870; + ATOM_LE_RADIO_SCAN_STOPPED = 871; + ATOM_LE_SCAN_RESULT_RECEIVED = 872; + ATOM_LE_SCAN_ABUSED = 873; + ATOM_LE_ADV_STATE_CHANGED = 874; + ATOM_LE_ADV_ERROR_REPORTED = 875; + ATOM_A2DP_SESSION_REPORTED = 904; + ATOM_BLUETOOTH_CROSS_LAYER_EVENT_REPORTED = 916; + ATOM_BROADCAST_AUDIO_SESSION_REPORTED = 927; + ATOM_BROADCAST_AUDIO_SYNC_REPORTED = 928; + ATOM_BLUETOOTH_RFCOMM_CONNECTION_REPORTED_AT_CLOSE = 982; + ATOM_BLUETOOTH_LE_CONNECTION = 988; + ATOM_BROADCAST_SENT = 922; + ATOM_CAMERA_FEATURE_COMBINATION_QUERY_EVENT = 900; + ATOM_CERTIFICATE_TRANSPARENCY_LOG_LIST_STATE_CHANGED = 934; + ATOM_CERTIFICATE_TRANSPARENCY_LOG_LIST_UPDATE_FAILED = 972; + ATOM_DAILY_KEEPALIVE_INFO_REPORTED = 650; + ATOM_NETWORK_REQUEST_STATE_CHANGED = 779; + ATOM_TETHERING_ACTIVE_SESSIONS_REPORTED = 925; + ATOM_NETWORK_STATS_RECORDER_FILE_OPERATED = 783; + ATOM_CORE_NETWORKING_TERRIBLE_ERROR_OCCURRED = 979; + ATOM_APF_SESSION_INFO_REPORTED = 777; + ATOM_IP_CLIENT_RA_INFO_REPORTED = 778; + ATOM_VPN_CONNECTION_STATE_CHANGED = 850; + ATOM_VPN_CONNECTION_REPORTED = 851; + ATOM_CPU_POLICY = 10199; + ATOM_CREDENTIAL_MANAGER_API_CALLED = 585; + ATOM_CREDENTIAL_MANAGER_INIT_PHASE_REPORTED = 651; + ATOM_CREDENTIAL_MANAGER_CANDIDATE_PHASE_REPORTED = 652; + ATOM_CREDENTIAL_MANAGER_FINAL_PHASE_REPORTED = 653; + ATOM_CREDENTIAL_MANAGER_TOTAL_REPORTED = 667; + ATOM_CREDENTIAL_MANAGER_FINALNOUID_REPORTED = 668; + ATOM_CREDENTIAL_MANAGER_GET_REPORTED = 669; + ATOM_CREDENTIAL_MANAGER_AUTH_CLICK_REPORTED = 670; + ATOM_CREDENTIAL_MANAGER_APIV2_CALLED = 671; + ATOM_CRONET_ENGINE_CREATED = 703; + ATOM_CRONET_TRAFFIC_REPORTED = 704; + ATOM_CRONET_ENGINE_BUILDER_INITIALIZED = 762; + ATOM_CRONET_HTTP_FLAGS_INITIALIZED = 763; + ATOM_CRONET_INITIALIZED = 764; + ATOM_DESKTOP_MODE_UI_CHANGED = 818; + ATOM_DESKTOP_MODE_SESSION_TASK_UPDATE = 819; + ATOM_DESKTOP_MODE_TASK_SIZE_UPDATED = 935; + ATOM_DEVICE_LOCK_CHECK_IN_REQUEST_REPORTED = 726; + ATOM_DEVICE_LOCK_PROVISIONING_COMPLETE_REPORTED = 727; + ATOM_DEVICE_LOCK_KIOSK_APP_REQUEST_REPORTED = 728; + ATOM_DEVICE_LOCK_CHECK_IN_RETRY_REPORTED = 789; + ATOM_DEVICE_LOCK_PROVISION_FAILURE_REPORTED = 790; + ATOM_DEVICE_LOCK_LOCK_UNLOCK_DEVICE_FAILURE_REPORTED = 791; + ATOM_DEVICE_POLICY_MANAGEMENT_MODE = 10216; + ATOM_DEVICE_POLICY_STATE = 10217; + ATOM_DISPLAY_MODE_DIRECTOR_VOTE_CHANGED = 792; + ATOM_EXTERNAL_DISPLAY_STATE_CHANGED = 806; + ATOM_DND_STATE_CHANGED = 657; + ATOM_DREAM_SETTING_CHANGED = 705; + ATOM_DREAM_SETTING_SNAPSHOT = 10192; + ATOM_EXPRESS_EVENT_REPORTED = 528; + ATOM_EXPRESS_HISTOGRAM_SAMPLE_REPORTED = 593; + ATOM_EXPRESS_UID_EVENT_REPORTED = 644; + ATOM_EXPRESS_UID_HISTOGRAM_SAMPLE_REPORTED = 658; + ATOM_FEDERATED_COMPUTE_API_CALLED = 712; + ATOM_FEDERATED_COMPUTE_TRAINING_EVENT_REPORTED = 771; + ATOM_EXAMPLE_ITERATOR_NEXT_LATENCY_REPORTED = 838; + ATOM_FULL_SCREEN_INTENT_LAUNCHED = 631; + ATOM_BAL_ALLOWED = 632; + ATOM_IN_TASK_ACTIVITY_STARTED = 685; + ATOM_DEVICE_ORIENTATION_CHANGED = 906; + ATOM_CACHED_APPS_HIGH_WATERMARK = 10189; + ATOM_STYLUS_PREDICTION_METRICS_REPORTED = 718; + ATOM_USER_RISK_EVENT_REPORTED = 725; + ATOM_MEDIA_PROJECTION_STATE_CHANGED = 729; + ATOM_MEDIA_PROJECTION_TARGET_CHANGED = 730; + ATOM_EXCESSIVE_BINDER_PROXY_COUNT_REPORTED = 853; + ATOM_PROXY_BYTES_TRANSFER_BY_FG_BG = 10200; + ATOM_MOBILE_BYTES_TRANSFER_BY_PROC_STATE = 10204; + ATOM_BIOMETRIC_FRR_NOTIFICATION = 817; + ATOM_SENSITIVE_CONTENT_MEDIA_PROJECTION_SESSION = 830; + ATOM_SENSITIVE_NOTIFICATION_APP_PROTECTION_SESSION = 831; + ATOM_SENSITIVE_NOTIFICATION_APP_PROTECTION_APPLIED = 832; + ATOM_SENSITIVE_NOTIFICATION_REDACTION = 833; + ATOM_SENSITIVE_CONTENT_APP_PROTECTION = 835; + ATOM_APP_RESTRICTION_STATE_CHANGED = 866; + ATOM_BATTERY_USAGE_STATS_PER_UID = 10209; + ATOM_POSTGC_MEMORY_SNAPSHOT = 924; + ATOM_POWER_SAVE_TEMP_ALLOWLIST_CHANGED = 926; + ATOM_APP_OP_ACCESS_TRACKED = 931; + ATOM_CONTENT_OR_FILE_URI_EVENT_REPORTED = 933; + ATOM_APPLICATION_GRAMMATICAL_INFLECTION_CHANGED = 584; + ATOM_SYSTEM_GRAMMATICAL_INFLECTION_CHANGED = 816; + ATOM_BATTERY_HEALTH = 10220; + ATOM_HDMI_EARC_STATUS_REPORTED = 701; + ATOM_HDMI_SOUNDBAR_MODE_STATUS_REPORTED = 724; + ATOM_HEALTH_CONNECT_API_CALLED = 616; + ATOM_HEALTH_CONNECT_USAGE_STATS = 617; + ATOM_HEALTH_CONNECT_STORAGE_STATS = 618; + ATOM_HEALTH_CONNECT_API_INVOKED = 643; + ATOM_EXERCISE_ROUTE_API_CALLED = 654; + ATOM_HEALTH_CONNECT_EXPORT_INVOKED = 907; + ATOM_HEALTH_CONNECT_IMPORT_INVOKED = 918; + ATOM_HEALTH_CONNECT_EXPORT_IMPORT_STATS_REPORTED = 919; + ATOM_HEALTH_CONNECT_UI_IMPRESSION = 623; + ATOM_HEALTH_CONNECT_UI_INTERACTION = 624; + ATOM_HEALTH_CONNECT_APP_OPENED_REPORTED = 625; + ATOM_HOTWORD_EGRESS_SIZE_ATOM_REPORTED = 761; + ATOM_IKE_SESSION_TERMINATED = 678; + ATOM_IKE_LIVENESS_CHECK_SESSION_VALIDATED = 760; + ATOM_NEGOTIATED_SECURITY_ASSOCIATION = 821; + ATOM_KEYBOARD_CONFIGURED = 682; + ATOM_KEYBOARD_SYSTEMS_EVENT_REPORTED = 683; + ATOM_INPUTDEVICE_USAGE_REPORTED = 686; + ATOM_INPUT_EVENT_LATENCY_REPORTED = 932; + ATOM_TOUCHPAD_USAGE = 10191; + ATOM_KERNEL_OOM_KILL_OCCURRED = 754; + ATOM_EMERGENCY_STATE_CHANGED = 633; + ATOM_CHRE_SIGNIFICANT_MOTION_STATE_CHANGED = 868; + ATOM_POPULATION_DENSITY_PROVIDER_LOADING_REPORTED = 1002; + ATOM_DENSITY_BASED_COARSE_LOCATIONS_USAGE_REPORTED = 1003; + ATOM_DENSITY_BASED_COARSE_LOCATIONS_PROVIDER_QUERY_REPORTED = 1004; + ATOM_MEDIA_CODEC_RECLAIM_REQUEST_COMPLETED = 600; + ATOM_MEDIA_CODEC_STARTED = 641; + ATOM_MEDIA_CODEC_STOPPED = 642; + ATOM_MEDIA_CODEC_RENDERED = 684; + ATOM_MEDIA_EDITING_ENDED_REPORTED = 798; + ATOM_MTE_STATE = 10181; + ATOM_MICROXR_DEVICE_BOOT_COMPLETE_REPORTED = 901; + ATOM_NFC_OBSERVE_MODE_STATE_CHANGED = 855; + ATOM_NFC_FIELD_CHANGED = 856; + ATOM_NFC_POLLING_LOOP_NOTIFICATION_REPORTED = 857; + ATOM_NFC_PROPRIETARY_CAPABILITIES_REPORTED = 858; + ATOM_ONDEVICEPERSONALIZATION_API_CALLED = 711; + ATOM_COMPONENT_STATE_CHANGED_REPORTED = 863; + ATOM_PDF_LOAD_REPORTED = 859; + ATOM_PDF_API_USAGE_REPORTED = 860; + ATOM_PDF_SEARCH_REPORTED = 861; + ATOM_PRESSURE_STALL_INFORMATION = 10229; + ATOM_PERMISSION_RATIONALE_DIALOG_VIEWED = 645; + ATOM_PERMISSION_RATIONALE_DIALOG_ACTION_REPORTED = 646; + ATOM_APP_DATA_SHARING_UPDATES_NOTIFICATION_INTERACTION = 647; + ATOM_APP_DATA_SHARING_UPDATES_FRAGMENT_VIEWED = 648; + ATOM_APP_DATA_SHARING_UPDATES_FRAGMENT_ACTION_REPORTED = 649; + ATOM_ENHANCED_CONFIRMATION_DIALOG_RESULT_REPORTED = 827; + ATOM_ENHANCED_CONFIRMATION_RESTRICTION_CLEARED = 828; + ATOM_PHOTOPICKER_SESSION_INFO_REPORTED = 886; + ATOM_PHOTOPICKER_API_INFO_REPORTED = 887; + ATOM_PHOTOPICKER_UI_EVENT_LOGGED = 888; + ATOM_PHOTOPICKER_MEDIA_ITEM_STATUS_REPORTED = 889; + ATOM_PHOTOPICKER_PREVIEW_INFO_LOGGED = 890; + ATOM_PHOTOPICKER_MENU_INTERACTION_LOGGED = 891; + ATOM_PHOTOPICKER_BANNER_INTERACTION_LOGGED = 892; + ATOM_PHOTOPICKER_MEDIA_LIBRARY_INFO_LOGGED = 893; + ATOM_PHOTOPICKER_PAGE_INFO_LOGGED = 894; + ATOM_PHOTOPICKER_MEDIA_GRID_SYNC_INFO_REPORTED = 895; + ATOM_PHOTOPICKER_ALBUM_SYNC_INFO_REPORTED = 896; + ATOM_PHOTOPICKER_SEARCH_INFO_REPORTED = 897; + ATOM_SEARCH_DATA_EXTRACTION_DETAILS_REPORTED = 898; + ATOM_EMBEDDED_PHOTOPICKER_INFO_REPORTED = 899; + ATOM_ATOM_9999 = 9999; + ATOM_ATOM_99999 = 99999; + ATOM_SCREEN_OFF_REPORTED = 776; + ATOM_SCREEN_TIMEOUT_OVERRIDE_REPORTED = 836; + ATOM_SCREEN_INTERACTIVE_SESSION_REPORTED = 837; + ATOM_SCREEN_DIM_REPORTED = 867; + ATOM_MEDIA_PROVIDER_DATABASE_ROLLBACK_REPORTED = 784; + ATOM_BACKUP_SETUP_STATUS_REPORTED = 785; + ATOM_RANGING_SESSION_CONFIGURED = 993; + ATOM_RANGING_SESSION_STARTED = 994; + ATOM_RANGING_SESSION_CLOSED = 995; + ATOM_RANGING_TECHNOLOGY_STARTED = 996; + ATOM_RANGING_TECHNOLOGY_STOPPED = 997; + ATOM_RKPD_POOL_STATS = 664; + ATOM_RKPD_CLIENT_OPERATION = 665; + ATOM_SANDBOX_API_CALLED = 488; + ATOM_SANDBOX_ACTIVITY_EVENT_OCCURRED = 735; + ATOM_SDK_SANDBOX_RESTRICTED_ACCESS_IN_SESSION = 796; + ATOM_SANDBOX_SDK_STORAGE = 10159; + ATOM_SELINUX_AUDIT_LOG = 799; + ATOM_SETTINGS_SPA_REPORTED = 622; + ATOM_TEST_EXTENSION_ATOM_REPORTED = 660; + ATOM_TEST_RESTRICTED_ATOM_REPORTED = 672; + ATOM_STATS_SOCKET_LOSS_REPORTED = 752; + ATOM_LOCKSCREEN_SHORTCUT_SELECTED = 611; + ATOM_LOCKSCREEN_SHORTCUT_TRIGGERED = 612; + ATOM_LAUNCHER_IMPRESSION_EVENT_V2 = 716; + ATOM_DISPLAY_SWITCH_LATENCY_TRACKED = 753; + ATOM_NOTIFICATION_LISTENER_SERVICE = 829; + ATOM_NAV_HANDLE_TOUCH_POINTS = 869; + ATOM_COMMUNAL_HUB_WIDGET_EVENT_REPORTED = 908; + ATOM_COMMUNAL_HUB_SNAPSHOT = 10226; + ATOM_EMERGENCY_NUMBER_DIALED = 637; + ATOM_CALL_STATS = 10221; + ATOM_CALL_AUDIO_ROUTE_STATS = 10222; + ATOM_TELECOM_API_STATS = 10223; + ATOM_TELECOM_ERROR_STATS = 10224; + ATOM_CELLULAR_RADIO_POWER_STATE_CHANGED = 713; + ATOM_EMERGENCY_NUMBERS_INFO = 10180; + ATOM_DATA_NETWORK_VALIDATION = 10207; + ATOM_DATA_RAT_STATE_CHANGED = 854; + ATOM_CONNECTED_CHANNEL_CHANGED = 882; + ATOM_IWLAN_UNDERLYING_NETWORK_VALIDATION_RESULT_REPORTED = 923; + ATOM_QUALIFIED_RAT_LIST_CHANGED = 634; + ATOM_QNS_IMS_CALL_DROP_STATS = 635; + ATOM_QNS_FALLBACK_RESTRICTION_CHANGED = 636; + ATOM_QNS_RAT_PREFERENCE_MISMATCH_INFO = 10177; + ATOM_QNS_HANDOVER_TIME_MILLIS = 10178; + ATOM_QNS_HANDOVER_PINGPONG = 10179; + ATOM_SATELLITE_CONTROLLER = 10182; + ATOM_SATELLITE_SESSION = 10183; + ATOM_SATELLITE_INCOMING_DATAGRAM = 10184; + ATOM_SATELLITE_OUTGOING_DATAGRAM = 10185; + ATOM_SATELLITE_PROVISION = 10186; + ATOM_SATELLITE_SOS_MESSAGE_RECOMMENDER = 10187; + ATOM_CARRIER_ROAMING_SATELLITE_SESSION = 10211; + ATOM_CARRIER_ROAMING_SATELLITE_CONTROLLER_STATS = 10212; + ATOM_CONTROLLER_STATS_PER_PACKAGE = 10213; + ATOM_SATELLITE_ENTITLEMENT = 10214; + ATOM_SATELLITE_CONFIG_UPDATER = 10215; + ATOM_SATELLITE_ACCESS_CONTROLLER = 10219; + ATOM_CELLULAR_IDENTIFIER_DISCLOSED = 800; + ATOM_THREADNETWORK_TELEMETRY_DATA_REPORTED = 738; + ATOM_THREADNETWORK_TOPO_ENTRY_REPEATED = 739; + ATOM_THREADNETWORK_DEVICE_INFO_REPORTED = 740; + ATOM_BOOT_INTEGRITY_INFO_REPORTED = 775; + ATOM_TV_LOW_POWER_STANDBY_POLICY = 679; + ATOM_EXTERNAL_TV_INPUT_EVENT = 717; + ATOM_TEST_UPROBESTATS_ATOM_REPORTED = 915; + ATOM_UWB_ACTIVITY_INFO = 10188; + ATOM_MEDIATOR_UPDATED = 721; + ATOM_SYSPROXY_BLUETOOTH_BYTES_TRANSFER = 10196; + ATOM_SYSPROXY_CONNECTION_UPDATED = 786; + ATOM_WEAR_COMPANION_CONNECTION_STATE = 921; + ATOM_MEDIA_ACTION_REPORTED = 608; + ATOM_MEDIA_CONTROLS_LAUNCHED = 609; + ATOM_MEDIA_SESSION_STATE_CHANGED = 677; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_DEVICE_SCAN_API_LATENCY = 757; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_SASS_DEVICE_UNAVAILABLE = 758; + ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_FASTPAIR_API_TIMEOUT = 759; + ATOM_WEAR_MODE_STATE_CHANGED = 715; + ATOM_RENDERER_INITIALIZED = 736; + ATOM_SCHEMA_VERSION_RECEIVED = 737; + ATOM_LAYOUT_INSPECTED = 741; + ATOM_LAYOUT_EXPRESSION_INSPECTED = 742; + ATOM_LAYOUT_ANIMATIONS_INSPECTED = 743; + ATOM_MATERIAL_COMPONENTS_INSPECTED = 744; + ATOM_TILE_REQUESTED = 745; + ATOM_STATE_RESPONSE_RECEIVED = 746; + ATOM_TILE_RESPONSE_RECEIVED = 747; + ATOM_INFLATION_FINISHED = 748; + ATOM_INFLATION_FAILED = 749; + ATOM_IGNORED_INFLATION_FAILURES_REPORTED = 750; + ATOM_DRAWABLE_RENDERED = 751; + ATOM_WEAR_TIME_SYNC_REQUESTED = 911; + ATOM_WEAR_TIME_UPDATE_STARTED = 912; + ATOM_WEAR_TIME_SYNC_ATTEMPT_COMPLETED = 913; + ATOM_WEAR_TIME_CHANGED = 914; + ATOM_WEAR_ADAPTIVE_SUSPEND_STATS_REPORTED = 619; + ATOM_WEAR_POWER_ANOMALY_SERVICE_OPERATIONAL_STATS_REPORTED = 620; + ATOM_WEAR_POWER_ANOMALY_SERVICE_EVENT_STATS_REPORTED = 621; + ATOM_WS_WEAR_TIME_SESSION = 610; + ATOM_WS_INCOMING_CALL_ACTION_REPORTED = 626; + ATOM_WS_CALL_DISCONNECTION_REPORTED = 627; + ATOM_WS_CALL_DURATION_REPORTED = 628; + ATOM_WS_CALL_USER_EXPERIENCE_LATENCY_REPORTED = 629; + ATOM_WS_CALL_INTERACTION_REPORTED = 630; + ATOM_WS_ON_BODY_STATE_CHANGED = 787; + ATOM_WS_WATCH_FACE_RESTRICTED_COMPLICATIONS_IMPACTED = 802; + ATOM_WS_WATCH_FACE_DEFAULT_RESTRICTED_COMPLICATIONS_REMOVED = 803; + ATOM_WS_COMPLICATIONS_IMPACTED_NOTIFICATION_EVENT_REPORTED = 804; + ATOM_WS_REMOTE_EVENT_USAGE_REPORTED = 920; + ATOM_WS_BUGREPORT_REQUESTED = 936; + ATOM_WS_BUGREPORT_TRIGGERED = 937; + ATOM_WS_BUGREPORT_FINISHED = 938; + ATOM_WS_BUGREPORT_RESULT_RECEIVED = 939; + ATOM_WS_STANDALONE_MODE_SNAPSHOT = 10197; + ATOM_WS_FAVORITE_WATCH_FACE_SNAPSHOT = 10206; + ATOM_WS_PHOTOS_WATCH_FACE_FEATURE_SNAPSHOT = 10225; + ATOM_WS_WATCH_FACE_CUSTOMIZATION_SNAPSHOT = 10227; + ATOM_WEAR_POWER_MENU_OPENED = 731; + ATOM_WEAR_ASSISTANT_OPENED = 755; + ATOM_FIRST_OVERLAY_STATE_CHANGED = 917; + ATOM_WIFI_AWARE_NDP_REPORTED = 638; + ATOM_WIFI_AWARE_ATTACH_REPORTED = 639; + ATOM_WIFI_SELF_RECOVERY_TRIGGERED = 661; + ATOM_SOFT_AP_STARTED = 680; + ATOM_SOFT_AP_STOPPED = 681; + ATOM_WIFI_LOCK_RELEASED = 687; + ATOM_WIFI_LOCK_DEACTIVATED = 688; + ATOM_WIFI_CONFIG_SAVED = 689; + ATOM_WIFI_AWARE_RESOURCE_USING_CHANGED = 690; + ATOM_WIFI_AWARE_HAL_API_CALLED = 691; + ATOM_WIFI_LOCAL_ONLY_REQUEST_RECEIVED = 692; + ATOM_WIFI_LOCAL_ONLY_REQUEST_SCAN_TRIGGERED = 693; + ATOM_WIFI_THREAD_TASK_EXECUTED = 694; + ATOM_WIFI_STATE_CHANGED = 700; + ATOM_PNO_SCAN_STARTED = 719; + ATOM_PNO_SCAN_STOPPED = 720; + ATOM_WIFI_IS_UNUSABLE_REPORTED = 722; + ATOM_WIFI_AP_CAPABILITIES_REPORTED = 723; + ATOM_SOFT_AP_STATE_CHANGED = 805; + ATOM_SCORER_PREDICTION_RESULT_REPORTED = 884; + ATOM_WIFI_AWARE_CAPABILITIES = 10190; + ATOM_WIFI_MODULE_INFO = 10193; + ATOM_WIFI_SETTING_INFO = 10194; + ATOM_WIFI_COMPLEX_SETTING_INFO = 10195; + ATOM_WIFI_CONFIGURED_NETWORK_INFO = 10198; +} +// End of protos/perfetto/config/statsd/atom_ids.proto + +// Begin of protos/perfetto/config/statsd/statsd_tracing_config.proto + +// This file is named 'statsd_tracing_config.proto' rather than +// 'statsd_config.proto' (which would be more consistent with the other +// config protos) so it doesn't show up and confuse folks looking for +// the existing statsd_config.proto for configuring statsd itself. +// Same for the config proto itself. +message StatsdTracingConfig { + // This is for the common case of the atom id being known in the enum AtomId. + repeated AtomId push_atom_id = 1; + + // Escape hatch for Atom IDs that are not yet in the AtomId enum + // (e.g. non-upstream atoms that don't exist in AOSP). + repeated int32 raw_push_atom_id = 2; + repeated StatsdPullAtomConfig pull_config = 3; +} + +message StatsdPullAtomConfig { + repeated AtomId pull_atom_id = 1; + repeated int32 raw_pull_atom_id = 2; + + optional int32 pull_frequency_ms = 3; + repeated string packages = 4; +} + +// End of protos/perfetto/config/statsd/statsd_tracing_config.proto + +// Begin of protos/perfetto/common/sys_stats_counters.proto + +// When editing entries here remember also to update "sys_stats_counters.h" with +// the corresponding string definitions for the actual /proc files parser. + +// Counter definitions for Linux's /proc/meminfo. +enum MeminfoCounters { + MEMINFO_UNSPECIFIED = 0; + MEMINFO_MEM_TOTAL = 1; + MEMINFO_MEM_FREE = 2; + MEMINFO_MEM_AVAILABLE = 3; + MEMINFO_BUFFERS = 4; + MEMINFO_CACHED = 5; + MEMINFO_SWAP_CACHED = 6; + MEMINFO_ACTIVE = 7; + MEMINFO_INACTIVE = 8; + MEMINFO_ACTIVE_ANON = 9; + MEMINFO_INACTIVE_ANON = 10; + MEMINFO_ACTIVE_FILE = 11; + MEMINFO_INACTIVE_FILE = 12; + MEMINFO_UNEVICTABLE = 13; + MEMINFO_MLOCKED = 14; + MEMINFO_SWAP_TOTAL = 15; + MEMINFO_SWAP_FREE = 16; + MEMINFO_DIRTY = 17; + MEMINFO_WRITEBACK = 18; + MEMINFO_ANON_PAGES = 19; + MEMINFO_MAPPED = 20; + MEMINFO_SHMEM = 21; + MEMINFO_SLAB = 22; + MEMINFO_SLAB_RECLAIMABLE = 23; + MEMINFO_SLAB_UNRECLAIMABLE = 24; + MEMINFO_KERNEL_STACK = 25; + MEMINFO_PAGE_TABLES = 26; + MEMINFO_COMMIT_LIMIT = 27; + MEMINFO_COMMITED_AS = 28; + MEMINFO_VMALLOC_TOTAL = 29; + MEMINFO_VMALLOC_USED = 30; + MEMINFO_VMALLOC_CHUNK = 31; + MEMINFO_CMA_TOTAL = 32; + MEMINFO_CMA_FREE = 33; + MEMINFO_GPU = 34; + MEMINFO_ZRAM = 35; + MEMINFO_MISC = 36; + MEMINFO_ION_HEAP = 37; + MEMINFO_ION_HEAP_POOL = 38; +} + +// Counter definitions for Linux's /proc/vmstat. +enum VmstatCounters { + VMSTAT_UNSPECIFIED = 0; + VMSTAT_NR_FREE_PAGES = 1; + VMSTAT_NR_ALLOC_BATCH = 2; + VMSTAT_NR_INACTIVE_ANON = 3; + VMSTAT_NR_ACTIVE_ANON = 4; + VMSTAT_NR_INACTIVE_FILE = 5; + VMSTAT_NR_ACTIVE_FILE = 6; + VMSTAT_NR_UNEVICTABLE = 7; + VMSTAT_NR_MLOCK = 8; + VMSTAT_NR_ANON_PAGES = 9; + VMSTAT_NR_MAPPED = 10; + VMSTAT_NR_FILE_PAGES = 11; + VMSTAT_NR_DIRTY = 12; + VMSTAT_NR_WRITEBACK = 13; + VMSTAT_NR_SLAB_RECLAIMABLE = 14; + VMSTAT_NR_SLAB_UNRECLAIMABLE = 15; + VMSTAT_NR_PAGE_TABLE_PAGES = 16; + VMSTAT_NR_KERNEL_STACK = 17; + VMSTAT_NR_OVERHEAD = 18; + VMSTAT_NR_UNSTABLE = 19; + VMSTAT_NR_BOUNCE = 20; + VMSTAT_NR_VMSCAN_WRITE = 21; + VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM = 22; + VMSTAT_NR_WRITEBACK_TEMP = 23; + VMSTAT_NR_ISOLATED_ANON = 24; + VMSTAT_NR_ISOLATED_FILE = 25; + VMSTAT_NR_SHMEM = 26; + VMSTAT_NR_DIRTIED = 27; + VMSTAT_NR_WRITTEN = 28; + VMSTAT_NR_PAGES_SCANNED = 29; + VMSTAT_WORKINGSET_REFAULT = 30; + VMSTAT_WORKINGSET_ACTIVATE = 31; + VMSTAT_WORKINGSET_NODERECLAIM = 32; + VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES = 33; + VMSTAT_NR_FREE_CMA = 34; + VMSTAT_NR_SWAPCACHE = 35; + VMSTAT_NR_DIRTY_THRESHOLD = 36; + VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD = 37; + VMSTAT_PGPGIN = 38; + VMSTAT_PGPGOUT = 39; + VMSTAT_PGPGOUTCLEAN = 40; + VMSTAT_PSWPIN = 41; + VMSTAT_PSWPOUT = 42; + VMSTAT_PGALLOC_DMA = 43; + VMSTAT_PGALLOC_NORMAL = 44; + VMSTAT_PGALLOC_MOVABLE = 45; + VMSTAT_PGFREE = 46; + VMSTAT_PGACTIVATE = 47; + VMSTAT_PGDEACTIVATE = 48; + VMSTAT_PGFAULT = 49; + VMSTAT_PGMAJFAULT = 50; + VMSTAT_PGREFILL_DMA = 51; + VMSTAT_PGREFILL_NORMAL = 52; + VMSTAT_PGREFILL_MOVABLE = 53; + VMSTAT_PGSTEAL_KSWAPD_DMA = 54; + VMSTAT_PGSTEAL_KSWAPD_NORMAL = 55; + VMSTAT_PGSTEAL_KSWAPD_MOVABLE = 56; + VMSTAT_PGSTEAL_DIRECT_DMA = 57; + VMSTAT_PGSTEAL_DIRECT_NORMAL = 58; + VMSTAT_PGSTEAL_DIRECT_MOVABLE = 59; + VMSTAT_PGSCAN_KSWAPD_DMA = 60; + VMSTAT_PGSCAN_KSWAPD_NORMAL = 61; + VMSTAT_PGSCAN_KSWAPD_MOVABLE = 62; + VMSTAT_PGSCAN_DIRECT_DMA = 63; + VMSTAT_PGSCAN_DIRECT_NORMAL = 64; + VMSTAT_PGSCAN_DIRECT_MOVABLE = 65; + VMSTAT_PGSCAN_DIRECT_THROTTLE = 66; + VMSTAT_PGINODESTEAL = 67; + VMSTAT_SLABS_SCANNED = 68; + VMSTAT_KSWAPD_INODESTEAL = 69; + VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY = 70; + VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY = 71; + VMSTAT_PAGEOUTRUN = 72; + VMSTAT_ALLOCSTALL = 73; + VMSTAT_PGROTATED = 74; + VMSTAT_DROP_PAGECACHE = 75; + VMSTAT_DROP_SLAB = 76; + VMSTAT_PGMIGRATE_SUCCESS = 77; + VMSTAT_PGMIGRATE_FAIL = 78; + VMSTAT_COMPACT_MIGRATE_SCANNED = 79; + VMSTAT_COMPACT_FREE_SCANNED = 80; + VMSTAT_COMPACT_ISOLATED = 81; + VMSTAT_COMPACT_STALL = 82; + VMSTAT_COMPACT_FAIL = 83; + VMSTAT_COMPACT_SUCCESS = 84; + VMSTAT_COMPACT_DAEMON_WAKE = 85; + VMSTAT_UNEVICTABLE_PGS_CULLED = 86; + VMSTAT_UNEVICTABLE_PGS_SCANNED = 87; + VMSTAT_UNEVICTABLE_PGS_RESCUED = 88; + VMSTAT_UNEVICTABLE_PGS_MLOCKED = 89; + VMSTAT_UNEVICTABLE_PGS_MUNLOCKED = 90; + VMSTAT_UNEVICTABLE_PGS_CLEARED = 91; + VMSTAT_UNEVICTABLE_PGS_STRANDED = 92; + VMSTAT_NR_ZSPAGES = 93; + VMSTAT_NR_ION_HEAP = 94; + VMSTAT_NR_GPU_HEAP = 95; + VMSTAT_ALLOCSTALL_DMA = 96; + VMSTAT_ALLOCSTALL_MOVABLE = 97; + VMSTAT_ALLOCSTALL_NORMAL = 98; + VMSTAT_COMPACT_DAEMON_FREE_SCANNED = 99; + VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED = 100; + VMSTAT_NR_FASTRPC = 101; + VMSTAT_NR_INDIRECTLY_RECLAIMABLE = 102; + VMSTAT_NR_ION_HEAP_POOL = 103; + VMSTAT_NR_KERNEL_MISC_RECLAIMABLE = 104; + VMSTAT_NR_SHADOW_CALL_STACK_BYTES = 105; + VMSTAT_NR_SHMEM_HUGEPAGES = 106; + VMSTAT_NR_SHMEM_PMDMAPPED = 107; + VMSTAT_NR_UNRECLAIMABLE_PAGES = 108; + VMSTAT_NR_ZONE_ACTIVE_ANON = 109; + VMSTAT_NR_ZONE_ACTIVE_FILE = 110; + VMSTAT_NR_ZONE_INACTIVE_ANON = 111; + VMSTAT_NR_ZONE_INACTIVE_FILE = 112; + VMSTAT_NR_ZONE_UNEVICTABLE = 113; + VMSTAT_NR_ZONE_WRITE_PENDING = 114; + VMSTAT_OOM_KILL = 115; + VMSTAT_PGLAZYFREE = 116; + VMSTAT_PGLAZYFREED = 117; + VMSTAT_PGREFILL = 118; + VMSTAT_PGSCAN_DIRECT = 119; + VMSTAT_PGSCAN_KSWAPD = 120; + VMSTAT_PGSKIP_DMA = 121; + VMSTAT_PGSKIP_MOVABLE = 122; + VMSTAT_PGSKIP_NORMAL = 123; + VMSTAT_PGSTEAL_DIRECT = 124; + VMSTAT_PGSTEAL_KSWAPD = 125; + VMSTAT_SWAP_RA = 126; + VMSTAT_SWAP_RA_HIT = 127; + VMSTAT_WORKINGSET_RESTORE = 128; + VMSTAT_ALLOCSTALL_DEVICE = 129; + VMSTAT_ALLOCSTALL_DMA32 = 130; + VMSTAT_BALLOON_DEFLATE = 131; + VMSTAT_BALLOON_INFLATE = 132; + VMSTAT_BALLOON_MIGRATE = 133; + VMSTAT_CMA_ALLOC_FAIL = 134; + VMSTAT_CMA_ALLOC_SUCCESS = 135; + VMSTAT_NR_FILE_HUGEPAGES = 136; + VMSTAT_NR_FILE_PMDMAPPED = 137; + VMSTAT_NR_FOLL_PIN_ACQUIRED = 138; + VMSTAT_NR_FOLL_PIN_RELEASED = 139; + VMSTAT_NR_SEC_PAGE_TABLE_PAGES = 140; + VMSTAT_NR_SHADOW_CALL_STACK = 141; + VMSTAT_NR_SWAPCACHED = 142; + VMSTAT_NR_THROTTLED_WRITTEN = 143; + VMSTAT_PGALLOC_DEVICE = 144; + VMSTAT_PGALLOC_DMA32 = 145; + VMSTAT_PGDEMOTE_DIRECT = 146; + VMSTAT_PGDEMOTE_KSWAPD = 147; + VMSTAT_PGREUSE = 148; + VMSTAT_PGSCAN_ANON = 149; + VMSTAT_PGSCAN_FILE = 150; + VMSTAT_PGSKIP_DEVICE = 151; + VMSTAT_PGSKIP_DMA32 = 152; + VMSTAT_PGSTEAL_ANON = 153; + VMSTAT_PGSTEAL_FILE = 154; + VMSTAT_THP_COLLAPSE_ALLOC = 155; + VMSTAT_THP_COLLAPSE_ALLOC_FAILED = 156; + VMSTAT_THP_DEFERRED_SPLIT_PAGE = 157; + VMSTAT_THP_FAULT_ALLOC = 158; + VMSTAT_THP_FAULT_FALLBACK = 159; + VMSTAT_THP_FAULT_FALLBACK_CHARGE = 160; + VMSTAT_THP_FILE_ALLOC = 161; + VMSTAT_THP_FILE_FALLBACK = 162; + VMSTAT_THP_FILE_FALLBACK_CHARGE = 163; + VMSTAT_THP_FILE_MAPPED = 164; + VMSTAT_THP_MIGRATION_FAIL = 165; + VMSTAT_THP_MIGRATION_SPLIT = 166; + VMSTAT_THP_MIGRATION_SUCCESS = 167; + VMSTAT_THP_SCAN_EXCEED_NONE_PTE = 168; + VMSTAT_THP_SCAN_EXCEED_SHARE_PTE = 169; + VMSTAT_THP_SCAN_EXCEED_SWAP_PTE = 170; + VMSTAT_THP_SPLIT_PAGE = 171; + VMSTAT_THP_SPLIT_PAGE_FAILED = 172; + VMSTAT_THP_SPLIT_PMD = 173; + VMSTAT_THP_SWPOUT = 174; + VMSTAT_THP_SWPOUT_FALLBACK = 175; + VMSTAT_THP_ZERO_PAGE_ALLOC = 176; + VMSTAT_THP_ZERO_PAGE_ALLOC_FAILED = 177; + VMSTAT_VMA_LOCK_ABORT = 178; + VMSTAT_VMA_LOCK_MISS = 179; + VMSTAT_VMA_LOCK_RETRY = 180; + VMSTAT_VMA_LOCK_SUCCESS = 181; + VMSTAT_WORKINGSET_ACTIVATE_ANON = 182; + VMSTAT_WORKINGSET_ACTIVATE_FILE = 183; + VMSTAT_WORKINGSET_NODES = 184; + VMSTAT_WORKINGSET_REFAULT_ANON = 185; + VMSTAT_WORKINGSET_REFAULT_FILE = 186; + VMSTAT_WORKINGSET_RESTORE_ANON = 187; + VMSTAT_WORKINGSET_RESTORE_FILE = 188; +} + +// End of protos/perfetto/common/sys_stats_counters.proto + +// Begin of protos/perfetto/config/sys_stats/sys_stats_config.proto + +// This file defines the configuration for the Linux /proc poller data source, +// which injects counters in the trace. +// Counters that are needed in the trace must be explicitly listed in the +// *_counters fields. This is to avoid spamming the trace with all counters +// at all times. +// The sampling rate is configurable. All polling rates (*_period_ms) need +// to be integer multiples of each other. +// OK: [10ms, 10ms, 10ms], [10ms, 20ms, 10ms], [10ms, 20ms, 60ms] +// Not OK: [10ms, 10ms, 11ms], [10ms, 15ms, 20ms] +message SysStatsConfig { + // Polls /proc/meminfo every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + // Cost: 0.3 ms [read] + 0.07 ms [parse + trace injection] + optional uint32 meminfo_period_ms = 1; + + // If empty all known counters are reported. Otherwise, only the counters + // specified below are reported. + repeated MeminfoCounters meminfo_counters = 2; + + // Polls /proc/vmstat every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + // Cost: 0.2 ms [read] + 0.3 ms [parse + trace injection] + optional uint32 vmstat_period_ms = 3; + repeated VmstatCounters vmstat_counters = 4; + + // Pols /proc/stat every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + // Cost: 4.1 ms [read] + 1.9 ms [parse + trace injection] + optional uint32 stat_period_ms = 5; + enum StatCounters { + STAT_UNSPECIFIED = 0; + STAT_CPU_TIMES = 1; + STAT_IRQ_COUNTS = 2; + STAT_SOFTIRQ_COUNTS = 3; + STAT_FORK_COUNT = 4; + } + repeated StatCounters stat_counters = 6; + + // Polls /sys/devfreq/*/curfreq every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + // This option can be used to record unchanging values. + // Updates from frequency changes can come from ftrace/set_clock_rate. + optional uint32 devfreq_period_ms = 7; + + // Polls /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq every X ms. + // This is required to be > 10ms to avoid excessive CPU usage. + optional uint32 cpufreq_period_ms = 8; + + // Polls /proc/buddyinfo every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + optional uint32 buddyinfo_period_ms = 9; + + // Polls /proc/diskstats every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + optional uint32 diskstat_period_ms = 10; + + // Polls /proc/pressure/* every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + optional uint32 psi_period_ms = 11; + + // Polls /sys/class/thermal/* every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + optional uint32 thermal_period_ms = 12; + + // Polls /sys/devices/system/cpu/cpu*/cpuidle/state* every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + optional uint32 cpuidle_period_ms = 13; + + // Polls device-specific GPU frequency info every X ms, if non-zero. + // This is required to be > 10ms to avoid excessive CPU usage. + optional uint32 gpufreq_period_ms = 14; +} + +// End of protos/perfetto/config/sys_stats/sys_stats_config.proto + +// Begin of protos/perfetto/config/system_info/system_info_config.proto + +// This data-source does a one-off recording of system information when +// the trace starts. +// Currently this includes: +// - Values of +// /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies This +// datasource has no configuration options at present. +message SystemInfoConfig {} + +// End of protos/perfetto/config/system_info/system_info_config.proto + +// Begin of protos/perfetto/config/test_config.proto + +// The configuration for a fake producer used in tests. +message TestConfig { + message DummyFields { + optional uint32 field_uint32 = 1; + optional int32 field_int32 = 2; + optional uint64 field_uint64 = 3; + optional int64 field_int64 = 4; + optional fixed64 field_fixed64 = 5; + optional sfixed64 field_sfixed64 = 6; + optional fixed32 field_fixed32 = 7; + optional sfixed32 field_sfixed32 = 8; + optional double field_double = 9; + optional float field_float = 10; + optional sint64 field_sint64 = 11; + optional sint32 field_sint32 = 12; + optional string field_string = 13; + optional bytes field_bytes = 14; + } + + // The number of messages the fake producer should send. + optional uint32 message_count = 1; + + // The maximum number of messages which should be sent each second. + // The actual obserced speed may be lower if the producer is unable to + // work fast enough. + // If this is zero or unset, the producer will send as fast as possible. + optional uint32 max_messages_per_second = 2; + + // The seed value for a simple multiplicative congruential pseudo-random + // number sequence. + optional uint32 seed = 3; + + // The size of each message in bytes. Should be greater than or equal 5 to + // account for the number of bytes needed to encode the random number and a + // null byte for the string. + optional uint32 message_size = 4; + + // Whether the producer should send a event batch when the data source is + // is initially registered. + optional bool send_batch_on_register = 5; + + optional DummyFields dummy_fields = 6; +} + +// End of protos/perfetto/config/test_config.proto + +// Begin of protos/perfetto/config/track_event/track_event_config.proto + +message TrackEventConfig { + // The following fields define the set of enabled trace categories. Each list + // item is a glob. + // + // To determine if category is enabled, it is checked against the filters in + // the following order: + // + // 1. Exact matches in enabled categories. + // 2. Exact matches in enabled tags. + // 3. Exact matches in disabled categories. + // 4. Exact matches in disabled tags. + // 5. Pattern matches in enabled categories. + // 6. Pattern matches in enabled tags. + // 7. Pattern matches in disabled categories. + // 8. Pattern matches in disabled tags. + // + // If none of the steps produced a match: + // - In the C++ SDK (`perfetto::Category`), categories are enabled by + // default. + // - In the C SDK (`PerfettoTeCategory`), categories are disabled by default. + // + // Examples: + // + // - To enable all non-slow/debug categories: + // + // enabled_categories: "*" + // + // - To enable specific categories: + // + // disabled_categories: "*" + // enabled_categories: "my_category" + // enabled_categories: "my_category2" + // + // - To enable only categories with a specific tag: + // + // disabled_tags: "*" + // enabled_tags: "my_tag" + // + + // Default: [] + repeated string disabled_categories = 1; + + // Default: [] + repeated string enabled_categories = 2; + + // Default: ["slow", "debug"] + repeated string disabled_tags = 3; + + // Default: [] + repeated string enabled_tags = 4; + + // Default: false (i.e. enabled by default) + optional bool disable_incremental_timestamps = 5; + + // Allows to specify a custom unit different than the default (ns). + // Also affects thread timestamps if enable_thread_time_sampling = true. + // A multiplier of 1000 means that a timestamp = 3 should be interpreted as + // 3000 ns = 3 us. + // Default: 1 (if unset, it should be read as 1). + optional uint64 timestamp_unit_multiplier = 6; + + // Default: false (i.e. debug_annotations is NOT filtered out by default) + // When true, any debug annotations provided as arguments to the + // TRACE_EVENT macros are not written into the trace. Typed arguments will + // still be emitted even if set to true. + optional bool filter_debug_annotations = 7; + + // Default: false (i.e. disabled) + // When true, the SDK samples and emits the current thread time counter value + // for each event on the current thread's track. This value represents the + // total CPU time consumed by that thread since its creation. + // Learn more: "CLOCK_THREAD_CPUTIME_ID" flag at + // https://man7.org/linux/man-pages/man3/clock_gettime.3.html + optional bool enable_thread_time_sampling = 8; + + // When enable_thread_time_sampling is true, and this is specified, thread + // time is sampled only if the elapsed wall time > + // `thread_time_subsampling_ns`. Otherwise, thread time is considered nil. + // Effectively, this means thread time will have a leeway of + // `thread_time_subsampling_ns` and won't be emitted for shorter events. + optional uint64 thread_time_subsampling_ns = 10; + + // Default: false (i.e. dynamic event names are NOT filtered out by default) + // When true, event_names wrapped in perfetto::DynamicString will be filtered + // out. + optional bool filter_dynamic_event_names = 9; +} + +// End of protos/perfetto/config/track_event/track_event_config.proto + +// Begin of protos/perfetto/config/data_source_config.proto + +// The configuration that is passed to each data source when starting tracing. +// Next id: 138 +message DataSourceConfig { + enum SessionInitiator { + SESSION_INITIATOR_UNSPECIFIED = 0; + // This trace was initiated from a trusted system app has DUMP and + // USAGE_STATS permission. This system app is expected to not expose the + // trace to the user of the device. + // This is determined by checking the UID initiating the trace. + SESSION_INITIATOR_TRUSTED_SYSTEM = 1; + }; + // Data source unique name, e.g., "linux.ftrace". This must match + // the name passed by the data source when it registers (see + // RegisterDataSource()). + optional string name = 1; + + // The index of the logging buffer where TracePacket(s) will be stored. + // This field doesn't make a major difference for the Producer(s). The final + // logging buffers, in fact, are completely owned by the Service. We just ask + // the Producer to copy this number into the chunk headers it emits, so that + // the Service can quickly identify the buffer where to move the chunks into + // without expensive lookups on its fastpath. + optional uint32 target_buffer = 2; + + // Set by the service to indicate the duration of the trace. + // DO NOT SET in consumer as this will be overridden by the service. + optional uint32 trace_duration_ms = 3; + + // If true, |trace_duration_ms| should count also time in suspend. This + // is propagated from TraceConfig.prefer_suspend_clock_for_duration. + optional bool prefer_suspend_clock_for_duration = 122; + + // Set by the service to indicate how long it waits after StopDataSource. + // DO NOT SET in consumer as this will be overridden by the service. + optional uint32 stop_timeout_ms = 7; + + // Set by the service to indicate whether this tracing session has extra + // guardrails. + // DO NOT SET in consumer as this will be overridden by the service. + optional bool enable_extra_guardrails = 6; + + // Set by the service to indicate which user initiated this trace. + // DO NOT SET in consumer as this will be overridden by the service. + optional SessionInitiator session_initiator = 8; + + // Set by the service to indicate which tracing session the data source + // belongs to. The intended use case for this is checking if two data sources, + // one of which produces metadata for the other one, belong to the same trace + // session and hence should be linked together. + // This field was introduced in Aug 2018 after Android P. + // DO NOT SET in consumer as this will be overridden by the service. + optional uint64 tracing_session_id = 4; + + enum BufferExhaustedPolicy { + // The data source will use its default buffer exhausted policy, specified + // by the code when the data source is registered. + BUFFER_EXHAUSTED_UNSPECIFIED = 0; + // The data source will drop packets when there's no space in the shared + // memory buffer. + BUFFER_EXHAUSTED_DROP = 1; + // The data source will wait when there's no space in the shared memory + // buffer. If there's still not space, after a few seconds, the whole + // producer process will be aborted. + BUFFER_EXHAUSTED_STALL_THEN_ABORT = 2; + // The data source will wait when there's no space in the shared memory + // buffer. If there's still not space, after a few seconds, the data source + // will drop packets. + BUFFER_EXHAUSTED_STALL_THEN_DROP = 3; + }; + // How to behave when the producer runs out of space in the shared memory + // buffer. This is only honored by some data sources (in the SDK, the data + // sources registered with a configurable buffer exhausted policy). + optional BufferExhaustedPolicy buffer_exhausted_policy = 9; + + optional PriorityBoostConfig priority_boost = 10; + + // Keep the lower IDs (up to 99) for fields that are *not* specific to + // data-sources and needs to be processed by the traced daemon. + + // All data source config fields must be marked as [lazy=true]. This prevents + // the proto-to-cpp generator from recursing into those when generating the + // cpp classes and polluting tracing/core with data-source-specific classes. + // Instead they are treated as opaque strings containing raw proto bytes. + + // Data source name: linux.ftrace + optional FtraceConfig ftrace_config = 100 [lazy = true]; + // Data source name: linux.inode_file_map + optional InodeFileConfig inode_file_config = 102 [lazy = true]; + // Data source name: linux.process_stats + optional ProcessStatsConfig process_stats_config = 103 [lazy = true]; + // Data source name: linux.sys_stats + optional SysStatsConfig sys_stats_config = 104 [lazy = true]; + // Data source name: android.heapprofd + // Introduced in Android 10. + optional HeapprofdConfig heapprofd_config = 105 [lazy = true]; + // Data source name: android.java_hprof + // Introduced in Android 11. + // COMMENTED optional JavaHprofConfig java_hprof_config = 110 [lazy = true]; + // Data source name: android.power + optional AndroidPowerConfig android_power_config = 106 [lazy = true]; + // Data source name: android.log + optional AndroidLogConfig android_log_config = 107 [lazy = true]; + // Data source name: gpu.counters + optional GpuCounterConfig gpu_counter_config = 108 [lazy = true]; + // Data source name: android.game_interventions + optional AndroidGameInterventionListConfig + android_game_intervention_list_config = 116 [lazy = true]; + // Data source name: android.packages_list + optional PackagesListConfig packages_list_config = 109 [lazy = true]; + // Data source name: linux.perf + // COMMENTED optional PerfEventConfig perf_event_config = 111 [lazy = true]; + // Data source name: vulkan.memory_tracker + optional VulkanMemoryConfig vulkan_memory_config = 112 [lazy = true]; + // Data source name: track_event + optional TrackEventConfig track_event_config = 113 [lazy = true]; + // Data source name: android.polled_state + optional AndroidPolledStateConfig android_polled_state_config = 114 + [lazy = true]; + // Data source name: android.system_property + optional AndroidSystemPropertyConfig android_system_property_config = 118 + [lazy = true]; + // Data source name: android.statsd + optional StatsdTracingConfig statsd_tracing_config = 117 [lazy = true]; + // Data source name: linux.system_info + optional SystemInfoConfig system_info_config = 119; + // Data source name: linux.frozen_ftrace + optional FrozenFtraceConfig frozen_ftrace_config = 136 [lazy = true]; + + // Chrome is special as it doesn't use the perfetto IPC layer. We want to + // avoid proto serialization and de-serialization there because that would + // just add extra hops on top of the Mojo ser/des. Instead we auto-generate a + // C++ class for it so it can pass around plain C++ objets. + optional ChromeConfig chrome_config = 101; + + // Data source name: code.v8.dev + optional V8Config v8_config = 127 [lazy = true]; + + // If an interceptor is specified here, packets for this data source will be + // rerouted to the interceptor instead of the main trace buffer. This can be + // used, for example, to write trace data into ETW or for logging trace points + // to the console. + // + // Note that interceptors are only supported by data sources registered + // through the Perfetto SDK API. Data sources that don't use that API (e.g., + // traced_probes) may not support interception. + optional InterceptorConfig interceptor_config = 115; + + // Data source name: android.network_packets. + // Introduced in Android 14 (U). + optional NetworkPacketTraceConfig network_packet_trace_config = 120 + [lazy = true]; + + // Data source name: android.surfaceflinger.layers + optional SurfaceFlingerLayersConfig surfaceflinger_layers_config = 121 + [lazy = true]; + + // Data source name: android.surfaceflinger.transactions + optional SurfaceFlingerTransactionsConfig surfaceflinger_transactions_config = + 123 [lazy = true]; + + // Data source name: android.sdk_sysprop_guard + // Introduced in Android 14 (U) QPR1. + optional AndroidSdkSyspropGuardConfig android_sdk_sysprop_guard_config = 124 + [lazy = true]; + + // Data source name: windows.etw + optional EtwConfig etw_config = 125 [lazy = true]; + + // Data source name: android.protolog + optional ProtoLogConfig protolog_config = 126 [lazy = true]; + + // Data source name: android.input.inputevent + optional AndroidInputEventConfig android_input_event_config = 128 + [lazy = true]; + + // Data source name: android.pixel.modem + optional PixelModemConfig pixel_modem_config = 129 [lazy = true]; + + // Data source name: android.windowmanager + optional WindowManagerConfig windowmanager_config = 130 [lazy = true]; + + // Data source name: org.chromium.system_metrics + optional ChromiumSystemMetricsConfig chromium_system_metrics = 131 + [lazy = true]; + + // Data source name: android.kernel_wakelocks + optional KernelWakelocksConfig kernel_wakelocks_config = 132 [lazy = true]; + + // Data source name: gpu.renderstages + optional GpuRenderStagesConfig gpu_renderstages_config = 133 [lazy = true]; + + // Data source name: org.chromium.histogram_samples + optional ChromiumHistogramSamplesConfig chromium_histogram_samples = 134 + [lazy = true]; + + // Data source name: android.app_wakelocks + optional AppWakelocksConfig app_wakelocks_config = 135 [lazy = true]; + + // Data source name: android.cpu_per_uid + optional CpuPerUidConfig cpu_per_uid_config = 137 [lazy = true]; + + // This is a fallback mechanism to send a free-form text config to the + // producer. In theory this should never be needed. All the code that + // is part of the platform (i.e. traced service) is supposed to *not* truncate + // the trace config proto and propagate unknown fields. However, if anything + // in the pipeline (client or backend) ends up breaking this forward compat + // plan, this field will become the escape hatch to allow future data sources + // to get some meaningful configuration. + optional string legacy_config = 1000; + + // This field is only used for testing. + optional TestConfig for_testing = 1001; + + // Was |for_testing|. Caused more problems then found. + reserved 268435455; +} + +// End of protos/perfetto/config/data_source_config.proto + +// Begin of protos/perfetto/config/trace_config.proto + +// The overall config that is used when starting a new tracing session through +// ProducerPort::StartTracing(). +// It contains the general config for the logging buffer(s) and the configs for +// all the data source being enabled. +// +// Next id: 43. +message TraceConfig { + message BufferConfig { + optional uint32 size_kb = 1; + + // |page_size|, now deprecated. + reserved 2; + + // |optimize_for|, now deprecated. + reserved 3; + + enum FillPolicy { + UNSPECIFIED = 0; + + // Default behavior. The buffer operates as a conventional ring buffer. + // If the writer is faster than the reader (or if the reader reads only + // after tracing is stopped) newly written packets will overwrite old + // packets. + RING_BUFFER = 1; + + // Behaves like RING_BUFFER as long as there is space in the buffer or + // the reader catches up with the writer. As soon as the writer hits + // an unread chunk, it stops accepting new data in the buffer. + DISCARD = 2; + } + optional FillPolicy fill_policy = 4; + + // When true the buffer is moved (rather than copied) onto the cloned + // session, and an empty buffer of the same size is allocated in the source + // tracing session. This feature will likely get deprecated in the future. + // It been introduced mainly to support the surfaceflinger snapshot dump + // for bugreports, where SF can dumps O(400MB) into the bugreport trace. In + // that case we don't want to retain another in-memory copy of the buffer. + optional bool transfer_on_clone = 5; + + // Used in conjunction with transfer_on_clone. When true the buffer is + // cleared before issuing the Flush(reason=kTraceClone). This is to ensure + // that if the data source took too long to write the data in a previous + // clone-related flush, we don't end up with a mixture of leftovers from + // the previous write and new data. + optional bool clear_before_clone = 6; + } + repeated BufferConfig buffers = 1; + + message DataSource { + // Filters and data-source specific config. It contains also the unique name + // of the data source, the one passed in the DataSourceDescriptor when they + // register on the service. + optional protos.DataSourceConfig config = 1; + + // Optional. If multiple producers (~processes) expose the same data source + // and either |producer_name_filter| or |producer_name_regex_filter| is set, + // the data source is enabled only for producers whose names match any of + // the filters. + // |producer_name_filter| has to be an exact match, while + // |producer_name_regex_filter| is a regular expression. + // This allows to enable a data source only for specific processes. + // The "repeated" fields have OR semantics: specifying a filter ["foo", + // "bar"] will enable data sources on both "foo" and "bar" (if they exist). + repeated string producer_name_filter = 2; + repeated string producer_name_regex_filter = 3; + + // Filter by machine names. The name of a machine is determined by the + // PERFETTO_MACHINE_NAME env variable. In Android systems, if the env + // variable is not set then the + // persist.traced_relay.machine_name system property is used. If the + // sysprop isn't set or not in an Android system, then the machine name by + // default is set to the utsname sysname (e.g. Linux), which can be obtained + // via the 'uname -s' command. As a convenience, one can use "host" to refer + // to the host machine, which is the machine running traced. + repeated string machine_name_filter = 4; + } + repeated DataSource data_sources = 2; + + // Config for disabling builtin data sources in the tracing service. + message BuiltinDataSource { + // Disable emitting clock timestamps into the trace. + optional bool disable_clock_snapshotting = 1; + + // Disable echoing the original trace config in the trace. + optional bool disable_trace_config = 2; + + // Disable emitting system info (build fingerprint, cpuinfo, etc). + optional bool disable_system_info = 3; + + // Disable emitting events for data-source state changes (e.g. the marker + // for all data sources having ACKed the start of the trace). + optional bool disable_service_events = 4; + + // The authoritative clock domain for the trace. Defaults to BOOTTIME. See + // also ClockSnapshot's primary_trace_clock. The configured value is written + // into the trace as part of the ClockSnapshots emitted by the service. + // Trace processor will attempt to translate packet/event timestamps from + // various data sources (and their chosen clock domains) to this domain + // during import. Added in Android R. + optional BuiltinClock primary_trace_clock = 5; + + // Time interval in between snapshotting of sync markers, clock snapshots, + // stats, and other periodic service-emitted events. Note that the service + // only keeps track of the first and the most recent snapshot until + // ReadBuffers() is called. + optional uint32 snapshot_interval_ms = 6; + + // Hints to the service that a suspend-aware (i.e. counting time in suspend) + // clock should be used for periodic snapshots of service-emitted events. + // This means, if a snapshot *should* have happened during suspend, it will + // happen immediately after the device resumes. + // + // Choosing a clock like this is done on best-effort basis; not all + // platforms (e.g. Windows) expose a clock which can be used for periodic + // tasks counting suspend. If such a clock is not available, the service + // falls back to the best-available alternative. + // + // Introduced in Android S. + // TODO(lalitm): deprecate this in T and make this the default if nothing + // crashes in S. + optional bool prefer_suspend_clock_for_snapshot = 7; + + // Disables the reporting of per-trace-writer histograms in TraceStats. + optional bool disable_chunk_usage_histograms = 8; + } + optional BuiltinDataSource builtin_data_sources = 20; + + // If specified, the trace will be stopped |duration_ms| after starting. + // This does *not* count the time the system is suspended, so we will run + // for duration_ms of system activity, not wall time. + // + // However in case of traces with triggers, see + // TriggerConfig.trigger_timeout_ms instead. + optional uint32 duration_ms = 3; + + // If true, tries to use CLOCK_BOOTTIME for duration_ms rather than + // CLOCK_MONOTONIC (which doesn't count time in suspend). Supported only on + // Linux/Android, no-op on other platforms. This is used when dealing with + // long (e.g. 24h) traces, where suspend can inflate them to weeks of + // wall-time, making them more likely to hit device reboots (and hence loss). + // This option also changes consistently the semantic of + // TriggerConfig.stop_delay_ms. + optional bool prefer_suspend_clock_for_duration = 36; + + // This is set when --dropbox is passed to the Perfetto command line client + // and enables guardrails that limit resource usage for traces requested + // by statsd. + optional bool enable_extra_guardrails = 4; + + enum LockdownModeOperation { + LOCKDOWN_UNCHANGED = 0; + LOCKDOWN_CLEAR = 1; + LOCKDOWN_SET = 2; + } + // Reject producers that are not running under the same UID as the tracing + // service. + optional LockdownModeOperation lockdown_mode = 5; + + message ProducerConfig { + // Identifies the producer for which this config is for. + optional string producer_name = 1; + + // Specifies the preferred size of the shared memory buffer. If the size is + // larger than the max size, the max will be used. If it is smaller than + // the page size or doesn't fit pages evenly into it, it will fall back to + // the size specified by the producer or finally the default shared memory + // size. + optional uint32 shm_size_kb = 2; + + // Specifies the preferred size of each page in the shared memory buffer. + // Must be an integer multiple of 4K. + optional uint32 page_size_kb = 3; + } + + repeated ProducerConfig producers = 6; + + // Contains statsd-specific metadata about an alert associated with the trace. + message StatsdMetadata { + // The identifier of the alert which triggered this trace. + optional int64 triggering_alert_id = 1; + // The uid which registered the triggering configuration with statsd. + optional int32 triggering_config_uid = 2; + // The identifier of the config which triggered the alert. + optional int64 triggering_config_id = 3; + // The identifier of the subscription which triggered this trace. + optional int64 triggering_subscription_id = 4; + } + + // Statsd-specific metadata. + optional StatsdMetadata statsd_metadata = 7; + + // When true && |output_path| is empty, the EnableTracing() request must + // provide a file descriptor. The service will then periodically read packets + // out of the trace buffer and store it into the passed file. + // If |output_path| is not empty no fd should be passed, the service + // will create a new file and write into that (see comment below). + optional bool write_into_file = 8; + + // This must point to a non-existing file. If the file exists the service + // will NOT overwrite and will fail instead as a security precaution. + // On Android, when this is used with the system traced, the path must be + // within /data/misc/perfetto-traces/ or the trace will fail. + // This option has been introduced in Android R. Before R write_into_file + // can be used only with the "pass a file descriptor over IPC" mode. + optional string output_path = 29; + + // Optional. If non-zero tunes the write period. A min value of 100ms is + // enforced (i.e. smaller values are ignored). + optional uint32 file_write_period_ms = 9; + + // Optional. When non zero the periodic write stops once at most X bytes + // have been written into the file. Tracing is disabled when this limit is + // reached, even if |duration_ms| has not been reached yet. + optional uint64 max_file_size_bytes = 10; + + // Contains flags which override the default values of the guardrails inside + // Perfetto. + message GuardrailOverrides { + // Override the default limit (in bytes) for uploading data to server within + // a 24 hour period. + // On R-, this override only affected userdebug builds. Since S, it also + // affects user builds. + // In 24Q3+ (V+), this override is a noop because upload guardrail logic + // was removed from Perfetto. + optional uint64 max_upload_per_day_bytes = 1 [deprecated = true]; + + // Overrides the guardrail for maximum trace buffer size. + // Available on U+ + optional uint32 max_tracing_buffer_size_kb = 2; + } + optional GuardrailOverrides guardrail_overrides = 11; + + // When true, data sources are not started until an explicit call to + // StartTracing() on the consumer port. This is to support early + // initialization and fast trace triggering. This can be used only when the + // Consumer explicitly triggers the StartTracing() method. + // This should not be used in a remote trace config via statsd, doing so will + // result in a hung trace session. + optional bool deferred_start = 12; + + // When set, it periodically issues a Flush() to all data source, forcing them + // to commit their data into the tracing service. This can be used for + // quasi-real-time streaming mode and to guarantee some partial ordering of + // events in the trace in windows of X ms. + optional uint32 flush_period_ms = 13; + + // Wait for this long for producers to acknowledge flush requests. + // Default 5s. + optional uint32 flush_timeout_ms = 14; + + // Wait for this long for producers to acknowledge stop requests. + // Default 5s. + optional uint32 data_source_stop_timeout_ms = 23; + + // |disable_clock_snapshotting| moved. + reserved 15; + + // Android-only. If set, sends an intent to the Traceur system app when the + // trace ends to notify it about the trace readiness. + optional bool notify_traceur = 16; + + // This field was introduced in Android S. + // Android-only. If set to a value > 0, marks the trace session as a candidate + // for being attached to a bugreport. This field effectively acts as a z-index + // for bugreports. When Android's dumpstate runs perfetto + // --save-for-bugreport, traced will pick the tracing session with the highest + // score (score <= 0 is ignored) and: + // On Android S, T: will steal its contents, save the trace into + // a known path and stop prematurely. + // On Android U+: will create a read-only snapshot and save that into a known + // path, without stoppin the original tracing session. + // When this field is set the tracing session becomes eligible to be cloned + // by other UIDs. + optional int32 bugreport_score = 30; + + // When set, defines name of the file that will be saved under + // /data/misc/perfetto-traces/bugreport/ when using --save-all-for-bugreport. + // If omitted, traces will be named systrace.pftrace, systrace_1.pftrace, etc, + // starting from the highest `bugreport_score`. + // Introduced in v42 / Android V. + optional string bugreport_filename = 38; + + // Triggers allow producers to start or stop the tracing session when an event + // occurs. + // + // For example if we are tracing probabilistically, most traces will be + // uninteresting. Triggers allow us to keep only the interesting ones such as + // those traces during which the device temperature reached a certain + // threshold. In this case the producer can activate a trigger to keep + // (STOP_TRACING) the trace, otherwise it can also begin a trace + // (START_TRACING) because it knows something is about to happen. + message TriggerConfig { + enum TriggerMode { + UNSPECIFIED = 0; + + // When this mode is chosen, data sources are not started until one of the + // |triggers| are received. This supports early initialization and fast + // starting of the tracing system. On triggering, the session will then + // record for |stop_delay_ms|. However if no trigger is seen + // after |trigger_timeout_ms| the session will be stopped and no data will + // be returned. + START_TRACING = 1; + + // When this mode is chosen, the session will be started via the normal + // EnableTracing() & StartTracing(). If no trigger is ever seen + // the session will be stopped after |trigger_timeout_ms| and no data will + // be returned. However if triggered the trace will stop after + // |stop_delay_ms| and any data in the buffer will be returned to the + // consumer. + STOP_TRACING = 2; + + // 3 was taken by CLONE_SNAPSHOT but that has been moved to 4. + // The early implementation of CLONE_SNAPSHOT had various bugs + // (b/290798988, b/290799105) and made it into Android U. The number + // change is to make sure nobody rolls out a config that hits the broken + // behaviour. + reserved 3; + + // When this mode is chosen, this causes a snapshot of the current tracing + // session to be created after |stop_delay_ms| while the current tracing + // session continues undisturbed (% an extra flush). This mode can be + // used only when the tracing session is handled by the "perfetto" cmdline + // client (which is true in 90% of cases). Part of the business logic + // necessary for this behavior, and ensuing file handling, lives in + // perfetto_cmd.cc . On other consumers, this causes only a notification + // of the trigger through a CloneTriggerHit ObservableEvent. The custom + // consumer is supposed to call CloneSession() itself after the event. + // Use use_clone_snapshot_if_available=true when targeting older versions + // of perfetto. + CLONE_SNAPSHOT = 4; + + // NOTE: CLONE_SNAPSHOT should be used only when we targeting Android V+ + // (15+) / Perfetto v38+. A bug in older versions of the tracing service + // might cause indefinitely long tracing sessions (see b/274931668). + } + optional TriggerMode trigger_mode = 1; + + // This flag is really a workaround for b/274931668. This is needed only + // when deploying configs to different versions of the tracing service. + // When this is set to true this has the same effect of setting trigger_mode + // to CLONE_SNAPSHOT on newer versions of the service. This boolean has been + // introduced to allow to have configs that use CLONE_SNAPSHOT on newer + // versions of Android and fall back to STOP_TRACING on older versions where + // CLONE_SNAPSHOT did not exist. + // When using this flag, trigger_mode must be set to STOP_TRACING. + optional bool use_clone_snapshot_if_available = 5; + + // DEPRECATED, was use_clone_snapshot_if_available in U. See the comment + // around CLONE_SNAPSHOT. + reserved 4; + + message Trigger { + // The producer must specify this name to activate the trigger. + optional string name = 1; + + // An std::regex that will match the producer that can activate this + // trigger. This is optional. If unset any producers can activate this + // trigger. + optional string producer_name_regex = 2; + + // After a trigger is received either in START_TRACING or STOP_TRACING + // mode then the trace will end |stop_delay_ms| after triggering. + // In CLONE_SNAPSHOT mode, this is the delay between the trigger and the + // snapshot. + // If |prefer_suspend_clock_for_duration| is set, the duration will be + // based on wall-clock, counting also time in suspend. + optional uint32 stop_delay_ms = 3; + + // Limits the number of traces this trigger can start/stop in a rolling + // 24 hour window. If this field is unset or zero, no limit is applied and + // activiation of this trigger *always* starts/stops the trace. + optional uint32 max_per_24_h = 4; + + // A value between 0 and 1 which encodes the probability of skipping a + // trigger with this name. This is useful for reducing the probability + // of high-frequency triggers from dominating trace finaization. If this + // field is unset or zero, the trigger will *never* be skipped. If this + // field is greater than or equal to 1, this trigger will *always* be + // skipped i.e. it will be as if this trigger was never included in the + // first place. + // This probability check is applied *before* any other limits. For + // example, if |max_per_24_h| is also set, first we will check if the + // probability bar is met and only then will we check the |max_per_24_h| + // limit. + optional double skip_probability = 5; + } + // A list of triggers which are related to this configuration. If ANY + // trigger is seen then an action will be performed based on |trigger_mode|. + repeated Trigger triggers = 2; + + // Required and must be positive if a TriggerConfig is specified. This is + // how long this TraceConfig should wait for a trigger to arrive. After this + // period of time if no trigger is seen the TracingSession will be cleaned + // up. + optional uint32 trigger_timeout_ms = 3; + } + optional TriggerConfig trigger_config = 17; + + // When this is non-empty the perfetto command line tool will ignore the rest + // of this TraceConfig and instead connect to the perfetto service as a + // producer and send these triggers, potentially stopping or starting traces + // that were previous configured to use a TriggerConfig. + repeated string activate_triggers = 18; + + // Configuration for trace contents that reference earlier trace data. For + // example, a data source might intern strings, and emit packets containing + // {interned id : string} pairs. Future packets from that data source can then + // use the interned ids instead of duplicating the raw string contents. The + // trace parser will then need to use that interning table to fully interpret + // the rest of the trace. + message IncrementalStateConfig { + // If nonzero, notify eligible data sources to clear their incremental state + // periodically, with the given period. The notification is sent only to + // data sources that have |handles_incremental_state_clear| set in their + // DataSourceDescriptor. The notification requests that the data source + // stops referring to past trace contents. This is particularly useful when + // tracing in ring buffer mode, where it is not exceptional to overwrite old + // trace data. + // + // Warning: this time-based global clearing is likely to be removed in the + // future, to be replaced with a smarter way of sending the notifications + // only when necessary. + optional uint32 clear_period_ms = 1; + } + optional IncrementalStateConfig incremental_state_config = 21; + + // No longer needed as we unconditionally allow tracing on user builds. + optional bool allow_user_build_tracing = 19 [deprecated = true]; + + // If set the tracing service will ensure there is at most one tracing session + // with this key. + optional string unique_session_name = 22; + + // Compress trace with the given method. Best effort. + enum CompressionType { + COMPRESSION_TYPE_UNSPECIFIED = 0; + COMPRESSION_TYPE_DEFLATE = 1; + } + optional CompressionType compression_type = 24; + + // DEPRECATED, was compress_from_cli. + reserved 37; + + // Android-only. Not for general use. If set, saves the trace into an + // incident. This field is read by perfetto_cmd, rather than the tracing + // service. This field must be set when passing the --upload flag to + // perfetto_cmd. + message IncidentReportConfig { + // In this message, either: + // * all of |destination_package|, |destination_class| and |privacy_level| + // must be set. + // * |skip_incidentd| must be explicitly set to true. + + optional string destination_package = 1; + optional string destination_class = 2; + // Level of filtering in the requested incident. See |Destination| in + // frameworks/base/core/proto/android/privacy.proto. + optional int32 privacy_level = 3; + + // If true, then skips saving the trace to incidentd. + // + // This flag is useful in testing (e.g. Perfetto-statsd integration tests) + // or when we explicitly don't want traces to go to incidentd even when they + // usually would (e.g. configs deployed using statsd but only used for + // inclusion in bugreports using |bugreport_score|). + // + // The motivation for having this flag, instead of just not setting + // |incident_report_config|, is prevent accidents where + // |incident_report_config| is omitted by mistake. + optional bool skip_incidentd = 5; + + // If true, do not write the trace into dropbox (i.e. incident only). + // Otherwise, write to both dropbox and incident. + // TODO(lalitm): remove this field as we no longer use Dropbox. + optional bool skip_dropbox = 4 [deprecated = true]; + } + optional IncidentReportConfig incident_report_config = 25; + + enum StatsdLogging { + STATSD_LOGGING_UNSPECIFIED = 0; + STATSD_LOGGING_ENABLED = 1; + STATSD_LOGGING_DISABLED = 2; + } + + // Android-only. Not for general use. If specified, sets the logging to statsd + // of guardrails and checkpoints in the tracing service. perfetto_cmd sets + // this to enabled (if not explicitly set in the config) when specifying + // --upload. + optional StatsdLogging statsd_logging = 31; + + // DEPRECATED. Was trace_uuid, use trace_uuid_msb and trace_uuid_lsb instead. + reserved 26; + + // An identifier clients can use to tie this trace to other logging. + // DEPRECATED as per v32. See TracePacket.trace_uuid for the authoritative + // Trace UUID. If this field is set, the tracing service will respect the + // requested UUID (i.e. TracePacket.trace_uuid == this field) but only if + // gap-less snapshotting is not used. + optional int64 trace_uuid_msb = 27 [deprecated = true]; + optional int64 trace_uuid_lsb = 28 [deprecated = true]; + + // When set applies a post-filter to the trace contents using the filter + // provided. The filter is applied at ReadBuffers() time and works both in the + // case of IPC readback and write_into_file. This filter can be generated + // using `tools/proto_filter -s schema.proto -F filter_out.bytes` or + // `-T filter_out.escaped_string` (for .pbtx). See go/trace-filtering for + // design. + // + // Introduced in Android S, but it was broken (b/195065199). Reintroduced in + // Android T with a different field number. Updated in Android U with a new + // bytecode version which supports string filtering. + message TraceFilter { + // ========================= + // Filter bytecode. + // ========================= + + // The bytecode as implemented in Android T. + optional bytes bytecode = 1; + + // The bytecode as implemented in Android U. Adds support for string + // filtering. + optional bytes bytecode_v2 = 2; + + // ========================= + // String filtering + // ========================= + + // The principles and terminology of string filtering is heavily inspired by + // iptables. A "rule" decide how strings should be filtered. Each rule + // contains a "policy" which indicates the algorithm to use for filtering. + // A "chain" is a list of rules which will be sequentially checked against + // each string. + // + // The first rule which applies to the string terminates filtering for that + // string. If no rules apply, the string is left unchanged. + + // A policy specifies which algorithm should be used for filtering the + // string. + enum StringFilterPolicy { + SFP_UNSPECIFIED = 0; + + // Tries to match the string field against |regex_pattern|. If it + // matches, all matching groups are "redacted" (i.e. replaced with a + // constant string) and filtering is terminated (i.e. no further rules are + // checked). If it doesn't match, the string is left unchanged and the + // next rule in chain is considered. + SFP_MATCH_REDACT_GROUPS = 1; + + // Like |SFP_MATCH_REDACT_GROUPS| but tries to do some pre-work before + // checking the regex. Specifically, it tries to parse the string field as + // an atrace tracepoint and checks if the post-tgid field starts with + // |atrace_post_tgid_starts_with|. The regex matching is only performed if + // this check succeeds. + SFP_ATRACE_MATCH_REDACT_GROUPS = 2; + + // Tries to match the string field against |regex_pattern|. If it + // matches, filtering is terminated (i.e. no further rules are checked). + // If it doesn't match, the string is left unchanged and the next rule in + // chain is considered. + SFP_MATCH_BREAK = 3; + + // Like |SFP_MATCH_BREAK| but tries to do some pre-work before checking + // the regex. Specifically, it tries to parse the string field as an + // atrace tracepoint and checks if the post-tgid field starts with + // |atrace_post_tgid_starts_with|. The regex matching is only performed if + // this check succeeds. + SFP_ATRACE_MATCH_BREAK = 4; + + // Tries to repeatedly search (i.e. find substrings of) the string field + // with |regex_pattern|. For each match, redacts any matching groups (i.e. + // replaced with a constant string). Once there are no further matches, + // filtering is terminated (i.e. no further rules are checked). + // + // Note that this is policy is a "search" policy not a "match" policy + // unlike the above policies: + // * Match policies require matching the full string i.e. there is an + // implicit leading `^` and trailing `$`. + // * Search policies perform repeated partial matching of the string + // e.g. + // - String: `foo=aaa,bar=123,foo=bbb,baz=456` + // - Pattern: `foo=(\d+)` + // - Output: `foo=P6O,bar=123,foo=P6O,baz=456` + // where P6O is the redaction string + // + // All of this is only performed after some pre-work where we try to parse + // the string field as an atrace tracepoint and check if the post-tgid + // field starts with |atrace_post_tgid_starts_with|. + // + // If there are no partial matches, the string is left unchanged and the + // next rule in chain is considered. + SFP_ATRACE_REPEATED_SEARCH_REDACT_GROUPS = 5; + } + + // A rule specifies how strings should be filtered. + message StringFilterRule { + // The policy (i.e. algorithm) dictating how strings matching this rule + // should be handled. + optional StringFilterPolicy policy = 1; + + // The regex pattern used to match against each string. + optional string regex_pattern = 2; + + // The string which should appear after the tgid in atrace tracepoint + // strings. + optional string atrace_payload_starts_with = 3; + } + + // A chain is a list of rules which string will be sequentially checked + // against. + message StringFilterChain { + repeated StringFilterRule rules = 1; + } + optional StringFilterChain string_filter_chain = 3; + } + // old field number for trace_filter + reserved 32; + optional TraceFilter trace_filter = 33; + + // Android-only. Not for general use. If set, reports the trace to the + // Android framework. This field is read by perfetto_cmd, rather than the + // tracing service. This field must be set when passing the --upload flag to + // perfetto_cmd. + message AndroidReportConfig { + // In this message, either: + // * |reporter_service_package| and |reporter_service_class| must be set. + // * |skip_reporting| must be explicitly set to true. + + optional string reporter_service_package = 1; + optional string reporter_service_class = 2; + + // If true, then skips reporting the trace to Android framework. + // + // This flag is useful in testing (e.g. Perfetto-statsd integration tests) + // or when we explicitly don't want to report traces to the framework even + // when they usually would (e.g. configs deployed using statsd but only + // used for inclusion in bugreports using |bugreport_score|). + // + // The motivation for having this flag, instead of just not setting + // |framework_report_config|, is prevent accidents where + // |framework_report_config| is omitted by mistake. + optional bool skip_report = 3; + + // If true, will direct the Android framework to read the data in trace + // file and pass it to the reporter class over a pipe instead of passing + // the file descriptor directly. + // + // This flag is needed because the Android test framework does not + // currently support priv-app helper apps (in terms of SELinux) and we + // really don't want to add an allow rule for untrusted_app to receive + // trace fds. + // + // Because of this, we instead will direct the framework to create a new + // pipe and pass this to the reporter process instead. As the pipe is + // created by the framework, we won't have any problems with SELinux + // (system_server is already allowed to pass pipe fds, even + // to untrusted apps). + // + // As the name suggests this option *MUST* only be used for testing. + // Note that the framework will reject (and drop) files which are too + // large both for simplicity and to be minimize the amount of data we + // pass to a non-priv app (note that the framework will still check + // manifest permissions even though SELinux permissions are worked around). + optional bool use_pipe_in_framework_for_testing = 4; + } + optional AndroidReportConfig android_report_config = 34; + + // If set, delays the start of tracing by a random duration. The duration is + // chosen from a uniform distribution between the specified minimum and + // maximum. + // Note: this delay is implemented by perfetto_cmd *not* by traced so will + // not work if you communicate with traced directly over the consumer API. + // Introduced in Android T. + message CmdTraceStartDelay { + optional uint32 min_delay_ms = 1; + optional uint32 max_delay_ms = 2; + } + optional CmdTraceStartDelay cmd_trace_start_delay = 35; + + // When non-empty, ensures that for a each semaphore named `name at most + // `max_other_session_count`` *other* sessions (whose value is taken of the + // minimum of all values specified by this config or any already-running + // session) can be be running. + // + // If a semaphore "acquisition" fails, EnableTracing will return an error + // and the tracing session will not be started (or elgible to start in + // the case of deferred sessions). + // + // This is easiest to explain with an example. Suppose the tracing service has + // the following active tracing sessions: + // S1 = [{name=foo, max_other_session_count=2}, + // {name=bar, max_other_session_count=0}] + // S2 = [{name=foo, max_other_session_count=1}, + // {name=baz, max_other_session_count=1}] + // + // Then, for a new session, the following would be the expected behaviour of + // EnableSession given the state of `session_semaphores`. + // Q: session_semaphores = [] + // A: Allowed because it does not specify any semaphores. Will be allowed + // no matter the state of any other tracing session. + // Q: session_semaphores = [{name=baz, max_other_session_count=1}] + // A: Allowed because both S2 and this config specify + // max_other_session_count=1 for baz. + // Q: session_semaphores = [{name=foo, max_other_session_count=3}] + // A: Denied because S2 specified max_other_session_count=1 for foo and S1 + // takes that slot. + // Q: session_semaphores = [{name=bar, max_other_session_count=0}] + // A: Denied because S1 takes the the slot specified by both S1 and + // this config. + // + // Introduced in 24Q3 (Android V). + message SessionSemaphore { + // The name of the semaphore. Acts as a unique identifier across all + // tracing sessions (including the one being started). + optional string name = 1; + + // The maximum number of *other* sesssions which specify the same semaphore + // which can be active. The minimum of this value across all tracing + // sessions and the value specified by the config is used when deciding + // whether the tracing session can be started. + optional uint64 max_other_session_count = 2; + } + repeated SessionSemaphore session_semaphores = 39; + + // Priority boost to be applied to the traced process, when the session is + // running. + optional PriorityBoostConfig priority_boost = 40; + + // When set to a value > 0, this tracing session will be started in + // "exclusive mode". This has the following semantics: + // - It can only be set by shell or root users. + // - A new exclusive session will only be started if its priority is strictly + // higher than any other active tracing session. + // - If a new exclusive session is started, all other existing tracing + // sessions (exclusive or not) are aborted. + // - While an exclusive session is active, any new non-exclusive session (or + // any exclusive session with a lower or equal priority) will be rejected. + // + // Introduced in: perfetto v52. + // Supported on: Android 25Q3+. + optional uint32 exclusive_prio = 41; + + // If true && |write_into_file|, do NOT flush buffers when periodically write + // them into file. + // + // By default, if |write_into_file| is set, each time we periodically write + // buffers into file, we first issue a Flush() to all data source, forcing + // them to commit their data into the tracing service. This helps us to always + // write latest data to the file. + // + // Before this flag was introduced, the default behavior was NOT to flush + // buffers when periodically write them into file. If true this flag + // returns the old default behavior. + // + // Introduced in: perfetto v53. + // Supported on: Android 25Q4+. + optional bool no_flush_before_write_into_file = 42; +} + +// End of protos/perfetto/config/trace_config.proto + +// Begin of protos/perfetto/common/system_info.proto + +message Utsname { + optional string sysname = 1; + optional string version = 2; + optional string release = 3; + optional string machine = 4; +} + +// Next id: 16 +message SystemInfo { + optional Utsname utsname = 1; + optional string android_build_fingerprint = 2; + + // The manufacturer of the product/hardware. + // Source : "ro.product.manufacturer" + // Introduced after Android W in Nov 2024 and is not supported on older + // versions. + optional string android_device_manufacturer = 14; + + // The SoC model from which trace is collected + optional string android_soc_model = 9; + + // The guest SoC model from which trace is collected in case of VMs + optional string android_guest_soc_model = 13; + + // The hardware reversion from android device + optional string android_hardware_revision = 10; + + // The storage component from android_device. This field has been introduced + // after Android W in Aug 2024 and is not supported on older versions. + optional string android_storage_model = 11; + + // The RAM component information from android device. This field has been + // introduced after Android W in Aug 2024 and is not supported on older + // versions. + optional string android_ram_model = 12; + + // The serial console information from android device. + optional string android_serial_console = 15; + + // The version of traced (the same returned by `traced --version`). + // This is a human readable string with and its format varies depending on + // the build system and the repo (standalone vs AOSP). + // This is intended for human debugging only. + optional string tracing_service_version = 4; + + // The Android SDK vesion (e.g. 21 for L, 31 for S etc). + // Introduced in Android T. + optional uint64 android_sdk_version = 5; + + // Kernel page size - sysconf(_SC_PAGESIZE). + optional uint32 page_size = 6; + + // Number of cpus - sysconf(_SC_NPROCESSORS_CONF). + // Might be different to the number of online cpus. + // Introduced in perfetto v44. + optional uint32 num_cpus = 8; + + // The timezone offset from UTC, as per strftime("%z"), in minutes. + // Introduced in v38 / Android V. + optional int32 timezone_off_mins = 7; + + // Ticks per second - sysconf(_SC_CLK_TCK). + // Not serialised as of perfetto v44. + optional int64 hz = 3; +} + +// End of protos/perfetto/common/system_info.proto + +// Begin of protos/perfetto/common/trace_stats.proto + +// Statistics for the internals of the tracing service. +// +// Next id: 19. +message TraceStats { + // From TraceBuffer::Stats. + // + // Next id: 21. + message BufferStats { + // Size of the circular buffer in bytes. + optional uint64 buffer_size = 12; + + // Num. bytes written into the circular buffer, including chunk headers. + optional uint64 bytes_written = 1; + + // Num. bytes overwritten before they have been read (i.e. loss of data). + optional uint64 bytes_overwritten = 13; + + // Total size of chunks that were fully read from the circular buffer by the + // consumer. This may not be equal to |bytes_written| either in the middle + // of tracing, or if |chunks_overwritten| is non-zero. Note that this is the + // size of the chunks read from the buffer, including chunk headers, which + // will be different from the total size of packets returned to the + // consumer. + // + // The current utilization of the trace buffer (mid-tracing) can be obtained + // by subtracting |bytes_read| and |bytes_overwritten| from |bytes_written|, + // adding the difference of |padding_bytes_written| and + // |padding_bytes_cleared|, and comparing this sum to the |buffer_size|. + // Note that this represents the total size of buffered data in the buffer, + // yet this data may be spread non-contiguously through the buffer and may + // be overridden before the utilization reaches 100%. + optional uint64 bytes_read = 14; + + // Num. bytes that were allocated as padding between chunks in the circular + // buffer. + optional uint64 padding_bytes_written = 15; + + // Num. of padding bytes that were removed from the circular buffer when + // they were overwritten. + // + // The difference between |padding_bytes_written| and + // |padding_bytes_cleared| denotes the total size of padding currently + // present in the buffer. + optional uint64 padding_bytes_cleared = 16; + + // Num. chunks (!= packets) written into the buffer. + optional uint64 chunks_written = 2; + + // Num. chunks (!= packets) rewritten into the buffer. This means we rewrote + // the same chunk with additional packets appended to the end. + optional uint64 chunks_rewritten = 10; + + // Num. chunks overwritten before they have been read (i.e. loss of data). + optional uint64 chunks_overwritten = 3; + + // Num. chunks discarded (i.e. loss of data). Can be > 0 only when a buffer + // is configured with FillPolicy == DISCARD. + optional uint64 chunks_discarded = 18; + + // Num. chunks (!= packets) that were fully read from the circular buffer by + // the consumer. This may not be equal to |chunks_written| either in the + // middle of tracing, or if |chunks_overwritten| is non-zero. + optional uint64 chunks_read = 17; + + // Num. chunks that were committed out of order. + optional uint64 chunks_committed_out_of_order = 11; + + // Num. times the ring buffer wrapped around. + optional uint64 write_wrap_count = 4; + + // Num. out-of-band (OOB) patches that succeeded. + optional uint64 patches_succeeded = 5; + + // Num. OOB patches that failed (e.g., the chunk to patch was gone). + optional uint64 patches_failed = 6; + + // Num. readaheads (for large multi-chunk packet reads) that ended up in a + // successful packet read. + optional uint64 readaheads_succeeded = 7; + + // Num. readaheads aborted because of missing chunks in the sequence stream. + // Note that a small number > 0 is totally expected: occasionally, when + // issuing a read, the very last packet in a sequence might be incomplete + // (because the producer is still writing it while we read). The read will + // stop at that point, for that sequence, increasing this counter. + optional uint64 readaheads_failed = 8; + + // Num. of violations of the SharedMemoryABI found while writing or reading + // the buffer. This is an indication of either a bug in the producer(s) or + // malicious producer(s). + optional uint64 abi_violations = 9; + + // The fields below have been introduced in Android R. + + // Num. of times the service detected packet loss on a trace writer + // sequence. This is usually caused by exhaustion of available chunks in the + // writer process's SMB. Note that this relies on the client's TraceWriter + // indicating this loss to the service -- packets lost for other reasons are + // not reflected in this stat. + optional uint64 trace_writer_packet_loss = 19; + } + + // Stats for the TraceBuffer(s) of the current trace session. + repeated BufferStats buffer_stats = 1; + + // Per TraceWriter stat. Each {producer, trace writer} tuple is publicly + // visible as a unique sequence ID in the trace. + message WriterStats { + // This matches the TracePacket.trusted_packet_sequence_id and is used to + // correlate the stats with the actual packet types. + optional uint64 sequence_id = 1; + + // The buffer index (0..N, as defined in the TraceConfig). + optional uint32 buffer = 4; + + // These two arrays have the same cardinality and match the cardinality of + // chunk_payload_histogram_def + 1 (for the overflow bucket, see below). + // `sum` contains the SUM(entries) and `counts` contains the COUNT(entries) + // for each bucket. + repeated uint64 chunk_payload_histogram_counts = 2 [packed = true]; + repeated int64 chunk_payload_histogram_sum = 3 [packed = true]; + } + + // The thresholds of each the `writer_stats` histogram buckets. This is + // emitted only once as all WriterStats share the same bucket layout. + // This field has the same cardinality of the + // `writer_stats.chunk_payload_histogram_{counts,sum}` - 1. + // (The -1 is because the last overflow bucket is not reported in the _def). + // An array of values [10, 100, 1000] in the _def array means that there are + // four buckets (3 + the implicit overflow bucket): + // [0]: x <= 10; [1]: 100 < x <= 1000; [2]: 1000 < x <= 1000; [3]: x > 1000. + repeated int64 chunk_payload_histogram_def = 17; + repeated WriterStats writer_stats = 18; + + // Num. producers connected (whether they are involved in the current tracing + // session or not). + optional uint32 producers_connected = 2; + + // Num. producers ever seen for all trace sessions since startup (it's a good + // proxy for inferring num. producers crashed / killed). + optional uint64 producers_seen = 3; + + // Num. data sources registered for all trace sessions. + optional uint32 data_sources_registered = 4; + + // Num. data sources ever seen for all trace sessions since startup. + optional uint64 data_sources_seen = 5; + + // Num. concurrently active tracing sessions. + optional uint32 tracing_sessions = 6; + + // Num. buffers for all tracing session (not just the current one). This will + // be >= buffer_stats.size(), because the latter is only about the current + // session. + optional uint32 total_buffers = 7; + + // The fields below have been introduced in Android Q. + + // Num. chunks that were discarded by the service before attempting to commit + // them to a buffer, e.g. because the producer specified an invalid buffer ID. + optional uint64 chunks_discarded = 8; + + // Num. patches that were discarded by the service before attempting to apply + // them to a buffer, e.g. because the producer specified an invalid buffer ID. + optional uint64 patches_discarded = 9; + + // Packets that failed validation of the TrustedPacket. If this is > 0, there + // is a bug in the producer. + optional uint64 invalid_packets = 10; + + // This is set only when the TraceConfig specifies a TraceFilter. + message FilterStats { + optional uint64 input_packets = 1; + optional uint64 input_bytes = 2; + optional uint64 output_bytes = 3; + optional uint64 errors = 4; + optional uint64 time_taken_ns = 5; + + // The number of bytes discarded by the filter (i.e. output - input). + // The array has one entry for each buffer defined in the config (unless no + // packets for that buffer were seen and hence filtered). + // Note: the SUM(bytes_discarded_per_buffer) will be <= but not == the total + // (output_bytes - input_bytes) because the filter might also discard + // server-generated synthetic packets, that have no buffer index. + repeated uint64 bytes_discarded_per_buffer = 20; + } + optional FilterStats filter_stats = 11; + + // Count of Flush() requests (either from the Consumer, or self-induced + // periodic flushes). The final Flush() is also included in the count. + optional uint64 flushes_requested = 12; + + // The count of the Flush() requests that were completed successfully. + // In a well behaving trace this should always be == `flush_requests`. + optional uint64 flushes_succeeded = 13; + + // The count of the Flush() requests that failed (in most timed out). + // In a well behaving trace this should always be == 0. + optional uint64 flushes_failed = 14; + + enum FinalFlushOutcome { + FINAL_FLUSH_UNSPECIFIED = 0; + FINAL_FLUSH_SUCCEEDED = 1; + FINAL_FLUSH_FAILED = 2; + } + optional FinalFlushOutcome final_flush_outcome = 15; +} + +// End of protos/perfetto/common/trace_stats.proto + +// Begin of protos/perfetto/trace/android/android_game_intervention_list.proto + +message AndroidGameInterventionList { + message GameModeInfo { + optional uint32 mode = 1; + optional bool use_angle = 2; + optional float resolution_downscale = 3; + optional float fps = 4; + } + message GamePackageInfo { + optional string name = 1; + optional uint64 uid = 2; + optional uint32 current_mode = 3; + repeated GameModeInfo game_mode_info = 4; + } + + repeated GamePackageInfo game_packages = 1; + + // True when at least one error occurred when parsing + // game_mode_intervention.list + optional bool parse_error = 2; + + // Failed to open / read game_mode_intervention.list + optional bool read_error = 3; +} + +// End of protos/perfetto/trace/android/android_game_intervention_list.proto + +// Begin of protos/perfetto/trace/android/android_log.proto + +message AndroidLogPacket { + message LogEvent { + // The log buffer (e.g. MAIN, SYSTEM, RADIO) the event comes from. + optional AndroidLogId log_id = 1; + + // PID (TGID), TID and UID of the task that emitted the event. + optional int32 pid = 2; + optional int32 tid = 3; + optional int32 uid = 4; + + // Timestamp [ns]. The clock source is CLOCK_REALTIME, unlike many other + // Perfetto trace events that instead use CLOCK_BOOTTIME. The trace + // processor will take care of realigning clocks using the ClockSnapshot(s). + optional uint64 timestamp = 5; + + // When log_id == LID_EVENTS, |tag| corresponds to the event name defined in + // the second column of /system/etc/event-log-tags. For all other events, + // |tag| is the app-specified argument passed to __android_log_write(). + optional string tag = 6; + + // Empty when log_id == LID_EVENTS. + optional AndroidLogPriority prio = 7; + + // Empty when log_id == LID_EVENTS. + optional string message = 8; + + message Arg { + optional string name = 1; + oneof value { + int64 int_value = 2; + float float_value = 3; + string string_value = 4; + } + } + // Only populated when log_id == LID_EVENTS. + repeated Arg args = 9; + } + + repeated LogEvent events = 1; + + // Stats are emitted only upon Flush() and are monotonic (i.e. they are + // absolute counters since the beginning of the lifetime of the tracing + // session and NOT relative to the previous Stats snapshot). + message Stats { + // Total number of log events seen, including errors and skipped entries + // (num of events stored in the trace = total - failed - skipped). + optional uint64 num_total = 1; + + // Parser failures. + optional uint64 num_failed = 2; + + // Messages skipped due to filters. + optional uint64 num_skipped = 3; + } + optional Stats stats = 2; +} + +// End of protos/perfetto/trace/android/android_log.proto + +// Begin of protos/perfetto/trace/android/android_system_property.proto + +message AndroidSystemProperty { + message PropertyValue { + optional string name = 1; + optional string value = 2; + } + + repeated PropertyValue values = 1; +} + +// End of protos/perfetto/trace/android/android_system_property.proto + +// Begin of protos/perfetto/trace/android/app_wakelock_data.proto + +// AppWakelockInfo describes the time-independent properties of a wakelock, such +// as the owning package or wakelock tag. This is interned to reduce trace size. +// Event bundles refer to interned wakelock info by the iid. +message AppWakelockInfo { + // The interned id of this wakelock. + optional int32 iid = 1; + + // The app-provided tag of the wakelock. + optional string tag = 2; + + // The wakelock flags (such as partial vs full). + optional int32 flags = 3; + + // The pid that created the wakelock. + optional int32 owner_pid = 4; + + // The uid that created the wakelock. + optional int32 owner_uid = 5; + + // The uid of the work source root (if present). + optional int32 work_uid = 6; +} + +// AppWakelockBundle describes one or more wakelock events. Events are written +// in two paired array, such that the details for event i are in intern_id[i] +// and encoded_ts[i]. +message AppWakelockBundle { + // The interned id for the WakelockInfo of the event. + repeated uint32 intern_id = 1 [packed = true]; + + // The timestamp and event type, encoded as: + // (event_time - packet_time) << 1 | (acquired ? 1 : 0) + repeated uint64 encoded_ts = 2 [packed = true]; + + // For writing single packets (mainly by tokenization). + optional AppWakelockInfo info = 3; + optional bool acquired = 4; +} + +// End of protos/perfetto/trace/android/app_wakelock_data.proto + +// Begin of protos/perfetto/trace/android/bluetooth_trace.proto + +// Describes the packet type and direction. CMD and EVT are unidirectional, so +// no need to differentiate the direction. +enum BluetoothTracePacketType { + HCI_CMD = 1; + HCI_EVT = 2; + HCI_ACL_RX = 3; + HCI_ACL_TX = 4; + HCI_SCO_RX = 5; + HCI_SCO_TX = 6; + HCI_ISO_RX = 7; + HCI_ISO_TX = 8; +} + +// Trace event for bluetooth +message BluetoothTraceEvent { + // Packet type and direction + optional BluetoothTracePacketType packet_type = 1; + + // Total count of the packets collected during the collection interval + optional uint32 count = 2; + + // Total cumulative length of the packets collected during the collection + // interval + optional uint32 length = 3; + + // The collection interval in nanoseconds. This is the duration between the + // first and last packets collected. + optional uint32 duration = 4; + + // In case of CMD type, further breakdown of the type of command + optional uint32 op_code = 5; + + // In the case of EVT type, further breakdown of the type of event + optional uint32 event_code = 6; + + // When applicable for EVT type, further breakdown of event type into specific + // subevent + optional uint32 subevent_code = 7; + + // Associated handle for the bluetooth packet + optional uint32 connection_handle = 8; +} + +// End of protos/perfetto/trace/android/bluetooth_trace.proto + +// Begin of protos/perfetto/trace/android/camera_event.proto + +// A profiling event corresponding to a single camera frame. This message +// collects important details and timestamps involved in producing a single +// camera frame. +// Next ID: 17 +message AndroidCameraFrameEvent { + // Identifier for the CameraCaptureSession this frame originates from. See: + // https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession + optional uint64 session_id = 1; + // Identifier for the camera sensor that is the source of this frame. This may + // be either a physical or logical camera (up to vendor interpretation). + optional uint32 camera_id = 2; + // The frame number identifying this frame on this camera. + optional int64 frame_number = 3; + // Identifier for the CaptureRequest. See: + // https://developer.android.com/reference/android/hardware/camera2/CaptureRequest + // + // If multiple cameras are streaming simultaneously, the request_id may be + // used to identify which frames were captured in service of the same request. + optional int64 request_id = 4; + + // The CLOCK_BOOTTIME timestamp at which the camera framework request is + // received by the camera HAL pipeline. Note that this request may wait for + // some time before processing actually begins. See also + // request_processing_started_ns. + optional int64 request_received_ns = 5; + // The CLOCK_BOOTTIME timestamp at which the framework request is accepted for + // processing by the camera HAL pipeline. This is the time at which the + // pipeline actually begins to work on the request. + optional int64 request_processing_started_ns = 6; + + // The CLOCK_BOOTTIME timestamp at which the sensor begins its exposure. + optional int64 start_of_exposure_ns = 7; + // The CLOCK_BOOTTIME timestamp corresponding to the sensor start of frame + // event. + optional int64 start_of_frame_ns = 8; + // The CLOCK_BOOTTIME timestamp at which the camera HAL has sent all responses + // for the frame. + optional int64 responses_all_sent_ns = 9; + + // The error status, if any, reported to the camera framework. Any status + // other than STATUS_OK indicates a dropped frame. + // Next Enum: 6 + enum CaptureResultStatus { + STATUS_UNSPECIFIED = 0; + STATUS_OK = 1; + // Early metadata was returned to the camera framework with an error. + STATUS_EARLY_METADATA_ERROR = 2; + // Final metadata was returned to the camera framework with an error. + STATUS_FINAL_METADATA_ERROR = 3; + // One or more buffers were returned to the camera framework with an error. + STATUS_BUFFER_ERROR = 4; + // The frame was dropped as a result of a flush operation. + STATUS_FLUSH_ERROR = 5; + } + optional CaptureResultStatus capture_result_status = 10; + + // The number of sensor frames that were skipped between this frame and the + // previous frame. Under normal operation, this should be zero. Any number + // greater than zero indicates dropped sensor frames. + optional int32 skipped_sensor_frames = 11; + + // The value of CONTROL_CAPTURE_INTENT. See: + // https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#CONTROL_CAPTURE_INTENT + optional int32 capture_intent = 12; + // The number of streams in the capture request. + optional int32 num_streams = 13; + + // A profiling event corresponding to a single node processing within the + // camera pipeline. Intuitively this corresponds to a single stage of + // processing to produce a camera frame. Next ID: 6 + message CameraNodeProcessingDetails { + optional int64 node_id = 1; + // The timestamp at which node processing begins to run. + optional int64 start_processing_ns = 2; + // The timestamp at which node processing finishes running. + optional int64 end_processing_ns = 3; + // The delay between inputs becoming ready and the node actually beginning + // to run. + optional int64 scheduling_latency_ns = 4; + } + repeated CameraNodeProcessingDetails node_processing_details = 14; + + // These fields capture vendor-specific additions to this proto message. In + // practice `vendor_data` typically contains a serialized message of the + // vendor's design, and `vendor_data_version` is incremented each time there + // is a backwards incompatible change made to the message. + optional int32 vendor_data_version = 15; + optional bytes vendor_data = 16; +} + +// A profiling event that may be emitted periodically (i.e., at a slower rate +// than `AndroidCameraFrameEvent`s) to record fixed and aggregated camera +// session-specific values. +message AndroidCameraSessionStats { + // Identifier for the CameraCaptureSession this frame originates from. See: + // https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession + optional uint64 session_id = 1; + + // Although vendor implementations may vary, camera pipeline processing is + // typically arranged into a directed graph-like structure. This message is + // used to record that graph. + message CameraGraph { + message CameraNode { + optional int64 node_id = 1; + // A list of inputs consumed by this node. + repeated int64 input_ids = 2; + // A list of outputs produced by this node. + repeated int64 output_ids = 3; + + // These fields capture vendor-specific additions to this proto message. + // In practice `vendor_data` typically contains a serialized message of + // the vendor's design, and `vendor_data_version` is incremented each time + // there is a backwards incompatible change made to the message. + optional int32 vendor_data_version = 4; + optional bytes vendor_data = 5; + } + repeated CameraNode nodes = 1; + + // An adjacency list describing connections between CameraNodes, mapping + // nodes and their outputs to other nodes that consume them as inputs. + message CameraEdge { + // The pair of IDs identifying the node and output connected by this edge. + optional int64 output_node_id = 1; + optional int64 output_id = 2; + + // The pair of IDs identifying the node and input connected by this edge. + optional int64 input_node_id = 3; + optional int64 input_id = 4; + + // These fields capture vendor-specific additions to this proto message. + // In practice `vendor_data` typically contains a serialized message of + // the vendor's design, and `vendor_data_version` is incremented each time + // there is a backwards incompatible change made to the message. + optional int32 vendor_data_version = 5; + optional bytes vendor_data = 6; + } + repeated CameraEdge edges = 2; + } + optional CameraGraph graph = 2; +} + +// End of protos/perfetto/trace/android/camera_event.proto + +// Begin of protos/perfetto/trace/android/cpu_per_uid_data.proto + +message CpuPerUidData { + // Number of clusters in the device. This will only be filled in the first + // packet in a sequence. + optional uint32 cluster_count = 1; + + // The UIDs for which we have data in this packet. + repeated uint32 uid = 2 [packed = true]; + + // List of times for {UID, cluster} tuples. This will be cluster_count + // times as long as the UID list. + // + // Ordered like: + // [{UID 0, cluster 0}, {UID 0, cluster 1}, {UID 0, cluster 2}, + // {UID 1, cluster 0}, {UID 1, cluster 1}, {UID 1, cluster 2}, ...] + // + // Each value is an absolute count for the first packet in a sequence, and a + // delta thereafter. UIDs for which all clusters have a zero delta are + // omitted; a single non-zero value for any cluster for a UID will cause + // values for all clusters to be recorded. + repeated uint64 total_time_ms = 3 [packed = true]; +} + +// End of protos/perfetto/trace/android/cpu_per_uid_data.proto + +// Begin of protos/perfetto/trace/android/frame_timeline_event.proto + +// Generated by SurfaceFlinger's FrameTimeline (go/adaptive-scheduling-fr). +// Used in comparing the expected timeline of a frame to the actual timeline. +// Key terms: +// 1) DisplayFrame - represents SurfaceFlinger's work on a frame(composited) +// 2) SurfaceFrame - represents App's work on its frame +// 3) Timeline = start to end of a component's(app/SF) work on a frame. +// SurfaceFlinger composites frames from many apps together, so +// One DisplayFrame can map to N SurfaceFrame(s) +// This relationship can be reconstructed by using +// DisplayFrame.token = SurfaceFrame.display_frame_token +message FrameTimelineEvent { + // Specifies the reason(s) most likely to have caused the jank. + // Used as a bitmask. + enum JankType { + JANK_UNSPECIFIED = 0; + JANK_NONE = 1; + JANK_SF_SCHEDULING = 2; + JANK_PREDICTION_ERROR = 4; + JANK_DISPLAY_HAL = 8; + JANK_SF_CPU_DEADLINE_MISSED = 16; + JANK_SF_GPU_DEADLINE_MISSED = 32; + JANK_APP_DEADLINE_MISSED = 64; + JANK_BUFFER_STUFFING = 128; + JANK_UNKNOWN = 256; + JANK_SF_STUFFING = 512; + JANK_DROPPED = 1024; + JANK_NON_ANIMATING = 2048; + JANK_APP_RESYNCED_JITTER = 4096; + JANK_DISPLAY_NOT_ON = 8192; + }; + + // Specifies the severity of a jank. + enum JankSeverityType { + SEVERITY_UNKNOWN = 0; + SEVERITY_NONE = 1; + SEVERITY_PARTIAL = 2; + SEVERITY_FULL = 3; + } + + // Specifies how a frame was presented on screen w.r.t. timing. + // Can be different for SurfaceFrame and DisplayFrame. + enum PresentType { + PRESENT_UNSPECIFIED = 0; + PRESENT_ON_TIME = 1; + PRESENT_LATE = 2; + PRESENT_EARLY = 3; + PRESENT_DROPPED = 4; + PRESENT_UNKNOWN = 5; + }; + + // Specifies if the predictions for the frame are still valid, expired or + // unknown. + enum PredictionType { + PREDICTION_UNSPECIFIED = 0; + PREDICTION_VALID = 1; + PREDICTION_EXPIRED = 2; + PREDICTION_UNKNOWN = 3; + }; + + // Indicates the start of expected timeline slice for SurfaceFrames. + message ExpectedSurfaceFrameStart { + // Cookie used to correlate between the start and end messages of the same + // frame. Since all values except the ts are same for start and end, cookie + // helps in preventing redundant data transmission. + // The same cookie is used only by start and end messages of a single frame + // and is otherwise unique. + optional int64 cookie = 1; + + // Token received by the app for its work. Can be shared between multiple + // layers of the same app (example: pip mode). + optional int64 token = 2; + // The corresponding DisplayFrame token is required to link the App's work + // with SurfaceFlinger's work. Many SurfaceFrames can be mapped to a single + // DisplayFrame. + // this.display_frame_token = DisplayFrame.token + optional int64 display_frame_token = 3; + + // Pid of the app. Used in creating the timeline tracks (and slices) inside + // the respective process track group. + optional int32 pid = 4; + optional string layer_name = 5; + }; + + // Indicates the start of actual timeline slice for SurfaceFrames. Also + // includes the jank information. + message ActualSurfaceFrameStart { + // Cookie used to correlate between the start and end messages of the same + // frame. Since all values except the ts are same for start and end, cookie + // helps in preventing redundant data transmission. + // The same cookie is used only by start and end messages of a single frame + // and is otherwise unique. + optional int64 cookie = 1; + + // Token received by the app for its work. Can be shared between multiple + // layers of the same app (example: pip mode). + optional int64 token = 2; + // The corresponding DisplayFrame token is required to link the App's work + // with SurfaceFlinger's work. Many SurfaceFrames can be mapped to a single + // DisplayFrame. + // this.display_frame_token = DisplayFrame.token + optional int64 display_frame_token = 3; + + // Pid of the app. Used in creating the timeline tracks (and slices) inside + // the respective process track group. + optional int32 pid = 4; + optional string layer_name = 5; + + optional PresentType present_type = 6; + optional bool on_time_finish = 7; + optional bool gpu_composition = 8; + // A bitmask of JankType. More than one reason can be attributed to a janky + // frame. + optional int32 jank_type = 9; + optional PredictionType prediction_type = 10; + optional bool is_buffer = 11; + optional JankSeverityType jank_severity_type = 12; + optional float present_delay_millis = 13; + optional float vsync_resynced_jitter_millis = 14; + optional float jank_severity_score = 15; + + // experimental value for jank_type. Do not consider in jank analysis. + optional int32 jank_type_experimental = 16; + + // experimental value for present_type. Do not consider in jank analysis. + optional PresentType present_type_experimental = 17; + }; + + // Indicates the start of expected timeline slice for DisplayFrames. + message ExpectedDisplayFrameStart { + // Cookie used to correlate between the start and end messages of the same + // frame. Since all values except the ts are same for start and end, cookie + // helps in preventing redundant data transmission. + // The same cookie is used only by start and end messages of a single frame + // and is otherwise unique. + optional int64 cookie = 1; + + // Token received by SurfaceFlinger for its work + // this.token = SurfaceFrame.display_frame_token + optional int64 token = 2; + + // Pid of SurfaceFlinger. Used in creating the timeline tracks (and slices) + // inside the SurfaceFlinger process group. + optional int32 pid = 3; + }; + + // Indicates the start of actual timeline slice for DisplayFrames. Also + // includes the jank information. + message ActualDisplayFrameStart { + // Cookie used to correlate between the start and end messages of the same + // frame. Since all values except the ts are same for start and end, cookie + // helps in preventing redundant data transmission. + // The same cookie is used only by start and end messages of a single frame + // and is otherwise unique. + optional int64 cookie = 1; + + // Token received by SurfaceFlinger for its work + // this.token = SurfaceFrame.display_frame_token + optional int64 token = 2; + + // Pid of SurfaceFlinger. Used in creating the timeline tracks (and slices) + // inside the SurfaceFlinger process group. + optional int32 pid = 3; + + optional PresentType present_type = 4; + optional bool on_time_finish = 5; + optional bool gpu_composition = 6; + // A bitmask of JankType. More than one reason can be attributed to a janky + // frame. + optional int32 jank_type = 7; + optional PredictionType prediction_type = 8; + optional JankSeverityType jank_severity_type = 9; + + optional float present_delay_millis = 10; + optional float jank_severity_score = 11; + + // experimental value for jank_type. Do not consider in jank analysis. + optional int32 jank_type_experimental = 12; + + // experimental value for present_type. Do not consider in jank analysis. + optional PresentType present_type_experimental = 13; + }; + + // FrameEnd just sends the cookie to indicate that the corresponding + // frame slice's end. + message FrameEnd { + optional int64 cookie = 1; + }; + + oneof event { + ExpectedDisplayFrameStart expected_display_frame_start = 1; + ActualDisplayFrameStart actual_display_frame_start = 2; + + ExpectedSurfaceFrameStart expected_surface_frame_start = 3; + ActualSurfaceFrameStart actual_surface_frame_start = 4; + + FrameEnd frame_end = 5; + } +} + +// End of protos/perfetto/trace/android/frame_timeline_event.proto + +// Begin of protos/perfetto/trace/android/gpu_mem_event.proto + +// Generated by Android's GpuService. +message GpuMemTotalEvent { + optional uint32 gpu_id = 1; + optional uint32 pid = 2; + optional uint64 size = 3; +} + +// End of protos/perfetto/trace/android/gpu_mem_event.proto + +// Begin of protos/perfetto/trace/android/graphics_frame_event.proto + +// Generated by Android's SurfaceFlinger. +message GraphicsFrameEvent { + enum BufferEventType { + UNSPECIFIED = 0; + DEQUEUE = 1; + QUEUE = 2; + POST = 3; + ACQUIRE_FENCE = 4; + LATCH = 5; + // HWC will compose this buffer + HWC_COMPOSITION_QUEUED = 6; + // renderEngine composition + FALLBACK_COMPOSITION = 7; + PRESENT_FENCE = 8; + RELEASE_FENCE = 9; + MODIFY = 10; + DETACH = 11; + ATTACH = 12; + CANCEL = 13; + } + + message BufferEvent { + optional uint32 frame_number = 1; + optional BufferEventType type = 2; + optional string layer_name = 3; + // If no duration is set, the event is an instant event. + optional uint64 duration_ns = 4; + // Unique buffer identifier. + optional uint32 buffer_id = 5; + } + + optional BufferEvent buffer_event = 1; +} + +// End of protos/perfetto/trace/android/graphics_frame_event.proto + +// Begin of protos/perfetto/trace/android/initial_display_state.proto + +message InitialDisplayState { + // Same values as android.view.Display.STATE_* + optional int32 display_state = 1; + optional double brightness = 2; +} + +// End of protos/perfetto/trace/android/initial_display_state.proto + +// Begin of protos/perfetto/trace/android/kernel_wakelock_data.proto + +message KernelWakelockData { + message Wakelock { + enum Type { + WAKELOCK_TYPE_UNKNOWN = 0; + WAKELOCK_TYPE_KERNEL = 1; + WAKELOCK_TYPE_NATIVE = 2; + } + + // Interning id. + optional uint32 wakelock_id = 1; + + // Name of the wakelock. + optional string wakelock_name = 2; + + // Type of the wakelock. We record data about both true kernel wakelocks + // and "native" wakelocks which are taken in userspace but are more + // conceptually similar to kernel wakelocks than normal userspace ones. + optional Type wakelock_type = 3; + } + + // This is only emitted when we encounter new wakelocks. + repeated Wakelock wakelock = 1; + + // Interning id. + repeated uint32 wakelock_id = 2 [packed = true]; + + // If we interned the wakelock name in this packet, this is the total time + // the wakelock has been held. + // If not, it's a delta from the last time we saw it. + repeated uint64 time_held_millis = 3 [packed = true]; + + optional uint64 error_flags = 4; +} + +// End of protos/perfetto/trace/android/kernel_wakelock_data.proto + +// Begin of protos/perfetto/trace/android/network_trace.proto + +enum TrafficDirection { + DIR_UNSPECIFIED = 0; + DIR_INGRESS = 1; + DIR_EGRESS = 2; +} + +// NetworkPacketEvent records the details of a single packet sent or received +// on the network (in Linux kernel terminology, one sk_buff struct). +message NetworkPacketEvent { + // The direction traffic is flowing for this event. + optional TrafficDirection direction = 1; + + // The name of the network interface if available (e.g. 'rmnet0'). + optional string network_interface = 2; + + // The length of the packet in bytes (wire_size - L2_header_size). Ignored + // when using NetworkPacketEvent as the ctx in either NetworkPacketBundle or + // NetworkPacketContext. + optional uint32 length = 3; + + // The Linux user id associated with the packet's socket. + optional uint32 uid = 4; + + // The Android network tag associated with the packet's socket. + optional uint32 tag = 5; + + // The packet's IP protocol (TCP=6, UDP=17, etc). + optional uint32 ip_proto = 6; + + // The packet's TCP flags as a bitmask (FIN=0x1, SYN=0x2, RST=0x4, etc). + optional uint32 tcp_flags = 7; + + // The local udp/tcp port of the packet. + optional uint32 local_port = 8; + + // The remote udp/tcp port of the packet. + optional uint32 remote_port = 9; + + // The 1-byte ICMP type identifier. + optional uint32 icmp_type = 10; + + // The 1-byte ICMP code identifier. + optional uint32 icmp_code = 11; +} + +// NetworkPacketBundle bundles one or more packets sharing the same attributes. +message NetworkPacketBundle { + oneof packet_context { + // The intern id for looking up the associated packet context. + uint64 iid = 1; + + // The inlined context for events in this bundle. + NetworkPacketEvent ctx = 2; + } + + // The timestamp of the i-th packet encoded as the nanoseconds since the + // enclosing TracePacket's timestamp. + repeated uint64 packet_timestamps = 3 [packed = true]; + + // The length of the i-th packet in bytes (wire_size - L2_header_size). + repeated uint32 packet_lengths = 4 [packed = true]; + + // Total number of packets in the bundle (when above aggregation_threshold). + optional uint32 total_packets = 5; + + // Duration between first and last packet (when above aggregation_threshold). + optional uint64 total_duration = 6; + + // Total packet length in bytes (when above aggregation_threshold). + optional uint64 total_length = 7; +} + +// An internable packet context. +message NetworkPacketContext { + optional uint64 iid = 1; + optional NetworkPacketEvent ctx = 2; +} + +// End of protos/perfetto/trace/android/network_trace.proto + +// Begin of protos/perfetto/trace/android/packages_list.proto + +message PackagesList { + message PackageInfo { + optional string name = 1; + optional uint64 uid = 2; + optional bool debuggable = 3; + optional bool profileable_from_shell = 4; + optional int64 version_code = 5; + } + + repeated PackageInfo packages = 1; + + // At least one error occurred parsing the packages.list. + optional bool parse_error = 2; + + // Failed to open / read packages.list. + optional bool read_error = 3; +} + +// End of protos/perfetto/trace/android/packages_list.proto + +// Begin of protos/perfetto/trace/android/pixel_modem_events.proto + +message PixelModemEvents { + // Pigweed-format dehydrated events. + repeated bytes events = 1; + + // Timestamps of the events, converted to CLOCK_BOOTTIME. The first + // timestamp is the absolute timestamp of the first event. Subsequent + // timestamps are deltas from the previous timestamp. + // The nth entry from `events` gets the nth entry here. + repeated uint64 event_time_nanos = 2; +} + +// NB: this is not emitted in the trace but can be prepended later. +message PixelModemTokenDatabase { + // Pigweed-format database to allow event rehydration. + optional bytes database = 1; +} + +// End of protos/perfetto/trace/android/pixel_modem_events.proto + +// Begin of protos/perfetto/trace/android/protolog.proto + +/* represents a single log entry */ +message ProtoLogMessage { + /* log statement identifier, created from message string and log level. */ + optional fixed64 message_id = 1; + /* string parameters passed to the log call that have been interned. */ + repeated uint32 str_param_iids = 2; + /* integer parameters passed to the log call. */ + repeated sint64 sint64_params = 3; + /* floating point parameters passed to the log call. */ + repeated double double_params = 4; + /* boolean parameters passed to the log call. */ + repeated int32 boolean_params = 5; + // id of the interned stacktrace string + // (only dumped if explicitly confuigured to do so) + optional uint32 stacktrace_iid = 6; +} + +/* contains all the data required to fully decode the protolog messages */ +message ProtoLogViewerConfig { + message MessageData { + // the id of the message that is logged in a ProtoLogMessage + optional fixed64 message_id = 1; + // the string representation of the message + optional string message = 2; + // the level of the message + optional ProtoLogLevel level = 3; + // the id of the log group this message belongs to + optional uint32 group_id = 4; + // path to the file where the message was logged + optional string location = 5; + } + + /* information about a ProtoLog log group */ + message Group { + optional uint32 id = 1; + optional string name = 2; + optional string tag = 3; + } + + repeated MessageData messages = 1; + repeated Group groups = 2; +} + +// End of protos/perfetto/trace/android/protolog.proto + +// Begin of protos/perfetto/trace/android/shell_transition.proto + +// ShellTransition messages record information about the shell transitions in +// the system. This is used to track the animations that are created and execute +// through the shell transition system. +message ShellTransition { + // The unique identifier of the transition. + optional int32 id = 1; + + // The time the transition was created on the WM side + // (using SystemClock.elapsedRealtimeNanos()) + optional int64 create_time_ns = 2; + // The time the transition was sent from the WM side to shell + // (using SystemClock.elapsedRealtimeNanos()) + optional int64 send_time_ns = 3; + // The time the transition was dispatched by shell to execute + // (using SystemClock.elapsedRealtimeNanos()) + optional int64 dispatch_time_ns = 4; + // If the transition merge was accepted by the transition handler, this + // contains the time the transition was merged into transition with id + // `merge_target`. + // (using SystemClock.elapsedRealtimeNanos()) + optional int64 merge_time_ns = 5; + // The time shell proposed the transition should be merged to the transition + // handler into transition with id `merge_target`. + // (using SystemClock.elapsedRealtimeNanos()). + optional int64 merge_request_time_ns = 6; + // If the transition was aborted on the shell side, this is the time that + // occurred. + // (using SystemClock.elapsedRealtimeNanos()) + optional int64 shell_abort_time_ns = 7; + // If the transition was aborted on the wm side, this is the time that + // occurred. + // (using SystemClock.elapsedRealtimeNanos()) + optional int64 wm_abort_time_ns = 8; + // The time WM considers the transition to be complete. + // (using SystemClock.elapsedRealtimeNanos()) + optional int64 finish_time_ns = 9; + + // The id of the transaction that WM proposed to use as the starting + // transaction. It contains all the layer changes required to setup the + // transition and should be executed right at the start of the transition + // by the transition handler. + optional uint64 start_transaction_id = 10; + // The if of the transaction that WM proposed to use as the finish + // transaction. It contains all the layer changes required to set the final + // state of the transition. + optional uint64 finish_transaction_id = 11; + + // The id of the handler that executed the transition. A HandlerMappings + // message in the trace will contain the mapping of id to a string + // representation of the handler. + optional int32 handler = 12; + // The transition type of this transition (e.g. TO_FRONT, OPEN, CLOSE). + optional int32 type = 13; + + // The list of targets that are part of this transition. + repeated Target targets = 14; + // The id of the transition we have requested to merge or have merged this + // transition into. + optional int32 merge_target = 15; + + // The flags set on this transition. + optional int32 flags = 16; + // The time the starting window was removed. Tracked because this can + // happen after the transition finishes, but the app may not yet be visible + // until the starting window is removed. So in a sense the transition is not + // finished until the starting window is removed. (b/284302118) + // (using SystemClock.elapsedRealtimeNanos()) + optional int64 starting_window_remove_time_ns = 17; + + // Contains the information about the windows targeted in a transition. + message Target { + // The transition mode of this target (e.g. TO_FRONT, CLOSE...) + optional int32 mode = 1; + // The layer id of this target. + optional int32 layer_id = 2; + // The window id of this target. + optional int32 window_id = 3; + // The flags set on this target. + optional int32 flags = 4; + } +} + +// Contains mappings from handler ids to string representation of the handlers. +message ShellHandlerMappings { + repeated ShellHandlerMapping mapping = 1; +} + +message ShellHandlerMapping { + // The id of the handler used in the ShellTransition message. + optional int32 id = 1; + // A human readable and meaningful string representation of the handler. + optional string name = 2; +} + +// End of protos/perfetto/trace/android/shell_transition.proto + +// Begin of protos/perfetto/trace/android/graphics/rect.proto + +message RectProto { + optional int32 left = 1; + optional int32 top = 2; + optional int32 right = 3; + optional int32 bottom = 4; +} + +// End of protos/perfetto/trace/android/graphics/rect.proto + +// Begin of protos/perfetto/trace/android/surfaceflinger_common.proto + +message RegionProto { + // Previously: uint64 id + reserved 1; + repeated RectProto rect = 2; +} + +message SizeProto { + optional int32 w = 1; + optional int32 h = 2; +} + +message TransformProto { + optional float dsdx = 1; + optional float dtdx = 2; + optional float dsdy = 3; + optional float dtdy = 4; + optional int32 type = 5; +} + +message ColorProto { + optional float r = 1; + optional float g = 2; + optional float b = 3; + optional float a = 4; +} + +message InputWindowInfoProto { + optional uint32 layout_params_flags = 1; + optional int32 layout_params_type = 2; + optional RectProto frame = 3; + optional RegionProto touchable_region = 4; + + optional int32 surface_inset = 5; + optional bool visible = 6; + optional bool can_receive_keys = 7 [deprecated = true]; + optional bool focusable = 8; + optional bool has_wallpaper = 9; + + optional float global_scale_factor = 10; + optional float window_x_scale = 11 [deprecated = true]; + optional float window_y_scale = 12 [deprecated = true]; + + optional int32 crop_layer_id = 13; + optional bool replace_touchable_region_with_crop = 14; + optional RectProto touchable_region_crop = 15; + optional TransformProto transform = 16; + optional uint32 input_config = 17; +} + +message BlurRegion { + optional uint32 blur_radius = 1; + optional uint32 corner_radius_tl = 2 [deprecated = true]; + optional uint32 corner_radius_tr = 3 [deprecated = true]; + optional uint32 corner_radius_bl = 4 [deprecated = true]; + optional float corner_radius_br = 5 [deprecated = true]; + optional float corner_radius_tlx = 11; + optional float corner_radius_tly = 12; + optional float corner_radius_trx = 13; + optional float corner_radius_try = 14; + optional float corner_radius_blx = 15; + optional float corner_radius_bly = 16; + optional float corner_radius_brx = 17; + optional float corner_radius_bry = 18; + optional float alpha = 6; + optional int32 left = 7; + optional int32 top = 8; + optional int32 right = 9; + optional int32 bottom = 10; +} + +message ColorTransformProto { + // This will be a 4x4 matrix of float values + repeated float val = 1 [packed = true]; +} + +enum TrustedOverlay { + UNSET = 0; + DISABLED = 1; + ENABLED = 2; +}; +message BoxShadowSettings { + message BoxShadowParams { + optional float blur_radius = 1; + optional float spread_radius = 2; + optional int32 color = 3; + optional float offset_x = 4; + optional float offset_y = 5; + } + repeated BoxShadowParams box_shadows = 1; +} + +message BorderSettings { + optional float stroke_width = 1; + optional int32 color = 2; +} +// End of protos/perfetto/trace/android/surfaceflinger_common.proto + +// Begin of protos/perfetto/trace/android/surfaceflinger_layers.proto + +// Message used by Winscope to process legacy trace files. +// Represents a file full of surface flinger trace entries. +// Encoded, it should start with 0x4c 0x59 0x52 0x54 0x52 0x41 0x43 0x45 +// (.LYRTRACE), such that they can be easily identified. +message LayersTraceFileProto { + // constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | + // MagicNumber.MAGIC_NUMBER_L (this is needed because enums have to be 32 bits + // and there's no nice way to put 64bit constants into .proto files. + enum MagicNumber { + INVALID = 0; + // LYRT (little-endian ASCII) + MAGIC_NUMBER_L = 0x5452594c; + // RACE (little-endian ASCII) + MAGIC_NUMBER_H = 0x45434152; + } + + // Must be the first field, set to value in MagicNumber + optional fixed64 magic_number = 1; + + repeated LayersSnapshotProto entry = 2; + + // Offset between real-time clock and elapsed time clock in nanoseconds. + // Calculated as: systemTime(SYSTEM_TIME_REALTIME) - + // systemTime(SYSTEM_TIME_MONOTONIC) + optional fixed64 real_to_elapsed_time_offset_nanos = 3; +} + +message LayersSnapshotProto { + // elapsed realtime in nanos since boot of when this entry was logged + optional sfixed64 elapsed_realtime_nanos = 1; + + // SurfaceFlinger's stage where the snapshot was triggered. + // Currently either "visibleRegionsDirty" or "bufferLatched". + optional string where = 2; + + optional LayersProto layers = 3; + + // Blob for the current HWC information for all layers, reported by dumpsys. + // Example: + // "maxDownScale: 4, maxFullWidth: 8192, HWState: 1, AssignedState: 3, ..." + optional string hwc_blob = 4; + + // Excludes state sent during composition like visible region and composition + // type. + optional bool excludes_composition_state = 5; + + // Number of missed entries since the last entry was recorded. + optional uint32 missed_entries = 6; + + repeated DisplayProto displays = 7; + + optional int64 vsync_id = 8; +} + +// Contains a list of all layers. +message LayersProto { + repeated LayerProto layers = 1; +} + +message DisplayProto { + optional uint64 id = 1; + // Display descriptor, e.g. "Built-In Screen" + optional string name = 2; + optional uint32 layer_stack = 3; + optional SizeProto size = 4; + optional RectProto layer_stack_space_rect = 5; + optional TransformProto transform = 6; + optional bool is_virtual = 7; + optional double dpi_x = 8; + optional double dpi_y = 9; +} + +// Must match definition in the IComposerClient HAL +enum HwcCompositionType { + // Invalid composition type + HWC_TYPE_UNSPECIFIED = 0; + // Layer was composited by the client into the client target buffer + HWC_TYPE_CLIENT = 1; + // Layer was composited by the device through hardware overlays + HWC_TYPE_DEVICE = 2; + // Layer was composited by the device using a color + HWC_TYPE_SOLID_COLOR = 3; + // Similar to DEVICE, but the layer position may have been asynchronously set + // through setCursorPosition + HWC_TYPE_CURSOR = 4; + // Layer was composited by the device via a sideband stream + HWC_TYPE_SIDEBAND = 5; + // Layer was composited by hardware optimized for display decoration + HWC_TYPE_DISPLAY_DECORATION = 6; +} + +// Information about each layer. +message LayerProto { + // unique id per layer. + optional int32 id = 1; + // unique name per layer. + // Example: "Wallpaper". + optional string name = 2; + // list of children this layer may have. May be empty. + repeated int32 children = 3 [packed = true]; + // list of layers that are z order relative to this layer. + repeated int32 relatives = 4 [packed = true]; + // The type of layer. + // Examples: "ContainerLayer", "BufferStateLayer". + optional string type = 5; + optional RegionProto transparent_region = 6; + optional RegionProto visible_region = 7; + optional RegionProto damage_region = 8; + optional uint32 layer_stack = 9; + // The layer's z order. Can be z order in layer stack, relative to parent, + // or relative to another layer specified in zOrderRelative. + optional int32 z = 10; + // The layer's position on the display. + optional PositionProto position = 11; + // The layer's requested position. + optional PositionProto requested_position = 12; + // The layer's size. + optional SizeProto size = 13; + // The layer's crop in its own bounds. + optional RectProto crop = 14; + // The layer's crop in its parent's bounds. + optional RectProto final_crop = 15 [deprecated = true]; + optional bool is_opaque = 16; + optional bool invalidate = 17; + // Composition states's dataspace. + // Examples: "STANDARD_BT709", "STANDARD_BT601_625". + // See full enum in + // frameworks/native/libs/nativewindow/include/android/data_space.h + optional string dataspace = 18; + // Buffer's pixel format + // Examples: "PIXEL_FORMAT_TRANSLUCENT", "PIXEL_FORMAT_RGBA_8888". + // See full enum in frameworks/native/libs/ui/include/ui/PixelFormat.h + optional string pixel_format = 19; + // The layer's actual color. + optional ColorProto color = 20; + // The layer's requested color. + optional ColorProto requested_color = 21; + // Can be any combination of + // hidden = 0x01 + // opaque = 0x02, + // secure = 0x80, + optional uint32 flags = 22; + // The layer's actual transform + optional TransformProto transform = 23; + // The layer's requested transform. + optional TransformProto requested_transform = 24; + // The parent layer. This value can be null if there is no parent. + optional int32 parent = 25; + // The layer that this layer has a z order relative to. This value can be + // null. + optional int32 z_order_relative_of = 26; + // This value can be null if there's nothing to draw. + optional ActiveBufferProto active_buffer = 27; + // The number of frames available. + optional int32 queued_frames = 28; + optional bool refresh_pending = 29; + // The layer's composer backend destination frame + optional RectProto hwc_frame = 30; + // The layer's composer backend source crop + optional FloatRectProto hwc_crop = 31; + // The layer's composer backend transform + optional int32 hwc_transform = 32; + optional int32 window_type = 33 [deprecated = true]; + optional int32 app_id = 34 [deprecated = true]; + // The layer's composition type + optional HwcCompositionType hwc_composition_type = 35; + // If it's a buffer layer, indicate if the content is protected + optional bool is_protected = 36; + // Current frame number being rendered. + optional uint64 curr_frame = 37; + // A list of barriers that the layer is waiting to update state. + repeated BarrierLayerProto barrier_layer = 38; + // If active_buffer is not null, record its transform. + optional TransformProto buffer_transform = 39; + optional int32 effective_scaling_mode = 40; + // Layer's corner radius + optional float corner_radius = 41 [deprecated = true]; + // Metadata map. May be empty. + map metadata = 42; + + optional TransformProto effective_transform = 43; + optional FloatRectProto source_bounds = 44; + optional FloatRectProto bounds = 45; + optional FloatRectProto screen_bounds = 46; + + optional InputWindowInfoProto input_window_info = 47; + + // Crop used to draw the rounded corner. + optional FloatRectProto corner_radius_crop = 48; + + // length of the shadow to draw around the layer, it may be set on the + // layer or set by a parent layer. + optional float shadow_radius = 49; + optional ColorTransformProto color_transform = 50; + + optional bool is_relative_of = 51; + // Layer's background blur radius in pixels. + optional int32 background_blur_radius = 52; + + optional uint32 owner_uid = 53; + + // Regions of a layer, where blur should be applied. + repeated BlurRegion blur_regions = 54; + + optional bool is_trusted_overlay = 55; + + // Corner radius explicitly set on layer rather than inherited + optional float requested_corner_radius = 56 [deprecated = true]; + + optional RectProto destination_frame = 57; + + optional uint32 original_id = 58; + + optional TrustedOverlay trusted_overlay = 59; + + // Layer's scale during background blur, relative to 1.0f=100% + optional float background_blur_scale = 60; + + // Layer's corner radius. + optional CornerRadiiProto corner_radii = 61; + + // Corner radius explicitly set on layer rather than inherited + optional CornerRadiiProto requested_corner_radii = 62; + + // Corner radius explicity set as drawn by client + optional CornerRadiiProto client_drawn_corner_radii = 63; + + // Priority value of the layer set by the system. + optional int32 system_content_priority = 64; + + // Settings which specify how shadows should be drawn for a layer. + optional BoxShadowSettings box_shadow_settings = 65; + + // Settings which specify how an outline should be drawn for a layer. + optional BorderSettings border_settings = 66; + + // "True" corner radii of the layer computed by SurfaceFlinger. + optional CornerRadiiProto effective_radii = 67; +} + +message PositionProto { + optional float x = 1; + optional float y = 2; +} + +message FloatRectProto { + optional float left = 1; + optional float top = 2; + optional float right = 3; + optional float bottom = 4; +} + +message CornerRadiiProto { + optional float tl = 1; + optional float tr = 2; + optional float bl = 3; + optional float br = 4; +} + +message ActiveBufferProto { + optional uint32 width = 1; + optional uint32 height = 2; + optional uint32 stride = 3; + optional int32 format = 4; + optional uint64 usage = 5; +} + +message BarrierLayerProto { + // layer id the barrier is waiting on. + optional int32 id = 1; + // frame number the barrier is waiting on. + optional uint64 frame_number = 2; +} + +// End of protos/perfetto/trace/android/surfaceflinger_layers.proto + +// Begin of protos/perfetto/trace/android/surfaceflinger_transactions.proto + +// Message used by Winscope to process legacy trace files. +// Represents a file full of surface flinger transactions. +// Encoded, it should start with 0x54 0x4E 0x58 0x54 0x52 0x41 0x43 0x45 +// (.TNXTRACE), such that they can be easily identified. +message TransactionTraceFile { + // constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | + // MagicNumber.MAGIC_NUMBER_L (this is needed because enums have to be 32 bits + // and there's no nice way to put 64bit constants into .proto files. + enum MagicNumber { + INVALID = 0; + // TNXT (little-endian ASCII) + MAGIC_NUMBER_L = 0x54584E54; + // RACE (little-endian ASCII) + MAGIC_NUMBER_H = 0x45434152; + } + + // Must be the first field, set to value in MagicNumber + optional fixed64 magic_number = 1; + repeated TransactionTraceEntry entry = 2; + + // offset between real-time clock and elapsed time clock in nanoseconds. + // Calculated as: systemTime(SYSTEM_TIME_REALTIME) - + // systemTime(SYSTEM_TIME_MONOTONIC) + optional fixed64 real_to_elapsed_time_offset_nanos = 3; + optional uint32 version = 4; +} + +message TransactionTraceEntry { + optional int64 elapsed_realtime_nanos = 1; + optional int64 vsync_id = 2; + repeated TransactionState transactions = 3; + repeated LayerCreationArgs added_layers = 4; + repeated uint32 destroyed_layers = 5; + repeated DisplayState added_displays = 6; + repeated int32 removed_displays = 7; + repeated uint32 destroyed_layer_handles = 8; + optional bool displays_changed = 9; + repeated DisplayInfo displays = 10; +} + +message DisplayInfo { + optional uint32 layer_stack = 1; + optional int32 display_id = 2; + optional int32 logical_width = 3; + optional int32 logical_height = 4; + optional Transform transform_inverse = 5; + optional Transform transform = 6; + optional bool receives_input = 7; + optional bool is_secure = 8; + optional bool is_primary = 9; + optional bool is_virtual = 10; + optional int32 rotation_flags = 11; + optional int32 transform_hint = 12; +} + +message LayerCreationArgs { + optional uint32 layer_id = 1; + optional string name = 2; + optional uint32 flags = 3; + optional uint32 parent_id = 4; + optional uint32 mirror_from_id = 5; + optional bool add_to_root = 6; + optional uint32 layer_stack_to_mirror = 7; +} + +message Transform { + optional float dsdx = 1; + optional float dtdx = 2; + optional float dtdy = 3; + optional float dsdy = 4; + optional float tx = 5; + optional float ty = 6; +} + +message TransactionBarrier { + optional string barrier_token = 1; + optional uint32 kind = 2; +} + +message TransactionState { + optional int32 pid = 1; + optional int32 uid = 2; + optional int64 vsync_id = 3; + optional int32 input_event_id = 4; + optional int64 post_time = 5; + optional uint64 transaction_id = 6; + repeated LayerState layer_changes = 7; + repeated DisplayState display_changes = 8; + repeated uint64 merged_transaction_ids = 9; + optional uint64 apply_token = 10; + repeated TransactionBarrier transaction_barriers = 11; +} + +// Keep insync with layer_state_t +message LayerState { + optional uint32 layer_id = 1; + // Changes are split into ChangesLsb and ChangesMsb. First 32 bits are in + // ChangesLsb and the next 32 bits are in ChangesMsb. This is needed because + // enums have to be 32 bits and there's no nice way to put 64bit constants + // into .proto files. + enum ChangesLsb { + eChangesLsbNone = 0; + ePositionChanged = 0x00000001; + eLayerChanged = 0x00000002; + // unused = 0x00000004; + eAlphaChanged = 0x00000008; + + eMatrixChanged = 0x00000010; + eTransparentRegionChanged = 0x00000020; + eFlagsChanged = 0x00000040; + eLayerStackChanged = 0x00000080; + + eReleaseBufferListenerChanged = 0x00000400; + eShadowRadiusChanged = 0x00000800; + + eBufferCropChanged = 0x00002000; + eRelativeLayerChanged = 0x00004000; + eReparent = 0x00008000; + + eColorChanged = 0x00010000; + eBufferTransformChanged = 0x00040000; + eTransformToDisplayInverseChanged = 0x00080000; + + eCropChanged = 0x00100000; + eBufferChanged = 0x00200000; + eAcquireFenceChanged = 0x00400000; + eDataspaceChanged = 0x00800000; + + eHdrMetadataChanged = 0x01000000; + eSurfaceDamageRegionChanged = 0x02000000; + eApiChanged = 0x04000000; + eSidebandStreamChanged = 0x08000000; + + eColorTransformChanged = 0x10000000; + eHasListenerCallbacksChanged = 0x20000000; + eInputInfoChanged = 0x40000000; + // 0x80000000; (proto stores enums as signed int) + eCornerRadiusChanged = -2147483648; + }; + enum ChangesMsb { + eChangesMsbNone = 0; + eDestinationFrameChanged = 0x1; + eCachedBufferChanged = 0x2; + eBackgroundColorChanged = 0x4; + eMetadataChanged = 0x8; + eColorSpaceAgnosticChanged = 0x10; + eFrameRateSelectionPriority = 0x20; + eFrameRateChanged = 0x40; + eBackgroundBlurRadiusChanged = 0x80; + eProducerDisconnect = 0x100; + eFixedTransformHintChanged = 0x200; + eFrameNumberChanged = 0x400; + eBlurRegionsChanged = 0x800; + eAutoRefreshChanged = 0x1000; + eStretchChanged = 0x2000; + eTrustedOverlayChanged = 0x4000; + eDropInputModeChanged = 0x8000; + eClientDrawnCornerRadiusChanged = 0x00010000; + eSystemContentPriorityChanged = 0x00020000; + eBoxShadowSettingsChanged = 0x00040000; + eBorderSettingsChanged = 0x00080000; + }; + optional uint64 what = 2; + optional float x = 3; + optional float y = 4; + optional int32 z = 5; + optional uint32 w = 6; + optional uint32 h = 7; + optional uint32 layer_stack = 8; + + enum Flags { + eFlagsNone = 0; + eLayerHidden = 0x01; + eLayerOpaque = 0x02; + eLayerSkipScreenshot = 0x40; + eLayerSecure = 0x80; + eEnableBackpressure = 0x100; + eLayerIsDisplayDecoration = 0x200; + }; + optional uint32 flags = 9; + optional uint32 mask = 10; + + message Matrix22 { + optional float dsdx = 1; + optional float dtdx = 2; + optional float dtdy = 3; + optional float dsdy = 4; + }; + + message CornerRadii { + optional float tl = 1; + optional float tr = 2; + optional float bl = 3; + optional float br = 4; + } + optional Matrix22 matrix = 11; + optional float corner_radius = 12 [deprecated = true]; + optional uint32 background_blur_radius = 13; + optional uint32 parent_id = 14; + optional uint32 relative_parent_id = 15; + + optional float alpha = 16; + message Color3 { + optional float r = 1; + optional float g = 2; + optional float b = 3; + } + optional Color3 color = 17; + optional RegionProto transparent_region = 18; + optional uint32 transform = 19; + optional bool transform_to_display_inverse = 20; + optional RectProto crop = 21; + + message BufferData { + optional uint64 buffer_id = 1; + optional uint32 width = 2; + optional uint32 height = 3; + optional uint64 frame_number = 4; + + enum BufferDataChange { + BufferDataChangeNone = 0; + fenceChanged = 0x01; + frameNumberChanged = 0x02; + cachedBufferChanged = 0x04; + } + optional uint32 flags = 5; + optional uint64 cached_buffer_id = 6; + + enum PixelFormat { + PIXEL_FORMAT_UNKNOWN = 0; + PIXEL_FORMAT_CUSTOM = -4; + PIXEL_FORMAT_TRANSLUCENT = -3; + PIXEL_FORMAT_TRANSPARENT = -2; + PIXEL_FORMAT_OPAQUE = -1; + PIXEL_FORMAT_RGBA_8888 = 1; + PIXEL_FORMAT_RGBX_8888 = 2; + PIXEL_FORMAT_RGB_888 = 3; + PIXEL_FORMAT_RGB_565 = 4; + PIXEL_FORMAT_BGRA_8888 = 5; + PIXEL_FORMAT_RGBA_5551 = 6; + PIXEL_FORMAT_RGBA_4444 = 7; + PIXEL_FORMAT_RGBA_FP16 = 22; + PIXEL_FORMAT_RGBA_1010102 = 43; + PIXEL_FORMAT_R_8 = 0x38; + } + optional PixelFormat pixel_format = 7; + optional uint64 usage = 8; + } + optional BufferData buffer_data = 22; + optional int32 api = 23; + optional bool has_sideband_stream = 24; + optional ColorTransformProto color_transform = 25; + repeated BlurRegion blur_regions = 26; + + message WindowInfo { + optional uint32 layout_params_flags = 1; + optional int32 layout_params_type = 2; + optional RegionProto touchable_region = 3; + optional int32 surface_inset = 4; + // unused + optional bool focusable = 5; + // unused + optional bool has_wallpaper = 6; + optional float global_scale_factor = 7; + optional uint32 crop_layer_id = 8; + optional bool replace_touchable_region_with_crop = 9; + optional RectProto touchable_region_crop = 10; + optional Transform transform = 11; + optional uint32 input_config = 12; + } + optional WindowInfo window_info_handle = 27; + optional float bg_color_alpha = 28; + optional int32 bg_color_dataspace = 29; + optional bool color_space_agnostic = 30; + optional float shadow_radius = 31; + optional int32 frame_rate_selection_priority = 32; + optional float frame_rate = 33; + optional int32 frame_rate_compatibility = 34; + optional int32 change_frame_rate_strategy = 35; + optional uint32 fixed_transform_hint = 36; + optional uint64 frame_number = 37; + optional bool auto_refresh = 38; + // unused + optional bool is_trusted_overlay = 39; + optional RectProto buffer_crop = 40; + optional RectProto destination_frame = 41; + + enum DropInputMode { + NONE = 0; + ALL = 1; + OBSCURED = 2; + }; + optional DropInputMode drop_input_mode = 42; + + optional TrustedOverlay trusted_overlay = 43; + + optional float background_blur_scale = 44; + + optional CornerRadii corner_radii = 45; + + optional CornerRadii client_drawn_corner_radii = 46; + + optional int32 system_content_priority = 47; + + optional BoxShadowSettings box_shadow_settings = 48; + + optional BorderSettings border_settings = 49; +} + +message DisplayState { + enum Changes { + eChangesNone = 0; + eSurfaceChanged = 0x01; + eLayerStackChanged = 0x02; + eDisplayProjectionChanged = 0x04; + eDisplaySizeChanged = 0x08; + eFlagsChanged = 0x10; + }; + optional int32 id = 1; + optional uint32 what = 2; + optional uint32 flags = 3; + optional uint32 layer_stack = 4; + optional uint32 orientation = 5; + optional RectProto layer_stack_space_rect = 6; + optional RectProto oriented_display_space_rect = 7; + optional uint32 width = 8; + optional uint32 height = 9; +} + +// End of protos/perfetto/trace/android/surfaceflinger_transactions.proto + +// Begin of protos/perfetto/trace/android/winscope_extensions.proto + +message WinscopeExtensions { + extensions 1 to 6; +} + +// End of protos/perfetto/trace/android/winscope_extensions.proto + +// Begin of protos/perfetto/trace/chrome/chrome_benchmark_metadata.proto + +// This message is not intended to be written by the chrome on the device. +// It's emitted on the host by the telemetry benchmark infrastructure (it's a +// part of the trace that's written by the telemetry tracing agent). +message ChromeBenchmarkMetadata { + // Time when the benchmark execution started (host unixtime in microseconds). + optional int64 benchmark_start_time_us = 1; + + // Time when this particular story was run (host unixtime in microseconds). + optional int64 story_run_time_us = 2; + + // Name of benchmark. + optional string benchmark_name = 3; + + // Description of benchmark. + optional string benchmark_description = 4; + + // Optional label. + optional string label = 5; + + // Name of story. + optional string story_name = 6; + + // List of story tags. + repeated string story_tags = 7; + + // Index of the story run (>0 if the same story was run several times). + optional int32 story_run_index = 8; + + // Whether this run failed. + optional bool had_failures = 9; +} + +// End of protos/perfetto/trace/chrome/chrome_benchmark_metadata.proto + +// Begin of protos/perfetto/trace/chrome/chrome_metadata.proto + +// Metadata for chrome traces. +message ChromeMetadataPacket { + optional BackgroundTracingMetadata background_tracing_metadata = 1; + + // Version code of Chrome used by Android's Play Store. This field is only set + // on Android. + optional int32 chrome_version_code = 2; + + // Comma separated list of enabled categories for tracing. The list of + // possible category strings are listed in code + // base/trace_event/builtin_categories.h. + optional string enabled_categories = 3; + + // Finch name and group based on the ActiveGroupId. + message FinchHash { + optional uint32 name = 1; + optional uint32 group = 2; + } + + // List of Finch study/groups that apply to this trace. + repeated FinchHash field_trial_hashes = 4; +} + +// Metadata related to background tracing scenarios, states and triggers. +message BackgroundTracingMetadata { + // Information about a trigger rule defined in the experiment config. + message TriggerRule { + enum TriggerType { + TRIGGER_UNSPECIFIED = 0; + + // Traces are triggered by specific range of values of an UMA histogram. + MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE = 1; + + // Traces are triggered by specific named events in chromium codebase, + // like "second-update-failure". + MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED = 2; + } + optional TriggerType trigger_type = 1; + + // Configuration of histogram trigger. + message HistogramRule { + // UMA histogram name hash, same as HistogramEventProto.name_hash. + optional fixed64 histogram_name_hash = 1; + + // Range of values of the histogram that activates trigger. + optional int64 histogram_min_trigger = 2; + optional int64 histogram_max_trigger = 3; + } + optional HistogramRule histogram_rule = 2; + + // Configuration of named trigger. + message NamedRule { + enum EventType { + UNSPECIFIED = 0; + SESSION_RESTORE = 1; + NAVIGATION = 2; + STARTUP = 3; + REACHED_CODE = 4; + CONTENT_TRIGGER = 5; + + TEST_RULE = 1000; + } + optional EventType event_type = 1; + + // If |event_type| is CONTENT_TRIGGER, then this stores the hash of the + // content-trigger that actually fired. + optional fixed64 content_trigger_name_hash = 2; + } + optional NamedRule named_rule = 3; + + // Hash of the rule name. + optional fixed32 name_hash = 4; + } + + // Specifies the rule that caused the trace to be uploaded. + optional TriggerRule triggered_rule = 1; + + // List of all active triggers in current session, when trace was triggered. + repeated TriggerRule active_rules = 2; + + // Hash of the scenario name. + optional fixed32 scenario_name_hash = 3; +} + +// End of protos/perfetto/trace/chrome/chrome_metadata.proto + +// Begin of protos/perfetto/trace/chrome/chrome_trace_event.proto + +message ChromeTracedValue { + enum NestedType { + DICT = 0; + ARRAY = 1; + } + optional NestedType nested_type = 1; + + repeated string dict_keys = 2; + repeated ChromeTracedValue dict_values = 3; + repeated ChromeTracedValue array_values = 4; + optional int32 int_value = 5; + optional double double_value = 6; + optional bool bool_value = 7; + optional string string_value = 8; +} + +message ChromeStringTableEntry { + optional string value = 1; + optional int32 index = 2; +} + +// Deprecated, use TrackEvent protos instead. +message ChromeTraceEvent { + message Arg { + optional string name = 1; + + oneof value { + bool bool_value = 2; + uint64 uint_value = 3; + int64 int_value = 4; + double double_value = 5; + string string_value = 6; + // Pointers are stored in a separate type as the JSON output treats them + // differently from other uint64 values. + uint64 pointer_value = 7; + string json_value = 8; + ChromeTracedValue traced_value = 10; + } + + // Takes precedence over |name| if set, + // and is an index into |string_table|. + optional uint32 name_index = 9; + } + + optional string name = 1; + optional int64 timestamp = 2; + optional int32 phase = 3; + optional int32 thread_id = 4; + optional int64 duration = 5; + optional int64 thread_duration = 6; + optional string scope = 7; + optional uint64 id = 8; + optional uint32 flags = 9; + optional string category_group_name = 10; + optional int32 process_id = 11; + optional int64 thread_timestamp = 12; + optional uint64 bind_id = 13; + + repeated Arg args = 14; + + // Takes precedence over respectively |name| and + // |category_group_name_index| if set, + // and are indices into |string_table|. + optional uint32 name_index = 15; + optional uint32 category_group_name_index = 16; +} + +message ChromeMetadata { + optional string name = 1; + + oneof value { + string string_value = 2; + bool bool_value = 3; + int64 int_value = 4; + string json_value = 5; + } +} + +// Subtraces produced in legacy json format by Chrome tracing agents not yet +// updated to support the new binary format, e.g. ETW and CrOS ARC. +// TODO(eseckler): Update these agents to become perfetto producers. +message ChromeLegacyJsonTrace { + enum TraceType { + USER_TRACE = 0; + + // Deprecated. + SYSTEM_TRACE = 1; + } + optional TraceType type = 1; + optional string data = 2; +} + +message ChromeEventBundle { + // Deprecated, use TrackEvent protos instead. + repeated ChromeTraceEvent trace_events = 1 [deprecated = true]; + // TODO(ssid): This should be deprecated in favor of ChromeMetadataPacket + // which contains typed fields. + repeated ChromeMetadata metadata = 2; + // ftrace output from CrOS and Cast system tracing agents. + // TODO(eseckler): Replace system traces with native perfetto service. + repeated string legacy_ftrace_output = 4; + repeated ChromeLegacyJsonTrace legacy_json_trace = 5; + + // Contents of a string table that's valid for + // the whole ChromeEventBundle entry. + repeated ChromeStringTableEntry string_table = 3 [deprecated = true]; +} + +// End of protos/perfetto/trace/chrome/chrome_trace_event.proto + +// Begin of protos/perfetto/trace/chrome/chrome_trigger.proto + +// Information about a specific trigger during a background tracing scenario +// Associated packet timestamps are useful to delimitate a scenario range in a +// trace. Triggers are also useful for filtering traces. +message ChromeTrigger { + // Name of the trigger which was received. + optional string trigger_name = 1; + // SHA1 hash of the trigger name. + optional fixed32 trigger_name_hash = 2; + // Flow id which should terminate on this trigger. + optional fixed64 flow_id = 3; +} + +// End of protos/perfetto/trace/chrome/chrome_trigger.proto + +// Begin of protos/perfetto/trace/chrome/v8.proto + +// These are the protos for the V8 data source. +// +// All events are associated to a V8 isolate instance. There can be multiple +// instances associated to a given thread, although this is rare. +// +// Generated code in V8 is allocated in the V8 heap (in a special executeable +// section), this means that code can be garbage collected (when no longer used) +// or can be moved around (e.g. during heap compactation). This means that a +// given callsite might correspond to function `A` at one point in time and to +// function `B` later on. +// In addition V8 code has various levels of optimization, so a function might +// have multiple associated code snippets. +// +// V8 does not track code deletion, so we have to indirectly infer it by +// detecting code overlaps, if a newer code creation event overlaps with older +// code we need to asume that the old code was deleted. Code moves are logged, +// and there is an event to track those. + +// 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 +message V8String { + oneof encoded_string { + // ISO/IEC 8859-1:1998 encoding aka latin1 + // https://en.wikipedia.org/wiki/ISO/IEC_8859-1 + bytes latin1 = 1; + // UTF-16 Little Endian Encoding + bytes utf16_le = 2; + // UTF-16 Big Endian Encoding + bytes utf16_be = 3; + } +} + +// Interned version of V8String +message InternedV8String { + optional uint64 iid = 1; + // 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. + oneof encoded_string { + // ISO/IEC 8859-1:1998 encoding aka latin1 + // https://en.wikipedia.org/wiki/ISO/IEC_8859-1 + bytes latin1 = 2; + // UTF-16 Little Endian Encoding + bytes utf16_le = 3; + // UTF-16 Big Endian Encoding + bytes utf16_be = 4; + } +} + +// 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). +message InternedV8JsScript { + optional uint64 iid = 1; + // Unique in a given isolate + optional int32 script_id = 2; + + enum Type { + TYPE_UNKNOWN = 0; + TYPE_NORMAL = 1; + TYPE_EVAL = 2; + TYPE_MODULE = 3; + TYPE_NATIVE = 4; + TYPE_EXTENSION = 5; + TYPE_INSPECTOR = 6; + } + + optional Type type = 3; + optional V8String name = 4; + // Actual source of the script + optional V8String source = 5; +} + +message InternedV8WasmScript { + optional uint64 iid = 1; + // Unique in a given isolate + optional int32 script_id = 2; + + optional string url = 3; + // Raw transferred wasm native module wire bytes. + optional bytes wire_bytes = 4; +} + +message InternedV8JsFunction { + enum Kind { + KIND_UNKNOWN = 0; + KIND_NORMAL_FUNCTION = 1; + KIND_MODULE = 2; + KIND_ASYNC_MODULE = 3; + KIND_BASE_CONSTRUCTOR = 4; + KIND_DEFAULT_BASE_CONSTRUCTOR = 5; + KIND_DEFAULT_DERIVED_CONSTRUCTOR = 6; + KIND_DERIVED_CONSTRUCTOR = 7; + KIND_GETTER_FUNCTION = 8; + KIND_STATIC_GETTER_FUNCTION = 9; + KIND_SETTER_FUNCTION = 10; + KIND_STATIC_SETTER_FUNCTION = 11; + KIND_ARROW_FUNCTION = 12; + KIND_ASYNC_ARROW_FUNCTION = 13; + KIND_ASYNC_FUNCTION = 14; + KIND_ASYNC_CONCISE_METHOD = 15; + KIND_STATIC_ASYNC_CONCISE_METHOD = 16; + KIND_ASYNC_CONCISE_GENERATOR_METHOD = 17; + KIND_STATIC_ASYNC_CONCISE_GENERATOR_METHOD = 18; + KIND_ASYNC_GENERATOR_FUNCTION = 19; + KIND_GENERATOR_FUNCTION = 20; + KIND_CONCISE_GENERATOR_METHOD = 21; + KIND_STATIC_CONCISE_GENERATOR_METHOD = 22; + KIND_CONCISE_METHOD = 23; + KIND_STATIC_CONCISE_METHOD = 24; + KIND_CLASS_MEMBERS_INITIALIZER_FUNCTION = 25; + KIND_CLASS_STATIC_INITIALIZER_FUNCTION = 26; + KIND_INVALID = 27; + } + optional uint64 iid = 1; + optional uint64 v8_js_function_name_iid = 2; + optional uint64 v8_js_script_iid = 3; + + optional bool is_toplevel = 4; + optional Kind kind = 5; + + // Where in the script source this function is defined. This is counted in + // bytes not characters. + optional uint32 byte_offset = 6; + optional uint32 line = 7; + optional uint32 column = 8; +} + +// A V8 Isolate instance. A V8 Isolate represents an isolated instance of the V8 +// engine. +message InternedV8Isolate { + optional uint64 iid = 1; + + optional uint32 pid = 2; + + // Process unique isolate id. + optional int32 isolate_id = 3; + + // 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. + message CodeRange { + optional uint64 base_address = 1; + optional uint64 size = 2; + // Used when short builtin calls are enabled, where embedded builtins are + // copied into the CodeRange so calls can be nearer. + optional uint64 embedded_blob_code_copy_start_address = 3; + // Whether this code range is shared with other Isolates in the same process + optional bool is_process_wide = 4; + } + optional CodeRange code_range = 4; + // The embedded blob holds code for built in functions that are precompiled in + // the V8 library. + optional uint64 embedded_blob_code_start_address = 5; + optional uint64 embedded_blob_code_size = 6; +} + +message V8JsCode { + enum Tier { + TIER_UNKNOWN = 0; + TIER_IGNITION = 1; + TIER_SPARKPLUG = 2; + TIER_MAGLEV = 3; + TIER_TURBOSHAFT = 4; + TIER_TURBOFAN = 5; + } + optional uint64 v8_isolate_iid = 1; + optional uint32 tid = 2; + optional uint64 v8_js_function_iid = 3; + optional Tier tier = 4; + + optional uint64 instruction_start = 5; + optional uint64 instruction_size_bytes = 6; + oneof instructions { + bytes machine_code = 7; + bytes bytecode = 8; + } +} + +message V8InternalCode { + enum Type { + TYPE_UNKNOWN = 0; + TYPE_BYTECODE_HANDLER = 1; + TYPE_FOR_TESTING = 2; + TYPE_BUILTIN = 3; + TYPE_WASM_FUNCTION = 4; + TYPE_WASM_TO_CAPI_FUNCTION = 5; + TYPE_WASM_TO_JS_FUNCTION = 6; + TYPE_JS_TO_WASM_FUNCTION = 7; + TYPE_JS_TO_JS_FUNCTION = 8; + TYPE_C_WASM_ENTRY = 9; + } + optional uint64 v8_isolate_iid = 1; + optional uint32 tid = 2; + optional string name = 3; + optional Type type = 4; + optional int32 builtin_id = 5; + + optional uint64 instruction_start = 6; + optional uint64 instruction_size_bytes = 7; + optional bytes machine_code = 8; +} + +message V8WasmCode { + enum Tier { + TIER_UNKNOWN = 0; + TIER_LIFTOFF = 1; + TIER_TURBOFAN = 2; + } + optional uint64 v8_isolate_iid = 1; + optional uint32 tid = 2; + optional uint64 v8_wasm_script_iid = 3; + optional string function_name = 4; + + optional Tier tier = 5; + optional int32 code_offset_in_module = 6; + + optional uint64 instruction_start = 7; + optional uint64 instruction_size_bytes = 8; + optional bytes machine_code = 9; +} + +message V8RegExpCode { + optional uint64 v8_isolate_iid = 1; + optional uint32 tid = 2; + optional V8String pattern = 3; + + optional uint64 instruction_start = 4; + optional uint64 instruction_size_bytes = 5; + optional bytes machine_code = 6; +} + +// Move event for V8 code (JS / Wasm / Internal / Regexp) that was relocated in +// memory by V8's GC. +message V8CodeMove { + optional uint64 isolate_iid = 1; + optional uint32 tid = 2; + optional uint64 from_instruction_start_address = 3; + optional uint64 to_instruction_start_address = 4; + optional uint64 instruction_size_bytes = 5; + oneof to_instructions { + bytes to_machine_code = 6; + bytes to_bytecode = 7; + } +} + +message V8CodeDefaults { + optional uint32 tid = 1; +} + +// End of protos/perfetto/trace/chrome/v8.proto + +// Begin of protos/perfetto/trace/clock_snapshot.proto + +// A snapshot of clock readings to allow for trace alignment. +message ClockSnapshot { + message Clock { + // DEPRECATED. This enum has moved to ../common/builtin_clock.proto. + enum BuiltinClocks { + UNKNOWN = 0; + REALTIME = 1; + REALTIME_COARSE = 2; + MONOTONIC = 3; + MONOTONIC_COARSE = 4; + MONOTONIC_RAW = 5; + BOOTTIME = 6; + BUILTIN_CLOCK_MAX_ID = 63; + + reserved 7, 8; + } + + // Clock IDs have the following semantic: + // [1, 63]: Builtin types, see BuiltinClock from + // ../common/builtin_clock.proto. + // [64, 127]: User-defined clocks. These clocks are sequence-scoped. They + // are only valid within the same |trusted_packet_sequence_id| + // (i.e. only for TracePacket(s) emitted by the same TraceWriter + // that emitted the clock snapshot). + // [128, MAX]: Reserved for future use. The idea is to allow global clock + // IDs and setting this ID to hash(full_clock_name) & ~127. + optional uint32 clock_id = 1; + + // Absolute timestamp. Unit is ns unless specified otherwise by the + // unit_multiplier_ns field below. + optional uint64 timestamp = 2; + + // When true each TracePacket's timestamp should be interpreted as a delta + // from the last TracePacket's timestamp (referencing this clock) emitted by + // the same packet_sequence_id. Should only be used for user-defined + // sequence-local clocks. The first packet timestamp after each + // ClockSnapshot that contains this clock is relative to the |timestamp| in + // the ClockSnapshot. + optional bool is_incremental = 3; + + // Allows to specify a custom unit different than the default (ns) for this + // clock domain. + // + // * A multiplier of 1000 means that a timestamp = 3 should be interpreted + // as 3000 ns = 3 us. + // * All snapshots for the same clock within a trace need to use the same + // unit. + // * `unit_multiplier_ns` is *not* supported for the `primary_trace_clock`. + optional uint64 unit_multiplier_ns = 4; + } + repeated Clock clocks = 1; + + // The authoritative clock domain for the trace. Defaults to BOOTTIME, but can + // be overridden in TraceConfig's builtin_data_sources. Trace processor will + // attempt to translate packet/event timestamps from various data sources (and + // their chosen clock domains) to this domain during import. + optional BuiltinClock primary_trace_clock = 2; +} + +// End of protos/perfetto/trace/clock_snapshot.proto + +// Begin of protos/perfetto/trace/etw/etw.proto + +// Proto definition based on the Thread_v2 CSwitch class definition +// See: https://learn.microsoft.com/en-us/windows/win32/etw/cswitch +message CSwitchEtwEvent { + // New thread ID after the switch. + optional uint32 new_thread_id = 1; + + // Previous thread ID. + optional uint32 old_thread_id = 2; + + // Thread priority of the new thread. + optional sint32 new_thread_priority = 3; + + // Thread priority of the previous thread. + optional sint32 old_thread_priority = 4; + + // The index of the C-state that was last used by the processor. A value of 0 + // represents the lightest idle state with higher values representing deeper + // C-states. + optional uint32 previous_c_state = 5; + + // Wait reason for the previous thread. The ordering is important as based on + // the OldThreadWaitReason definition from the link above. The following are + // the possible values: + enum OldThreadWaitReason { + EXECUTIVE = 0; + FREE_PAGE = 1; + PAGE_IN = 2; + POOL_ALLOCATION = 3; + DELAY_EXECUTION = 4; + SUSPEND = 5; + USER_REQUEST = 6; + WR_EXECUTIVE = 7; + WR_FREE_PAGE = 8; + WR_PAGE_IN = 9; + WR_POOL_ALLOCATION = 10; + WR_DELAY_EXECUTION = 11; + WR_SUSPENDED = 12; + WR_USER_REQUEST = 13; + WR_EVENT_PAIR = 14; + WR_QUEUE = 15; + WR_LPC_RECEIVER = 16; + WR_LPC_REPLY = 17; + WR_VIRTUAL_MEMORY = 18; + WR_PAGE_OUT = 19; + WR_RENDEZ_VOUS = 20; + WR_KEYED_EVENT = 21; + WR_TERMINATED = 22; + WR_PROCESS_IN_SWAP = 23; + WR_CPU_RATE_CONTROL = 24; + WR_CALLOUT_STACK = 25; + WR_KERNEL = 26; + WR_RESOURCE = 27; + WR_PUSH_LOCK = 28; + WR_MUTEX = 29; + WR_QUANTUM_END = 30; + WR_DISPATCH_INT = 31; + WR_PREEMPTED = 32; + WR_YIELD_EXECUTION = 33; + WR_FAST_MUTEX = 34; + WR_GUARD_MUTEX = 35; + WR_RUNDOWN = 36; + MAXIMUM_WAIT_REASON = 37; + } + + oneof old_thread_wait_reason_enum_or_int { + OldThreadWaitReason old_thread_wait_reason = 6; + int32 old_thread_wait_reason_int = 11; + } + + // Wait mode for the previous thread. The ordering is important as based on + // the OldThreadWaitMode definition from the link above. The following are the + // possible values: + enum OldThreadWaitMode { + KERNEL_MODE = 0; + USER_MODE = 1; + } + + oneof old_thread_wait_mode_enum_or_int { + OldThreadWaitMode old_thread_wait_mode = 7; + int32 old_thread_wait_mode_int = 12; + } + + // State of the previous thread. The ordering is important as based on the + // OldThreadState definition from the link above. The following are the + // possible state values: + enum OldThreadState { + INITIALIZED = 0; + READY = 1; + RUNNING = 2; + STANDBY = 3; + TERMINATED = 4; + WAITING = 5; + TRANSITION = 6; + DEFERRED_READY = 7; + } + + oneof old_thread_state_enum_or_int { + OldThreadState old_thread_state = 8; + sint32 old_thread_state_int = 13; + } + + // Ideal wait time of the previous thread. + optional sint32 old_thread_wait_ideal_processor = 9; + + // Wait time for the new thread. + optional uint32 new_thread_wait_time = 10; +} + +// Proto definition based on the Thread_v2 CSwitch class definition +// See: https://learn.microsoft.com/en-us/windows/win32/etw/readythread +message ReadyThreadEtwEvent { + // The thread identifier of the thread being readied for execution. + optional uint32 t_thread_id = 1; + + // The reason for the priority boost. The ordering is important as based on + // the AdjustReason definition from the link above. + enum AdjustReason { + IGNORE_THE_INCREMENT = 0; + // Apply the increment, which will decay incrementally at the end of each + // quantum. + APPLY_INCREMENT = 1; + // Apply the increment as a boost that will decay in its entirety at quantum + // (typically for priority donation). + APPLY_INCREMENT_BOOST = 2; + } + + oneof adjust_reason_enum_or_int { + AdjustReason adjust_reason = 2; + int32 adjust_reason_int = 5; + } + + // The value by which the priority is being adjusted. + optional sint32 adjust_increment = 3; + + enum TraceFlag { + TRACE_FLAG_UNSPECIFIED = 0; + // The thread has been readied from DPC (deferred procedure call). + THREAD_READIED = 0x1; + // The kernel stack is currently swapped out. + KERNEL_STACK_SWAPPED_OUT = 0x2; + // The process address space is swapped out. + PROCESS_ADDRESS_SWAPPED_OUT = 0x4; + } + + oneof flag_enum_or_int { + TraceFlag flag = 4; + int32 flag_int = 6; + } +} + +// Proto definition based on the type of MemInfoArgs_V1, found here and observed +// on local traces using tracerpt: +// https://github.com/repnz/etw-providers-docs/blob/master/Manifests-Win10-17134/Microsoft-Windows-Kernel-Memory.xml +message MemInfoEtwEvent { + // Number of memory priorities on the system. + optional uint32 priority_levels = 1; + + // Number of pages in the zero list. + optional uint64 zero_page_count = 2; + + // Number of pages in the free list. + optional uint64 free_page_count = 3; + + // Number of pages in the modified list. + optional uint64 modified_page_count = 4; + + // Number of modified non-paged pool pages. + optional uint64 modified_no_write_page_count = 5; + + // Number of bad pages. + optional uint64 bad_page_count = 6; + + // Number of standby pages by memory priority. + repeated uint64 standby_page_counts = 7; + + // Number of repurposed pages by memory priority. + repeated uint64 repurposed_page_counts = 8; + + // Modified paged pages. + optional uint64 modified_page_count_page_file = 9; + // Pool page counts. + optional uint64 paged_pool_page_count = 10; + optional uint64 non_paged_pool_page_count = 11; + + // Memory Descriptor List page count. + optional uint64 mdl_page_count = 12; + + // Commit weight. + optional uint64 commit_page_count = 13; +} + +// Proto definition based on the `FileIo_Create` class definition. +message FileIoCreateEtwEvent { + optional uint64 irp_ptr = 1; + optional uint64 file_object = 2; + optional uint32 ttid = 3; + optional uint32 create_options = 4; + optional uint32 file_attributes = 5; + optional uint32 share_access = 6; + optional string open_path = 7; +} + +// Proto definition based on the `FileIo_DirEnum` class definition. +message FileIoDirEnumEtwEvent { + optional uint64 irp_ptr = 1; + optional uint64 file_object = 2; + optional uint64 file_key = 3; + optional uint32 ttid = 4; + optional uint32 length = 5; + optional uint32 info_class = 6; + optional uint32 file_index = 7; + optional string file_name = 8; +} + +// Proto definition based on the `FileIo_Info` class definition. +message FileIoInfoEtwEvent { + optional uint64 irp_ptr = 1; + optional uint64 file_object = 2; + optional uint64 file_key = 3; + optional uint64 extra_info = 4; + optional uint32 ttid = 5; + optional uint32 info_class = 6; +} + +// Proto definition based on the `FileIo_ReadWrite` class definition. +message FileIoReadWriteEtwEvent { + optional uint64 offset = 1; + optional uint64 irp_ptr = 2; + optional uint64 file_object = 3; + optional uint64 file_key = 4; + optional uint32 ttid = 5; + optional uint32 io_size = 6; + optional uint32 io_flags = 7; +} + +// Proto definition based on the `FileIo_SimpleOp` class definition. +message FileIoSimpleOpEtwEvent { + optional uint64 irp_ptr = 1; + optional uint64 file_object = 2; + optional uint64 file_key = 3; + optional uint32 ttid = 4; +} + +// Proto definition based on the `FileIo_OpEnd` class definition. +message FileIoOpEndEtwEvent { + optional uint64 irp_ptr = 1; + optional uint64 extra_info = 2; + optional uint32 nt_status = 3; +} + +// End of protos/perfetto/trace/etw/etw.proto + +// Begin of protos/perfetto/trace/etw/etw_event.proto + +message EtwTraceEvent { + optional uint64 timestamp = 1; + optional uint32 cpu = 4; + optional uint32 thread_id = 5; + + oneof event { + CSwitchEtwEvent c_switch = 2; + ReadyThreadEtwEvent ready_thread = 3; + MemInfoEtwEvent mem_info = 6; + FileIoCreateEtwEvent file_io_create = 7; + FileIoDirEnumEtwEvent file_io_dir_enum = 8; + FileIoInfoEtwEvent file_io_info = 9; + FileIoReadWriteEtwEvent file_io_read_write = 10; + FileIoSimpleOpEtwEvent file_io_simple_op = 11; + FileIoOpEndEtwEvent file_io_op_end = 12; + } +} + +// End of protos/perfetto/trace/etw/etw_event.proto + +// Begin of protos/perfetto/trace/etw/etw_event_bundle.proto + +// The result of tracing one or more etw event uses per-processor buffers where +// an in-use buffer is assigned to each processor at all times. Therefore, +// collecting multiple events they should already be synchronized. +message EtwTraceEventBundle { + optional uint32 cpu = 1; + repeated EtwTraceEvent event = 2; +} +// End of protos/perfetto/trace/etw/etw_event_bundle.proto + +// Begin of protos/perfetto/trace/evdev.proto + +// Records an event in the evdev protocol, as used by Linux and some other *nix +// kernels to report events from human interface devices. +// +// Next ID: 3 +message EvdevEvent { + // The device's unique ID number. This need not be the number of its + // /dev/input/event node. + optional uint32 device_id = 1; + + oneof event { + InputEvent input_event = 2; + } + + // Proto version of Linux's struct input_event. The meaning of types and codes + // are described in the Linux kernel documentation at + // https://www.kernel.org/doc/html/latest/input/event-codes.html. + // + // Next ID: 5 + message InputEvent { + // The monotonic timestamp at which the event occurred, as reported by the + // kernel, in integer nanoseconds. If omitted, assume that it hasn't changed + // since the previous event. + optional uint64 kernel_timestamp = 1; + + // The code grouping for this event, used to distinguish signals, absolute + // and relative axis changes, and other types of event. + optional uint32 type = 2; + // The precise type of the event, such as the axis code for absolute and + // relative events. + optional uint32 code = 3; + // The new value of the axis described by type and code. + optional sint32 value = 4; + } +} + +// End of protos/perfetto/trace/evdev.proto + +// Begin of protos/perfetto/common/descriptor.proto + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + // file name, relative to root of source tree + optional string name = 1; + // e.g. "foo", "foo.bar", etc. + optional string package = 2; + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated FieldDescriptorProto extension = 7; + + reserved 6; + reserved 8; + reserved 9; + reserved 12; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + reserved 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + reserved 7; + + // Range of reserved tag numbers. Reserved tag numbers may not be used by + // fields or extension ranges in the same message. Reserved ranges may + // not overlap. + message ReservedRange { + // Inclusive. + optional int32 start = 1; + // Exclusive. + optional int32 end = 2; + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +message UninterpretedOption { + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). + // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + // "foo.(bar.baz).moo". + message NamePart { + optional string name_part = 1; + optional bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +message FieldOptions { + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + optional bool packed = 2; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + TYPE_GROUP = 10; + // Length-delimited aggregate. + TYPE_MESSAGE = 11; + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + // Uses ZigZag encoding. + TYPE_SINT32 = 17; + // Uses ZigZag encoding. + TYPE_SINT64 = 18; + }; + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + }; + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + optional Type type = 5; + + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + optional string default_value = 7; + + optional FieldOptions options = 8; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + reserved 10; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + reserved 3; + reserved 4; + + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + repeated string reserved_name = 5; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + reserved 3; +} + +message OneofOptions { + reserved 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// End of protos/perfetto/common/descriptor.proto + +// Begin of protos/perfetto/trace/extension_descriptor.proto + +// This message contains descriptors used to parse extension fields of +// TrackEvent. +// +// See docs/design-docs/extensions.md for more details. +message ExtensionDescriptor { + optional FileDescriptorSet extension_set = 1; +} + +// End of protos/perfetto/trace/extension_descriptor.proto + +// Begin of protos/perfetto/trace/filesystem/inode_file_map.proto + +// Represents the mapping between inode numbers in a block device and their path +// on the filesystem +message InodeFileMap { + // Representation of Entry + message Entry { + optional uint64 inode_number = 1; + + // The path to the file, e.g. "etc/file.xml" + // List of strings for multiple hardlinks + repeated string paths = 2; + + // The file type + enum Type { + UNKNOWN = 0; + FILE = 1; + DIRECTORY = 2; + } + optional Type type = 3; + } + + optional uint64 block_device_id = 1; + + // The mount points of the block device, e.g. ["system"]. + repeated string mount_points = 2; + + // The list of all the entries from the block device + repeated Entry entries = 3; +} + +// End of protos/perfetto/trace/filesystem/inode_file_map.proto + +/* COMMENTED ftrace +// Begin of protos/perfetto/trace/ftrace/android_fs.proto + +message AndroidFsDatareadEndFtraceEvent { + optional int32 bytes = 1; + optional uint64 ino = 2; + optional int64 offset = 3; +} +message AndroidFsDatareadStartFtraceEvent { + optional int32 bytes = 1; + optional string cmdline = 2; + optional int64 i_size = 3; + optional uint64 ino = 4; + optional int64 offset = 5; + optional string pathbuf = 6; + optional int32 pid = 7; +} +message AndroidFsDatawriteEndFtraceEvent { + optional int32 bytes = 1; + optional uint64 ino = 2; + optional int64 offset = 3; +} +message AndroidFsDatawriteStartFtraceEvent { + optional int32 bytes = 1; + optional string cmdline = 2; + optional int64 i_size = 3; + optional uint64 ino = 4; + optional int64 offset = 5; + optional string pathbuf = 6; + optional int32 pid = 7; +} +message AndroidFsFsyncEndFtraceEvent { + optional int32 bytes = 1; + optional uint64 ino = 2; + optional int64 offset = 3; +} +message AndroidFsFsyncStartFtraceEvent { + optional string cmdline = 1; + optional int64 i_size = 2; + optional uint64 ino = 3; + optional string pathbuf = 4; + optional int32 pid = 5; +} + +// End of protos/perfetto/trace/ftrace/android_fs.proto + +// Begin of protos/perfetto/trace/ftrace/bcl_exynos.proto + +message BclIrqTriggerFtraceEvent { + optional int32 id = 1; + optional int32 throttle = 2; + optional int32 cpu0_limit = 3; + optional int32 cpu1_limit = 4; + optional int32 cpu2_limit = 5; + optional int32 tpu_limit = 6; + optional int32 gpu_limit = 7; + optional int32 voltage = 8; + optional int32 capacity = 9; +} + +// End of protos/perfetto/trace/ftrace/bcl_exynos.proto + +// Begin of protos/perfetto/trace/ftrace/binder.proto + +message BinderTransactionFtraceEvent { + optional int32 debug_id = 1; + optional int32 target_node = 2; + optional int32 to_proc = 3; + optional int32 to_thread = 4; + optional int32 reply = 5; + optional uint32 code = 6; + optional uint32 flags = 7; +} +message BinderTransactionReceivedFtraceEvent { + optional int32 debug_id = 1; +} +message BinderSetPriorityFtraceEvent { + optional int32 proc = 1; + optional int32 thread = 2; + optional uint32 old_prio = 3; + optional uint32 new_prio = 4; + optional uint32 desired_prio = 5; +} +message BinderLockFtraceEvent { + optional string tag = 1; +} +message BinderLockedFtraceEvent { + optional string tag = 1; +} +message BinderUnlockFtraceEvent { + optional string tag = 1; +} +message BinderTransactionAllocBufFtraceEvent { + optional uint64 data_size = 1; + optional int32 debug_id = 2; + optional uint64 offsets_size = 3; + optional uint64 extra_buffers_size = 4; +} +message BinderCommandFtraceEvent { + optional uint32 cmd = 1; +} +message BinderReturnFtraceEvent { + optional uint32 cmd = 1; +} + +// End of protos/perfetto/trace/ftrace/binder.proto + +// Begin of protos/perfetto/trace/ftrace/block.proto + +message BlockRqIssueFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional uint32 bytes = 4; + optional string rwbs = 5; + optional string comm = 6; + optional string cmd = 7; +} +message BlockBioBackmergeFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional string rwbs = 4; + optional string comm = 5; +} +message BlockBioBounceFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional string rwbs = 4; + optional string comm = 5; +} +message BlockBioCompleteFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional int32 error = 4; + optional string rwbs = 5; +} +message BlockBioFrontmergeFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional string rwbs = 4; + optional string comm = 5; +} +message BlockBioQueueFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional string rwbs = 4; + optional string comm = 5; +} +message BlockBioRemapFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional uint64 old_dev = 4; + optional uint64 old_sector = 5; + optional string rwbs = 6; +} +message BlockDirtyBufferFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint64 size = 3; +} +message BlockGetrqFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional string rwbs = 4; + optional string comm = 5; +} +message BlockPlugFtraceEvent { + optional string comm = 1; +} +message BlockRqAbortFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional int32 errors = 4; + optional string rwbs = 5; + optional string cmd = 6; +} +message BlockRqCompleteFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional int32 errors = 4; + optional string rwbs = 5; + optional string cmd = 6; + optional int32 error = 7; +} +message BlockRqInsertFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional uint32 bytes = 4; + optional string rwbs = 5; + optional string comm = 6; + optional string cmd = 7; +} +message BlockRqRemapFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional uint64 old_dev = 4; + optional uint64 old_sector = 5; + optional uint32 nr_bios = 6; + optional string rwbs = 7; +} +message BlockRqRequeueFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional int32 errors = 4; + optional string rwbs = 5; + optional string cmd = 6; +} +message BlockSleeprqFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional string rwbs = 4; + optional string comm = 5; +} +message BlockSplitFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint64 new_sector = 3; + optional string rwbs = 4; + optional string comm = 5; +} +message BlockTouchBufferFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint64 size = 3; +} +message BlockUnplugFtraceEvent { + optional int32 nr_rq = 1; + optional string comm = 2; +} +message BlockIoStartFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional uint32 bytes = 4; + optional uint32 ioprio = 5; + optional string rwbs = 6; + optional string comm = 7; + optional string cmd = 8; +} +message BlockIoDoneFtraceEvent { + optional uint64 dev = 1; + optional uint64 sector = 2; + optional uint32 nr_sector = 3; + optional uint32 bytes = 4; + optional uint32 ioprio = 5; + optional string rwbs = 6; + optional string comm = 7; + optional string cmd = 8; +} + +// End of protos/perfetto/trace/ftrace/block.proto + +// Begin of protos/perfetto/trace/ftrace/cgroup.proto + +message CgroupAttachTaskFtraceEvent { + optional int32 dst_root = 1; + optional int32 dst_id = 2; + optional int32 pid = 3; + optional string comm = 4; + optional string cname = 5; + optional int32 dst_level = 6; + optional string dst_path = 7; +} +message CgroupMkdirFtraceEvent { + optional int32 root = 1; + optional int32 id = 2; + optional string cname = 3; + optional int32 level = 4; + optional string path = 5; +} +message CgroupRemountFtraceEvent { + optional int32 root = 1; + optional uint32 ss_mask = 2; + optional string name = 3; +} +message CgroupRmdirFtraceEvent { + optional int32 root = 1; + optional int32 id = 2; + optional string cname = 3; + optional int32 level = 4; + optional string path = 5; +} +message CgroupTransferTasksFtraceEvent { + optional int32 dst_root = 1; + optional int32 dst_id = 2; + optional int32 pid = 3; + optional string comm = 4; + optional string cname = 5; + optional int32 dst_level = 6; + optional string dst_path = 7; +} +message CgroupDestroyRootFtraceEvent { + optional int32 root = 1; + optional uint32 ss_mask = 2; + optional string name = 3; +} +message CgroupReleaseFtraceEvent { + optional int32 root = 1; + optional int32 id = 2; + optional string cname = 3; + optional int32 level = 4; + optional string path = 5; +} +message CgroupRenameFtraceEvent { + optional int32 root = 1; + optional int32 id = 2; + optional string cname = 3; + optional int32 level = 4; + optional string path = 5; +} +message CgroupSetupRootFtraceEvent { + optional int32 root = 1; + optional uint32 ss_mask = 2; + optional string name = 3; +} + +// End of protos/perfetto/trace/ftrace/cgroup.proto + +// Begin of protos/perfetto/trace/ftrace/clk.proto + +message ClkEnableFtraceEvent { + optional string name = 1; +} +message ClkDisableFtraceEvent { + optional string name = 1; +} +message ClkSetRateFtraceEvent { + optional string name = 1; + optional uint64 rate = 2; +} + +// End of protos/perfetto/trace/ftrace/clk.proto + +// Begin of protos/perfetto/trace/ftrace/cma.proto + +message CmaAllocStartFtraceEvent { + optional uint32 align = 1; + optional uint32 count = 2; + optional string name = 3; +} +message CmaAllocInfoFtraceEvent { + optional uint32 align = 1; + optional uint32 count = 2; + optional uint32 err_iso = 3; + optional uint32 err_mig = 4; + optional uint32 err_test = 5; + optional string name = 6; + optional uint64 nr_mapped = 7; + optional uint64 nr_migrated = 8; + optional uint64 nr_reclaimed = 9; + optional uint64 pfn = 10; +} +message CmaAllocFinishFtraceEvent { + optional string name = 1; + optional uint64 pfn = 2; + optional uint64 page = 3; + optional uint64 count = 4; + optional uint32 align = 5; + optional int32 errorno = 6; +} + +// End of protos/perfetto/trace/ftrace/cma.proto + +// Begin of protos/perfetto/trace/ftrace/compaction.proto + +message MmCompactionBeginFtraceEvent { + optional uint64 zone_start = 1; + optional uint64 migrate_pfn = 2; + optional uint64 free_pfn = 3; + optional uint64 zone_end = 4; + optional uint32 sync = 5; +} +message MmCompactionDeferCompactionFtraceEvent { + optional int32 nid = 1; + optional uint32 idx = 2; + optional int32 order = 3; + optional uint32 considered = 4; + optional uint32 defer_shift = 5; + optional int32 order_failed = 6; +} +message MmCompactionDeferredFtraceEvent { + optional int32 nid = 1; + optional uint32 idx = 2; + optional int32 order = 3; + optional uint32 considered = 4; + optional uint32 defer_shift = 5; + optional int32 order_failed = 6; +} +message MmCompactionDeferResetFtraceEvent { + optional int32 nid = 1; + optional uint32 idx = 2; + optional int32 order = 3; + optional uint32 considered = 4; + optional uint32 defer_shift = 5; + optional int32 order_failed = 6; +} +message MmCompactionEndFtraceEvent { + optional uint64 zone_start = 1; + optional uint64 migrate_pfn = 2; + optional uint64 free_pfn = 3; + optional uint64 zone_end = 4; + optional uint32 sync = 5; + optional int32 status = 6; +} +message MmCompactionFinishedFtraceEvent { + optional int32 nid = 1; + optional uint32 idx = 2; + optional int32 order = 3; + optional int32 ret = 4; +} +message MmCompactionIsolateFreepagesFtraceEvent { + optional uint64 start_pfn = 1; + optional uint64 end_pfn = 2; + optional uint64 nr_scanned = 3; + optional uint64 nr_taken = 4; +} +message MmCompactionIsolateMigratepagesFtraceEvent { + optional uint64 start_pfn = 1; + optional uint64 end_pfn = 2; + optional uint64 nr_scanned = 3; + optional uint64 nr_taken = 4; +} +message MmCompactionKcompactdSleepFtraceEvent { + optional int32 nid = 1; +} +message MmCompactionKcompactdWakeFtraceEvent { + optional int32 nid = 1; + optional int32 order = 2; + optional uint32 classzone_idx = 3; + optional uint32 highest_zoneidx = 4; +} +message MmCompactionMigratepagesFtraceEvent { + optional uint64 nr_migrated = 1; + optional uint64 nr_failed = 2; +} +message MmCompactionSuitableFtraceEvent { + optional int32 nid = 1; + optional uint32 idx = 2; + optional int32 order = 3; + optional int32 ret = 4; +} +message MmCompactionTryToCompactPagesFtraceEvent { + optional int32 order = 1; + optional uint32 gfp_mask = 2; + optional uint32 mode = 3; + optional int32 prio = 4; +} +message MmCompactionWakeupKcompactdFtraceEvent { + optional int32 nid = 1; + optional int32 order = 2; + optional uint32 classzone_idx = 3; + optional uint32 highest_zoneidx = 4; +} + +// End of protos/perfetto/trace/ftrace/compaction.proto + +// Begin of protos/perfetto/trace/ftrace/cpm_trace.proto + +message ParamSetValueCpmFtraceEvent { + optional string body = 1; + optional uint32 value = 2; + optional int64 timestamp = 3; +} + +// End of protos/perfetto/trace/ftrace/cpm_trace.proto + +// Begin of protos/perfetto/trace/ftrace/cpuhp.proto + +message CpuhpExitFtraceEvent { + optional uint32 cpu = 1; + optional int32 idx = 2; + optional int32 ret = 3; + optional int32 state = 4; +} +message CpuhpMultiEnterFtraceEvent { + optional uint32 cpu = 1; + optional uint64 fun = 2; + optional int32 idx = 3; + optional int32 target = 4; +} +message CpuhpEnterFtraceEvent { + optional uint32 cpu = 1; + optional uint64 fun = 2; + optional int32 idx = 3; + optional int32 target = 4; +} +message CpuhpLatencyFtraceEvent { + optional uint32 cpu = 1; + optional int32 ret = 2; + optional uint32 state = 3; + optional uint64 time = 4; +} +message CpuhpPauseFtraceEvent { + optional uint32 active_cpus = 1; + optional uint32 cpus = 2; + optional uint32 pause = 3; + optional uint32 time = 4; +} + +// End of protos/perfetto/trace/ftrace/cpuhp.proto + +// Begin of protos/perfetto/trace/ftrace/cros_ec.proto + +message CrosEcSensorhubDataFtraceEvent { + optional int64 current_time = 1; + optional int64 current_timestamp = 2; + optional int64 delta = 3; + optional uint32 ec_fifo_timestamp = 4; + optional uint32 ec_sensor_num = 5; + optional int64 fifo_timestamp = 6; +} + +// End of protos/perfetto/trace/ftrace/cros_ec.proto + +// Begin of protos/perfetto/trace/ftrace/dcvsh.proto + +message DcvshFreqFtraceEvent { + optional uint64 cpu = 1; + optional uint64 freq = 2; +} + +// End of protos/perfetto/trace/ftrace/dcvsh.proto + +// Begin of protos/perfetto/trace/ftrace/devfreq.proto + +message DevfreqFrequencyFtraceEvent { + optional string dev_name = 1; + optional uint64 freq = 2; + optional uint64 prev_freq = 3; + optional uint64 busy_time = 4; + optional uint64 total_time = 5; +} + +// End of protos/perfetto/trace/ftrace/devfreq.proto + +// Begin of protos/perfetto/trace/ftrace/dma_fence.proto + +message DmaFenceInitFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} +message DmaFenceEmitFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} +message DmaFenceSignaledFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} +message DmaFenceWaitStartFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} +message DmaFenceWaitEndFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} + +// End of protos/perfetto/trace/ftrace/dma_fence.proto + +// Begin of protos/perfetto/trace/ftrace/dmabuf_heap.proto + +message DmaHeapStatFtraceEvent { + optional uint64 inode = 1; + optional int64 len = 2; + optional uint64 total_allocated = 3; +} + +// End of protos/perfetto/trace/ftrace/dmabuf_heap.proto + +// Begin of protos/perfetto/trace/ftrace/dpu.proto + +message DpuTracingMarkWriteFtraceEvent { + optional int32 pid = 1; + optional string trace_name = 2; + optional uint32 trace_begin = 3; + optional string name = 4; + optional uint32 type = 5; + optional int32 value = 6; +} +message DpuDsiCmdFifoStatusFtraceEvent { + optional uint32 header = 1; + optional uint32 payload = 2; +} +message DpuDsiRxFtraceEvent { + optional uint32 cmd = 1; + optional uint32 rx_buf = 2; +} +message DpuDsiTxFtraceEvent { + optional uint32 type = 1; + optional uint32 tx_buf = 2; + optional uint32 last = 3; + optional uint32 delay_ms = 4; +} +message DpuDispDpuUnderrunFtraceEvent { + optional int32 id = 1; + optional int32 frames_pending = 2; + optional int32 vsync_count = 3; +} +message DpuDispVblankIrqEnableFtraceEvent { + optional int32 id = 1; + optional int32 output_id = 2; + optional int32 enable = 3; +} + +// End of protos/perfetto/trace/ftrace/dpu.proto + +// Begin of protos/perfetto/trace/ftrace/drm.proto + +message DrmVblankEventFtraceEvent { + optional int32 crtc = 1; + optional uint32 high_prec = 2; + optional uint32 seq = 3; + optional int64 time = 4; +} +message DrmVblankEventDeliveredFtraceEvent { + optional int32 crtc = 1; + optional uint64 file = 2; + optional uint32 seq = 3; +} + +// End of protos/perfetto/trace/ftrace/drm.proto + +// Begin of protos/perfetto/trace/ftrace/dwc3.proto + +message Dwc3AllocRequestFtraceEvent { + optional string name = 1; + optional uint64 req = 2; + optional uint32 actual = 3; + optional uint32 length = 4; + optional int32 status = 5; + optional int32 zero = 6; + optional int32 short_not_ok = 7; + optional int32 no_interrupt = 8; +} +message Dwc3CompleteTrbFtraceEvent { + optional string name = 1; + optional uint64 trb = 2; + optional uint32 allocated = 3; + optional uint32 queued = 4; + optional uint32 bpl = 5; + optional uint32 bph = 6; + optional uint32 size = 7; + optional uint32 ctrl = 8; + optional uint32 type = 9; + optional uint32 enqueue = 10; + optional uint32 dequeue = 11; +} +message Dwc3CtrlReqFtraceEvent { + optional uint32 bRequestType = 1; + optional uint32 bRequest = 2; + optional uint32 wValue = 3; + optional uint32 wIndex = 4; + optional uint32 wLength = 5; + optional string str = 6; +} +message Dwc3EpDequeueFtraceEvent { + optional string name = 1; + optional uint64 req = 2; + optional uint32 actual = 3; + optional uint32 length = 4; + optional int32 status = 5; + optional int32 zero = 6; + optional int32 short_not_ok = 7; + optional int32 no_interrupt = 8; +} +message Dwc3EpQueueFtraceEvent { + optional string name = 1; + optional uint64 req = 2; + optional uint32 actual = 3; + optional uint32 length = 4; + optional int32 status = 5; + optional int32 zero = 6; + optional int32 short_not_ok = 7; + optional int32 no_interrupt = 8; +} +message Dwc3EventFtraceEvent { + optional uint32 event = 1; + optional uint32 ep0state = 2; + optional string str = 3; +} +message Dwc3FreeRequestFtraceEvent { + optional string name = 1; + optional uint64 req = 2; + optional uint32 actual = 3; + optional uint32 length = 4; + optional int32 status = 5; + optional int32 zero = 6; + optional int32 short_not_ok = 7; + optional int32 no_interrupt = 8; +} +message Dwc3GadgetEpCmdFtraceEvent { + optional string name = 1; + optional uint32 cmd = 2; + optional uint32 param0 = 3; + optional uint32 param1 = 4; + optional uint32 param2 = 5; + optional int32 cmd_status = 6; +} +message Dwc3GadgetEpDisableFtraceEvent { + optional string name = 1; + optional uint32 maxpacket = 2; + optional uint32 maxpacket_limit = 3; + optional uint32 max_streams = 4; + optional uint32 maxburst = 5; + optional uint32 flags = 6; + optional uint32 direction = 7; + optional uint32 trb_enqueue = 8; + optional uint32 trb_dequeue = 9; +} +message Dwc3GadgetEpEnableFtraceEvent { + optional string name = 1; + optional uint32 maxpacket = 2; + optional uint32 maxpacket_limit = 3; + optional uint32 max_streams = 4; + optional uint32 maxburst = 5; + optional uint32 flags = 6; + optional uint32 direction = 7; + optional uint32 trb_enqueue = 8; + optional uint32 trb_dequeue = 9; +} +message Dwc3GadgetGenericCmdFtraceEvent { + optional uint32 cmd = 1; + optional uint32 param = 2; + optional int32 status = 3; +} +message Dwc3GadgetGivebackFtraceEvent { + optional string name = 1; + optional uint64 req = 2; + optional uint32 actual = 3; + optional uint32 length = 4; + optional int32 status = 5; + optional int32 zero = 6; + optional int32 short_not_ok = 7; + optional int32 no_interrupt = 8; +} +message Dwc3PrepareTrbFtraceEvent { + optional string name = 1; + optional uint64 trb = 2; + optional uint32 allocated = 3; + optional uint32 queued = 4; + optional uint32 bpl = 5; + optional uint32 bph = 6; + optional uint32 size = 7; + optional uint32 ctrl = 8; + optional uint32 type = 9; + optional uint32 enqueue = 10; + optional uint32 dequeue = 11; +} +message Dwc3ReadlFtraceEvent { + optional uint64 base = 1; + optional uint32 offset = 2; + optional uint32 value = 3; + optional string msg = 4; +} +message Dwc3WritelFtraceEvent { + optional uint64 base = 1; + optional uint32 offset = 2; + optional uint32 value = 3; + optional string msg = 4; +} + +// End of protos/perfetto/trace/ftrace/dwc3.proto + +// Begin of protos/perfetto/trace/ftrace/ext4.proto + +message Ext4DaWriteBeginFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint32 len = 4; + optional uint32 flags = 5; +} +message Ext4DaWriteEndFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint32 len = 4; + optional uint32 copied = 5; +} +message Ext4SyncFileEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 parent = 3; + optional int32 datasync = 4; +} +message Ext4SyncFileExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; +} +message Ext4AllocDaBlocksFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 data_blocks = 3; + optional uint32 meta_blocks = 4; +} +message Ext4AllocateBlocksFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 block = 3; + optional uint32 len = 4; + optional uint32 logical = 5; + optional uint32 lleft = 6; + optional uint32 lright = 7; + optional uint64 goal = 8; + optional uint64 pleft = 9; + optional uint64 pright = 10; + optional uint32 flags = 11; +} +message Ext4AllocateInodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 dir = 3; + optional uint32 mode = 4; +} +message Ext4BeginOrderedTruncateFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 new_size = 3; +} +message Ext4CollapseRangeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 offset = 3; + optional int64 len = 4; +} +message Ext4DaReleaseSpaceFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 i_blocks = 3; + optional int32 freed_blocks = 4; + optional int32 reserved_data_blocks = 5; + optional int32 reserved_meta_blocks = 6; + optional int32 allocated_meta_blocks = 7; + optional uint32 mode = 8; +} +message Ext4DaReserveSpaceFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 i_blocks = 3; + optional int32 reserved_data_blocks = 4; + optional int32 reserved_meta_blocks = 5; + optional uint32 mode = 6; + optional int32 md_needed = 7; +} +message Ext4DaUpdateReserveSpaceFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 i_blocks = 3; + optional int32 used_blocks = 4; + optional int32 reserved_data_blocks = 5; + optional int32 reserved_meta_blocks = 6; + optional int32 allocated_meta_blocks = 7; + optional int32 quota_claim = 8; + optional uint32 mode = 9; +} +message Ext4DaWritePagesFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 first_page = 3; + optional int64 nr_to_write = 4; + optional int32 sync_mode = 5; + optional uint64 b_blocknr = 6; + optional uint32 b_size = 7; + optional uint32 b_state = 8; + optional int32 io_done = 9; + optional int32 pages_written = 10; +} +message Ext4DaWritePagesExtentFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 lblk = 3; + optional uint32 len = 4; + optional uint32 flags = 5; +} +message Ext4DirectIOEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint64 len = 4; + optional int32 rw = 5; +} +message Ext4DirectIOExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint64 len = 4; + optional int32 rw = 5; + optional int32 ret = 6; +} +message Ext4DiscardBlocksFtraceEvent { + optional uint64 dev = 1; + optional uint64 blk = 2; + optional uint64 count = 3; +} +message Ext4DiscardPreallocationsFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 len = 3; + optional uint32 needed = 4; +} +message Ext4DropInodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 drop = 3; +} +message Ext4EsCacheExtentFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional uint32 len = 4; + optional uint64 pblk = 5; + optional uint32 status = 6; +} +message Ext4EsFindDelayedExtentRangeEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; +} +message Ext4EsFindDelayedExtentRangeExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional uint32 len = 4; + optional uint64 pblk = 5; + optional uint64 status = 6; +} +message Ext4EsInsertExtentFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional uint32 len = 4; + optional uint64 pblk = 5; + optional uint64 status = 6; +} +message Ext4EsLookupExtentEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; +} +message Ext4EsLookupExtentExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional uint32 len = 4; + optional uint64 pblk = 5; + optional uint64 status = 6; + optional int32 found = 7; +} +message Ext4EsRemoveExtentFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 lblk = 3; + optional int64 len = 4; +} +message Ext4EsShrinkFtraceEvent { + optional uint64 dev = 1; + optional int32 nr_shrunk = 2; + optional uint64 scan_time = 3; + optional int32 nr_skipped = 4; + optional int32 retried = 5; +} +message Ext4EsShrinkCountFtraceEvent { + optional uint64 dev = 1; + optional int32 nr_to_scan = 2; + optional int32 cache_cnt = 3; +} +message Ext4EsShrinkScanEnterFtraceEvent { + optional uint64 dev = 1; + optional int32 nr_to_scan = 2; + optional int32 cache_cnt = 3; +} +message Ext4EsShrinkScanExitFtraceEvent { + optional uint64 dev = 1; + optional int32 nr_shrunk = 2; + optional int32 cache_cnt = 3; +} +message Ext4EvictInodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 nlink = 3; +} +message Ext4ExtConvertToInitializedEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 m_lblk = 3; + optional uint32 m_len = 4; + optional uint32 u_lblk = 5; + optional uint32 u_len = 6; + optional uint64 u_pblk = 7; +} +message Ext4ExtConvertToInitializedFastpathFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 m_lblk = 3; + optional uint32 m_len = 4; + optional uint32 u_lblk = 5; + optional uint32 u_len = 6; + optional uint64 u_pblk = 7; + optional uint32 i_lblk = 8; + optional uint32 i_len = 9; + optional uint64 i_pblk = 10; +} +message Ext4ExtHandleUnwrittenExtentsFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 flags = 3; + optional uint32 lblk = 4; + optional uint64 pblk = 5; + optional uint32 len = 6; + optional uint32 allocated = 7; + optional uint64 newblk = 8; +} +message Ext4ExtInCacheFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional int32 ret = 4; +} +message Ext4ExtLoadExtentFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pblk = 3; + optional uint32 lblk = 4; +} +message Ext4ExtMapBlocksEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional uint32 len = 4; + optional uint32 flags = 5; +} +message Ext4ExtMapBlocksExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 flags = 3; + optional uint64 pblk = 4; + optional uint32 lblk = 5; + optional uint32 len = 6; + optional uint32 mflags = 7; + optional int32 ret = 8; +} +message Ext4ExtPutInCacheFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional uint32 len = 4; + optional uint64 start = 5; +} +message Ext4ExtRemoveSpaceFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 start = 3; + optional uint32 end = 4; + optional int32 depth = 5; +} +message Ext4ExtRemoveSpaceDoneFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 start = 3; + optional uint32 end = 4; + optional int32 depth = 5; + optional int64 partial = 6; + optional uint32 eh_entries = 7; + optional uint32 pc_lblk = 8; + optional uint64 pc_pclu = 9; + optional int32 pc_state = 10; +} +message Ext4ExtRmIdxFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pblk = 3; +} +message Ext4ExtRmLeafFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 partial = 3; + optional uint32 start = 4; + optional uint32 ee_lblk = 5; + optional uint64 ee_pblk = 6; + optional int32 ee_len = 7; + optional uint32 pc_lblk = 8; + optional uint64 pc_pclu = 9; + optional int32 pc_state = 10; +} +message Ext4ExtShowExtentFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pblk = 3; + optional uint32 lblk = 4; + optional uint32 len = 5; +} +message Ext4FallocateEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 offset = 3; + optional int64 len = 4; + optional int32 mode = 5; + optional int64 pos = 6; +} +message Ext4FallocateExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint32 blocks = 4; + optional int32 ret = 5; +} +message Ext4FindDelallocRangeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 from = 3; + optional uint32 to = 4; + optional int32 reverse = 5; + optional int32 found = 6; + optional uint32 found_blk = 7; +} +message Ext4ForgetFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 block = 3; + optional int32 is_metadata = 4; + optional uint32 mode = 5; +} +message Ext4FreeBlocksFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 block = 3; + optional uint64 count = 4; + optional int32 flags = 5; + optional uint32 mode = 6; +} +message Ext4FreeInodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 uid = 3; + optional uint32 gid = 4; + optional uint64 blocks = 5; + optional uint32 mode = 6; +} +message Ext4GetImpliedClusterAllocExitFtraceEvent { + optional uint64 dev = 1; + optional uint32 flags = 2; + optional uint32 lblk = 3; + optional uint64 pblk = 4; + optional uint32 len = 5; + optional int32 ret = 6; +} +message Ext4GetReservedClusterAllocFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional uint32 len = 4; +} +message Ext4IndMapBlocksEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 lblk = 3; + optional uint32 len = 4; + optional uint32 flags = 5; +} +message Ext4IndMapBlocksExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 flags = 3; + optional uint64 pblk = 4; + optional uint32 lblk = 5; + optional uint32 len = 6; + optional uint32 mflags = 7; + optional int32 ret = 8; +} +message Ext4InsertRangeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 offset = 3; + optional int64 len = 4; +} +message Ext4InvalidatepageFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 index = 3; + optional uint64 offset = 4; + optional uint32 length = 5; +} +message Ext4JournalStartFtraceEvent { + optional uint64 dev = 1; + optional uint64 ip = 2; + optional int32 blocks = 3; + optional int32 rsv_blocks = 4; + optional int32 nblocks = 5; + optional int32 revoke_creds = 6; +} +message Ext4JournalStartReservedFtraceEvent { + optional uint64 dev = 1; + optional uint64 ip = 2; + optional int32 blocks = 3; +} +message Ext4JournalledInvalidatepageFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 index = 3; + optional uint64 offset = 4; + optional uint32 length = 5; +} +message Ext4JournalledWriteEndFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint32 len = 4; + optional uint32 copied = 5; +} +message Ext4LoadInodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; +} +message Ext4LoadInodeBitmapFtraceEvent { + optional uint64 dev = 1; + optional uint32 group = 2; +} +message Ext4MarkInodeDirtyFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 ip = 3; +} +message Ext4MbBitmapLoadFtraceEvent { + optional uint64 dev = 1; + optional uint32 group = 2; +} +message Ext4MbBuddyBitmapLoadFtraceEvent { + optional uint64 dev = 1; + optional uint32 group = 2; +} +message Ext4MbDiscardPreallocationsFtraceEvent { + optional uint64 dev = 1; + optional int32 needed = 2; +} +message Ext4MbNewGroupPaFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pa_pstart = 3; + optional uint64 pa_lstart = 4; + optional uint32 pa_len = 5; +} +message Ext4MbNewInodePaFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pa_pstart = 3; + optional uint64 pa_lstart = 4; + optional uint32 pa_len = 5; +} +message Ext4MbReleaseGroupPaFtraceEvent { + optional uint64 dev = 1; + optional uint64 pa_pstart = 2; + optional uint32 pa_len = 3; +} +message Ext4MbReleaseInodePaFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 block = 3; + optional uint32 count = 4; +} +message Ext4MballocAllocFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 orig_logical = 3; + optional int32 orig_start = 4; + optional uint32 orig_group = 5; + optional int32 orig_len = 6; + optional uint32 goal_logical = 7; + optional int32 goal_start = 8; + optional uint32 goal_group = 9; + optional int32 goal_len = 10; + optional uint32 result_logical = 11; + optional int32 result_start = 12; + optional uint32 result_group = 13; + optional int32 result_len = 14; + optional uint32 found = 15; + optional uint32 groups = 16; + optional uint32 buddy = 17; + optional uint32 flags = 18; + optional uint32 tail = 19; + optional uint32 cr = 20; +} +message Ext4MballocDiscardFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 result_start = 3; + optional uint32 result_group = 4; + optional int32 result_len = 5; +} +message Ext4MballocFreeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 result_start = 3; + optional uint32 result_group = 4; + optional int32 result_len = 5; +} +message Ext4MballocPreallocFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 orig_logical = 3; + optional int32 orig_start = 4; + optional uint32 orig_group = 5; + optional int32 orig_len = 6; + optional uint32 result_logical = 7; + optional int32 result_start = 8; + optional uint32 result_group = 9; + optional int32 result_len = 10; +} +message Ext4OtherInodeUpdateTimeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 orig_ino = 3; + optional uint32 uid = 4; + optional uint32 gid = 5; + optional uint32 mode = 6; +} +message Ext4PunchHoleFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 offset = 3; + optional int64 len = 4; + optional int32 mode = 5; +} +message Ext4ReadBlockBitmapLoadFtraceEvent { + optional uint64 dev = 1; + optional uint32 group = 2; + optional uint32 prefetch = 3; +} +message Ext4ReadpageFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 index = 3; +} +message Ext4ReleasepageFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 index = 3; +} +message Ext4RemoveBlocksFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 from = 3; + optional uint32 to = 4; + optional int64 partial = 5; + optional uint64 ee_pblk = 6; + optional uint32 ee_lblk = 7; + optional uint32 ee_len = 8; + optional uint32 pc_lblk = 9; + optional uint64 pc_pclu = 10; + optional int32 pc_state = 11; +} +message Ext4RequestBlocksFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 len = 3; + optional uint32 logical = 4; + optional uint32 lleft = 5; + optional uint32 lright = 6; + optional uint64 goal = 7; + optional uint64 pleft = 8; + optional uint64 pright = 9; + optional uint32 flags = 10; +} +message Ext4RequestInodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 dir = 2; + optional uint32 mode = 3; +} +message Ext4SyncFsFtraceEvent { + optional uint64 dev = 1; + optional int32 wait = 2; +} +message Ext4TrimAllFreeFtraceEvent { + optional int32 dev_major = 1; + optional int32 dev_minor = 2; + optional uint32 group = 3; + optional int32 start = 4; + optional int32 len = 5; +} +message Ext4TrimExtentFtraceEvent { + optional int32 dev_major = 1; + optional int32 dev_minor = 2; + optional uint32 group = 3; + optional int32 start = 4; + optional int32 len = 5; +} +message Ext4TruncateEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 blocks = 3; +} +message Ext4TruncateExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 blocks = 3; +} +message Ext4UnlinkEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 parent = 3; + optional int64 size = 4; +} +message Ext4UnlinkExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; +} +message Ext4WriteBeginFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint32 len = 4; + optional uint32 flags = 5; +} +message Ext4WriteEndFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint32 len = 4; + optional uint32 copied = 5; +} +message Ext4WritepageFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 index = 3; +} +message Ext4WritepagesFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 nr_to_write = 3; + optional int64 pages_skipped = 4; + optional int64 range_start = 5; + optional int64 range_end = 6; + optional uint64 writeback_index = 7; + optional int32 sync_mode = 8; + optional uint32 for_kupdate = 9; + optional uint32 range_cyclic = 10; +} +message Ext4WritepagesResultFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; + optional int32 pages_written = 4; + optional int64 pages_skipped = 5; + optional uint64 writeback_index = 6; + optional int32 sync_mode = 7; +} +message Ext4ZeroRangeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 offset = 3; + optional int64 len = 4; + optional int32 mode = 5; +} + +// End of protos/perfetto/trace/ftrace/ext4.proto + +// Begin of protos/perfetto/trace/ftrace/f2fs.proto + +message F2fsDoSubmitBioFtraceEvent { + optional uint64 dev = 1; + optional int32 btype = 2; + optional uint32 sync = 3; + optional uint64 sector = 4; + optional uint32 size = 5; +} +message F2fsEvictInodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pino = 3; + optional uint32 mode = 4; + optional int64 size = 5; + optional uint32 nlink = 6; + optional uint64 blocks = 7; + optional uint32 advise = 8; +} +message F2fsFallocateFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 mode = 3; + optional int64 offset = 4; + optional int64 len = 5; + optional int64 size = 6; + optional uint64 blocks = 7; + optional int32 ret = 8; +} +message F2fsGetDataBlockFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 iblock = 3; + optional uint64 bh_start = 4; + optional uint64 bh_size = 5; + optional int32 ret = 6; +} +message F2fsGetVictimFtraceEvent { + optional uint64 dev = 1; + optional int32 type = 2; + optional int32 gc_type = 3; + optional int32 alloc_mode = 4; + optional int32 gc_mode = 5; + optional uint32 victim = 6; + optional uint32 ofs_unit = 7; + optional uint32 pre_victim = 8; + optional uint32 prefree = 9; + optional uint32 free = 10; + optional uint32 cost = 11; +} +message F2fsIgetFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pino = 3; + optional uint32 mode = 4; + optional int64 size = 5; + optional uint32 nlink = 6; + optional uint64 blocks = 7; + optional uint32 advise = 8; +} +message F2fsIgetExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; +} +message F2fsNewInodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; +} +message F2fsReadpageFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 index = 3; + optional uint64 blkaddr = 4; + optional int32 type = 5; + optional int32 dir = 6; + optional int32 dirty = 7; + optional int32 uptodate = 8; +} +message F2fsReserveNewBlockFtraceEvent { + optional uint64 dev = 1; + optional uint32 nid = 2; + optional uint32 ofs_in_node = 3; +} +message F2fsSetPageDirtyFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 type = 3; + optional int32 dir = 4; + optional uint64 index = 5; + optional int32 dirty = 6; + optional int32 uptodate = 7; +} +message F2fsSubmitWritePageFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 type = 3; + optional uint64 index = 4; + optional uint32 block = 5; +} +message F2fsSyncFileEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pino = 3; + optional uint32 mode = 4; + optional int64 size = 5; + optional uint32 nlink = 6; + optional uint64 blocks = 7; + optional uint32 advise = 8; +} +message F2fsSyncFileExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 need_cp = 3; + optional int32 datasync = 4; + optional int32 ret = 5; + optional int32 cp_reason = 6; +} +message F2fsSyncFsFtraceEvent { + optional uint64 dev = 1; + optional int32 dirty = 2; + optional int32 wait = 3; +} +message F2fsTruncateFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint64 pino = 3; + optional uint32 mode = 4; + optional int64 size = 5; + optional uint32 nlink = 6; + optional uint64 blocks = 7; + optional uint32 advise = 8; +} +message F2fsTruncateBlocksEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 size = 3; + optional uint64 blocks = 4; + optional uint64 from = 5; +} +message F2fsTruncateBlocksExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; +} +message F2fsTruncateDataBlocksRangeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 nid = 3; + optional uint32 ofs = 4; + optional int32 free = 5; +} +message F2fsTruncateInodeBlocksEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 size = 3; + optional uint64 blocks = 4; + optional uint64 from = 5; +} +message F2fsTruncateInodeBlocksExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; +} +message F2fsTruncateNodeFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 nid = 3; + optional uint32 blk_addr = 4; +} +message F2fsTruncateNodesEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 nid = 3; + optional uint32 blk_addr = 4; +} +message F2fsTruncateNodesExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; +} +message F2fsTruncatePartialNodesFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional uint32 nid = 3; + optional int32 depth = 4; + optional int32 err = 5; +} +message F2fsUnlinkEnterFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 size = 3; + optional uint64 blocks = 4; + optional string name = 5; +} +message F2fsUnlinkExitFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 ret = 3; +} +message F2fsVmPageMkwriteFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int32 type = 3; + optional int32 dir = 4; + optional uint64 index = 5; + optional int32 dirty = 6; + optional int32 uptodate = 7; +} +message F2fsWriteBeginFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint32 len = 4; + optional uint32 flags = 5; +} +message F2fsWriteCheckpointFtraceEvent { + optional uint64 dev = 1; + optional uint32 is_umount = 2; + optional string msg = 3; + optional int32 reason = 4; +} +message F2fsWriteEndFtraceEvent { + optional uint64 dev = 1; + optional uint64 ino = 2; + optional int64 pos = 3; + optional uint32 len = 4; + optional uint32 copied = 5; +} +message F2fsIostatFtraceEvent { + optional uint64 app_bio = 1; + optional uint64 app_brio = 2; + optional uint64 app_dio = 3; + optional uint64 app_drio = 4; + optional uint64 app_mio = 5; + optional uint64 app_mrio = 6; + optional uint64 app_rio = 7; + optional uint64 app_wio = 8; + optional uint64 dev = 9; + optional uint64 fs_cdrio = 10; + optional uint64 fs_cp_dio = 11; + optional uint64 fs_cp_mio = 12; + optional uint64 fs_cp_nio = 13; + optional uint64 fs_dio = 14; + optional uint64 fs_discard = 15; + optional uint64 fs_drio = 16; + optional uint64 fs_gc_dio = 17; + optional uint64 fs_gc_nio = 18; + optional uint64 fs_gdrio = 19; + optional uint64 fs_mio = 20; + optional uint64 fs_mrio = 21; + optional uint64 fs_nio = 22; + optional uint64 fs_nrio = 23; +} +message F2fsIostatLatencyFtraceEvent { + optional uint32 d_rd_avg = 1; + optional uint32 d_rd_cnt = 2; + optional uint32 d_rd_peak = 3; + optional uint32 d_wr_as_avg = 4; + optional uint32 d_wr_as_cnt = 5; + optional uint32 d_wr_as_peak = 6; + optional uint32 d_wr_s_avg = 7; + optional uint32 d_wr_s_cnt = 8; + optional uint32 d_wr_s_peak = 9; + optional uint64 dev = 10; + optional uint32 m_rd_avg = 11; + optional uint32 m_rd_cnt = 12; + optional uint32 m_rd_peak = 13; + optional uint32 m_wr_as_avg = 14; + optional uint32 m_wr_as_cnt = 15; + optional uint32 m_wr_as_peak = 16; + optional uint32 m_wr_s_avg = 17; + optional uint32 m_wr_s_cnt = 18; + optional uint32 m_wr_s_peak = 19; + optional uint32 n_rd_avg = 20; + optional uint32 n_rd_cnt = 21; + optional uint32 n_rd_peak = 22; + optional uint32 n_wr_as_avg = 23; + optional uint32 n_wr_as_cnt = 24; + optional uint32 n_wr_as_peak = 25; + optional uint32 n_wr_s_avg = 26; + optional uint32 n_wr_s_cnt = 27; + optional uint32 n_wr_s_peak = 28; +} +message F2fsBackgroundGcFtraceEvent { + optional uint64 dev = 1; + optional uint32 wait_ms = 2; + optional uint32 prefree = 3; + optional uint32 free = 4; +} +message F2fsGcBeginFtraceEvent { + optional uint64 dev = 1; + optional uint32 sync = 2; + optional uint32 background = 3; + optional int64 dirty_nodes = 4; + optional int64 dirty_dents = 5; + optional int64 dirty_imeta = 6; + optional uint32 free_sec = 7; + optional uint32 free_seg = 8; + optional int32 reserved_seg = 9; + optional uint32 prefree_seg = 10; + optional int32 gc_type = 11; + optional uint32 no_bg_gc = 12; + optional uint32 nr_free_secs = 13; +} +message F2fsGcEndFtraceEvent { + optional uint64 dev = 1; + optional int32 ret = 2; + optional int32 seg_freed = 3; + optional int32 sec_freed = 4; + optional int64 dirty_nodes = 5; + optional int64 dirty_dents = 6; + optional int64 dirty_imeta = 7; + optional uint32 free_sec = 8; + optional uint32 free_seg = 9; + optional int32 reserved_seg = 10; + optional uint32 prefree_seg = 11; +} + +// End of protos/perfetto/trace/ftrace/f2fs.proto + +// Begin of protos/perfetto/trace/ftrace/fastrpc.proto + +message FastrpcDmaStatFtraceEvent { + optional int32 cid = 1; + optional int64 len = 2; + optional uint64 total_allocated = 3; +} +message FastrpcDmaFreeFtraceEvent { + optional int32 cid = 1; + optional uint64 phys = 2; + optional uint64 size = 3; +} +message FastrpcDmaAllocFtraceEvent { + optional int32 cid = 1; + optional uint64 phys = 2; + optional uint64 size = 3; + optional uint64 attr = 4; + optional int32 mflags = 5; +} +message FastrpcDmaUnmapFtraceEvent { + optional int32 cid = 1; + optional uint64 phys = 2; + optional uint64 size = 3; +} +message FastrpcDmaMapFtraceEvent { + optional int32 cid = 1; + optional int32 fd = 2; + optional uint64 phys = 3; + optional uint64 size = 4; + optional uint64 len = 5; + optional uint32 attr = 6; + optional int32 mflags = 7; +} + +// End of protos/perfetto/trace/ftrace/fastrpc.proto + +// Begin of protos/perfetto/trace/ftrace/fence.proto + +message FenceInitFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} +message FenceDestroyFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} +message FenceEnableSignalFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} +message FenceSignaledFtraceEvent { + optional uint32 context = 1; + optional string driver = 2; + optional uint32 seqno = 3; + optional string timeline = 4; +} + +// End of protos/perfetto/trace/ftrace/fence.proto + +// Begin of protos/perfetto/trace/ftrace/filemap.proto + +message MmFilemapAddToPageCacheFtraceEvent { + optional uint64 pfn = 1; + optional uint64 i_ino = 2; + optional uint64 index = 3; + optional uint64 s_dev = 4; + optional uint64 page = 5; +} +message MmFilemapDeleteFromPageCacheFtraceEvent { + optional uint64 pfn = 1; + optional uint64 i_ino = 2; + optional uint64 index = 3; + optional uint64 s_dev = 4; + optional uint64 page = 5; +} + +// End of protos/perfetto/trace/ftrace/filemap.proto + +// Begin of protos/perfetto/trace/ftrace/fs.proto + +message DoSysOpenFtraceEvent { + optional string filename = 1; + optional int32 flags = 2; + optional int32 mode = 3; +} +message OpenExecFtraceEvent { + optional string filename = 1; +} + +// End of protos/perfetto/trace/ftrace/fs.proto + +// Begin of protos/perfetto/trace/ftrace/ftrace.proto + +message PrintFtraceEvent { + optional uint64 ip = 1; + optional string buf = 2; +} +message FuncgraphEntryFtraceEvent { + optional int32 depth = 1; + optional uint64 func = 2; +} +message FuncgraphExitFtraceEvent { + optional uint64 calltime = 1; + optional int32 depth = 2; + optional uint64 func = 3; + optional uint64 overrun = 4; + optional uint64 rettime = 5; +} + +// End of protos/perfetto/trace/ftrace/ftrace.proto + +// Begin of protos/perfetto/trace/ftrace/g2d.proto + +message G2dTracingMarkWriteFtraceEvent { + optional int32 pid = 1; + optional string name = 4; + optional uint32 type = 5; + optional int32 value = 6; +} + +// End of protos/perfetto/trace/ftrace/g2d.proto + +// Begin of protos/perfetto/trace/ftrace/generic.proto + +// This generic proto is used to output events in the trace +// when a specific proto for that event does not exist. +message GenericFtraceEvent { + message Field { + optional string name = 1; + oneof value { + string str_value = 3; + int64 int_value = 4; + uint64 uint_value = 5; + } + } + + optional string event_name = 1; + repeated Field field = 2; +} + +message KprobeEvent { + enum KprobeType { + KPROBE_TYPE_UNKNOWN = 0; + KPROBE_TYPE_BEGIN = 1; + KPROBE_TYPE_END = 2; + KPROBE_TYPE_INSTANT = 3; + } + optional string name = 1; + optional KprobeType type = 2; +} + +// End of protos/perfetto/trace/ftrace/generic.proto + +// Begin of protos/perfetto/trace/ftrace/google_icc_trace.proto + +message GoogleIccEventFtraceEvent { + optional string event = 1; + optional uint64 timestamp = 2; +} + +// End of protos/perfetto/trace/ftrace/google_icc_trace.proto + +// Begin of protos/perfetto/trace/ftrace/google_irm_trace.proto + +message GoogleIrmEventFtraceEvent { + optional string event = 1; + optional uint64 timestamp = 2; +} + +// End of protos/perfetto/trace/ftrace/google_irm_trace.proto + +// Begin of protos/perfetto/trace/ftrace/gpu_mem.proto + +message GpuMemTotalFtraceEvent { + optional uint32 gpu_id = 1; + optional uint32 pid = 2; + optional uint64 size = 3; +} + +// End of protos/perfetto/trace/ftrace/gpu_mem.proto + +// Begin of protos/perfetto/trace/ftrace/gpu_scheduler.proto + +message DrmSchedJobFtraceEvent { + optional uint64 entity = 1; + optional uint64 fence = 2; + optional int32 hw_job_count = 3; + optional uint64 id = 4; + optional uint32 job_count = 5; + optional string name = 6; +} +message DrmRunJobFtraceEvent { + optional uint64 entity = 1; + optional uint64 fence = 2; + optional int32 hw_job_count = 3; + optional uint64 id = 4; + optional uint32 job_count = 5; + optional string name = 6; +} +message DrmSchedProcessJobFtraceEvent { + optional uint64 fence = 1; +} +message DrmSchedJobAddDepFtraceEvent { + optional uint64 fence_context = 1; + optional uint64 fence_seqno = 2; + optional uint64 ctx = 3; + optional uint64 seqno = 4; +} +message DrmSchedJobDoneFtraceEvent { + optional uint64 fence_context = 1; + optional uint64 fence_seqno = 2; +} +message DrmSchedJobQueueFtraceEvent { + optional string name = 1; + optional uint32 job_count = 2; + optional int32 hw_job_count = 3; + optional string dev = 4; + optional uint64 fence_context = 5; + optional uint64 fence_seqno = 6; + optional uint64 client_id = 7; +} +message DrmSchedJobRunFtraceEvent { + optional string name = 1; + optional uint32 job_count = 2; + optional int32 hw_job_count = 3; + optional string dev = 4; + optional uint64 fence_context = 5; + optional uint64 fence_seqno = 6; + optional uint64 client_id = 7; +} +message DrmSchedJobUnschedulableFtraceEvent { + optional uint64 fence_context = 1; + optional uint64 fence_seqno = 2; + optional uint64 ctx = 3; + optional uint64 seqno = 4; +} + +// End of protos/perfetto/trace/ftrace/gpu_scheduler.proto + +// Begin of protos/perfetto/trace/ftrace/hyp.proto + +message HypEnterFtraceEvent {} +message HypExitFtraceEvent {} +message HostHcallFtraceEvent { + optional uint32 id = 1; + optional uint32 invalid = 2; +} +message HostSmcFtraceEvent { + optional uint64 id = 1; + optional uint32 forwarded = 2; +} +message HostMemAbortFtraceEvent { + optional uint64 esr = 1; + optional uint64 addr = 2; +} +message HostFfaCallFtraceEvent { + optional uint64 func_id = 1; + optional uint64 res_a1 = 2; + optional uint64 res_a2 = 3; + optional uint64 res_a3 = 4; + optional uint64 res_a4 = 5; + optional int32 handled = 6; + optional int32 err = 7; +} +message IommuIdmapFtraceEvent { + optional uint64 from = 1; + optional uint64 to = 2; + optional int32 prot = 3; +} +message PsciMemProtectFtraceEvent { + optional uint64 count = 1; + optional uint64 was = 2; +} + +// End of protos/perfetto/trace/ftrace/hyp.proto + +// Begin of protos/perfetto/trace/ftrace/hypervisor.proto + +message HypervisorHostHcallFtraceEvent { + optional uint32 id = 1; + optional uint32 invalid = 2; +} +message HypervisorHostSmcFtraceEvent { + optional uint64 id = 1; + optional uint32 forwarded = 2; +} +message HypervisorHypExitFtraceEvent {} +message HypervisorIommuIdmapFtraceEvent { + optional uint64 from = 1; + optional uint64 to = 2; + optional int32 prot = 3; +} +message HypervisorPsciMemProtectFtraceEvent { + optional uint64 count = 1; + optional uint64 was = 2; +} +message HypervisorHostMemAbortFtraceEvent { + optional uint64 esr = 1; + optional uint64 addr = 2; +} +message HypervisorHypEnterFtraceEvent {} +message HypervisorIommuIdmapCompleteFtraceEvent { + optional uint32 map = 1; +} +message HypervisorVcpuIllegalTrapFtraceEvent { + optional uint64 esr = 1; +} + +// End of protos/perfetto/trace/ftrace/hypervisor.proto + +// Begin of protos/perfetto/trace/ftrace/i2c.proto + +message I2cReadFtraceEvent { + optional int32 adapter_nr = 1; + optional uint32 msg_nr = 2; + optional uint32 addr = 3; + optional uint32 flags = 4; + optional uint32 len = 5; +} +message I2cWriteFtraceEvent { + optional int32 adapter_nr = 1; + optional uint32 msg_nr = 2; + optional uint32 addr = 3; + optional uint32 flags = 4; + optional uint32 len = 5; + optional uint32 buf = 6; +} +message I2cResultFtraceEvent { + optional int32 adapter_nr = 1; + optional uint32 nr_msgs = 2; + optional int32 ret = 3; +} +message I2cReplyFtraceEvent { + optional int32 adapter_nr = 1; + optional uint32 msg_nr = 2; + optional uint32 addr = 3; + optional uint32 flags = 4; + optional uint32 len = 5; + optional uint32 buf = 6; +} +message SmbusReadFtraceEvent { + optional int32 adapter_nr = 1; + optional uint32 flags = 2; + optional uint32 addr = 3; + optional uint32 command = 4; + optional uint32 protocol = 5; +} +message SmbusWriteFtraceEvent { + optional int32 adapter_nr = 1; + optional uint32 addr = 2; + optional uint32 flags = 3; + optional uint32 command = 4; + optional uint32 len = 5; + optional uint32 protocol = 6; +} +message SmbusResultFtraceEvent { + optional int32 adapter_nr = 1; + optional uint32 addr = 2; + optional uint32 flags = 3; + optional uint32 read_write = 4; + optional uint32 command = 5; + optional int32 res = 6; + optional uint32 protocol = 7; +} +message SmbusReplyFtraceEvent { + optional int32 adapter_nr = 1; + optional uint32 addr = 2; + optional uint32 flags = 3; + optional uint32 command = 4; + optional uint32 len = 5; + optional uint32 protocol = 6; +} + +// End of protos/perfetto/trace/ftrace/i2c.proto + +// Begin of protos/perfetto/trace/ftrace/ion.proto + +message IonStatFtraceEvent { + optional uint32 buffer_id = 1; + optional int64 len = 2; + optional uint64 total_allocated = 3; +} + +// End of protos/perfetto/trace/ftrace/ion.proto + +// Begin of protos/perfetto/trace/ftrace/ipi.proto + +message IpiEntryFtraceEvent { + optional string reason = 1; +} +message IpiExitFtraceEvent { + optional string reason = 1; +} +message IpiRaiseFtraceEvent { + optional uint32 target_cpus = 1; + optional string reason = 2; +} + +// End of protos/perfetto/trace/ftrace/ipi.proto + +// Begin of protos/perfetto/trace/ftrace/irq.proto + +message SoftirqEntryFtraceEvent { + optional uint32 vec = 1; +} +message SoftirqExitFtraceEvent { + optional uint32 vec = 1; +} +message SoftirqRaiseFtraceEvent { + optional uint32 vec = 1; +} +message IrqHandlerEntryFtraceEvent { + optional int32 irq = 1; + optional string name = 2; + optional uint32 handler = 3; +} +message IrqHandlerExitFtraceEvent { + optional int32 irq = 1; + optional int32 ret = 2; +} + +// End of protos/perfetto/trace/ftrace/irq.proto + +// Begin of protos/perfetto/trace/ftrace/irq_vectors.proto + +message LocalTimerEntryFtraceEvent { + optional int32 vector = 1; +} +message LocalTimerExitFtraceEvent { + optional int32 vector = 1; +} + +// End of protos/perfetto/trace/ftrace/irq_vectors.proto + +// Begin of protos/perfetto/trace/ftrace/kgsl.proto + +message KgslGpuFrequencyFtraceEvent { + optional uint32 gpu_freq = 1; + optional uint32 gpu_id = 2; +} +message KgslAdrenoCmdbatchQueuedFtraceEvent { + optional uint32 id = 1; + optional uint32 timestamp = 2; + optional uint32 queued = 3; + optional uint32 flags = 4; + optional uint32 prio = 5; +} +message KgslAdrenoCmdbatchSubmittedFtraceEvent { + optional uint32 id = 1; + optional uint32 timestamp = 2; + optional int64 inflight = 3; + optional uint32 flags = 4; + optional uint64 ticks = 5; + optional uint64 secs = 6; + optional uint64 usecs = 7; + optional int32 prio = 8; + optional int32 rb_id = 9; + optional uint32 rptr = 10; + optional uint32 wptr = 11; + optional int32 q_inflight = 12; + optional int32 dispatch_queue = 13; +} +message KgslAdrenoCmdbatchSyncFtraceEvent { + optional uint32 id = 1; + optional uint32 timestamp = 2; + optional uint64 ticks = 3; + optional int32 prio = 4; +} +message KgslAdrenoCmdbatchRetiredFtraceEvent { + optional uint32 id = 1; + optional uint32 timestamp = 2; + optional int64 inflight = 3; + optional uint32 recovery = 4; + optional uint32 flags = 5; + optional uint64 start = 6; + optional uint64 retire = 7; + optional int32 prio = 8; + optional int32 rb_id = 9; + optional uint32 rptr = 10; + optional uint32 wptr = 11; + optional int32 q_inflight = 12; + optional uint64 fault_recovery = 13; + optional uint32 dispatch_queue = 14; + optional uint64 submitted_to_rb = 15; + optional uint64 retired_on_gmu = 16; + optional uint64 active = 17; +} + +// End of protos/perfetto/trace/ftrace/kgsl.proto + +// Begin of protos/perfetto/trace/ftrace/kmem.proto + +message AllocPagesIommuEndFtraceEvent { + optional uint32 gfp_flags = 1; + optional uint32 order = 2; +} +message AllocPagesIommuFailFtraceEvent { + optional uint32 gfp_flags = 1; + optional uint32 order = 2; +} +message AllocPagesIommuStartFtraceEvent { + optional uint32 gfp_flags = 1; + optional uint32 order = 2; +} +message AllocPagesSysEndFtraceEvent { + optional uint32 gfp_flags = 1; + optional uint32 order = 2; +} +message AllocPagesSysFailFtraceEvent { + optional uint32 gfp_flags = 1; + optional uint32 order = 2; +} +message AllocPagesSysStartFtraceEvent { + optional uint32 gfp_flags = 1; + optional uint32 order = 2; +} +message DmaAllocContiguousRetryFtraceEvent { + optional int32 tries = 1; +} +message IommuMapRangeFtraceEvent { + optional uint64 chunk_size = 1; + optional uint64 len = 2; + optional uint64 pa = 3; + optional uint64 va = 4; +} +message IommuSecPtblMapRangeEndFtraceEvent { + optional uint64 len = 1; + optional int32 num = 2; + optional uint32 pa = 3; + optional int32 sec_id = 4; + optional uint64 va = 5; +} +message IommuSecPtblMapRangeStartFtraceEvent { + optional uint64 len = 1; + optional int32 num = 2; + optional uint32 pa = 3; + optional int32 sec_id = 4; + optional uint64 va = 5; +} +message IonAllocBufferEndFtraceEvent { + optional string client_name = 1; + optional uint32 flags = 2; + optional string heap_name = 3; + optional uint64 len = 4; + optional uint32 mask = 5; +} +message IonAllocBufferFailFtraceEvent { + optional string client_name = 1; + optional int64 error = 2; + optional uint32 flags = 3; + optional string heap_name = 4; + optional uint64 len = 5; + optional uint32 mask = 6; +} +message IonAllocBufferFallbackFtraceEvent { + optional string client_name = 1; + optional int64 error = 2; + optional uint32 flags = 3; + optional string heap_name = 4; + optional uint64 len = 5; + optional uint32 mask = 6; +} +message IonAllocBufferStartFtraceEvent { + optional string client_name = 1; + optional uint32 flags = 2; + optional string heap_name = 3; + optional uint64 len = 4; + optional uint32 mask = 5; +} +message IonCpAllocRetryFtraceEvent { + optional int32 tries = 1; +} +message IonCpSecureBufferEndFtraceEvent { + optional uint64 align = 1; + optional uint64 flags = 2; + optional string heap_name = 3; + optional uint64 len = 4; +} +message IonCpSecureBufferStartFtraceEvent { + optional uint64 align = 1; + optional uint64 flags = 2; + optional string heap_name = 3; + optional uint64 len = 4; +} +message IonPrefetchingFtraceEvent { + optional uint64 len = 1; +} +message IonSecureCmaAddToPoolEndFtraceEvent { + optional uint32 is_prefetch = 1; + optional uint64 len = 2; + optional int32 pool_total = 3; +} +message IonSecureCmaAddToPoolStartFtraceEvent { + optional uint32 is_prefetch = 1; + optional uint64 len = 2; + optional int32 pool_total = 3; +} +message IonSecureCmaAllocateEndFtraceEvent { + optional uint64 align = 1; + optional uint64 flags = 2; + optional string heap_name = 3; + optional uint64 len = 4; +} +message IonSecureCmaAllocateStartFtraceEvent { + optional uint64 align = 1; + optional uint64 flags = 2; + optional string heap_name = 3; + optional uint64 len = 4; +} +message IonSecureCmaShrinkPoolEndFtraceEvent { + optional uint64 drained_size = 1; + optional uint64 skipped_size = 2; +} +message IonSecureCmaShrinkPoolStartFtraceEvent { + optional uint64 drained_size = 1; + optional uint64 skipped_size = 2; +} +message KfreeFtraceEvent { + optional uint64 call_site = 1; + optional uint64 ptr = 2; +} +message KmallocFtraceEvent { + optional uint64 bytes_alloc = 1; + optional uint64 bytes_req = 2; + optional uint64 call_site = 3; + optional uint32 gfp_flags = 4; + optional uint64 ptr = 5; +} +message KmallocNodeFtraceEvent { + optional uint64 bytes_alloc = 1; + optional uint64 bytes_req = 2; + optional uint64 call_site = 3; + optional uint32 gfp_flags = 4; + optional int32 node = 5; + optional uint64 ptr = 6; +} +message KmemCacheAllocFtraceEvent { + optional uint64 bytes_alloc = 1; + optional uint64 bytes_req = 2; + optional uint64 call_site = 3; + optional uint32 gfp_flags = 4; + optional uint64 ptr = 5; +} +message KmemCacheAllocNodeFtraceEvent { + optional uint64 bytes_alloc = 1; + optional uint64 bytes_req = 2; + optional uint64 call_site = 3; + optional uint32 gfp_flags = 4; + optional int32 node = 5; + optional uint64 ptr = 6; +} +message KmemCacheFreeFtraceEvent { + optional uint64 call_site = 1; + optional uint64 ptr = 2; +} +message MigratePagesEndFtraceEvent { + optional int32 mode = 1; +} +message MigratePagesStartFtraceEvent { + optional int32 mode = 1; +} +message MigrateRetryFtraceEvent { + optional int32 tries = 1; +} +message MmPageAllocFtraceEvent { + optional uint32 gfp_flags = 1; + optional int32 migratetype = 2; + optional uint32 order = 3; + optional uint64 page = 4; + optional uint64 pfn = 5; +} +message MmPageAllocExtfragFtraceEvent { + optional int32 alloc_migratetype = 1; + optional int32 alloc_order = 2; + optional int32 fallback_migratetype = 3; + optional int32 fallback_order = 4; + optional uint64 page = 5; + optional int32 change_ownership = 6; + optional uint64 pfn = 7; +} +message MmPageAllocZoneLockedFtraceEvent { + optional int32 migratetype = 1; + optional uint32 order = 2; + optional uint64 page = 3; + optional uint64 pfn = 4; +} +message MmPageFreeFtraceEvent { + optional uint32 order = 1; + optional uint64 page = 2; + optional uint64 pfn = 3; +} +message MmPageFreeBatchedFtraceEvent { + optional int32 cold = 1; + optional uint64 page = 2; + optional uint64 pfn = 3; +} +message MmPagePcpuDrainFtraceEvent { + optional int32 migratetype = 1; + optional uint32 order = 2; + optional uint64 page = 3; + optional uint64 pfn = 4; +} +message RssStatFtraceEvent { + optional int32 member = 1; + optional int64 size = 2; + optional uint32 curr = 3; + optional uint32 mm_id = 4; +} +message IonHeapShrinkFtraceEvent { + optional string heap_name = 1; + optional uint64 len = 2; + optional int64 total_allocated = 3; +} +message IonHeapGrowFtraceEvent { + optional string heap_name = 1; + optional uint64 len = 2; + optional int64 total_allocated = 3; +} +message IonBufferCreateFtraceEvent { + optional uint64 addr = 1; + optional uint64 len = 2; +} +message IonBufferDestroyFtraceEvent { + optional uint64 addr = 1; + optional uint64 len = 2; +} +message MmAllocContigMigrateRangeInfoFtraceEvent { + optional uint64 start = 1; + optional uint64 end = 2; + optional uint64 nr_migrated = 3; + optional uint64 nr_reclaimed = 4; + optional uint64 nr_mapped = 5; + optional int32 migratetype = 6; +} +message DmabufRssStatFtraceEvent { + optional uint64 rss = 1; + optional int64 rss_delta = 2; + optional uint64 i_ino = 3; +} + +// End of protos/perfetto/trace/ftrace/kmem.proto + +// Begin of protos/perfetto/trace/ftrace/kvm.proto + +message KvmAccessFaultFtraceEvent { + optional uint64 ipa = 1; +} +message KvmAckIrqFtraceEvent { + optional uint32 irqchip = 1; + optional uint32 pin = 2; +} +message KvmAgeHvaFtraceEvent { + optional uint64 end = 1; + optional uint64 start = 2; +} +message KvmAgePageFtraceEvent { + optional uint64 gfn = 1; + optional uint64 hva = 2; + optional uint32 level = 3; + optional uint32 referenced = 4; +} +message KvmArmClearDebugFtraceEvent { + optional uint32 guest_debug = 1; +} +message KvmArmSetDreg32FtraceEvent { + optional string name = 1; + optional uint32 value = 2; +} +message KvmArmSetRegsetFtraceEvent { + optional int32 len = 1; + optional string name = 2; +} +message KvmArmSetupDebugFtraceEvent { + optional uint32 guest_debug = 1; + optional uint64 vcpu = 2; +} +message KvmEntryFtraceEvent { + optional uint64 vcpu_pc = 1; +} +message KvmExitFtraceEvent { + optional uint32 esr_ec = 1; + optional int32 ret = 2; + optional uint64 vcpu_pc = 3; +} +message KvmFpuFtraceEvent { + optional uint32 load = 1; +} +message KvmGetTimerMapFtraceEvent { + optional int32 direct_ptimer = 1; + optional int32 direct_vtimer = 2; + optional int32 emul_ptimer = 3; + optional uint64 vcpu_id = 4; +} +message KvmGuestFaultFtraceEvent { + optional uint64 hsr = 1; + optional uint64 hxfar = 2; + optional uint64 ipa = 3; + optional uint64 vcpu_pc = 4; +} +message KvmHandleSysRegFtraceEvent { + optional uint64 hsr = 1; +} +message KvmHvcArm64FtraceEvent { + optional uint64 imm = 1; + optional uint64 r0 = 2; + optional uint64 vcpu_pc = 3; +} +message KvmIrqLineFtraceEvent { + optional int32 irq_num = 1; + optional int32 level = 2; + optional uint32 type = 3; + optional int32 vcpu_idx = 4; +} +message KvmMmioFtraceEvent { + optional uint64 gpa = 1; + optional uint32 len = 2; + optional uint32 type = 3; + optional uint64 val = 4; +} +message KvmMmioEmulateFtraceEvent { + optional uint64 cpsr = 1; + optional uint64 instr = 2; + optional uint64 vcpu_pc = 3; +} +message KvmSetGuestDebugFtraceEvent { + optional uint32 guest_debug = 1; + optional uint64 vcpu = 2; +} +message KvmSetIrqFtraceEvent { + optional uint32 gsi = 1; + optional int32 irq_source_id = 2; + optional int32 level = 3; +} +message KvmSetSpteHvaFtraceEvent { + optional uint64 hva = 1; +} +message KvmSetWayFlushFtraceEvent { + optional uint32 cache = 1; + optional uint64 vcpu_pc = 2; +} +message KvmSysAccessFtraceEvent { + optional uint32 CRm = 1; + optional uint32 CRn = 2; + optional uint32 Op0 = 3; + optional uint32 Op1 = 4; + optional uint32 Op2 = 5; + optional uint32 is_write = 6; + optional string name = 7; + optional uint64 vcpu_pc = 8; +} +message KvmTestAgeHvaFtraceEvent { + optional uint64 hva = 1; +} +message KvmTimerEmulateFtraceEvent { + optional uint32 should_fire = 1; + optional int32 timer_idx = 2; +} +message KvmTimerHrtimerExpireFtraceEvent { + optional int32 timer_idx = 1; +} +message KvmTimerRestoreStateFtraceEvent { + optional uint64 ctl = 1; + optional uint64 cval = 2; + optional int32 timer_idx = 3; +} +message KvmTimerSaveStateFtraceEvent { + optional uint64 ctl = 1; + optional uint64 cval = 2; + optional int32 timer_idx = 3; +} +message KvmTimerUpdateIrqFtraceEvent { + optional uint32 irq = 1; + optional int32 level = 2; + optional uint64 vcpu_id = 3; +} +message KvmToggleCacheFtraceEvent { + optional uint32 now = 1; + optional uint64 vcpu_pc = 2; + optional uint32 was = 3; +} +message KvmUnmapHvaRangeFtraceEvent { + optional uint64 end = 1; + optional uint64 start = 2; +} +message KvmUserspaceExitFtraceEvent { + optional uint32 reason = 1; +} +message KvmVcpuWakeupFtraceEvent { + optional uint64 ns = 1; + optional uint32 valid = 2; + optional uint32 waited = 3; +} +message KvmWfxArm64FtraceEvent { + optional uint32 is_wfe = 1; + optional uint64 vcpu_pc = 2; +} +message TrapRegFtraceEvent { + optional string fn = 1; + optional uint32 is_write = 2; + optional int32 reg = 3; + optional uint64 write_value = 4; +} +message VgicUpdateIrqPendingFtraceEvent { + optional uint32 irq = 1; + optional uint32 level = 2; + optional uint64 vcpu_id = 3; +} + +// End of protos/perfetto/trace/ftrace/kvm.proto + +// Begin of protos/perfetto/trace/ftrace/lowmemorykiller.proto + +message LowmemoryKillFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; + optional int64 pagecache_size = 3; + optional int64 pagecache_limit = 4; + optional int64 free = 5; +} + +// End of protos/perfetto/trace/ftrace/lowmemorykiller.proto + +// Begin of protos/perfetto/trace/ftrace/lwis.proto + +message LwisTracingMarkWriteFtraceEvent { + optional string lwis_name = 1; + optional uint32 type = 2; + optional int32 pid = 3; + optional string func_name = 4; + optional int64 value = 5; +} + +// End of protos/perfetto/trace/ftrace/lwis.proto + +// Begin of protos/perfetto/trace/ftrace/mali.proto + +message MaliTracingMarkWriteFtraceEvent { + optional string name = 1; + optional int32 pid = 2; + optional uint32 type = 3; + optional int32 value = 4; +} +message MaliMaliKCPUCQSSETFtraceEvent { + optional uint32 id = 1; + optional uint64 info_val1 = 2; + optional uint64 info_val2 = 3; + optional uint32 kctx_id = 4; + optional int32 kctx_tgid = 5; +} +message MaliMaliKCPUCQSWAITSTARTFtraceEvent { + optional uint32 id = 1; + optional uint64 info_val1 = 2; + optional uint64 info_val2 = 3; + optional uint32 kctx_id = 4; + optional int32 kctx_tgid = 5; +} +message MaliMaliKCPUCQSWAITENDFtraceEvent { + optional uint32 id = 1; + optional uint64 info_val1 = 2; + optional uint64 info_val2 = 3; + optional uint32 kctx_id = 4; + optional int32 kctx_tgid = 5; +} +message MaliMaliKCPUFENCESIGNALFtraceEvent { + optional uint64 info_val1 = 1; + optional uint64 info_val2 = 2; + optional int32 kctx_tgid = 3; + optional uint32 kctx_id = 4; + optional uint32 id = 5; +} +message MaliMaliKCPUFENCEWAITSTARTFtraceEvent { + optional uint64 info_val1 = 1; + optional uint64 info_val2 = 2; + optional int32 kctx_tgid = 3; + optional uint32 kctx_id = 4; + optional uint32 id = 5; +} +message MaliMaliKCPUFENCEWAITENDFtraceEvent { + optional uint64 info_val1 = 1; + optional uint64 info_val2 = 2; + optional int32 kctx_tgid = 3; + optional uint32 kctx_id = 4; + optional uint32 id = 5; +} +message MaliMaliCSFINTERRUPTSTARTFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliCSFINTERRUPTENDFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUHCTLCORESDOWNSCALENOTIFYPENDFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUHCTLCORESNOTIFYPENDFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUHCTLCOREINACTIVEPENDFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUHCTLMCUONRECHECKFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUHCTLSHADERSCOREOFFPENDFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUHCTLSHADERSPENDOFFFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUHCTLSHADERSPENDONFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUHCTLSHADERSREADYOFFFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUINSLEEPFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUOFFFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONCOREATTRUPDATEPENDFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONGLBREINITPENDFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONHALTFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONHWCNTDISABLEFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONHWCNTENABLEFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONPENDHALTFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONPENDSLEEPFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUONSLEEPINITIATEFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUPENDOFFFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUPENDONRELOADFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCUPOWERDOWNFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliMaliPMMCURESETWAITFtraceEvent { + optional int32 kctx_tgid = 1; + optional uint32 kctx_id = 2; + optional uint64 info_val = 3; +} +message MaliGpuPowerStateFtraceEvent { + optional uint64 change_ns = 1; + optional int32 from_state = 2; + optional int32 to_state = 3; +} + +// End of protos/perfetto/trace/ftrace/mali.proto + +// Begin of protos/perfetto/trace/ftrace/mdss.proto + +message MdpCmdKickoffFtraceEvent { + optional uint32 ctl_num = 1; + optional int32 kickoff_cnt = 2; +} +message MdpCommitFtraceEvent { + optional uint32 num = 1; + optional uint32 play_cnt = 2; + optional uint32 clk_rate = 3; + optional uint64 bandwidth = 4; +} +message MdpPerfSetOtFtraceEvent { + optional uint32 pnum = 1; + optional uint32 xin_id = 2; + optional uint32 rd_lim = 3; + optional uint32 is_vbif_rt = 4; +} +message MdpSsppChangeFtraceEvent { + optional uint32 num = 1; + optional uint32 play_cnt = 2; + optional uint32 mixer = 3; + optional uint32 stage = 4; + optional uint32 flags = 5; + optional uint32 format = 6; + optional uint32 img_w = 7; + optional uint32 img_h = 8; + optional uint32 src_x = 9; + optional uint32 src_y = 10; + optional uint32 src_w = 11; + optional uint32 src_h = 12; + optional uint32 dst_x = 13; + optional uint32 dst_y = 14; + optional uint32 dst_w = 15; + optional uint32 dst_h = 16; +} +message TracingMarkWriteFtraceEvent { + optional int32 pid = 1; + optional string trace_name = 2; + optional uint32 trace_begin = 3; +} +message MdpCmdPingpongDoneFtraceEvent { + optional uint32 ctl_num = 1; + optional uint32 intf_num = 2; + optional uint32 pp_num = 3; + optional int32 koff_cnt = 4; +} +message MdpCompareBwFtraceEvent { + optional uint64 new_ab = 1; + optional uint64 new_ib = 2; + optional uint64 new_wb = 3; + optional uint64 old_ab = 4; + optional uint64 old_ib = 5; + optional uint64 old_wb = 6; + optional uint32 params_changed = 7; + optional uint32 update_bw = 8; +} +message MdpPerfSetPanicLutsFtraceEvent { + optional uint32 pnum = 1; + optional uint32 fmt = 2; + optional uint32 mode = 3; + optional uint32 panic_lut = 4; + optional uint32 robust_lut = 5; +} +message MdpSsppSetFtraceEvent { + optional uint32 num = 1; + optional uint32 play_cnt = 2; + optional uint32 mixer = 3; + optional uint32 stage = 4; + optional uint32 flags = 5; + optional uint32 format = 6; + optional uint32 img_w = 7; + optional uint32 img_h = 8; + optional uint32 src_x = 9; + optional uint32 src_y = 10; + optional uint32 src_w = 11; + optional uint32 src_h = 12; + optional uint32 dst_x = 13; + optional uint32 dst_y = 14; + optional uint32 dst_w = 15; + optional uint32 dst_h = 16; +} +message MdpCmdReadptrDoneFtraceEvent { + optional uint32 ctl_num = 1; + optional int32 koff_cnt = 2; +} +message MdpMisrCrcFtraceEvent { + optional uint32 block_id = 1; + optional uint32 vsync_cnt = 2; + optional uint32 crc = 3; +} +message MdpPerfSetQosLutsFtraceEvent { + optional uint32 pnum = 1; + optional uint32 fmt = 2; + optional uint32 intf = 3; + optional uint32 rot = 4; + optional uint32 fl = 5; + optional uint32 lut = 6; + optional uint32 linear = 7; +} +message MdpTraceCounterFtraceEvent { + optional int32 pid = 1; + optional string counter_name = 2; + optional int32 value = 3; +} +message MdpCmdReleaseBwFtraceEvent { + optional uint32 ctl_num = 1; +} +message MdpMixerUpdateFtraceEvent { + optional uint32 mixer_num = 1; +} +message MdpPerfSetWmLevelsFtraceEvent { + optional uint32 pnum = 1; + optional uint32 use_space = 2; + optional uint32 priority_bytes = 3; + optional uint32 wm0 = 4; + optional uint32 wm1 = 5; + optional uint32 wm2 = 6; + optional uint32 mb_cnt = 7; + optional uint32 mb_size = 8; +} +message MdpVideoUnderrunDoneFtraceEvent { + optional uint32 ctl_num = 1; + optional uint32 underrun_cnt = 2; +} +message MdpCmdWaitPingpongFtraceEvent { + optional uint32 ctl_num = 1; + optional int32 kickoff_cnt = 2; +} +message MdpPerfPrefillCalcFtraceEvent { + optional uint32 pnum = 1; + optional uint32 latency_buf = 2; + optional uint32 ot = 3; + optional uint32 y_buf = 4; + optional uint32 y_scaler = 5; + optional uint32 pp_lines = 6; + optional uint32 pp_bytes = 7; + optional uint32 post_sc = 8; + optional uint32 fbc_bytes = 9; + optional uint32 prefill_bytes = 10; +} +message MdpPerfUpdateBusFtraceEvent { + optional int32 client = 1; + optional uint64 ab_quota = 2; + optional uint64 ib_quota = 3; +} +message RotatorBwAoAsContextFtraceEvent { + optional uint32 state = 1; +} + +// End of protos/perfetto/trace/ftrace/mdss.proto + +// Begin of protos/perfetto/trace/ftrace/mm_event.proto + +message MmEventRecordFtraceEvent { + optional uint32 avg_lat = 1; + optional uint32 count = 2; + optional uint32 max_lat = 3; + optional uint32 type = 4; +} + +// End of protos/perfetto/trace/ftrace/mm_event.proto + +// Begin of protos/perfetto/trace/ftrace/net.proto + +message NetifReceiveSkbFtraceEvent { + optional uint32 len = 1; + optional string name = 2; + optional uint64 skbaddr = 3; +} +message NetDevXmitFtraceEvent { + optional uint32 len = 1; + optional string name = 2; + optional int32 rc = 3; + optional uint64 skbaddr = 4; +} +message NapiGroReceiveEntryFtraceEvent { + optional uint32 data_len = 1; + optional uint32 gso_size = 2; + optional uint32 gso_type = 3; + optional uint32 hash = 4; + optional uint32 ip_summed = 5; + optional uint32 l4_hash = 6; + optional uint32 len = 7; + optional int32 mac_header = 8; + optional uint32 mac_header_valid = 9; + optional string name = 10; + optional uint32 napi_id = 11; + optional uint32 nr_frags = 12; + optional uint32 protocol = 13; + optional uint32 queue_mapping = 14; + optional uint64 skbaddr = 15; + optional uint32 truesize = 16; + optional uint32 vlan_proto = 17; + optional uint32 vlan_tagged = 18; + optional uint32 vlan_tci = 19; +} +message NapiGroReceiveExitFtraceEvent { + optional int32 ret = 1; +} + +// End of protos/perfetto/trace/ftrace/net.proto + +// Begin of protos/perfetto/trace/ftrace/oom.proto + +message OomScoreAdjUpdateFtraceEvent { + optional string comm = 1; + optional int32 oom_score_adj = 2; + optional int32 pid = 3; +} +message MarkVictimFtraceEvent { + optional int32 pid = 1; +} + +// End of protos/perfetto/trace/ftrace/oom.proto + +// Begin of protos/perfetto/trace/ftrace/panel.proto + +message DsiCmdFifoStatusFtraceEvent { + optional uint32 header = 1; + optional uint32 payload = 2; +} +message DsiRxFtraceEvent { + optional uint32 cmd = 1; + optional uint32 rx_buf = 2; +} +message DsiTxFtraceEvent { + optional uint32 last = 1; + optional uint32 tx_buf = 2; + optional uint32 type = 3; +} +message PanelWriteGenericFtraceEvent { + optional int32 pid = 1; + optional string trace_name = 2; + optional uint32 trace_begin = 3; + optional string name = 4; + optional uint32 type = 5; + optional int32 value = 6; +} + +// End of protos/perfetto/trace/ftrace/panel.proto + +// Begin of protos/perfetto/trace/ftrace/perf_trace_counters.proto + +message SchedSwitchWithCtrsFtraceEvent { + optional int32 old_pid = 1; + optional int32 new_pid = 2; + optional uint64 cctr = 3; + optional uint64 ctr0 = 4; + optional uint64 ctr1 = 5; + optional uint64 ctr2 = 6; + optional uint64 ctr3 = 7; + optional uint32 lctr0 = 8; + optional uint32 lctr1 = 9; + optional uint64 ctr4 = 10; + optional uint64 ctr5 = 11; + optional string prev_comm = 12; + optional int32 prev_pid = 13; + optional uint32 cyc = 14; + optional uint32 inst = 15; + optional uint32 stallbm = 16; + optional uint32 l3dm = 17; + optional int32 next_pid = 18; + optional string next_comm = 19; + optional int64 prev_state = 20; + optional uint64 amu0 = 21; + optional uint64 amu1 = 22; + optional uint64 amu2 = 23; +} + +// End of protos/perfetto/trace/ftrace/perf_trace_counters.proto + +// Begin of protos/perfetto/trace/ftrace/pixel_mm.proto + +message PixelMmKswapdWakeFtraceEvent { + optional int32 whatever = 1; +} +message PixelMmKswapdDoneFtraceEvent { + optional uint64 delta_nr_scanned = 1; + optional uint64 delta_nr_reclaimed = 2; +} + +// End of protos/perfetto/trace/ftrace/pixel_mm.proto + +// Begin of protos/perfetto/trace/ftrace/power.proto + +message CpuFrequencyFtraceEvent { + optional uint32 state = 1; + optional uint32 cpu_id = 2; +} +message CpuFrequencyLimitsFtraceEvent { + optional uint32 min_freq = 1; + optional uint32 max_freq = 2; + optional uint32 cpu_id = 3; +} +message CpuIdleFtraceEvent { + optional uint32 state = 1; + optional uint32 cpu_id = 2; +} +message ClockEnableFtraceEvent { + optional string name = 1; + optional uint64 state = 2; + optional uint64 cpu_id = 3; +} +message ClockDisableFtraceEvent { + optional string name = 1; + optional uint64 state = 2; + optional uint64 cpu_id = 3; +} +message ClockSetRateFtraceEvent { + optional string name = 1; + optional uint64 state = 2; + optional uint64 cpu_id = 3; +} +message SuspendResumeFtraceEvent { + optional string action = 1; + optional int32 val = 2; + optional uint32 start = 3; +} +message GpuFrequencyFtraceEvent { + optional uint32 gpu_id = 1; + optional uint32 state = 2; +} +message WakeupSourceActivateFtraceEvent { + optional string name = 1; + optional uint64 state = 2; +} +message WakeupSourceDeactivateFtraceEvent { + optional string name = 1; + optional uint64 state = 2; +} +message GpuWorkPeriodFtraceEvent { + optional uint32 gpu_id = 1; + optional uint32 uid = 2; + optional uint64 start_time_ns = 3; + optional uint64 end_time_ns = 4; + optional uint64 total_active_duration_ns = 5; +} +message DevicePmCallbackStartFtraceEvent { + optional string device = 1; + optional string driver = 2; + optional string parent = 3; + optional string pm_ops = 4; + optional int32 event = 5; +} +message DevicePmCallbackEndFtraceEvent { + optional string device = 1; + optional string driver = 2; + optional int32 error = 3; +} + +// End of protos/perfetto/trace/ftrace/power.proto + +// Begin of protos/perfetto/trace/ftrace/printk.proto + +message ConsoleFtraceEvent { + optional string msg = 1; +} + +// End of protos/perfetto/trace/ftrace/printk.proto + +// Begin of protos/perfetto/trace/ftrace/raw_syscalls.proto + +message SysEnterFtraceEvent { + optional int64 id = 1; + repeated uint64 args = 2; +} +message SysExitFtraceEvent { + optional int64 id = 1; + optional int64 ret = 2; +} + +// End of protos/perfetto/trace/ftrace/raw_syscalls.proto + +// Begin of protos/perfetto/trace/ftrace/regulator.proto + +message RegulatorDisableFtraceEvent { + optional string name = 1; +} +message RegulatorDisableCompleteFtraceEvent { + optional string name = 1; +} +message RegulatorEnableFtraceEvent { + optional string name = 1; +} +message RegulatorEnableCompleteFtraceEvent { + optional string name = 1; +} +message RegulatorEnableDelayFtraceEvent { + optional string name = 1; +} +message RegulatorSetVoltageFtraceEvent { + optional string name = 1; + optional int32 min = 2; + optional int32 max = 3; +} +message RegulatorSetVoltageCompleteFtraceEvent { + optional string name = 1; + optional uint32 val = 2; +} + +// End of protos/perfetto/trace/ftrace/regulator.proto + +// Begin of protos/perfetto/trace/ftrace/rpm.proto + +message RpmStatusFtraceEvent { + optional string name = 1; + optional int32 status = 2; +} + +// End of protos/perfetto/trace/ftrace/rpm.proto + +// Begin of protos/perfetto/trace/ftrace/samsung.proto + +message SamsungTracingMarkWriteFtraceEvent { + optional int32 pid = 1; + optional string trace_name = 2; + optional uint32 trace_begin = 3; + optional uint32 trace_type = 4; + optional int32 value = 5; +} + +// End of protos/perfetto/trace/ftrace/samsung.proto + +// Begin of protos/perfetto/trace/ftrace/sched.proto + +message SchedSwitchFtraceEvent { + optional string prev_comm = 1; + optional int32 prev_pid = 2; + optional int32 prev_prio = 3; + optional int64 prev_state = 4; + optional string next_comm = 5; + optional int32 next_pid = 6; + optional int32 next_prio = 7; +} +message SchedWakeupFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; + optional int32 prio = 3; + optional int32 success = 4; + optional int32 target_cpu = 5; +} +message SchedBlockedReasonFtraceEvent { + optional int32 pid = 1; + optional uint64 caller = 2; + optional uint32 io_wait = 3; +} +message SchedCpuHotplugFtraceEvent { + optional int32 affected_cpu = 1; + optional int32 error = 2; + optional int32 status = 3; +} +message SchedWakingFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; + optional int32 prio = 3; + optional int32 success = 4; + optional int32 target_cpu = 5; +} +message SchedWakeupNewFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; + optional int32 prio = 3; + optional int32 success = 4; + optional int32 target_cpu = 5; +} +message SchedProcessExecFtraceEvent { + optional string filename = 1; + optional int32 pid = 2; + optional int32 old_pid = 3; +} +message SchedProcessExitFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; + optional int32 tgid = 3; + optional int32 prio = 4; +} +message SchedProcessForkFtraceEvent { + optional string parent_comm = 1; + optional int32 parent_pid = 2; + optional string child_comm = 3; + optional int32 child_pid = 4; +} +message SchedProcessFreeFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; + optional int32 prio = 3; +} +message SchedProcessHangFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; +} +message SchedProcessWaitFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; + optional int32 prio = 3; +} +message SchedPiSetprioFtraceEvent { + optional string comm = 1; + optional int32 newprio = 2; + optional int32 oldprio = 3; + optional int32 pid = 4; +} +message SchedCpuUtilCfsFtraceEvent { + optional int32 active = 1; + optional uint64 capacity = 2; + optional uint64 capacity_orig = 3; + optional uint32 cpu = 4; + optional uint64 cpu_importance = 5; + optional uint64 cpu_util = 6; + optional uint32 exit_lat = 7; + optional uint64 group_capacity = 8; + optional uint32 grp_overutilized = 9; + optional uint32 idle_cpu = 10; + optional uint32 nr_running = 11; + optional int64 spare_cap = 12; + optional uint32 task_fits = 13; + optional uint64 wake_group_util = 14; + optional uint64 wake_util = 15; +} +message SchedMigrateTaskFtraceEvent { + optional string comm = 1; + optional int32 pid = 2; + optional int32 prio = 3; + optional int32 orig_cpu = 4; + optional int32 dest_cpu = 5; + optional int32 running = 6; + optional uint32 load = 7; +} +message SchedWakeupTaskAttrFtraceEvent { + optional int32 pid = 1; + optional uint64 cpu_affinity = 2; + optional uint64 task_util = 3; + optional uint64 uclamp_min = 4; + optional uint64 vruntime = 5; +} + +// End of protos/perfetto/trace/ftrace/sched.proto + +// Begin of protos/perfetto/trace/ftrace/scm.proto + +message ScmCallStartFtraceEvent { + optional uint32 arginfo = 1; + optional uint64 x0 = 2; + optional uint64 x5 = 3; +} +message ScmCallEndFtraceEvent {} + +// End of protos/perfetto/trace/ftrace/scm.proto + +// Begin of protos/perfetto/trace/ftrace/sde.proto + +message SdeTracingMarkWriteFtraceEvent { + optional int32 pid = 1; + optional string trace_name = 2; + optional uint32 trace_type = 3; + optional int32 value = 4; + optional uint32 trace_begin = 5; +} +message SdeSdeEvtlogFtraceEvent { + optional string evtlog_tag = 1; + optional int32 pid = 2; + optional uint32 tag_id = 3; +} +message SdeSdePerfCalcCrtcFtraceEvent { + optional uint64 bw_ctl_ebi = 1; + optional uint64 bw_ctl_llcc = 2; + optional uint64 bw_ctl_mnoc = 3; + optional uint32 core_clk_rate = 4; + optional uint32 crtc = 5; + optional uint64 ib_ebi = 6; + optional uint64 ib_llcc = 7; + optional uint64 ib_mnoc = 8; +} +message SdeSdePerfCrtcUpdateFtraceEvent { + optional uint64 bw_ctl_ebi = 1; + optional uint64 bw_ctl_llcc = 2; + optional uint64 bw_ctl_mnoc = 3; + optional uint32 core_clk_rate = 4; + optional uint32 crtc = 5; + optional int32 params = 6; + optional uint64 per_pipe_ib_ebi = 7; + optional uint64 per_pipe_ib_llcc = 8; + optional uint64 per_pipe_ib_mnoc = 9; + optional uint32 stop_req = 10; + optional uint32 update_bus = 11; + optional uint32 update_clk = 12; +} +message SdeSdePerfSetQosLutsFtraceEvent { + optional uint32 fl = 1; + optional uint32 fmt = 2; + optional uint64 lut = 3; + optional uint32 lut_usage = 4; + optional uint32 pnum = 5; + optional uint32 rt = 6; +} +message SdeSdePerfUpdateBusFtraceEvent { + optional uint64 ab_quota = 1; + optional uint32 bus_id = 2; + optional int32 client = 3; + optional uint64 ib_quota = 4; +} + +// End of protos/perfetto/trace/ftrace/sde.proto + +// Begin of protos/perfetto/trace/ftrace/signal.proto + +message SignalDeliverFtraceEvent { + optional int32 code = 1; + optional uint64 sa_flags = 2; + optional int32 sig = 3; +} +message SignalGenerateFtraceEvent { + optional int32 code = 1; + optional string comm = 2; + optional int32 group = 3; + optional int32 pid = 4; + optional int32 result = 5; + optional int32 sig = 6; +} + +// End of protos/perfetto/trace/ftrace/signal.proto + +// Begin of protos/perfetto/trace/ftrace/skb.proto + +message KfreeSkbFtraceEvent { + optional uint64 location = 1; + optional uint32 protocol = 2; + optional uint64 skbaddr = 3; +} + +// End of protos/perfetto/trace/ftrace/skb.proto + +// Begin of protos/perfetto/trace/ftrace/sock.proto + +message InetSockSetStateFtraceEvent { + optional uint32 daddr = 1; + optional uint32 dport = 2; + optional uint32 family = 3; + optional int32 newstate = 4; + optional int32 oldstate = 5; + optional uint32 protocol = 6; + optional uint32 saddr = 7; + optional uint64 skaddr = 8; + optional uint32 sport = 9; +} + +// End of protos/perfetto/trace/ftrace/sock.proto + +// Begin of protos/perfetto/trace/ftrace/sync.proto + +message SyncPtFtraceEvent { + optional string timeline = 1; + optional string value = 2; +} +message SyncTimelineFtraceEvent { + optional string name = 1; + optional string value = 2; +} +message SyncWaitFtraceEvent { + optional string name = 1; + optional int32 status = 2; + optional uint32 begin = 3; +} + +// End of protos/perfetto/trace/ftrace/sync.proto + +// Begin of protos/perfetto/trace/ftrace/synthetic.proto + +message RssStatThrottledFtraceEvent { + optional uint32 curr = 1; + optional int32 member = 2; + optional uint32 mm_id = 3; + optional int64 size = 4; +} +message SuspendResumeMinimalFtraceEvent { + optional uint32 start = 1; +} + +// End of protos/perfetto/trace/ftrace/synthetic.proto + +// Begin of protos/perfetto/trace/ftrace/systrace.proto + +message ZeroFtraceEvent { + optional int32 flag = 1; + optional string name = 2; + optional int32 pid = 3; + optional int64 value = 4; +} + +// End of protos/perfetto/trace/ftrace/systrace.proto + +// Begin of protos/perfetto/trace/ftrace/task.proto + +message TaskNewtaskFtraceEvent { + optional int32 pid = 1; + optional string comm = 2; + optional uint64 clone_flags = 3; + optional int32 oom_score_adj = 4; +} +message TaskRenameFtraceEvent { + optional int32 pid = 1; + optional string oldcomm = 2; + optional string newcomm = 3; + optional int32 oom_score_adj = 4; +} + +// End of protos/perfetto/trace/ftrace/task.proto + +// Begin of protos/perfetto/trace/ftrace/tcp.proto + +message TcpRetransmitSkbFtraceEvent { + optional uint32 daddr = 1; + optional uint32 dport = 2; + optional uint32 saddr = 3; + optional uint64 skaddr = 4; + optional uint64 skbaddr = 5; + optional uint32 sport = 6; + optional int32 state = 7; +} + +// End of protos/perfetto/trace/ftrace/tcp.proto + +// Begin of protos/perfetto/trace/ftrace/thermal.proto + +message ThermalTemperatureFtraceEvent { + optional int32 id = 1; + optional int32 temp = 2; + optional int32 temp_prev = 3; + optional string thermal_zone = 4; +} +message CdevUpdateFtraceEvent { + optional uint64 target = 1; + optional string type = 2; +} + +// End of protos/perfetto/trace/ftrace/thermal.proto + +// Begin of protos/perfetto/trace/ftrace/thermal_exynos.proto + +message ThermalExynosAcpmBulkFtraceEvent { + optional uint32 tz_id = 1; + optional uint32 current_temp = 2; + optional uint32 ctrl_temp = 3; + optional uint32 cdev_state = 4; + optional int32 pid_et_p = 5; + optional int32 pid_power_range = 6; + optional int32 pid_p = 7; + optional int32 pid_i = 8; + optional int32 k_p = 9; + optional int32 k_i = 10; + optional uint64 timestamp = 11; +} +message ThermalExynosAcpmHighOverheadFtraceEvent { + optional int32 tz_id = 1; + optional uint32 current_temp = 2; + optional uint32 ctrl_temp = 3; + optional uint32 cdev_state = 4; + optional int32 pid_et_p = 5; + optional int32 k_p = 6; + optional int32 k_i = 7; +} + +// End of protos/perfetto/trace/ftrace/thermal_exynos.proto + +// Begin of protos/perfetto/trace/ftrace/timer.proto + +message HrtimerStartFtraceEvent { + optional uint64 hrtimer = 1; + optional uint64 function = 2; + optional int64 expires = 3; + optional int64 softexpires = 4; + optional uint32 mode = 5; +} +message HrtimerCancelFtraceEvent { + optional uint64 hrtimer = 1; +} +message HrtimerExpireEntryFtraceEvent { + optional uint64 hrtimer = 1; + optional int64 now = 2; + optional uint64 function = 3; +} +message HrtimerExpireExitFtraceEvent { + optional uint64 hrtimer = 1; +} +message TimerStartFtraceEvent { + optional uint64 timer = 1; + optional uint64 function = 2; + optional uint64 expires = 3; + optional uint64 now = 4; + optional uint32 deferrable = 5; + optional uint32 flags = 6; + optional uint64 bucket_expiry = 7; +} +message TimerCancelFtraceEvent { + optional uint64 timer = 1; +} +message TimerExpireEntryFtraceEvent { + optional uint64 timer = 1; + optional uint64 now = 2; + optional uint64 function = 3; + optional uint64 baseclk = 4; +} +message TimerExpireExitFtraceEvent { + optional uint64 timer = 1; +} + +// End of protos/perfetto/trace/ftrace/timer.proto + +// Begin of protos/perfetto/trace/ftrace/trusty.proto + +message TrustySmcFtraceEvent { + optional uint64 r0 = 1; + optional uint64 r1 = 2; + optional uint64 r2 = 3; + optional uint64 r3 = 4; +} +message TrustySmcDoneFtraceEvent { + optional uint64 ret = 1; +} +message TrustyStdCall32FtraceEvent { + optional uint64 r0 = 1; + optional uint64 r1 = 2; + optional uint64 r2 = 3; + optional uint64 r3 = 4; +} +message TrustyStdCall32DoneFtraceEvent { + optional int64 ret = 1; +} +message TrustyShareMemoryFtraceEvent { + optional uint64 len = 1; + optional uint32 lend = 2; + optional uint32 nents = 3; +} +message TrustyShareMemoryDoneFtraceEvent { + optional uint64 handle = 1; + optional uint64 len = 2; + optional uint32 lend = 3; + optional uint32 nents = 4; + optional int32 ret = 5; +} +message TrustyReclaimMemoryFtraceEvent { + optional uint64 id = 1; +} +message TrustyReclaimMemoryDoneFtraceEvent { + optional uint64 id = 1; + optional int32 ret = 2; +} +message TrustyIrqFtraceEvent { + optional int32 irq = 1; +} +message TrustyIpcHandleEventFtraceEvent { + optional uint32 chan = 1; + optional uint32 event_id = 2; + optional string srv_name = 3; +} +message TrustyIpcConnectFtraceEvent { + optional uint32 chan = 1; + optional string port = 2; + optional int32 state = 3; +} +message TrustyIpcConnectEndFtraceEvent { + optional uint32 chan = 1; + optional int32 err = 2; + optional int32 state = 3; +} +message TrustyIpcWriteFtraceEvent { + optional uint64 buf_id = 1; + optional uint32 chan = 2; + optional int32 kind_shm = 3; + optional int32 len_or_err = 4; + optional uint64 shm_cnt = 5; + optional string srv_name = 6; +} +message TrustyIpcPollFtraceEvent { + optional uint32 chan = 1; + optional uint32 poll_mask = 2; + optional string srv_name = 3; +} +message TrustyIpcReadFtraceEvent { + optional uint32 chan = 1; + optional string srv_name = 2; +} +message TrustyIpcReadEndFtraceEvent { + optional uint64 buf_id = 1; + optional uint32 chan = 2; + optional int32 len_or_err = 3; + optional uint64 shm_cnt = 4; + optional string srv_name = 5; +} +message TrustyIpcRxFtraceEvent { + optional uint64 buf_id = 1; + optional uint32 chan = 2; + optional string srv_name = 3; +} +message TrustyEnqueueNopFtraceEvent { + optional uint32 arg1 = 1; + optional uint32 arg2 = 2; + optional uint32 arg3 = 3; +} + +// End of protos/perfetto/trace/ftrace/trusty.proto + +// Begin of protos/perfetto/trace/ftrace/ufs.proto + +message UfshcdCommandFtraceEvent { + optional string dev_name = 1; + optional uint32 doorbell = 2; + optional uint32 intr = 3; + optional uint64 lba = 4; + optional uint32 opcode = 5; + optional string str = 6; + optional uint32 tag = 7; + optional int32 transfer_len = 8; + optional uint32 group_id = 9; + optional uint32 str_t = 10; +} +message UfshcdClkGatingFtraceEvent { + optional string dev_name = 1; + optional int32 state = 2; +} + +// End of protos/perfetto/trace/ftrace/ufs.proto + +// Begin of protos/perfetto/trace/ftrace/v4l2.proto + +message V4l2QbufFtraceEvent { + optional uint32 bytesused = 1; + optional uint32 field = 2; + optional uint32 flags = 3; + optional uint32 index = 4; + optional int32 minor = 5; + optional uint32 sequence = 6; + optional uint32 timecode_flags = 7; + optional uint32 timecode_frames = 8; + optional uint32 timecode_hours = 9; + optional uint32 timecode_minutes = 10; + optional uint32 timecode_seconds = 11; + optional uint32 timecode_type = 12; + optional uint32 timecode_userbits0 = 13; + optional uint32 timecode_userbits1 = 14; + optional uint32 timecode_userbits2 = 15; + optional uint32 timecode_userbits3 = 16; + optional int64 timestamp = 17; + optional uint32 type = 18; +} +message V4l2DqbufFtraceEvent { + optional uint32 bytesused = 1; + optional uint32 field = 2; + optional uint32 flags = 3; + optional uint32 index = 4; + optional int32 minor = 5; + optional uint32 sequence = 6; + optional uint32 timecode_flags = 7; + optional uint32 timecode_frames = 8; + optional uint32 timecode_hours = 9; + optional uint32 timecode_minutes = 10; + optional uint32 timecode_seconds = 11; + optional uint32 timecode_type = 12; + optional uint32 timecode_userbits0 = 13; + optional uint32 timecode_userbits1 = 14; + optional uint32 timecode_userbits2 = 15; + optional uint32 timecode_userbits3 = 16; + optional int64 timestamp = 17; + optional uint32 type = 18; +} +message Vb2V4l2BufQueueFtraceEvent { + optional uint32 field = 1; + optional uint32 flags = 2; + optional int32 minor = 3; + optional uint32 sequence = 4; + optional uint32 timecode_flags = 5; + optional uint32 timecode_frames = 6; + optional uint32 timecode_hours = 7; + optional uint32 timecode_minutes = 8; + optional uint32 timecode_seconds = 9; + optional uint32 timecode_type = 10; + optional uint32 timecode_userbits0 = 11; + optional uint32 timecode_userbits1 = 12; + optional uint32 timecode_userbits2 = 13; + optional uint32 timecode_userbits3 = 14; + optional int64 timestamp = 15; +} +message Vb2V4l2BufDoneFtraceEvent { + optional uint32 field = 1; + optional uint32 flags = 2; + optional int32 minor = 3; + optional uint32 sequence = 4; + optional uint32 timecode_flags = 5; + optional uint32 timecode_frames = 6; + optional uint32 timecode_hours = 7; + optional uint32 timecode_minutes = 8; + optional uint32 timecode_seconds = 9; + optional uint32 timecode_type = 10; + optional uint32 timecode_userbits0 = 11; + optional uint32 timecode_userbits1 = 12; + optional uint32 timecode_userbits2 = 13; + optional uint32 timecode_userbits3 = 14; + optional int64 timestamp = 15; +} +message Vb2V4l2QbufFtraceEvent { + optional uint32 field = 1; + optional uint32 flags = 2; + optional int32 minor = 3; + optional uint32 sequence = 4; + optional uint32 timecode_flags = 5; + optional uint32 timecode_frames = 6; + optional uint32 timecode_hours = 7; + optional uint32 timecode_minutes = 8; + optional uint32 timecode_seconds = 9; + optional uint32 timecode_type = 10; + optional uint32 timecode_userbits0 = 11; + optional uint32 timecode_userbits1 = 12; + optional uint32 timecode_userbits2 = 13; + optional uint32 timecode_userbits3 = 14; + optional int64 timestamp = 15; +} +message Vb2V4l2DqbufFtraceEvent { + optional uint32 field = 1; + optional uint32 flags = 2; + optional int32 minor = 3; + optional uint32 sequence = 4; + optional uint32 timecode_flags = 5; + optional uint32 timecode_frames = 6; + optional uint32 timecode_hours = 7; + optional uint32 timecode_minutes = 8; + optional uint32 timecode_seconds = 9; + optional uint32 timecode_type = 10; + optional uint32 timecode_userbits0 = 11; + optional uint32 timecode_userbits1 = 12; + optional uint32 timecode_userbits2 = 13; + optional uint32 timecode_userbits3 = 14; + optional int64 timestamp = 15; +} + +// End of protos/perfetto/trace/ftrace/v4l2.proto + +// Begin of protos/perfetto/trace/ftrace/virtio_gpu.proto + +message VirtioGpuCmdQueueFtraceEvent { + optional uint32 ctx_id = 1; + optional int32 dev = 2; + optional uint64 fence_id = 3; + optional uint32 flags = 4; + optional string name = 5; + optional uint32 num_free = 6; + optional uint32 seqno = 7; + optional uint32 type = 8; + optional uint32 vq = 9; +} +message VirtioGpuCmdResponseFtraceEvent { + optional uint32 ctx_id = 1; + optional int32 dev = 2; + optional uint64 fence_id = 3; + optional uint32 flags = 4; + optional string name = 5; + optional uint32 num_free = 6; + optional uint32 seqno = 7; + optional uint32 type = 8; + optional uint32 vq = 9; +} + +// End of protos/perfetto/trace/ftrace/virtio_gpu.proto + +// Begin of protos/perfetto/trace/ftrace/virtio_video.proto + +message VirtioVideoCmdFtraceEvent { + optional uint32 stream_id = 1; + optional uint32 type = 2; +} +message VirtioVideoCmdDoneFtraceEvent { + optional uint32 stream_id = 1; + optional uint32 type = 2; +} +message VirtioVideoResourceQueueFtraceEvent { + optional uint32 data_size0 = 1; + optional uint32 data_size1 = 2; + optional uint32 data_size2 = 3; + optional uint32 data_size3 = 4; + optional uint32 queue_type = 5; + optional int32 resource_id = 6; + optional int32 stream_id = 7; + optional uint64 timestamp = 8; +} +message VirtioVideoResourceQueueDoneFtraceEvent { + optional uint32 data_size0 = 1; + optional uint32 data_size1 = 2; + optional uint32 data_size2 = 3; + optional uint32 data_size3 = 4; + optional uint32 queue_type = 5; + optional int32 resource_id = 6; + optional int32 stream_id = 7; + optional uint64 timestamp = 8; +} + +// End of protos/perfetto/trace/ftrace/virtio_video.proto + +// Begin of protos/perfetto/trace/ftrace/vmscan.proto + +message MmVmscanDirectReclaimBeginFtraceEvent { + optional int32 order = 1; + optional int32 may_writepage = 2; + optional uint32 gfp_flags = 3; +} +message MmVmscanDirectReclaimEndFtraceEvent { + optional uint64 nr_reclaimed = 1; +} +message MmVmscanKswapdWakeFtraceEvent { + optional int32 nid = 1; + optional int32 order = 2; + optional int32 zid = 3; +} +message MmVmscanKswapdSleepFtraceEvent { + optional int32 nid = 1; +} +message MmShrinkSlabStartFtraceEvent { + optional uint64 cache_items = 1; + optional uint64 delta = 2; + optional uint32 gfp_flags = 3; + optional uint64 lru_pgs = 4; + optional int64 nr_objects_to_shrink = 5; + optional uint64 pgs_scanned = 6; + optional uint64 shr = 7; + optional uint64 shrink = 8; + optional uint64 total_scan = 9; + optional int32 nid = 10; + optional int32 priority = 11; +} +message MmShrinkSlabEndFtraceEvent { + optional int64 new_scan = 1; + optional int32 retval = 2; + optional uint64 shr = 3; + optional uint64 shrink = 4; + optional int64 total_scan = 5; + optional int64 unused_scan = 6; + optional int32 nid = 7; +} + +// End of protos/perfetto/trace/ftrace/vmscan.proto + +// Begin of protos/perfetto/trace/ftrace/workqueue.proto + +message WorkqueueActivateWorkFtraceEvent { + optional uint64 work = 1; +} +message WorkqueueExecuteEndFtraceEvent { + optional uint64 work = 1; + optional uint64 function = 2; +} +message WorkqueueExecuteStartFtraceEvent { + optional uint64 work = 1; + optional uint64 function = 2; +} +message WorkqueueQueueWorkFtraceEvent { + optional uint64 work = 1; + optional uint64 function = 2; + optional uint64 workqueue = 3; + optional uint32 req_cpu = 4; + optional uint32 cpu = 5; +} + +// End of protos/perfetto/trace/ftrace/workqueue.proto + +// Begin of protos/perfetto/trace/ftrace/ftrace_event.proto + +message FtraceEvent { + // Timestamp in nanoseconds using .../tracing/trace_clock. + optional uint64 timestamp = 1; + + // Kernel pid (do not confuse with userspace pid aka tgid). + optional uint32 pid = 2; + + // Not populated in actual traces. Wire format might change. + // Placeholder declaration so that the ftrace parsing code accepts the + // existence of this common field. If this becomes needed for all events: + // consider merging with common_preempt_count to avoid extra proto tags. + optional uint32 common_flags = 5; + + // Range reserved for self-describing messages. + reserved 65536 to 131072; + + oneof event { + PrintFtraceEvent print = 3; + SchedSwitchFtraceEvent sched_switch = 4; + // removed field with id 5; + // removed field with id 6; + // removed field with id 7; + // removed field with id 8; + // removed field with id 9; + // removed field with id 10; + CpuFrequencyFtraceEvent cpu_frequency = 11; + CpuFrequencyLimitsFtraceEvent cpu_frequency_limits = 12; + CpuIdleFtraceEvent cpu_idle = 13; + ClockEnableFtraceEvent clock_enable = 14; + ClockDisableFtraceEvent clock_disable = 15; + ClockSetRateFtraceEvent clock_set_rate = 16; + SchedWakeupFtraceEvent sched_wakeup = 17; + SchedBlockedReasonFtraceEvent sched_blocked_reason = 18; + SchedCpuHotplugFtraceEvent sched_cpu_hotplug = 19; + SchedWakingFtraceEvent sched_waking = 20; + IpiEntryFtraceEvent ipi_entry = 21; + IpiExitFtraceEvent ipi_exit = 22; + IpiRaiseFtraceEvent ipi_raise = 23; + SoftirqEntryFtraceEvent softirq_entry = 24; + SoftirqExitFtraceEvent softirq_exit = 25; + SoftirqRaiseFtraceEvent softirq_raise = 26; + I2cReadFtraceEvent i2c_read = 27; + I2cWriteFtraceEvent i2c_write = 28; + I2cResultFtraceEvent i2c_result = 29; + I2cReplyFtraceEvent i2c_reply = 30; + SmbusReadFtraceEvent smbus_read = 31; + SmbusWriteFtraceEvent smbus_write = 32; + SmbusResultFtraceEvent smbus_result = 33; + SmbusReplyFtraceEvent smbus_reply = 34; + LowmemoryKillFtraceEvent lowmemory_kill = 35; + IrqHandlerEntryFtraceEvent irq_handler_entry = 36; + IrqHandlerExitFtraceEvent irq_handler_exit = 37; + SyncPtFtraceEvent sync_pt = 38; + SyncTimelineFtraceEvent sync_timeline = 39; + SyncWaitFtraceEvent sync_wait = 40; + Ext4DaWriteBeginFtraceEvent ext4_da_write_begin = 41; + Ext4DaWriteEndFtraceEvent ext4_da_write_end = 42; + Ext4SyncFileEnterFtraceEvent ext4_sync_file_enter = 43; + Ext4SyncFileExitFtraceEvent ext4_sync_file_exit = 44; + BlockRqIssueFtraceEvent block_rq_issue = 45; + MmVmscanDirectReclaimBeginFtraceEvent mm_vmscan_direct_reclaim_begin = 46; + MmVmscanDirectReclaimEndFtraceEvent mm_vmscan_direct_reclaim_end = 47; + MmVmscanKswapdWakeFtraceEvent mm_vmscan_kswapd_wake = 48; + MmVmscanKswapdSleepFtraceEvent mm_vmscan_kswapd_sleep = 49; + BinderTransactionFtraceEvent binder_transaction = 50; + BinderTransactionReceivedFtraceEvent binder_transaction_received = 51; + BinderSetPriorityFtraceEvent binder_set_priority = 52; + BinderLockFtraceEvent binder_lock = 53; + BinderLockedFtraceEvent binder_locked = 54; + BinderUnlockFtraceEvent binder_unlock = 55; + WorkqueueActivateWorkFtraceEvent workqueue_activate_work = 56; + WorkqueueExecuteEndFtraceEvent workqueue_execute_end = 57; + WorkqueueExecuteStartFtraceEvent workqueue_execute_start = 58; + WorkqueueQueueWorkFtraceEvent workqueue_queue_work = 59; + RegulatorDisableFtraceEvent regulator_disable = 60; + RegulatorDisableCompleteFtraceEvent regulator_disable_complete = 61; + RegulatorEnableFtraceEvent regulator_enable = 62; + RegulatorEnableCompleteFtraceEvent regulator_enable_complete = 63; + RegulatorEnableDelayFtraceEvent regulator_enable_delay = 64; + RegulatorSetVoltageFtraceEvent regulator_set_voltage = 65; + RegulatorSetVoltageCompleteFtraceEvent regulator_set_voltage_complete = 66; + CgroupAttachTaskFtraceEvent cgroup_attach_task = 67; + CgroupMkdirFtraceEvent cgroup_mkdir = 68; + CgroupRemountFtraceEvent cgroup_remount = 69; + CgroupRmdirFtraceEvent cgroup_rmdir = 70; + CgroupTransferTasksFtraceEvent cgroup_transfer_tasks = 71; + CgroupDestroyRootFtraceEvent cgroup_destroy_root = 72; + CgroupReleaseFtraceEvent cgroup_release = 73; + CgroupRenameFtraceEvent cgroup_rename = 74; + CgroupSetupRootFtraceEvent cgroup_setup_root = 75; + MdpCmdKickoffFtraceEvent mdp_cmd_kickoff = 76; + MdpCommitFtraceEvent mdp_commit = 77; + MdpPerfSetOtFtraceEvent mdp_perf_set_ot = 78; + MdpSsppChangeFtraceEvent mdp_sspp_change = 79; + TracingMarkWriteFtraceEvent tracing_mark_write = 80; + MdpCmdPingpongDoneFtraceEvent mdp_cmd_pingpong_done = 81; + MdpCompareBwFtraceEvent mdp_compare_bw = 82; + MdpPerfSetPanicLutsFtraceEvent mdp_perf_set_panic_luts = 83; + MdpSsppSetFtraceEvent mdp_sspp_set = 84; + MdpCmdReadptrDoneFtraceEvent mdp_cmd_readptr_done = 85; + MdpMisrCrcFtraceEvent mdp_misr_crc = 86; + MdpPerfSetQosLutsFtraceEvent mdp_perf_set_qos_luts = 87; + MdpTraceCounterFtraceEvent mdp_trace_counter = 88; + MdpCmdReleaseBwFtraceEvent mdp_cmd_release_bw = 89; + MdpMixerUpdateFtraceEvent mdp_mixer_update = 90; + MdpPerfSetWmLevelsFtraceEvent mdp_perf_set_wm_levels = 91; + MdpVideoUnderrunDoneFtraceEvent mdp_video_underrun_done = 92; + MdpCmdWaitPingpongFtraceEvent mdp_cmd_wait_pingpong = 93; + MdpPerfPrefillCalcFtraceEvent mdp_perf_prefill_calc = 94; + MdpPerfUpdateBusFtraceEvent mdp_perf_update_bus = 95; + RotatorBwAoAsContextFtraceEvent rotator_bw_ao_as_context = 96; + MmFilemapAddToPageCacheFtraceEvent mm_filemap_add_to_page_cache = 97; + MmFilemapDeleteFromPageCacheFtraceEvent mm_filemap_delete_from_page_cache = + 98; + MmCompactionBeginFtraceEvent mm_compaction_begin = 99; + MmCompactionDeferCompactionFtraceEvent mm_compaction_defer_compaction = 100; + MmCompactionDeferredFtraceEvent mm_compaction_deferred = 101; + MmCompactionDeferResetFtraceEvent mm_compaction_defer_reset = 102; + MmCompactionEndFtraceEvent mm_compaction_end = 103; + MmCompactionFinishedFtraceEvent mm_compaction_finished = 104; + MmCompactionIsolateFreepagesFtraceEvent mm_compaction_isolate_freepages = + 105; + MmCompactionIsolateMigratepagesFtraceEvent + mm_compaction_isolate_migratepages = 106; + MmCompactionKcompactdSleepFtraceEvent mm_compaction_kcompactd_sleep = 107; + MmCompactionKcompactdWakeFtraceEvent mm_compaction_kcompactd_wake = 108; + MmCompactionMigratepagesFtraceEvent mm_compaction_migratepages = 109; + MmCompactionSuitableFtraceEvent mm_compaction_suitable = 110; + MmCompactionTryToCompactPagesFtraceEvent + mm_compaction_try_to_compact_pages = 111; + MmCompactionWakeupKcompactdFtraceEvent mm_compaction_wakeup_kcompactd = 112; + SuspendResumeFtraceEvent suspend_resume = 113; + SchedWakeupNewFtraceEvent sched_wakeup_new = 114; + BlockBioBackmergeFtraceEvent block_bio_backmerge = 115; + BlockBioBounceFtraceEvent block_bio_bounce = 116; + BlockBioCompleteFtraceEvent block_bio_complete = 117; + BlockBioFrontmergeFtraceEvent block_bio_frontmerge = 118; + BlockBioQueueFtraceEvent block_bio_queue = 119; + BlockBioRemapFtraceEvent block_bio_remap = 120; + BlockDirtyBufferFtraceEvent block_dirty_buffer = 121; + BlockGetrqFtraceEvent block_getrq = 122; + BlockPlugFtraceEvent block_plug = 123; + BlockRqAbortFtraceEvent block_rq_abort = 124; + BlockRqCompleteFtraceEvent block_rq_complete = 125; + BlockRqInsertFtraceEvent block_rq_insert = 126; + // removed field with id 127; + BlockRqRemapFtraceEvent block_rq_remap = 128; + BlockRqRequeueFtraceEvent block_rq_requeue = 129; + BlockSleeprqFtraceEvent block_sleeprq = 130; + BlockSplitFtraceEvent block_split = 131; + BlockTouchBufferFtraceEvent block_touch_buffer = 132; + BlockUnplugFtraceEvent block_unplug = 133; + Ext4AllocDaBlocksFtraceEvent ext4_alloc_da_blocks = 134; + Ext4AllocateBlocksFtraceEvent ext4_allocate_blocks = 135; + Ext4AllocateInodeFtraceEvent ext4_allocate_inode = 136; + Ext4BeginOrderedTruncateFtraceEvent ext4_begin_ordered_truncate = 137; + Ext4CollapseRangeFtraceEvent ext4_collapse_range = 138; + Ext4DaReleaseSpaceFtraceEvent ext4_da_release_space = 139; + Ext4DaReserveSpaceFtraceEvent ext4_da_reserve_space = 140; + Ext4DaUpdateReserveSpaceFtraceEvent ext4_da_update_reserve_space = 141; + Ext4DaWritePagesFtraceEvent ext4_da_write_pages = 142; + Ext4DaWritePagesExtentFtraceEvent ext4_da_write_pages_extent = 143; + Ext4DirectIOEnterFtraceEvent ext4_direct_IO_enter = 144; + Ext4DirectIOExitFtraceEvent ext4_direct_IO_exit = 145; + Ext4DiscardBlocksFtraceEvent ext4_discard_blocks = 146; + Ext4DiscardPreallocationsFtraceEvent ext4_discard_preallocations = 147; + Ext4DropInodeFtraceEvent ext4_drop_inode = 148; + Ext4EsCacheExtentFtraceEvent ext4_es_cache_extent = 149; + Ext4EsFindDelayedExtentRangeEnterFtraceEvent + ext4_es_find_delayed_extent_range_enter = 150; + Ext4EsFindDelayedExtentRangeExitFtraceEvent + ext4_es_find_delayed_extent_range_exit = 151; + Ext4EsInsertExtentFtraceEvent ext4_es_insert_extent = 152; + Ext4EsLookupExtentEnterFtraceEvent ext4_es_lookup_extent_enter = 153; + Ext4EsLookupExtentExitFtraceEvent ext4_es_lookup_extent_exit = 154; + Ext4EsRemoveExtentFtraceEvent ext4_es_remove_extent = 155; + Ext4EsShrinkFtraceEvent ext4_es_shrink = 156; + Ext4EsShrinkCountFtraceEvent ext4_es_shrink_count = 157; + Ext4EsShrinkScanEnterFtraceEvent ext4_es_shrink_scan_enter = 158; + Ext4EsShrinkScanExitFtraceEvent ext4_es_shrink_scan_exit = 159; + Ext4EvictInodeFtraceEvent ext4_evict_inode = 160; + Ext4ExtConvertToInitializedEnterFtraceEvent + ext4_ext_convert_to_initialized_enter = 161; + Ext4ExtConvertToInitializedFastpathFtraceEvent + ext4_ext_convert_to_initialized_fastpath = 162; + Ext4ExtHandleUnwrittenExtentsFtraceEvent ext4_ext_handle_unwritten_extents = + 163; + Ext4ExtInCacheFtraceEvent ext4_ext_in_cache = 164; + Ext4ExtLoadExtentFtraceEvent ext4_ext_load_extent = 165; + Ext4ExtMapBlocksEnterFtraceEvent ext4_ext_map_blocks_enter = 166; + Ext4ExtMapBlocksExitFtraceEvent ext4_ext_map_blocks_exit = 167; + Ext4ExtPutInCacheFtraceEvent ext4_ext_put_in_cache = 168; + Ext4ExtRemoveSpaceFtraceEvent ext4_ext_remove_space = 169; + Ext4ExtRemoveSpaceDoneFtraceEvent ext4_ext_remove_space_done = 170; + Ext4ExtRmIdxFtraceEvent ext4_ext_rm_idx = 171; + Ext4ExtRmLeafFtraceEvent ext4_ext_rm_leaf = 172; + Ext4ExtShowExtentFtraceEvent ext4_ext_show_extent = 173; + Ext4FallocateEnterFtraceEvent ext4_fallocate_enter = 174; + Ext4FallocateExitFtraceEvent ext4_fallocate_exit = 175; + Ext4FindDelallocRangeFtraceEvent ext4_find_delalloc_range = 176; + Ext4ForgetFtraceEvent ext4_forget = 177; + Ext4FreeBlocksFtraceEvent ext4_free_blocks = 178; + Ext4FreeInodeFtraceEvent ext4_free_inode = 179; + Ext4GetImpliedClusterAllocExitFtraceEvent + ext4_get_implied_cluster_alloc_exit = 180; + Ext4GetReservedClusterAllocFtraceEvent ext4_get_reserved_cluster_alloc = + 181; + Ext4IndMapBlocksEnterFtraceEvent ext4_ind_map_blocks_enter = 182; + Ext4IndMapBlocksExitFtraceEvent ext4_ind_map_blocks_exit = 183; + Ext4InsertRangeFtraceEvent ext4_insert_range = 184; + Ext4InvalidatepageFtraceEvent ext4_invalidatepage = 185; + Ext4JournalStartFtraceEvent ext4_journal_start = 186; + Ext4JournalStartReservedFtraceEvent ext4_journal_start_reserved = 187; + Ext4JournalledInvalidatepageFtraceEvent ext4_journalled_invalidatepage = + 188; + Ext4JournalledWriteEndFtraceEvent ext4_journalled_write_end = 189; + Ext4LoadInodeFtraceEvent ext4_load_inode = 190; + Ext4LoadInodeBitmapFtraceEvent ext4_load_inode_bitmap = 191; + Ext4MarkInodeDirtyFtraceEvent ext4_mark_inode_dirty = 192; + Ext4MbBitmapLoadFtraceEvent ext4_mb_bitmap_load = 193; + Ext4MbBuddyBitmapLoadFtraceEvent ext4_mb_buddy_bitmap_load = 194; + Ext4MbDiscardPreallocationsFtraceEvent ext4_mb_discard_preallocations = 195; + Ext4MbNewGroupPaFtraceEvent ext4_mb_new_group_pa = 196; + Ext4MbNewInodePaFtraceEvent ext4_mb_new_inode_pa = 197; + Ext4MbReleaseGroupPaFtraceEvent ext4_mb_release_group_pa = 198; + Ext4MbReleaseInodePaFtraceEvent ext4_mb_release_inode_pa = 199; + Ext4MballocAllocFtraceEvent ext4_mballoc_alloc = 200; + Ext4MballocDiscardFtraceEvent ext4_mballoc_discard = 201; + Ext4MballocFreeFtraceEvent ext4_mballoc_free = 202; + Ext4MballocPreallocFtraceEvent ext4_mballoc_prealloc = 203; + Ext4OtherInodeUpdateTimeFtraceEvent ext4_other_inode_update_time = 204; + Ext4PunchHoleFtraceEvent ext4_punch_hole = 205; + Ext4ReadBlockBitmapLoadFtraceEvent ext4_read_block_bitmap_load = 206; + Ext4ReadpageFtraceEvent ext4_readpage = 207; + Ext4ReleasepageFtraceEvent ext4_releasepage = 208; + Ext4RemoveBlocksFtraceEvent ext4_remove_blocks = 209; + Ext4RequestBlocksFtraceEvent ext4_request_blocks = 210; + Ext4RequestInodeFtraceEvent ext4_request_inode = 211; + Ext4SyncFsFtraceEvent ext4_sync_fs = 212; + Ext4TrimAllFreeFtraceEvent ext4_trim_all_free = 213; + Ext4TrimExtentFtraceEvent ext4_trim_extent = 214; + Ext4TruncateEnterFtraceEvent ext4_truncate_enter = 215; + Ext4TruncateExitFtraceEvent ext4_truncate_exit = 216; + Ext4UnlinkEnterFtraceEvent ext4_unlink_enter = 217; + Ext4UnlinkExitFtraceEvent ext4_unlink_exit = 218; + Ext4WriteBeginFtraceEvent ext4_write_begin = 219; + // removed field with id 220; + // removed field with id 221; + // removed field with id 222; + // removed field with id 223; + // removed field with id 224; + // removed field with id 225; + // removed field with id 226; + // removed field with id 227; + // removed field with id 228; + // removed field with id 229; + Ext4WriteEndFtraceEvent ext4_write_end = 230; + Ext4WritepageFtraceEvent ext4_writepage = 231; + Ext4WritepagesFtraceEvent ext4_writepages = 232; + Ext4WritepagesResultFtraceEvent ext4_writepages_result = 233; + Ext4ZeroRangeFtraceEvent ext4_zero_range = 234; + TaskNewtaskFtraceEvent task_newtask = 235; + TaskRenameFtraceEvent task_rename = 236; + SchedProcessExecFtraceEvent sched_process_exec = 237; + SchedProcessExitFtraceEvent sched_process_exit = 238; + SchedProcessForkFtraceEvent sched_process_fork = 239; + SchedProcessFreeFtraceEvent sched_process_free = 240; + SchedProcessHangFtraceEvent sched_process_hang = 241; + SchedProcessWaitFtraceEvent sched_process_wait = 242; + F2fsDoSubmitBioFtraceEvent f2fs_do_submit_bio = 243; + F2fsEvictInodeFtraceEvent f2fs_evict_inode = 244; + F2fsFallocateFtraceEvent f2fs_fallocate = 245; + F2fsGetDataBlockFtraceEvent f2fs_get_data_block = 246; + F2fsGetVictimFtraceEvent f2fs_get_victim = 247; + F2fsIgetFtraceEvent f2fs_iget = 248; + F2fsIgetExitFtraceEvent f2fs_iget_exit = 249; + F2fsNewInodeFtraceEvent f2fs_new_inode = 250; + F2fsReadpageFtraceEvent f2fs_readpage = 251; + F2fsReserveNewBlockFtraceEvent f2fs_reserve_new_block = 252; + F2fsSetPageDirtyFtraceEvent f2fs_set_page_dirty = 253; + F2fsSubmitWritePageFtraceEvent f2fs_submit_write_page = 254; + F2fsSyncFileEnterFtraceEvent f2fs_sync_file_enter = 255; + F2fsSyncFileExitFtraceEvent f2fs_sync_file_exit = 256; + F2fsSyncFsFtraceEvent f2fs_sync_fs = 257; + F2fsTruncateFtraceEvent f2fs_truncate = 258; + F2fsTruncateBlocksEnterFtraceEvent f2fs_truncate_blocks_enter = 259; + F2fsTruncateBlocksExitFtraceEvent f2fs_truncate_blocks_exit = 260; + F2fsTruncateDataBlocksRangeFtraceEvent f2fs_truncate_data_blocks_range = + 261; + F2fsTruncateInodeBlocksEnterFtraceEvent f2fs_truncate_inode_blocks_enter = + 262; + F2fsTruncateInodeBlocksExitFtraceEvent f2fs_truncate_inode_blocks_exit = + 263; + F2fsTruncateNodeFtraceEvent f2fs_truncate_node = 264; + F2fsTruncateNodesEnterFtraceEvent f2fs_truncate_nodes_enter = 265; + F2fsTruncateNodesExitFtraceEvent f2fs_truncate_nodes_exit = 266; + F2fsTruncatePartialNodesFtraceEvent f2fs_truncate_partial_nodes = 267; + F2fsUnlinkEnterFtraceEvent f2fs_unlink_enter = 268; + F2fsUnlinkExitFtraceEvent f2fs_unlink_exit = 269; + F2fsVmPageMkwriteFtraceEvent f2fs_vm_page_mkwrite = 270; + F2fsWriteBeginFtraceEvent f2fs_write_begin = 271; + F2fsWriteCheckpointFtraceEvent f2fs_write_checkpoint = 272; + F2fsWriteEndFtraceEvent f2fs_write_end = 273; + AllocPagesIommuEndFtraceEvent alloc_pages_iommu_end = 274; + AllocPagesIommuFailFtraceEvent alloc_pages_iommu_fail = 275; + AllocPagesIommuStartFtraceEvent alloc_pages_iommu_start = 276; + AllocPagesSysEndFtraceEvent alloc_pages_sys_end = 277; + AllocPagesSysFailFtraceEvent alloc_pages_sys_fail = 278; + AllocPagesSysStartFtraceEvent alloc_pages_sys_start = 279; + DmaAllocContiguousRetryFtraceEvent dma_alloc_contiguous_retry = 280; + IommuMapRangeFtraceEvent iommu_map_range = 281; + IommuSecPtblMapRangeEndFtraceEvent iommu_sec_ptbl_map_range_end = 282; + IommuSecPtblMapRangeStartFtraceEvent iommu_sec_ptbl_map_range_start = 283; + IonAllocBufferEndFtraceEvent ion_alloc_buffer_end = 284; + IonAllocBufferFailFtraceEvent ion_alloc_buffer_fail = 285; + IonAllocBufferFallbackFtraceEvent ion_alloc_buffer_fallback = 286; + IonAllocBufferStartFtraceEvent ion_alloc_buffer_start = 287; + IonCpAllocRetryFtraceEvent ion_cp_alloc_retry = 288; + IonCpSecureBufferEndFtraceEvent ion_cp_secure_buffer_end = 289; + IonCpSecureBufferStartFtraceEvent ion_cp_secure_buffer_start = 290; + IonPrefetchingFtraceEvent ion_prefetching = 291; + IonSecureCmaAddToPoolEndFtraceEvent ion_secure_cma_add_to_pool_end = 292; + IonSecureCmaAddToPoolStartFtraceEvent ion_secure_cma_add_to_pool_start = + 293; + IonSecureCmaAllocateEndFtraceEvent ion_secure_cma_allocate_end = 294; + IonSecureCmaAllocateStartFtraceEvent ion_secure_cma_allocate_start = 295; + IonSecureCmaShrinkPoolEndFtraceEvent ion_secure_cma_shrink_pool_end = 296; + IonSecureCmaShrinkPoolStartFtraceEvent ion_secure_cma_shrink_pool_start = + 297; + KfreeFtraceEvent kfree = 298; + KmallocFtraceEvent kmalloc = 299; + KmallocNodeFtraceEvent kmalloc_node = 300; + KmemCacheAllocFtraceEvent kmem_cache_alloc = 301; + KmemCacheAllocNodeFtraceEvent kmem_cache_alloc_node = 302; + KmemCacheFreeFtraceEvent kmem_cache_free = 303; + MigratePagesEndFtraceEvent migrate_pages_end = 304; + MigratePagesStartFtraceEvent migrate_pages_start = 305; + MigrateRetryFtraceEvent migrate_retry = 306; + MmPageAllocFtraceEvent mm_page_alloc = 307; + MmPageAllocExtfragFtraceEvent mm_page_alloc_extfrag = 308; + MmPageAllocZoneLockedFtraceEvent mm_page_alloc_zone_locked = 309; + MmPageFreeFtraceEvent mm_page_free = 310; + MmPageFreeBatchedFtraceEvent mm_page_free_batched = 311; + MmPagePcpuDrainFtraceEvent mm_page_pcpu_drain = 312; + RssStatFtraceEvent rss_stat = 313; + IonHeapShrinkFtraceEvent ion_heap_shrink = 314; + IonHeapGrowFtraceEvent ion_heap_grow = 315; + FenceInitFtraceEvent fence_init = 316; + FenceDestroyFtraceEvent fence_destroy = 317; + FenceEnableSignalFtraceEvent fence_enable_signal = 318; + FenceSignaledFtraceEvent fence_signaled = 319; + ClkEnableFtraceEvent clk_enable = 320; + ClkDisableFtraceEvent clk_disable = 321; + ClkSetRateFtraceEvent clk_set_rate = 322; + BinderTransactionAllocBufFtraceEvent binder_transaction_alloc_buf = 323; + SignalDeliverFtraceEvent signal_deliver = 324; + SignalGenerateFtraceEvent signal_generate = 325; + OomScoreAdjUpdateFtraceEvent oom_score_adj_update = 326; + GenericFtraceEvent generic = 327; + MmEventRecordFtraceEvent mm_event_record = 328; + SysEnterFtraceEvent sys_enter = 329; + SysExitFtraceEvent sys_exit = 330; + ZeroFtraceEvent zero = 331; + GpuFrequencyFtraceEvent gpu_frequency = 332; + SdeTracingMarkWriteFtraceEvent sde_tracing_mark_write = 333; + MarkVictimFtraceEvent mark_victim = 334; + IonStatFtraceEvent ion_stat = 335; + IonBufferCreateFtraceEvent ion_buffer_create = 336; + IonBufferDestroyFtraceEvent ion_buffer_destroy = 337; + ScmCallStartFtraceEvent scm_call_start = 338; + ScmCallEndFtraceEvent scm_call_end = 339; + GpuMemTotalFtraceEvent gpu_mem_total = 340; + ThermalTemperatureFtraceEvent thermal_temperature = 341; + CdevUpdateFtraceEvent cdev_update = 342; + CpuhpExitFtraceEvent cpuhp_exit = 343; + CpuhpMultiEnterFtraceEvent cpuhp_multi_enter = 344; + CpuhpEnterFtraceEvent cpuhp_enter = 345; + CpuhpLatencyFtraceEvent cpuhp_latency = 346; + FastrpcDmaStatFtraceEvent fastrpc_dma_stat = 347; + DpuTracingMarkWriteFtraceEvent dpu_tracing_mark_write = 348; + G2dTracingMarkWriteFtraceEvent g2d_tracing_mark_write = 349; + MaliTracingMarkWriteFtraceEvent mali_tracing_mark_write = 350; + DmaHeapStatFtraceEvent dma_heap_stat = 351; + CpuhpPauseFtraceEvent cpuhp_pause = 352; + SchedPiSetprioFtraceEvent sched_pi_setprio = 353; + SdeSdeEvtlogFtraceEvent sde_sde_evtlog = 354; + SdeSdePerfCalcCrtcFtraceEvent sde_sde_perf_calc_crtc = 355; + SdeSdePerfCrtcUpdateFtraceEvent sde_sde_perf_crtc_update = 356; + SdeSdePerfSetQosLutsFtraceEvent sde_sde_perf_set_qos_luts = 357; + SdeSdePerfUpdateBusFtraceEvent sde_sde_perf_update_bus = 358; + RssStatThrottledFtraceEvent rss_stat_throttled = 359; + NetifReceiveSkbFtraceEvent netif_receive_skb = 360; + NetDevXmitFtraceEvent net_dev_xmit = 361; + InetSockSetStateFtraceEvent inet_sock_set_state = 362; + TcpRetransmitSkbFtraceEvent tcp_retransmit_skb = 363; + CrosEcSensorhubDataFtraceEvent cros_ec_sensorhub_data = 364; + NapiGroReceiveEntryFtraceEvent napi_gro_receive_entry = 365; + NapiGroReceiveExitFtraceEvent napi_gro_receive_exit = 366; + KfreeSkbFtraceEvent kfree_skb = 367; + KvmAccessFaultFtraceEvent kvm_access_fault = 368; + KvmAckIrqFtraceEvent kvm_ack_irq = 369; + KvmAgeHvaFtraceEvent kvm_age_hva = 370; + KvmAgePageFtraceEvent kvm_age_page = 371; + KvmArmClearDebugFtraceEvent kvm_arm_clear_debug = 372; + KvmArmSetDreg32FtraceEvent kvm_arm_set_dreg32 = 373; + KvmArmSetRegsetFtraceEvent kvm_arm_set_regset = 374; + KvmArmSetupDebugFtraceEvent kvm_arm_setup_debug = 375; + KvmEntryFtraceEvent kvm_entry = 376; + KvmExitFtraceEvent kvm_exit = 377; + KvmFpuFtraceEvent kvm_fpu = 378; + KvmGetTimerMapFtraceEvent kvm_get_timer_map = 379; + KvmGuestFaultFtraceEvent kvm_guest_fault = 380; + KvmHandleSysRegFtraceEvent kvm_handle_sys_reg = 381; + KvmHvcArm64FtraceEvent kvm_hvc_arm64 = 382; + KvmIrqLineFtraceEvent kvm_irq_line = 383; + KvmMmioFtraceEvent kvm_mmio = 384; + KvmMmioEmulateFtraceEvent kvm_mmio_emulate = 385; + KvmSetGuestDebugFtraceEvent kvm_set_guest_debug = 386; + KvmSetIrqFtraceEvent kvm_set_irq = 387; + KvmSetSpteHvaFtraceEvent kvm_set_spte_hva = 388; + KvmSetWayFlushFtraceEvent kvm_set_way_flush = 389; + KvmSysAccessFtraceEvent kvm_sys_access = 390; + KvmTestAgeHvaFtraceEvent kvm_test_age_hva = 391; + KvmTimerEmulateFtraceEvent kvm_timer_emulate = 392; + KvmTimerHrtimerExpireFtraceEvent kvm_timer_hrtimer_expire = 393; + KvmTimerRestoreStateFtraceEvent kvm_timer_restore_state = 394; + KvmTimerSaveStateFtraceEvent kvm_timer_save_state = 395; + KvmTimerUpdateIrqFtraceEvent kvm_timer_update_irq = 396; + KvmToggleCacheFtraceEvent kvm_toggle_cache = 397; + KvmUnmapHvaRangeFtraceEvent kvm_unmap_hva_range = 398; + KvmUserspaceExitFtraceEvent kvm_userspace_exit = 399; + KvmVcpuWakeupFtraceEvent kvm_vcpu_wakeup = 400; + KvmWfxArm64FtraceEvent kvm_wfx_arm64 = 401; + TrapRegFtraceEvent trap_reg = 402; + VgicUpdateIrqPendingFtraceEvent vgic_update_irq_pending = 403; + WakeupSourceActivateFtraceEvent wakeup_source_activate = 404; + WakeupSourceDeactivateFtraceEvent wakeup_source_deactivate = 405; + UfshcdCommandFtraceEvent ufshcd_command = 406; + UfshcdClkGatingFtraceEvent ufshcd_clk_gating = 407; + ConsoleFtraceEvent console = 408; + DrmVblankEventFtraceEvent drm_vblank_event = 409; + DrmVblankEventDeliveredFtraceEvent drm_vblank_event_delivered = 410; + DrmSchedJobFtraceEvent drm_sched_job = 411; + DrmRunJobFtraceEvent drm_run_job = 412; + DrmSchedProcessJobFtraceEvent drm_sched_process_job = 413; + DmaFenceInitFtraceEvent dma_fence_init = 414; + DmaFenceEmitFtraceEvent dma_fence_emit = 415; + DmaFenceSignaledFtraceEvent dma_fence_signaled = 416; + DmaFenceWaitStartFtraceEvent dma_fence_wait_start = 417; + DmaFenceWaitEndFtraceEvent dma_fence_wait_end = 418; + F2fsIostatFtraceEvent f2fs_iostat = 419; + F2fsIostatLatencyFtraceEvent f2fs_iostat_latency = 420; + SchedCpuUtilCfsFtraceEvent sched_cpu_util_cfs = 421; + V4l2QbufFtraceEvent v4l2_qbuf = 422; + V4l2DqbufFtraceEvent v4l2_dqbuf = 423; + Vb2V4l2BufQueueFtraceEvent vb2_v4l2_buf_queue = 424; + Vb2V4l2BufDoneFtraceEvent vb2_v4l2_buf_done = 425; + Vb2V4l2QbufFtraceEvent vb2_v4l2_qbuf = 426; + Vb2V4l2DqbufFtraceEvent vb2_v4l2_dqbuf = 427; + DsiCmdFifoStatusFtraceEvent dsi_cmd_fifo_status = 428; + DsiRxFtraceEvent dsi_rx = 429; + DsiTxFtraceEvent dsi_tx = 430; + AndroidFsDatareadEndFtraceEvent android_fs_dataread_end = 431; + AndroidFsDatareadStartFtraceEvent android_fs_dataread_start = 432; + AndroidFsDatawriteEndFtraceEvent android_fs_datawrite_end = 433; + AndroidFsDatawriteStartFtraceEvent android_fs_datawrite_start = 434; + AndroidFsFsyncEndFtraceEvent android_fs_fsync_end = 435; + AndroidFsFsyncStartFtraceEvent android_fs_fsync_start = 436; + FuncgraphEntryFtraceEvent funcgraph_entry = 437; + FuncgraphExitFtraceEvent funcgraph_exit = 438; + VirtioVideoCmdFtraceEvent virtio_video_cmd = 439; + VirtioVideoCmdDoneFtraceEvent virtio_video_cmd_done = 440; + VirtioVideoResourceQueueFtraceEvent virtio_video_resource_queue = 441; + VirtioVideoResourceQueueDoneFtraceEvent virtio_video_resource_queue_done = + 442; + MmShrinkSlabStartFtraceEvent mm_shrink_slab_start = 443; + MmShrinkSlabEndFtraceEvent mm_shrink_slab_end = 444; + TrustySmcFtraceEvent trusty_smc = 445; + TrustySmcDoneFtraceEvent trusty_smc_done = 446; + TrustyStdCall32FtraceEvent trusty_std_call32 = 447; + TrustyStdCall32DoneFtraceEvent trusty_std_call32_done = 448; + TrustyShareMemoryFtraceEvent trusty_share_memory = 449; + TrustyShareMemoryDoneFtraceEvent trusty_share_memory_done = 450; + TrustyReclaimMemoryFtraceEvent trusty_reclaim_memory = 451; + TrustyReclaimMemoryDoneFtraceEvent trusty_reclaim_memory_done = 452; + TrustyIrqFtraceEvent trusty_irq = 453; + TrustyIpcHandleEventFtraceEvent trusty_ipc_handle_event = 454; + TrustyIpcConnectFtraceEvent trusty_ipc_connect = 455; + TrustyIpcConnectEndFtraceEvent trusty_ipc_connect_end = 456; + TrustyIpcWriteFtraceEvent trusty_ipc_write = 457; + TrustyIpcPollFtraceEvent trusty_ipc_poll = 458; + // removed field with id 459; + TrustyIpcReadFtraceEvent trusty_ipc_read = 460; + TrustyIpcReadEndFtraceEvent trusty_ipc_read_end = 461; + TrustyIpcRxFtraceEvent trusty_ipc_rx = 462; + // removed field with id 463; + TrustyEnqueueNopFtraceEvent trusty_enqueue_nop = 464; + CmaAllocStartFtraceEvent cma_alloc_start = 465; + CmaAllocInfoFtraceEvent cma_alloc_info = 466; + LwisTracingMarkWriteFtraceEvent lwis_tracing_mark_write = 467; + VirtioGpuCmdQueueFtraceEvent virtio_gpu_cmd_queue = 468; + VirtioGpuCmdResponseFtraceEvent virtio_gpu_cmd_response = 469; + MaliMaliKCPUCQSSETFtraceEvent mali_mali_KCPU_CQS_SET = 470; + MaliMaliKCPUCQSWAITSTARTFtraceEvent mali_mali_KCPU_CQS_WAIT_START = 471; + MaliMaliKCPUCQSWAITENDFtraceEvent mali_mali_KCPU_CQS_WAIT_END = 472; + MaliMaliKCPUFENCESIGNALFtraceEvent mali_mali_KCPU_FENCE_SIGNAL = 473; + MaliMaliKCPUFENCEWAITSTARTFtraceEvent mali_mali_KCPU_FENCE_WAIT_START = 474; + MaliMaliKCPUFENCEWAITENDFtraceEvent mali_mali_KCPU_FENCE_WAIT_END = 475; + HypEnterFtraceEvent hyp_enter = 476; + HypExitFtraceEvent hyp_exit = 477; + HostHcallFtraceEvent host_hcall = 478; + HostSmcFtraceEvent host_smc = 479; + HostMemAbortFtraceEvent host_mem_abort = 480; + SuspendResumeMinimalFtraceEvent suspend_resume_minimal = 481; + MaliMaliCSFINTERRUPTSTARTFtraceEvent mali_mali_CSF_INTERRUPT_START = 482; + MaliMaliCSFINTERRUPTENDFtraceEvent mali_mali_CSF_INTERRUPT_END = 483; + SamsungTracingMarkWriteFtraceEvent samsung_tracing_mark_write = 484; + BinderCommandFtraceEvent binder_command = 485; + BinderReturnFtraceEvent binder_return = 486; + SchedSwitchWithCtrsFtraceEvent sched_switch_with_ctrs = 487; + GpuWorkPeriodFtraceEvent gpu_work_period = 488; + RpmStatusFtraceEvent rpm_status = 489; + PanelWriteGenericFtraceEvent panel_write_generic = 490; + SchedMigrateTaskFtraceEvent sched_migrate_task = 491; + DpuDsiCmdFifoStatusFtraceEvent dpu_dsi_cmd_fifo_status = 492; + DpuDsiRxFtraceEvent dpu_dsi_rx = 493; + DpuDsiTxFtraceEvent dpu_dsi_tx = 494; + F2fsBackgroundGcFtraceEvent f2fs_background_gc = 495; + F2fsGcBeginFtraceEvent f2fs_gc_begin = 496; + F2fsGcEndFtraceEvent f2fs_gc_end = 497; + FastrpcDmaFreeFtraceEvent fastrpc_dma_free = 498; + FastrpcDmaAllocFtraceEvent fastrpc_dma_alloc = 499; + FastrpcDmaUnmapFtraceEvent fastrpc_dma_unmap = 500; + FastrpcDmaMapFtraceEvent fastrpc_dma_map = 501; + GoogleIccEventFtraceEvent google_icc_event = 502; + GoogleIrmEventFtraceEvent google_irm_event = 503; + DevicePmCallbackStartFtraceEvent device_pm_callback_start = 504; + DevicePmCallbackEndFtraceEvent device_pm_callback_end = 505; + ThermalExynosAcpmBulkFtraceEvent thermal_exynos_acpm_bulk = 506; + ThermalExynosAcpmHighOverheadFtraceEvent thermal_exynos_acpm_high_overhead = + 507; + DcvshFreqFtraceEvent dcvsh_freq = 508; + KgslGpuFrequencyFtraceEvent kgsl_gpu_frequency = 509; + MaliMaliPMMCUHCTLCORESDOWNSCALENOTIFYPENDFtraceEvent + mali_mali_PM_MCU_HCTL_CORES_DOWN_SCALE_NOTIFY_PEND = 510; + MaliMaliPMMCUHCTLCORESNOTIFYPENDFtraceEvent + mali_mali_PM_MCU_HCTL_CORES_NOTIFY_PEND = 511; + MaliMaliPMMCUHCTLCOREINACTIVEPENDFtraceEvent + mali_mali_PM_MCU_HCTL_CORE_INACTIVE_PEND = 512; + MaliMaliPMMCUHCTLMCUONRECHECKFtraceEvent + mali_mali_PM_MCU_HCTL_MCU_ON_RECHECK = 513; + MaliMaliPMMCUHCTLSHADERSCOREOFFPENDFtraceEvent + mali_mali_PM_MCU_HCTL_SHADERS_CORE_OFF_PEND = 514; + MaliMaliPMMCUHCTLSHADERSPENDOFFFtraceEvent + mali_mali_PM_MCU_HCTL_SHADERS_PEND_OFF = 515; + MaliMaliPMMCUHCTLSHADERSPENDONFtraceEvent + mali_mali_PM_MCU_HCTL_SHADERS_PEND_ON = 516; + MaliMaliPMMCUHCTLSHADERSREADYOFFFtraceEvent + mali_mali_PM_MCU_HCTL_SHADERS_READY_OFF = 517; + MaliMaliPMMCUINSLEEPFtraceEvent mali_mali_PM_MCU_IN_SLEEP = 518; + MaliMaliPMMCUOFFFtraceEvent mali_mali_PM_MCU_OFF = 519; + MaliMaliPMMCUONFtraceEvent mali_mali_PM_MCU_ON = 520; + MaliMaliPMMCUONCOREATTRUPDATEPENDFtraceEvent + mali_mali_PM_MCU_ON_CORE_ATTR_UPDATE_PEND = 521; + MaliMaliPMMCUONGLBREINITPENDFtraceEvent + mali_mali_PM_MCU_ON_GLB_REINIT_PEND = 522; + MaliMaliPMMCUONHALTFtraceEvent mali_mali_PM_MCU_ON_HALT = 523; + MaliMaliPMMCUONHWCNTDISABLEFtraceEvent mali_mali_PM_MCU_ON_HWCNT_DISABLE = + 524; + MaliMaliPMMCUONHWCNTENABLEFtraceEvent mali_mali_PM_MCU_ON_HWCNT_ENABLE = + 525; + MaliMaliPMMCUONPENDHALTFtraceEvent mali_mali_PM_MCU_ON_PEND_HALT = 526; + MaliMaliPMMCUONPENDSLEEPFtraceEvent mali_mali_PM_MCU_ON_PEND_SLEEP = 527; + MaliMaliPMMCUONSLEEPINITIATEFtraceEvent mali_mali_PM_MCU_ON_SLEEP_INITIATE = + 528; + MaliMaliPMMCUPENDOFFFtraceEvent mali_mali_PM_MCU_PEND_OFF = 529; + MaliMaliPMMCUPENDONRELOADFtraceEvent mali_mali_PM_MCU_PEND_ON_RELOAD = 530; + MaliMaliPMMCUPOWERDOWNFtraceEvent mali_mali_PM_MCU_POWER_DOWN = 531; + MaliMaliPMMCURESETWAITFtraceEvent mali_mali_PM_MCU_RESET_WAIT = 532; + BclIrqTriggerFtraceEvent bcl_irq_trigger = 533; + KgslAdrenoCmdbatchQueuedFtraceEvent kgsl_adreno_cmdbatch_queued = 534; + KgslAdrenoCmdbatchSubmittedFtraceEvent kgsl_adreno_cmdbatch_submitted = 535; + KgslAdrenoCmdbatchSyncFtraceEvent kgsl_adreno_cmdbatch_sync = 536; + KgslAdrenoCmdbatchRetiredFtraceEvent kgsl_adreno_cmdbatch_retired = 537; + PixelMmKswapdWakeFtraceEvent pixel_mm_kswapd_wake = 538; + PixelMmKswapdDoneFtraceEvent pixel_mm_kswapd_done = 539; + SchedWakeupTaskAttrFtraceEvent sched_wakeup_task_attr = 540; + DevfreqFrequencyFtraceEvent devfreq_frequency = 541; + KprobeEvent kprobe_event = 542; + ParamSetValueCpmFtraceEvent param_set_value_cpm = 543; + DoSysOpenFtraceEvent do_sys_open = 544; + OpenExecFtraceEvent open_exec = 545; + BlockIoStartFtraceEvent block_io_start = 546; + BlockIoDoneFtraceEvent block_io_done = 547; + MaliGpuPowerStateFtraceEvent mali_gpu_power_state = 548; + DpuDispDpuUnderrunFtraceEvent dpu_disp_dpu_underrun = 549; + DpuDispVblankIrqEnableFtraceEvent dpu_disp_vblank_irq_enable = 550; + HrtimerStartFtraceEvent hrtimer_start = 551; + HrtimerCancelFtraceEvent hrtimer_cancel = 552; + HrtimerExpireEntryFtraceEvent hrtimer_expire_entry = 553; + HrtimerExpireExitFtraceEvent hrtimer_expire_exit = 554; + TimerStartFtraceEvent timer_start = 555; + TimerCancelFtraceEvent timer_cancel = 556; + TimerExpireEntryFtraceEvent timer_expire_entry = 557; + TimerExpireExitFtraceEvent timer_expire_exit = 558; + LocalTimerEntryFtraceEvent local_timer_entry = 559; + LocalTimerExitFtraceEvent local_timer_exit = 560; + Dwc3AllocRequestFtraceEvent dwc3_alloc_request = 561; + Dwc3CompleteTrbFtraceEvent dwc3_complete_trb = 562; + Dwc3CtrlReqFtraceEvent dwc3_ctrl_req = 563; + Dwc3EpDequeueFtraceEvent dwc3_ep_dequeue = 564; + Dwc3EpQueueFtraceEvent dwc3_ep_queue = 565; + Dwc3EventFtraceEvent dwc3_event = 566; + Dwc3FreeRequestFtraceEvent dwc3_free_request = 567; + Dwc3GadgetEpCmdFtraceEvent dwc3_gadget_ep_cmd = 568; + Dwc3GadgetEpDisableFtraceEvent dwc3_gadget_ep_disable = 569; + Dwc3GadgetEpEnableFtraceEvent dwc3_gadget_ep_enable = 570; + Dwc3GadgetGenericCmdFtraceEvent dwc3_gadget_generic_cmd = 571; + Dwc3GadgetGivebackFtraceEvent dwc3_gadget_giveback = 572; + Dwc3PrepareTrbFtraceEvent dwc3_prepare_trb = 573; + Dwc3ReadlFtraceEvent dwc3_readl = 574; + Dwc3WritelFtraceEvent dwc3_writel = 575; + CmaAllocFinishFtraceEvent cma_alloc_finish = 576; + MmAllocContigMigrateRangeInfoFtraceEvent + mm_alloc_contig_migrate_range_info = 577; + HostFfaCallFtraceEvent host_ffa_call = 578; + DmabufRssStatFtraceEvent dmabuf_rss_stat = 579; + IommuIdmapFtraceEvent iommu_idmap = 580; + PsciMemProtectFtraceEvent psci_mem_protect = 581; + HypervisorHostHcallFtraceEvent hypervisor_host_hcall = 582; + HypervisorHostSmcFtraceEvent hypervisor_host_smc = 583; + HypervisorHypExitFtraceEvent hypervisor_hyp_exit = 584; + HypervisorIommuIdmapFtraceEvent hypervisor_iommu_idmap = 585; + HypervisorPsciMemProtectFtraceEvent hypervisor_psci_mem_protect = 586; + HypervisorHostMemAbortFtraceEvent hypervisor_host_mem_abort = 587; + HypervisorHypEnterFtraceEvent hypervisor_hyp_enter = 588; + HypervisorIommuIdmapCompleteFtraceEvent hypervisor_iommu_idmap_complete = + 589; + HypervisorVcpuIllegalTrapFtraceEvent hypervisor_vcpu_illegal_trap = 590; + DrmSchedJobAddDepFtraceEvent drm_sched_job_add_dep = 591; + DrmSchedJobDoneFtraceEvent drm_sched_job_done = 592; + DrmSchedJobQueueFtraceEvent drm_sched_job_queue = 593; + DrmSchedJobRunFtraceEvent drm_sched_job_run = 594; + DrmSchedJobUnschedulableFtraceEvent drm_sched_job_unschedulable = 595; + } +} + +// End of protos/perfetto/trace/ftrace/ftrace_event.proto + +// Begin of protos/perfetto/trace/ftrace/ftrace_stats.proto + +// Per-CPU kernel buffer stats for the ftrace data source gathered from +// /sys/kernel/tracing/per_cpu/cpuX/stats. +message FtraceCpuStats { + // CPU index. + optional uint64 cpu = 1; + + // Number of entries currently in the kernel buffer. + optional uint64 entries = 2; + + // Number of events lost in kernel buffers due to overwriting of old events + // before userspace had a chance to drain them. Valid if the buffer is in + // "overwrite" mode, otherwise see |dropped_events|. + optional uint64 overrun = 3; + + // This should always be zero. If not the buffer size is way too small or + // something went wrong with the tracer. Quoting the kernel: "number of + // commits failing due to the buffer wrapping around while there are + // uncommitted events, such as during an interrupt storm". + optional uint64 commit_overrun = 4; + + // Size of entries currently in the kernel buffer (see |entries|) in bytes. + // The field should be named "bytes", but is misnamed for historical reasons. + // This value has known inaccuracies before Linux v6.6: + // https://github.com/torvalds/linux/commit/45d99ea + optional uint64 bytes_read = 5; + + // The timestamp for the oldest event still in the ring buffer. + // Unit: seconds for typical trace clocks (i.e. not tsc/counter). + optional double oldest_event_ts = 6; + + // The current timestamp. + // Unit: seconds for typical trace clocks (i.e. not tsc/counter). + optional double now_ts = 7; + + // If the kernel buffer has overwrite mode disabled, this will show the number + // of new events that were lost because the buffer was full. This is similar + // to |overrun| but only for the overwrite=false case. + optional uint64 dropped_events = 8; + + // The number of events read (consumed) from the buffer by userspace. + optional uint64 read_events = 9; +} + +// Kprobe statistical data, gathered from /sys/kernel/tracing/kprobe_profile. +message FtraceKprobeStats { + // Cumulative number of kprobe events generated for this function + optional int64 hits = 1; + // Cumulative number of kprobe events that could not be generated for this + // function and were missed. This happens when too much nesting + // happens between a kprobe and its kretprobe, overflowing the + // maxactives buffer. + optional int64 misses = 2; +} + +// Errors and kernel buffer stats for the ftrace data source. +message FtraceStats { + enum Phase { + UNSPECIFIED = 0; + START_OF_TRACE = 1; + END_OF_TRACE = 2; + } + + // A pair of FtraceStats is written on every trace flush: + // * START_OF_TRACE - stats recorded at the beginning of the trace. + // * END_OF_TRACE - stats recorded during the flush. In other words shortly + // before this packet was written. For simple traces this + // will be once at the end of the trace. + optional Phase phase = 1; + + // Per-CPU stats (one entry for each CPU). + repeated FtraceCpuStats cpu_stats = 2; + + // When FtraceConfig.symbolize_ksyms = true, this records the number of + // symbols parsed from /proc/kallsyms, whether they have been seen in the + // trace or not. It can be used to debug kptr_restrict or security-related + // errors. + // Note: this will be valid only when phase = END_OF_TRACE. The symbolizer is + // initialized. When START_OF_TRACE is emitted it is not ready yet. + optional uint32 kernel_symbols_parsed = 3; + + // The memory used by the kernel symbolizer (KernelSymbolMap.size_bytes()). + optional uint32 kernel_symbols_mem_kb = 4; + + // Atrace errors (even non-fatal ones) are reported here. A typical example is + // one or more atrace categories not available on the device. + optional string atrace_errors = 5; + + // Error message due to exclusivity violation of a single-tenant feature. + optional string exclusive_feature_error = 13; + + // Ftrace events requested by the config but not present on device. + repeated string unknown_ftrace_events = 6; + + // Ftrace events requested by the config and present on device, but which we + // failed to enable due to permissions, or due to a conflicting option + // (currently FtraceConfig.disable_generic_events). + repeated string failed_ftrace_events = 7; + + // The data source was configured to preserve existing events in the ftrace + // buffer before the start of the trace. + optional bool preserve_ftrace_buffer = 8; + + // Unique errors encountered during reading and parsing of the raw ftrace + // data. Ring buffer ABI related errors will also be recorded in the + // affected FtraceEventBundles with a timestamp. + // Any traces with entries in this field should be investigated, as they + // indicate a bug in perfetto or the kernel. + repeated FtraceParseStatus ftrace_parse_errors = 9; + + // Kprobe profile stats for functions hits and misses + optional FtraceKprobeStats kprobe_stats = 10; + + // Per-cpu buffer size as returned by buffer_size_kb in pages (rounded up). + // Added in: perfetto v52. + optional uint32 cpu_buffer_size_pages = 11; + + // Per-cpu buffer size as cached by our implementation (ftrace muxer), based + // on the value we're writing into the tracefs control file. Might not be + // exactly equal to |cpu_buffer_size_pages| due to the kernel allocating extra + // scratch pages (and/or other factors). Added in: perfetto v52. + optional uint32 cached_cpu_buffer_size_pages = 12; +} + +enum FtraceParseStatus { + FTRACE_STATUS_UNSPECIFIED = 0; + // Not written, used for convenience of implementation: + FTRACE_STATUS_OK = 1; + // Issues with reading data out of the ftrace ring buffer: + FTRACE_STATUS_UNEXPECTED_READ_ERROR = 2; + FTRACE_STATUS_PARTIAL_PAGE_READ = 3; + // Ring buffer binary data not matching our understanding of the layout: + FTRACE_STATUS_ABI_INVALID_PAGE_HEADER = 4; + FTRACE_STATUS_ABI_SHORT_EVENT_HEADER = 5; + FTRACE_STATUS_ABI_NULL_PADDING = 6; + FTRACE_STATUS_ABI_SHORT_PADDING_LENGTH = 7; + FTRACE_STATUS_ABI_INVALID_PADDING_LENGTH = 8; + FTRACE_STATUS_ABI_SHORT_TIME_EXTEND = 9; + FTRACE_STATUS_ABI_SHORT_TIME_STAMP = 10; + FTRACE_STATUS_ABI_SHORT_DATA_LENGTH = 11; + FTRACE_STATUS_ABI_ZERO_DATA_LENGTH = 12; + FTRACE_STATUS_ABI_INVALID_DATA_LENGTH = 13; + FTRACE_STATUS_ABI_SHORT_EVENT_ID = 14; + FTRACE_STATUS_ABI_END_OVERFLOW = 15; + // Issues with parsing the event payload: + FTRACE_STATUS_SHORT_COMPACT_EVENT = 16; + FTRACE_STATUS_INVALID_EVENT = 17; +} + +// End of protos/perfetto/trace/ftrace/ftrace_stats.proto + +// Begin of protos/perfetto/trace/ftrace/ftrace_event_bundle.proto + +// The result of tracing one or more ftrace data pages from a single per-cpu +// kernel ring buffer. If collating multiple pages' worth of events, all of +// them come from contiguous pages, with no kernel data loss in between. +message FtraceEventBundle { + optional uint32 cpu = 1; + repeated FtraceEvent event = 2; + + // Set to true if there was data loss between the last time we've read from + // the corresponding per-cpu kernel buffer, and the earliest event recorded + // in this bundle. + optional bool lost_events = 3; + + // Optionally-enabled compact encoding of a batch of scheduling events. Only + // a subset of events & their fields is recorded. + // All fields (except comms) are stored in a structure-of-arrays form, one + // entry in each repeated field per event. + message CompactSched { + // Interned table of unique strings for this bundle. + repeated string intern_table = 5; + + // Delta-encoded timestamps across all sched_switch events within this + // bundle. The first is absolute, each next one is relative to its + // predecessor. + repeated uint64 switch_timestamp = 1 [packed = true]; + repeated int64 switch_prev_state = 2 [packed = true]; + repeated int32 switch_next_pid = 3 [packed = true]; + repeated int32 switch_next_prio = 4 [packed = true]; + // One per event, index into |intern_table| corresponding to the + // next_comm field of the event. + repeated uint32 switch_next_comm_index = 6 [packed = true]; + + // Delta-encoded timestamps across all sched_waking events within this + // bundle. The first is absolute, each next one is relative to its + // predecessor. + repeated uint64 waking_timestamp = 7 [packed = true]; + repeated int32 waking_pid = 8 [packed = true]; + repeated int32 waking_target_cpu = 9 [packed = true]; + repeated int32 waking_prio = 10 [packed = true]; + // One per event, index into |intern_table| corresponding to the + // comm field of the event. + repeated uint32 waking_comm_index = 11 [packed = true]; + repeated uint32 waking_common_flags = 12 [packed = true]; + } + optional CompactSched compact_sched = 4; + + // Perfetto will by default try to use the boottime ("boot") clock for ftrace + // timestamps as that counts during suspend, is available to userspace, and + // is coherent across cpus. + // + // If this field is set, it means that a different clock was used during + // recording. Either because the boot clock is unavailable (e.g. old kernels + // before 3.x), or the trace config has set an incompatible option + // (use_monotonic_raw_clock / preserve_ftrace_buffer). In that case, + // trace_processor will do best-effort clock alignment using timestamp pairs + // from |ftrace_timestamp| and |boot_timestamp| fields. This field is omitted + // when the ftrace clock is "boot", as that is the default assumption. + // + // Some clocks (local/global) are technically per-cpu, but we make a + // simplifying assumption that they are global, as their inter-cpu skew + // should be reasonably bounded on modern systems. + // + // Added in: perfetto v19. Android T (13). + optional FtraceClock ftrace_clock = 5; + + // The timestamp according to the ftrace clock, taken at the same instant as + // |boot_timestamp|. Note: timestamping is done at buffer read time, so it + // will be in the future relative to the data covered by this bundle. + // Implementation note: Populated by reading the 'now ts:' field in + // tracefs/per_cpu/cpu0/stat. + // + // Set only if |ftrace_clock| != FTRACE_CLOCK_UNSPECIFIED. + optional int64 ftrace_timestamp = 6; + + // The timestamp according to CLOCK_BOOTTIME, taken at the same instant as + // |ftrace_timestamp|. + // + // Set only if |ftrace_clock| != FTRACE_CLOCK_UNSPECIFIED. + optional int64 boot_timestamp = 7; + + // Errors encountered during parsing of the raw ftrace data. In case of ring + // buffer layout errors, the parser skips the rest of the offending kernel + // buffer page and continues from the next page. + // See also FtraceStats.ftrace_parse_errors, which collates all unique errors + // seen within the duration of the trace (even if the affected bundles get + // overwritten in ring buffer mode). + message FtraceError { + // Timestamp of the data that we're unable to parse, in the ftrace clock + // domain. Currently, we use the base timestamp of the tracing page + // containing the bad record rather than the time of the record itself. + optional uint64 timestamp = 1; + optional FtraceParseStatus status = 2; + } + repeated FtraceError error = 8; + + // Superseded by |previous_bundle_end_timestamp| in perfetto v47+. The + // primary difference is that this field tracked the last timestamp read from + // the per-cpu buffer, while the newer field tracks events that get + // serialised into the trace. + // Added in: perfetto v44. + optional uint64 last_read_event_timestamp = 9; + + // The timestamp (using ftrace clock) of the last event written into this + // data source on this cpu. In other words: the last event in the previous + // bundle. + // Lets the trace processing find an initial timestamp after which ftrace + // data is known to be valid across all cpus. Of particular importance when + // the perfetto trace buffer is a ring buffer as well, as the overwriting of + // oldest bundles can skew the first valid timestamp per cpu significantly. + // Added in: perfetto v47. + optional uint64 previous_bundle_end_timestamp = 10; + + // Describes the serialised |FtraceEvent| protos for events not known at + // compile time, when using the |denser_generic_event_encoding| option. + // Addded in: perfetto v50. + message GenericEventDescriptor { + // submessage id within FtraceEvent described by |event_descriptor|. + optional int32 field_id = 1; + // optional: the event's group, e.g. "sched" for "sched/sched_switch". + // The event name itself is in |event_descriptor.name|. + optional string group_name = 3; + // serialised DescriptorProto. + optional bytes event_descriptor = 2; + } + repeated GenericEventDescriptor generic_event_descriptors = 11; + + // Written only on android builds if the config sets |debug_ftrace_abi|. + // Contains the raw ring buffer tracing page that the implementation could + // not parse. + // Addded in: perfetto v50. + optional bytes broken_abi_trace_page = 512; +} + +enum FtraceClock { + // There is no FTRACE_CLOCK_BOOT entry as that's the default assumption. When + // the ftrace clock is "boot", it's just omitted (so UNSPECIFIED == BOOT). + FTRACE_CLOCK_UNSPECIFIED = 0; + FTRACE_CLOCK_UNKNOWN = 1; + FTRACE_CLOCK_GLOBAL = 2; + FTRACE_CLOCK_LOCAL = 3; + FTRACE_CLOCK_MONO_RAW = 4; +} + +// End of protos/perfetto/trace/ftrace/ftrace_event_bundle.proto + +* FTRACE +*/ + +// Begin of protos/perfetto/trace/generic_kernel/generic_power.proto + +// GenericKernelCpuFrequencyEvent is the standard proto to capture CPU +// frequency change events in a generic kernel implementation. +message GenericKernelCpuFrequencyEvent { + // CPU in which the event occurred. + optional int32 cpu = 1; + // Frequency (Hz) of the CPU. + optional int64 freq_hz = 2; +} + +// End of protos/perfetto/trace/generic_kernel/generic_power.proto + +// Begin of protos/perfetto/trace/generic_kernel/generic_task.proto + +// GenericKernelTaskStateEvent is the standard proto to capture thread state +// change events in a generic kernel implementation. This is mainly for the +// case where scheduler events are not directly supported in the kernel's +// tracing mechanism. +// +// By capturing these task state events Perfetto is able to infer higher-level +// events such as context switches and task waking events, providing as much +// parity as possible with established tracing frameworks such as +// Linux's ftrace. +message GenericKernelTaskStateEvent { + // CPU in which the event occurred. + // This field is only relevant with the TASK_STATE_RUNNING state. There is + // no specific meaning to the cpu field in a non-running state event. + optional int32 cpu = 1; + // Command name for the thread. + optional string comm = 2; + // Thread id. + optional int64 tid = 3; + + // TaskStateEnum represents the valid states of a thread. + // These states are a generic representation of the actual thread state and + // don't necessarily map one-to-one to the states the actual OS kernel + // tracks internally. + // + // Note: Consecutive TASK_STATE_RUNNING states for the same TID is considered + // an error resulting in potential data loss. + enum TaskStateEnum { + TASK_STATE_UNKNOWN = 0; + TASK_STATE_CREATED = 1; + TASK_STATE_RUNNABLE = 2; + TASK_STATE_RUNNING = 3; + TASK_STATE_INTERRUPTIBLE_SLEEP = 4; + TASK_STATE_UNINTERRUPTIBLE_SLEEP = 5; + TASK_STATE_STOPPED = 6; + TASK_STATE_DEAD = 7; + TASK_STATE_DESTROYED = 8; + } + // New state of the thread. + optional TaskStateEnum state = 4; + + // Priority of the thread. + // This value is OS agnostic and should only be interpreted based on the + // kernel who emitted the message. + optional int32 prio = 5; +} + +// GenericKernelTaskRenameEvent is the standard proto to capture the renaming +// of a thread. +message GenericKernelTaskRenameEvent { + // Thread id. + optional int64 tid = 1; + // New command name for the thread. + optional string comm = 2; +} + +// Metadata about the processes and threads in the trace. +// The main goal of this proto is to provide a generic kernel +// implementation a mechanism to outline its process structure. +message GenericKernelProcessTree { + // Representation of a thread. + message Thread { + // Thread id. + optional int64 tid = 1; + + // Id of the parent process. + optional int64 pid = 2; + + // The command name of the thread. + optional string comm = 3; + + // True if thread is the main thread. + optional bool is_main_thread = 4; + } + + // Representation of a process. + message Process { + // Process id. + optional int64 pid = 1; + + // Parent process id. + optional int64 ppid = 2; + + // The command line of the process. + // If the cmdline has spaces in it, then we use the characters from + // position 0 to the first instance of the space char (' ') as the name + // of the process. If no spaces are present, then the entire cmdline is + // used as the name. + optional string cmdline = 3; + } + + // List of processes and threads in the kernel. These lists are incremental + // and not exhaustive. A process and its threads might show up separately in + // different ProcessTree messages. A thread might not show up at all, if + // no sched switch activity was detected, for instance: + // #0 { processes: [{pid: 10, ...}], threads: [{tid: 11, pid: 10}] } + // #1 { threads: [{tid: 12, pid: 10}] } + // #2 { processes: [{pid: 20, ...}], threads: [{tid: 13, pid: 10}] } + repeated Process processes = 1; + repeated Thread threads = 2; +} + +// End of protos/perfetto/trace/generic_kernel/generic_task.proto + +// Begin of protos/perfetto/trace/gpu/gpu_counter_event.proto + +message GpuCounterEvent { + // The first trace packet of each session should include counter_spec. + optional GpuCounterDescriptor counter_descriptor = 1; + + message GpuCounter { + // required. Identifier for counter. + optional uint32 counter_id = 1; + // required. Value of the counter. + oneof value { + int64 int_value = 2; + double double_value = 3; + } + } + repeated GpuCounter counters = 2; + + // optional. Identifier for GPU in a multi-gpu device. + optional int32 gpu_id = 3; +} + +// End of protos/perfetto/trace/gpu/gpu_counter_event.proto + +// Begin of protos/perfetto/trace/gpu/gpu_log.proto + +// Message for logging events GPU data producer. +message GpuLog { + enum Severity { + LOG_SEVERITY_UNSPECIFIED = 0; + LOG_SEVERITY_VERBOSE = 1; + LOG_SEVERITY_DEBUG = 2; + LOG_SEVERITY_INFO = 3; + LOG_SEVERITY_WARNING = 4; + LOG_SEVERITY_ERROR = 5; + }; + optional Severity severity = 1; + + optional string tag = 2; + + optional string log_message = 3; +} + +// End of protos/perfetto/trace/gpu/gpu_log.proto + +// Begin of protos/perfetto/trace/gpu/gpu_render_stage_event.proto + +// next id: 15 +message GpuRenderStageEvent { + // required. Unique ID for the event. + optional uint64 event_id = 1; + + // optional. Duration of the event in nanoseconds. If unset, this is a + // single time point event. + optional uint64 duration = 2; + + // required. ID to a hardware queue description in the specifications. + // InternedGpuRenderStageSpecification + optional uint64 hw_queue_iid = 13; + + // required. ID to a render stage description in the specifications. + // InternedGpuRenderStageSpecification + optional uint64 stage_iid = 14; + + // optional. Identifier for GPU in a multi-gpu device. + optional int32 gpu_id = 11; + + // required. Graphics context for the event. + // For OpenGL, this is the GL context. + // For Vulkan, this is the VkDevice. + optional uint64 context = 5; + + // optional. The render target for this event. + // For OpenGL, this is the GL frame buffer handle. + // For Vulkan, this is the VkFrameBuffer handle. + optional uint64 render_target_handle = 8; + + // optional. Submission ID generated by the UMD. + // For OpenGL, the ID should map to an API submission (e.g., glFlush, + // glFinish, eglSwapBufffers) event. The set of submissions to the HW due + // to a single API submission should share the same ID. + // For Vulkan, it should map 1:1 with a vkQueueSubmit. + optional uint32 submission_id = 10; + + // optional. Additional data for the user. This may include attributes for + // the event like resource ids, shaders, etc. + message ExtraData { + optional string name = 1; + optional string value = 2; + } + repeated ExtraData extra_data = 6; + + // VULKAN SPECIFICS + + // optional. The Vulkan render pass handle. + optional uint64 render_pass_handle = 9; + + // optional. An ID for the render pass instance. This is used to correlate + // different events on different queues produced by the same Vulkan render + // pass instance. + optional uint64 render_pass_instance_id = 16; + + // optional. A bit mask representing which render subpasses contributed to + // this render stage event. Subpass index 0 is represented by setting the + // LSB of the mask. Additional mask can be added for subpass index greater + // than 63. + repeated uint64 render_subpass_index_mask = 15; + + // optional. The Vulkan command buffer handle. + optional uint64 command_buffer_handle = 12; + + // DEPRECATED + + // Deprecated. Use InternedGpuRenderStageSpecification instead. + // The first trace packet of each session should include a Specifications + // to enumerate *all* IDs that will be used. The timestamp of this packet + // must be earlier than all other packets. Only one packet with Specifications + // is expected. + message Specifications { + message ContextSpec { + optional uint64 context = 1; + optional int32 pid = 2; + } + optional ContextSpec context_spec = 1; + + message Description { + optional string name = 1; + optional string description = 2; + } + + // Labels to categorize the hw Queue this event goes on. + repeated Description hw_queue = 2; + + // Labels to categorize render stage(binning, render, compute etc). + repeated Description stage = 3; + } + // Deprecated. Use hw_queue_iid and stage_iid to refer to + // InternedGpuRenderStageSpecification instead. + optional Specifications specifications = 7 [deprecated = true]; + + // Deprecated. Use hw_queue_iid instead; + optional int32 hw_queue_id = 3 [deprecated = true]; + + // Deprecated. Use stage_iid instead; + optional int32 stage_id = 4 [deprecated = true]; + + // Extension for vendor's custom proto. + extensions 100; +} + +// Interned data. + +// The iid is the numeric value of either the GL Context or the VkDevice +// handle. +message InternedGraphicsContext { + optional uint64 iid = 1; + optional int32 pid = 2; + enum Api { + UNDEFINED = 0; + OPEN_GL = 1; + VULKAN = 2; + OPEN_CL = 3; + } + optional Api api = 3; +} + +message InternedGpuRenderStageSpecification { + optional uint64 iid = 1; + optional string name = 2; + optional string description = 3; + + enum RenderStageCategory { + OTHER = 0; + GRAPHICS = 1; + COMPUTE = 2; + } + optional RenderStageCategory category = 4; +} + +// End of protos/perfetto/trace/gpu/gpu_render_stage_event.proto + +// Begin of protos/perfetto/trace/gpu/vulkan_api_event.proto + +// Message for recording the Vulkan call. +message VulkanApiEvent { + oneof event { + VkDebugUtilsObjectName vk_debug_utils_object_name = 1; + VkQueueSubmit vk_queue_submit = 2; + } + + // For recording vkSetDebugUtilsObjectNameEXT and + // vkDebugMarkerSetObjectNameEXT + message VkDebugUtilsObjectName { + optional uint32 pid = 1; + optional uint64 vk_device = 2; + // VkObjectType. Value must match + // https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkObjectType.html. + optional int32 object_type = 3; + optional uint64 object = 4; + optional string object_name = 5; + } + + // For recording vkQueueSubmit call. + message VkQueueSubmit { + optional uint64 duration_ns = 1; + optional uint32 pid = 2; + optional uint32 tid = 3; + optional uint64 vk_queue = 4; + repeated uint64 vk_command_buffers = 5; + // Submission ID. An identifier unique to each vkQueueSubmit call. This + // submission_id must match GpuRenderStageEvent.submission_id if the + // GpuRenderStageEvent is created due to this vkQueueSubmit. + optional uint32 submission_id = 6; + } +} + +// End of protos/perfetto/trace/gpu/vulkan_api_event.proto + +// Begin of protos/perfetto/trace/gpu/vulkan_memory_event.proto + +// All the information that cannot be sent within a VulkanMemoryEvent message, +// are sent as annotations to the main memory event. One example is the +// properties of the object that consumes the allocated memory, for example, a +// buffer or an image. +// key_iid and string_iid are both interned strings. Original string value is +// stored in vulkan_memory_keys from +// protos/perfetto/trace/interned_data/interned_data.proto. +message VulkanMemoryEventAnnotation { + optional uint64 key_iid = 1; + oneof value { + int64 int_value = 2; + double double_value = 3; + uint64 string_iid = 4; + } +} + +// Each VulkanMemoryEvent encompasses information regarding one single function +// call that results in reserving, binding or freeing host or GPU memory. There +// is a special message type, ANNOTATIONS, which is used to communicate +// information that are not directly related to a memory event, nonetheless are +// essential to understand the memory usage. An example is the size and memory +// types of the memory heaps. +// +// Next reserved id: 10 (up to 15). +// Next id: 21. +message VulkanMemoryEvent { + enum Source { + SOURCE_UNSPECIFIED = 0; + SOURCE_DRIVER = 1; + SOURCE_DEVICE = 2; + SOURCE_DEVICE_MEMORY = 3; + SOURCE_BUFFER = 4; + SOURCE_IMAGE = 5; + } + + enum Operation { + OP_UNSPECIFIED = 0; + + // alloc, create + OP_CREATE = 1; + + // free, destroy(non-bound) + OP_DESTROY = 2; + + // bind buffer and image + OP_BIND = 3; + + // destroy (bound) + OP_DESTROY_BOUND = 4; + + // only annotations + OP_ANNOTATIONS = 5; + } + + enum AllocationScope { + SCOPE_UNSPECIFIED = 0; + SCOPE_COMMAND = 1; + SCOPE_OBJECT = 2; + SCOPE_CACHE = 3; + SCOPE_DEVICE = 4; + SCOPE_INSTANCE = 5; + } + + optional Source source = 1; + optional Operation operation = 2; + optional int64 timestamp = 3; + optional uint32 pid = 4; + optional fixed64 memory_address = 5; + optional uint64 memory_size = 6; + // Interned string. Original string value is stored in function_names from + // protos/perfetto/trace/interned_data/interned_data.proto. + optional uint64 caller_iid = 7; + optional AllocationScope allocation_scope = 8; + // Extra related information, e.g., create configs, etc. + repeated VulkanMemoryEventAnnotation annotations = 9; + + // Field IDs used for device memory (low sampling rate) + optional fixed64 device = 16; + optional fixed64 device_memory = 17; + optional uint32 memory_type = 18; + optional uint32 heap = 19; + optional fixed64 object_handle = 20; +} + +// End of protos/perfetto/trace/gpu/vulkan_memory_event.proto + +// Begin of protos/perfetto/trace/profiling/profile_common.proto + +// The interning fields in this file can refer to 2 different intern tables, +// depending on the message they are used in. If the interned fields are present +// in ProfilePacket proto, then the intern tables included in the ProfilePacket +// should be used. If the intered fields are present in the +// StreamingProfilePacket proto, then the intern tables included in all of the +// previous InternedData message with same sequence ID should be used. +// TODO(fmayer): Move to the intern tables to a common location. +message InternedString { + // Interning key. Starts from 1, 0 is the same as "not set". + optional uint64 iid = 1; + + // The actual string. + optional bytes str = 2; +} + +// Source line info. +message Line { + optional string function_name = 1; + optional string source_file_name = 2; + optional uint32 line_number = 3; +} + +// Symbols for a given address in a module. +message AddressSymbols { + optional uint64 address = 1; + + // Source lines that correspond to this address. + // + // These are repeated because when inlining happens, multiple functions' + // frames can be at a single address. Imagine function Foo calling the + // std::vector constructor, which gets inlined at 0xf00. We then get + // both Foo and the std::vector constructor when we symbolize the + // address. + repeated Line lines = 2; +} + +// Symbols for addresses seen in a module. +// Used in re-symbolisation of complete traces. +message ModuleSymbols { + // Fully qualified path to the mapping. + // E.g. /system/lib64/libc.so. + optional string path = 1; + + // .note.gnu.build-id on Linux (not hex encoded). + // uuid on MacOS. + // Module GUID on Windows. + optional string build_id = 2; + repeated AddressSymbols address_symbols = 3; +} + +message Mapping { + // Interning key. + // Starts from 1, 0 is the same as "not set". + optional uint64 iid = 1; + + // Interning key. + // Starts from 1, 0 is the same as "not set". + optional uint64 build_id = 2; + + // The linker may create multiple memory mappings for the same shared + // library. + // This is so that the ELF header is mapped as read only, while the + // executable memory is mapped as executable only. + // The details of this depend on the linker, a possible mapping of an ELF + // file is this: + // +----------------------+ + // ELF |xxxxxxxxxyyyyyyyyyyyyy| + // +---------+------------+ + // | | + // | read | executable + // v mapping v mapping + // +----------------------+ + // Memory |xxxxxxxxx|yyyyyyyyyyyy| + // +------------------+---+ + // ^ ^ ^ + // + + + + // start exact relpc + // offset offset 0x1800 + // 0x0000 0x1000 + // + // exact_offset is the offset into the library file of this mapping. + // start_offset is the offset into the library file of the first mapping + // for that library. For native libraries (.so files) this should be 0. + + // This is not set on Android 10. + optional uint64 exact_offset = 8; + + optional uint64 start_offset = 3; + optional uint64 start = 4; + optional uint64 end = 5; + + // Libunwindstack-specific concept, not to be confused with bionic linker's + // notion of load_bias. Needed to correct relative pc addresses (as produced + // by libunwindstack) when doing offline resymbolisation. + // + // For an executable ELF PT_LOAD segment, this is: + // p_vaddr - p_offset + // + // Where p_offset means that the code is at that offset into the ELF file on + // disk. While p_vaddr is the offset at which the code gets *mapped*, relative + // to where the linker loads the ELF into the address space. For most ELFs, + // the two values are identical and therefore load_bias is zero. + optional uint64 load_bias = 6; + + // E.g. ["system", "lib64", "libc.so"] + // id of string. + repeated uint64 path_string_ids = 7; +} + +message Frame { + // Interning key. Starts from 1, 0 is the same as "not set". + optional uint64 iid = 1; + + // E.g. "fopen" + // id of string. + optional uint64 function_name_id = 2; + + // The mapping in which this frame's instruction pointer resides. + // iid of Mapping.iid. + // + // If set (non-zero), rel_pc MUST also be set. If mapping_id is 0 (not set), + // this frame has no associated memory mapping (e.g., symbolized frames + // without address information). + // + // Starts from 1, 0 is the same as "not set". + optional uint64 mapping_id = 3; + + // Instruction pointer relative to the start of the mapping. + // MUST be set if mapping_id is set (non-zero). Ignored if mapping_id is 0. + optional uint64 rel_pc = 4; + + // Source file path for this frame. + // This is typically set during online symbolization when symbol information + // is available at trace collection time. If not set, source file paths may be + // added later via offline symbolization (see ModuleSymbols). + // + // Starts from 1, 0 is the same as "not set". + // + // iid of InternedData.source_paths. + optional uint64 source_path_iid = 5; + + // Line number in the source file for this frame. + // This is typically set during online symbolization when symbol information + // is available at trace collection time. If not set, line numbers may be + // added later via offline symbolization (see ModuleSymbols). + optional uint32 line_number = 6; +} + +message Callstack { + // Interning key. Starts from 1, 0 is the same as "not set". + optional uint64 iid = 1; + // Frames of this callstack. Bottom frame first. + repeated uint64 frame_ids = 2; +} + +// End of protos/perfetto/trace/profiling/profile_common.proto + +// Begin of protos/perfetto/trace/track_event/chrome_histogram_sample.proto + +message HistogramName { + optional uint64 iid = 1; + optional string name = 2; +} + +// An individual histogram sample logged via Chrome's UMA metrics system. +message ChromeHistogramSample { + // MD5 hash of the metric name. Either |name_hash| or |name|/|name_iid| or + // both must be present. + optional uint64 name_hash = 1; + optional string name = 2; + optional int64 sample = 3; + // Interned HistogramName. Only one of |name|, |name_iid| can be set. + optional uint64 name_iid = 4; +} + +// End of protos/perfetto/trace/track_event/chrome_histogram_sample.proto + +// Begin of protos/perfetto/trace/track_event/debug_annotation.proto + +// Proto representation of untyped key/value annotations provided in TRACE_EVENT +// macros. Users of the Perfetto SDK should prefer to use the +// perfetto::TracedValue API to fill these protos, rather than filling them +// manually. +// +// Debug annotations are intended for debug use and are not considered a stable +// API of the trace contents. Trace-based metrics that use debug annotation +// values are prone to breakage, so please rely on typed TrackEvent fields for +// these instead. +// +// DebugAnnotations support nested arrays and dictionaries. Each entry is +// encoded as a single DebugAnnotation message. Only dictionary entries +// set the "name" field. The TrackEvent message forms an implicit root +// dictionary. +// +// Example TrackEvent with nested annotations: +// track_event { +// debug_annotations { +// name: "foo" +// dict_entries { +// name: "a" +// bool_value: true +// } +// dict_entries { +// name: "b" +// int_value: 123 +// } +// } +// debug_annotations { +// name: "bar" +// array_values { +// string_value: "hello" +// } +// array_values { +// string_value: "world" +// } +// } +// } +// +// Next ID: 18. +// Reserved ID: 15 +message DebugAnnotation { + // Name fields are set only for dictionary entries. + oneof name_field { + // interned DebugAnnotationName. + uint64 name_iid = 1; + // non-interned variant. + string name = 10; + } + + oneof value { + bool bool_value = 2; + uint64 uint_value = 3; + int64 int_value = 4; + double double_value = 5; + // Pointers are stored in a separate type as the JSON output treats them + // differently from other uint64 values. + uint64 pointer_value = 7; + + // Deprecated. Use dict_entries / array_values instead. + NestedValue nested_value = 8; + + // Legacy instrumentation may not support conversion of nested data to + // NestedValue yet. + string legacy_json_value = 9; + + // interned and non-interned variants of strings. + string string_value = 6; + // Corresponds to |debug_annotation_string_values| field in InternedData. + uint64 string_value_iid = 17; + } + + // Used to embed arbitrary proto messages (which are also typically used to + // represent typed TrackEvent arguments). |proto_type_name| or + // |proto_type_name_iid| are storing the full name of the proto messages (e.g. + // .perfetto.protos.DebugAnnotation) and |proto_value| contains the serialised + // proto messages. See |TracedValue::WriteProto| for more details. + oneof proto_type_descriptor { + string proto_type_name = 16; + // interned DebugAnnotationValueTypeName. + uint64 proto_type_name_iid = 13; + } + optional bytes proto_value = 14; + + repeated DebugAnnotation dict_entries = 11; + repeated DebugAnnotation array_values = 12; + + // Deprecated legacy way to use nested values. Only kept for + // backwards-compatibility in TraceProcessor. May be removed in the future - + // code filling protos should use |dict_entries| and |array_values| instead. + message NestedValue { + enum NestedType { + // leaf value. + UNSPECIFIED = 0; + DICT = 1; + ARRAY = 2; + } + optional NestedType nested_type = 1; + + repeated string dict_keys = 2; + repeated NestedValue dict_values = 3; + repeated NestedValue array_values = 4; + optional int64 int_value = 5; + optional double double_value = 6; + optional bool bool_value = 7; + optional string string_value = 8; + } +} + +// -------------------- +// Interned data types: +// -------------------- + +message DebugAnnotationName { + optional uint64 iid = 1; + optional string name = 2; +} + +// See the |proto_type_descriptor| comment. +message DebugAnnotationValueTypeName { + optional uint64 iid = 1; + optional string name = 2; +} + +// End of protos/perfetto/trace/track_event/debug_annotation.proto + +// Begin of protos/perfetto/trace/track_event/log_message.proto + +message LogMessage { + // interned SourceLocation. + optional uint64 source_location_iid = 1; + // interned LogMessageBody. + optional uint64 body_iid = 2; + enum Priority { + PRIO_UNSPECIFIED = 0; + PRIO_UNUSED = 1; + PRIO_VERBOSE = 2; + PRIO_DEBUG = 3; + PRIO_INFO = 4; + PRIO_WARN = 5; + PRIO_ERROR = 6; + PRIO_FATAL = 7; + } + optional Priority prio = 3; +} + +// -------------------- +// Interned data types: +// -------------------- + +message LogMessageBody { + optional uint64 iid = 1; + optional string body = 2; +} + +// End of protos/perfetto/trace/track_event/log_message.proto + +// Begin of protos/perfetto/trace/track_event/source_location.proto + +// -------------------- +// Interned data types: +// -------------------- + +// A source location, represented as a native symbol. +// This is similar to `message Frame` from +// protos/perfetto/trace/profiling/profile_common.proto, but for abitrary +// source code locations (for example in track event args), not stack frames. +message UnsymbolizedSourceLocation { + optional uint64 iid = 1; + optional uint64 mapping_id = 2; + optional uint64 rel_pc = 3; +} + +message SourceLocation { + optional uint64 iid = 1; + optional string file_name = 2; + optional string function_name = 3; + optional uint32 line_number = 4; +} + +// End of protos/perfetto/trace/track_event/source_location.proto + +// Begin of protos/perfetto/trace/track_event/chrome_active_processes.proto + +// A list of processes connected to the tracing service. +message ChromeActiveProcesses { + repeated int32 pid = 1; +} +// End of protos/perfetto/trace/track_event/chrome_active_processes.proto + +// Begin of protos/perfetto/trace/track_event/chrome_application_state_info.proto + +// Trace event arguments for application state changes. +message ChromeApplicationStateInfo { + // Enum definition taken from: + // https://source.chromium.org/chromium/chromium/src/+/master:base/android/application_status_listener.h + enum ChromeApplicationState { + APPLICATION_STATE_UNKNOWN = 0; + APPLICATION_STATE_HAS_RUNNING_ACTIVITIES = 1; + APPLICATION_STATE_HAS_PAUSED_ACTIVITIES = 2; + APPLICATION_STATE_HAS_STOPPED_ACTIVITIES = 3; + APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES = 4; + }; + optional ChromeApplicationState application_state = 1; +} + +// End of protos/perfetto/trace/track_event/chrome_application_state_info.proto + +// Begin of protos/perfetto/trace/track_event/chrome_compositor_scheduler_state.proto + +// Describes Chrome's Compositor scheduler's current state and associated +// variables. +// +// These protos and enums were adapted from the corresponding original JSON +// trace event for the scheduler state. In contrast to the JSON, we use strongly +// typed enum values instead of strings for many fields, and +// microsecond-granularity timestamps. +// +// The original format was generated in JSON by the code at +// https://cs.chromium.org/chromium/src/cc/scheduler/scheduler.cc?l=870&rcl=5e15eabc9c0eec8daf94fdf78e93f13b6e3b63dd +// +// And is now generated as protozero: +// https://cs.chromium.org/chromium/src/cc/scheduler/scheduler.cc?q=Scheduler::AsPro +// +// All non-delta-timestamps are absolute CLOCK_MONOTONIC timestamps. + +enum ChromeCompositorSchedulerAction { + CC_SCHEDULER_ACTION_UNSPECIFIED = 0; + CC_SCHEDULER_ACTION_NONE = 1; + CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME = 2; + CC_SCHEDULER_ACTION_COMMIT = 3; + CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE = 4; + CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE = 5; + CC_SCHEDULER_ACTION_DRAW_FORCED = 6; + CC_SCHEDULER_ACTION_DRAW_ABORT = 7; + CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION = 8; + CC_SCHEDULER_ACTION_PREPARE_TILES = 9; + CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK = 10; + CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION = 11; + CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL = 12; + CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON = 13; +} + +// Next id: 18 +message ChromeCompositorSchedulerState { + enum BeginImplFrameDeadlineMode { + DEADLINE_MODE_UNSPECIFIED = 0; + DEADLINE_MODE_NONE = 1; + DEADLINE_MODE_IMMEDIATE = 2; + DEADLINE_MODE_REGULAR = 3; + DEADLINE_MODE_LATE = 4; + DEADLINE_MODE_BLOCKED = 5; + } + optional ChromeCompositorStateMachine state_machine = 1; + optional bool observing_begin_frame_source = 2; + optional bool begin_impl_frame_deadline_task = 3; + optional bool pending_begin_frame_task = 4; + optional bool skipped_last_frame_missed_exceeded_deadline = 5; + optional ChromeCompositorSchedulerAction inside_action = 7; + optional BeginImplFrameDeadlineMode deadline_mode = 8; + optional int64 deadline_us = 9; + optional int64 deadline_scheduled_at_us = 10; + optional int64 now_us = 11; + optional int64 now_to_deadline_delta_us = 12; + optional int64 now_to_deadline_scheduled_at_delta_us = 13; + optional BeginImplFrameArgs begin_impl_frame_args = 14; + optional BeginFrameObserverState begin_frame_observer_state = 15; + optional BeginFrameSourceState begin_frame_source_state = 16; + optional CompositorTimingHistory compositor_timing_history = 17; + + reserved 6; +} + +// Describes the current values stored in the Chrome Compositor state machine. +// Next id: 3 +message ChromeCompositorStateMachine { + // Next id: 6 + message MajorState { + enum BeginImplFrameState { + BEGIN_IMPL_FRAME_UNSPECIFIED = 0; + BEGIN_IMPL_FRAME_IDLE = 1; + BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME = 2; + BEGIN_IMPL_FRAME_INSIDE_DEADLINE = 3; + } + enum BeginMainFrameState { + BEGIN_MAIN_FRAME_UNSPECIFIED = 0; + BEGIN_MAIN_FRAME_IDLE = 1; + BEGIN_MAIN_FRAME_SENT = 2; + BEGIN_MAIN_FRAME_READY_TO_COMMIT = 3; + } + enum LayerTreeFrameSinkState { + LAYER_TREE_FRAME_UNSPECIFIED = 0; + LAYER_TREE_FRAME_NONE = 1; + LAYER_TREE_FRAME_ACTIVE = 2; + LAYER_TREE_FRAME_CREATING = 3; + LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT = 4; + LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION = 5; + } + enum ForcedRedrawOnTimeoutState { + FORCED_REDRAW_UNSPECIFIED = 0; + FORCED_REDRAW_IDLE = 1; + FORCED_REDRAW_WAITING_FOR_COMMIT = 2; + FORCED_REDRAW_WAITING_FOR_ACTIVATION = 3; + FORCED_REDRAW_WAITING_FOR_DRAW = 4; + } + optional ChromeCompositorSchedulerAction next_action = 1; + optional BeginImplFrameState begin_impl_frame_state = 2; + optional BeginMainFrameState begin_main_frame_state = 3; + optional LayerTreeFrameSinkState layer_tree_frame_sink_state = 4; + optional ForcedRedrawOnTimeoutState forced_redraw_state = 5; + } + optional MajorState major_state = 1; + + // Next id: 47 + message MinorState { + enum TreePriority { + TREE_PRIORITY_UNSPECIFIED = 0; + TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES = 1; + TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY = 2; + TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY = 3; + } + enum ScrollHandlerState { + SCROLL_HANDLER_UNSPECIFIED = 0; + SCROLL_AFFECTS_SCROLL_HANDLER = 1; + SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER = 2; + } + optional int32 commit_count = 1; + optional int32 current_frame_number = 2; + optional int32 last_frame_number_submit_performed = 3; + optional int32 last_frame_number_draw_performed = 4; + optional int32 last_frame_number_begin_main_frame_sent = 5; + optional bool did_draw = 6; + optional bool did_send_begin_main_frame_for_current_frame = 7; + optional bool did_notify_begin_main_frame_not_expected_until = 8; + optional bool did_notify_begin_main_frame_not_expected_soon = 9; + optional bool wants_begin_main_frame_not_expected = 10; + optional bool did_commit_during_frame = 11; + optional bool did_invalidate_layer_tree_frame_sink = 12; + optional bool did_perform_impl_side_invalidaion = 13; + optional bool did_prepare_tiles = 14; + optional int32 consecutive_checkerboard_animations = 15; + optional int32 pending_submit_frames = 16; + optional int32 submit_frames_with_current_layer_tree_frame_sink = 17; + optional bool needs_redraw = 18; + optional bool needs_prepare_tiles = 19; + optional bool needs_begin_main_frame = 20; + optional bool needs_one_begin_impl_frame = 21; + optional bool visible = 22; + optional bool begin_frame_source_paused = 23; + optional bool can_draw = 24; + optional bool resourceless_draw = 25; + optional bool has_pending_tree = 26; + optional bool pending_tree_is_ready_for_activation = 27; + optional bool active_tree_needs_first_draw = 28; + optional bool active_tree_is_ready_to_draw = 29; + optional bool did_create_and_initialize_first_layer_tree_frame_sink = 30; + optional TreePriority tree_priority = 31; + optional ScrollHandlerState scroll_handler_state = 32; + optional bool critical_begin_main_frame_to_activate_is_fast = 33; + optional bool main_thread_missed_last_deadline = 34; + optional bool video_needs_begin_frames = 36; + optional bool defer_begin_main_frame = 37; + optional bool last_commit_had_no_updates = 38; + optional bool did_draw_in_last_frame = 39; + optional bool did_submit_in_last_frame = 40; + optional bool needs_impl_side_invalidation = 41; + optional bool current_pending_tree_is_impl_side = 42; + optional bool previous_pending_tree_was_impl_side = 43; + optional bool processing_animation_worklets_for_active_tree = 44; + optional bool processing_animation_worklets_for_pending_tree = 45; + optional bool processing_paint_worklets_for_pending_tree = 46; + + reserved 35; + } + optional MinorState minor_state = 2; +} + +// Next id: 13 +message BeginFrameArgs { + // JSON format has a "type" field that was always just "BeginFrameArgs" we + // drop this in the proto representation, and instead make the JSON format + // "subtype" field become the type field. + enum BeginFrameArgsType { + BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED = 0; + BEGIN_FRAME_ARGS_TYPE_INVALID = 1; + BEGIN_FRAME_ARGS_TYPE_NORMAL = 2; + BEGIN_FRAME_ARGS_TYPE_MISSED = 3; + } + optional BeginFrameArgsType type = 1; + optional uint64 source_id = 2; + optional uint64 sequence_number = 3; + optional int64 frame_time_us = 4; + optional int64 deadline_us = 5; + optional int64 interval_delta_us = 6; + optional bool on_critical_path = 7; + optional bool animate_only = 8; + oneof created_from { + // The interned SourceLocation. + uint64 source_location_iid = 9; + // The SourceLocation that this args was created from. + // TODO(nuskos): Eventually we will support interning inside of + // TypedArgument TraceEvents and then we shouldn't need this SourceLocation + // since we can emit it as part of the InternedData message. When we can + // remove this |source_location|. + SourceLocation source_location = 10; + } + optional int64 frames_throttled_since_last = 12; +} + +// Next id: 7 +message BeginImplFrameArgs { + optional int64 updated_at_us = 1; + optional int64 finished_at_us = 2; + enum State { + BEGIN_FRAME_FINISHED = 0; + BEGIN_FRAME_USING = 1; + } + optional State state = 3; + oneof args { + // Only set if |state| is BEGIN_FRAME_FINISHED. + BeginFrameArgs current_args = 4; + // Only set if |state| is BEGIN_FRAME_USING. + BeginFrameArgs last_args = 5; + } + message TimestampsInUs { + optional int64 interval_delta = 1; + optional int64 now_to_deadline_delta = 2; + optional int64 frame_time_to_now_delta = 3; + optional int64 frame_time_to_deadline_delta = 4; + optional int64 now = 5; + optional int64 frame_time = 6; + optional int64 deadline = 7; + } + optional TimestampsInUs timestamps_in_us = 6; +} + +message BeginFrameObserverState { + optional int64 dropped_begin_frame_args = 1; + optional BeginFrameArgs last_begin_frame_args = 2; +} + +message BeginFrameSourceState { + optional uint32 source_id = 1; + optional bool paused = 2; + optional uint32 num_observers = 3; + optional BeginFrameArgs last_begin_frame_args = 4; +} + +message CompositorTimingHistory { + optional int64 begin_main_frame_queue_critical_estimate_delta_us = 1; + optional int64 begin_main_frame_queue_not_critical_estimate_delta_us = 2; + optional int64 begin_main_frame_start_to_ready_to_commit_estimate_delta_us = + 3; + optional int64 commit_to_ready_to_activate_estimate_delta_us = 4; + optional int64 prepare_tiles_estimate_delta_us = 5; + optional int64 activate_estimate_delta_us = 6; + optional int64 draw_estimate_delta_us = 7; +} + +// End of protos/perfetto/trace/track_event/chrome_compositor_scheduler_state.proto + +// Begin of protos/perfetto/trace/track_event/chrome_content_settings_event_info.proto + +// Details about ContentSettings trace events. +message ChromeContentSettingsEventInfo { + // The number of user defined hostname patterns for content settings at + // browser start. Similar to UMA histogram + // 'ContentSettings.NumberOfExceptions'. + optional uint32 number_of_exceptions = 1; +} +// End of protos/perfetto/trace/track_event/chrome_content_settings_event_info.proto + +// Begin of protos/perfetto/trace/track_event/chrome_frame_reporter.proto + +// DEPRECATED. Only kept for backwards compatibility. Use |ChromeFrameReporter2| +// in +// https://source.chromium.org/chromium/chromium/src/+/main:base/tracing/protos/chrome_track_event.proto +// instead. +message ChromeFrameReporter { + option deprecated = true; + + enum State { + // The frame did not have any updates to present. + STATE_NO_UPDATE_DESIRED = 0; + + // The frame presented all the desired updates (i.e. any updates requested + // from both the compositor thread and main-threads were handled). + STATE_PRESENTED_ALL = 1; + + // The frame was presented with some updates, but also missed some updates + // (e.g. missed updates from the main-thread, but included updates from the + // compositor thread). + STATE_PRESENTED_PARTIAL = 2; + + // The frame was dropped, i.e. some updates were desired for the frame, but + // was not presented. + STATE_DROPPED = 3; + }; + + optional State state = 1; + + enum FrameDropReason { + REASON_UNSPECIFIED = 0; + + // Frame was dropped by the display-compositor. + // The display-compositor may drop a frame some times (e.g. the frame missed + // the deadline, or was blocked on surface-sync, etc.) + REASON_DISPLAY_COMPOSITOR = 1; + + // Frame was dropped because of the main-thread. + // The main-thread may cause a frame to be dropped, e.g. if the main-thread + // is running expensive javascript, or doing a lot of layout updates, etc. + REASON_MAIN_THREAD = 2; + + // Frame was dropped by the client compositor. + // The client compositor can drop some frames too (e.g. attempting to + // recover latency, missing the deadline, etc.). + REASON_CLIENT_COMPOSITOR = 3; + }; + + // The reason is set only if |state| is not |STATE_UPDATED_ALL|. + optional FrameDropReason reason = 2; + + optional uint64 frame_source = 3; + optional uint64 frame_sequence = 4; + + // If this is a droped frame (i.e. if |state| is set to |STATE_DROPPED| or + // |STATE_PRESENTED_PARTIAL|), then indicates whether this frame impacts + // smoothness. + optional bool affects_smoothness = 5; + + enum ScrollState { + SCROLL_NONE = 0; + SCROLL_MAIN_THREAD = 1; + SCROLL_COMPOSITOR_THREAD = 2; + SCROLL_RASTER = 3; + + // Used when it can't be determined whether a scroll is in progress or not. + SCROLL_UNKNOWN = 4; + } + + // The type of active scroll. + optional ScrollState scroll_state = 6; + + // If any main thread animation is active during this frame. + optional bool has_main_animation = 7; + // If any compositor thread animation is active during this frame. + optional bool has_compositor_animation = 8; + // If any touch-driven UX (not scroll) is active during this frame. + optional bool has_smooth_input_main = 9; + + // Whether the frame contained any missing content (i.e. whether there was + // checkerboarding in the frame). If has_missing_content, + // checkerboarded_needs_raster and checkerboarded_needs_record all have + // values, has_missing_content should equal checkerboarded_needs_raster || + // checkerboarded_needs_record. + optional bool has_missing_content = 10; + + // The id of layer_tree_host that the frame has been produced for. + optional uint64 layer_tree_host_id = 11; + + // If total latency of PipelineReporter exceeds a certain limit. + optional bool has_high_latency = 12; + + enum FrameType { + FORKED = 0; + BACKFILL = 1; + } + + // Indicate if the frame is "FORKED" (i.e. a PipelineReporter event starts at + // the same frame sequence as another PipelineReporter) or "BACKFILL" + // (i.e. dropped frames when there are no partial compositor updates). + optional FrameType frame_type = 13; + + // The breakdown stage of PipelineReporter that is most likely accountable for + // high latency. + repeated string high_latency_contribution_stage = 14; + + // Whether the frame contained any content that is not fully rastered. + optional bool checkerboarded_needs_raster = 15; + + // Whether the frame contained any content that is not fully recorded. + optional bool checkerboarded_needs_record = 16; + + // viz::BeginFrameArgs.trace_id of the frame (before surface aggregation). See + // also ChromeTrackEvent.EventLatency.surface_frame_trace_id. + optional int64 surface_frame_trace_id = 17; + + // gfx::PresentationFeedback.display_trace_id of the frame (after surface + // aggregation). See also ChromeTrackEvent.EventLatency.display_trace_id. + optional int64 display_trace_id = 18; +} + +// End of protos/perfetto/trace/track_event/chrome_frame_reporter.proto + +// Begin of protos/perfetto/trace/track_event/chrome_keyed_service.proto + +// Details about one of Chrome's keyed services associated with the event. +message ChromeKeyedService { + // Name of the service, e.g. "MediaRouter", "PreviewsService", etc. (in + // Chrome, these are static strings known at compile time). + optional string name = 1; +} + +// End of protos/perfetto/trace/track_event/chrome_keyed_service.proto + +// Begin of protos/perfetto/trace/track_event/chrome_latency_info.proto + +message ChromeLatencyInfo { + optional int64 trace_id = 1; + + // NEXT ID: 12 + // All step are optional but the enum is ordered (not by number) below in the + // order we expect them to appear if they are emitted in trace in a blocking + // fashion. + enum Step { + STEP_UNSPECIFIED = 0; + // Emitted on the browser main thread. + STEP_SEND_INPUT_EVENT_UI = 3; + // Happens on the renderer's compositor. + STEP_HANDLE_INPUT_EVENT_IMPL = 5; + STEP_DID_HANDLE_INPUT_AND_OVERSCROLL = 8; + // Occurs on the Renderer's main thread. + STEP_HANDLE_INPUT_EVENT_MAIN = 4; + STEP_MAIN_THREAD_SCROLL_UPDATE = 2; + STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT = 1; + // Could be emitted on both the renderer's main OR compositor. + STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL = 9; + // Optionally sometimes HANDLED_INPUT_EVENT_MAIN_OR_IMPL will proxy to the + // renderer's compositor and this will be emitted. + STEP_HANDLED_INPUT_EVENT_IMPL = 10; + // Renderer's compositor. + STEP_SWAP_BUFFERS = 6; + // Happens on the VizCompositor in the GPU process. + STEP_DRAW_AND_SWAP = 7; + // Happens on the GPU main thread after the swap has completed. + STEP_FINISHED_SWAP_BUFFERS = 11; + // See above for NEXT ID, enum steps are not ordered by tag number. + }; + + optional Step step = 2; + optional int32 frame_tree_node_id = 3; + + // This enum is a copy of LatencyComponentType enum in Chrome, located in + // ui/latency/latency_info.h, modulo added UNKNOWN value per protobuf + // practices. + enum LatencyComponentType { + COMPONENT_UNSPECIFIED = 0; + COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH = 1; + COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL = 2; + COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL = 3; + COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL = 4; + COMPONENT_INPUT_EVENT_LATENCY_UI = 5; + COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN = 6; + COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN = 7; + COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL = 8; + COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT = 9; + COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH = 10; + COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP = 11; + COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME = 12; + COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER = 13; + COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP = 14; + } + + message ComponentInfo { + optional LatencyComponentType component_type = 1; + + // Microsecond timestamp in CLOCK_MONOTONIC domain + optional uint64 time_us = 2; + }; + + repeated ComponentInfo component_info = 4; + optional bool is_coalesced = 5; + optional int64 gesture_scroll_id = 6; + optional int64 touch_id = 7; + + enum InputType { + UNSPECIFIED_OR_OTHER = 0; + TOUCH_MOVED = 1; + GESTURE_SCROLL_BEGIN = 2; + GESTURE_SCROLL_UPDATE = 3; + GESTURE_SCROLL_END = 4; + GESTURE_TAP = 5; + GESTURE_TAP_CANCEL = 6; + } + + // The type of input corresponding to this `ChromeLatencyInfo`. + optional InputType input_type = 8; +} + +// End of protos/perfetto/trace/track_event/chrome_latency_info.proto + +// Begin of protos/perfetto/trace/track_event/chrome_legacy_ipc.proto + +// Details about a legacy Chrome IPC message that is either sent by the event. +// TODO(eseckler): Also use this message on the receiving side? +message ChromeLegacyIpc { + enum MessageClass { + CLASS_UNSPECIFIED = 0; + CLASS_AUTOMATION = 1; + CLASS_FRAME = 2; + CLASS_PAGE = 3; + CLASS_VIEW = 4; + CLASS_WIDGET = 5; + CLASS_INPUT = 6; + CLASS_TEST = 7; + CLASS_WORKER = 8; + CLASS_NACL = 9; + CLASS_GPU_CHANNEL = 10; + CLASS_MEDIA = 11; + CLASS_PPAPI = 12; + CLASS_CHROME = 13; + CLASS_DRAG = 14; + CLASS_PRINT = 15; + CLASS_EXTENSION = 16; + CLASS_TEXT_INPUT_CLIENT = 17; + CLASS_BLINK_TEST = 18; + CLASS_ACCESSIBILITY = 19; + CLASS_PRERENDER = 20; + CLASS_CHROMOTING = 21; + CLASS_BROWSER_PLUGIN = 22; + CLASS_ANDROID_WEB_VIEW = 23; + CLASS_NACL_HOST = 24; + CLASS_ENCRYPTED_MEDIA = 25; + CLASS_CAST = 26; + CLASS_GIN_JAVA_BRIDGE = 27; + CLASS_CHROME_UTILITY_PRINTING = 28; + CLASS_OZONE_GPU = 29; + CLASS_WEB_TEST = 30; + CLASS_NETWORK_HINTS = 31; + CLASS_EXTENSIONS_GUEST_VIEW = 32; + CLASS_GUEST_VIEW = 33; + CLASS_MEDIA_PLAYER_DELEGATE = 34; + CLASS_EXTENSION_WORKER = 35; + CLASS_SUBRESOURCE_FILTER = 36; + CLASS_UNFREEZABLE_FRAME = 37; + } + + // Corresponds to the message class type defined in Chrome's IPCMessageStart + // enum, e.g. FrameMsgStart, + optional MessageClass message_class = 1; + + // Line number of the message definition. See Chrome's IPC_MESSAGE_ID and + // IPC_MESSAGE_START macros. + optional uint32 message_line = 2; +} + +// End of protos/perfetto/trace/track_event/chrome_legacy_ipc.proto + +// Begin of protos/perfetto/trace/track_event/chrome_message_pump.proto + +// Details about Chrome message pump events +message ChromeMessagePump { + // True if there are sent messages in the queue. + optional bool sent_messages_in_queue = 1; + // Interned SourceLocation of IO handler that MessagePumpForIO is about to + // invoke. + optional uint64 io_handler_location_iid = 2; +} + +// End of protos/perfetto/trace/track_event/chrome_message_pump.proto + +// Begin of protos/perfetto/trace/track_event/chrome_mojo_event_info.proto + +// Contains information to identify mojo handling events. The trace events in +// mojo are common for all mojo interfaces and this information is used to +// identify who is the caller or callee. +message ChromeMojoEventInfo { + // Contains the interface name or the file name of the creator of a mojo + // handle watcher, recorded when an event if notified to the watcher. The code + // that runs within the track event belongs to the interface. + optional string watcher_notify_interface_tag = 1; + + // The hash of the IPC message that is being handled. + optional uint32 ipc_hash = 2; + + // A static string representing the mojo interface name of the message that is + // being handled. + optional string mojo_interface_tag = 3; + + // Refers to an interned UnsymbolizedSourceLocation. + // The UnsymbolizedSourceLocation contains the interface method that's being + // handled, represented as a native symbol. + // The native symbol can be symbolized after the trace is recorded. + // Not using a symbolized source location for official Chromium builds to + // reduce binary size - emitting file/function names as strings into the + // trace requires storing them in the binary, which causes a significant + // binary size bloat for Chromium. + optional uint64 mojo_interface_method_iid = 4; + + // Indicate whether this is a message or reply. + optional bool is_reply = 5; + + // The payload size of the message being sent through mojo messages. + optional uint64 payload_size = 6; + + // Represents the size of the message. Includes all headers and user payload. + optional uint64 data_num_bytes = 7; +} + +// End of protos/perfetto/trace/track_event/chrome_mojo_event_info.proto + +// Begin of protos/perfetto/trace/track_event/chrome_renderer_scheduler_state.proto + +// Describes the state of the RendererScheduler for a given Renderer Process. + +// RAIL Mode is an indication of the kind of work that a Renderer is currently +// performing which is in turn used to prioritise work accordingly. +// A fuller description of these modes can be found https://web.dev/rail/ +enum ChromeRAILMode { + RAIL_MODE_NONE = 0; + RAIL_MODE_RESPONSE = 1; + RAIL_MODE_ANIMATION = 2; + RAIL_MODE_IDLE = 3; + RAIL_MODE_LOAD = 4; +} + +message ChromeRendererSchedulerState { + optional ChromeRAILMode rail_mode = 1; + + optional bool is_backgrounded = 2; + optional bool is_hidden = 3; +} + +// End of protos/perfetto/trace/track_event/chrome_renderer_scheduler_state.proto + +// Begin of protos/perfetto/trace/track_event/chrome_user_event.proto + +// Details about a UI interaction initiated by the user, such as opening or +// closing a tab or a context menu. +message ChromeUserEvent { + // Name of the action, e.g. "NewTab", "ShowBookmarkManager", etc. (in + // Chrome, these are usually static strings known at compile time, or + // concatenations of multiple such static strings). + optional string action = 1; + + // MD5 hash of the action string. + optional uint64 action_hash = 2; +} + +// End of protos/perfetto/trace/track_event/chrome_user_event.proto + +// Begin of protos/perfetto/trace/track_event/chrome_window_handle_event_info.proto + +// Details about HWNDMessageHandler trace events. +message ChromeWindowHandleEventInfo { + optional uint32 dpi = 1; + optional uint32 message_id = 2; + optional fixed64 hwnd_ptr = 3; +} + +// End of protos/perfetto/trace/track_event/chrome_window_handle_event_info.proto + +// Begin of protos/perfetto/trace/track_event/screenshot.proto + +message Screenshot { + optional bytes jpg_image = 1; +} + +// End of protos/perfetto/trace/track_event/screenshot.proto + +// Begin of protos/perfetto/trace/track_event/task_execution.proto + +// TrackEvent arguments describing the execution of a task. +message TaskExecution { + // Source location that the task was posted from. + // interned SourceLocation. + optional uint64 posted_from_iid = 1; +} +// End of protos/perfetto/trace/track_event/task_execution.proto + +// Begin of protos/perfetto/trace/track_event/track_event.proto + +// NOTE: Full TrackEvent support in the client lib and chrome is WIP, thus these +// protos are still subject to change. Don't depend on them staying as they are. + +// Trace events emitted by client instrumentation library (TRACE_EVENT macros), +// which describe activity on a track, such as a thread or asynchronous event +// track. The track is specified using separate TrackDescriptor messages and +// referred to via the track's UUID. +// +// A simple TrackEvent packet specifies a timestamp, category, name and type: +// ```protobuf +// trace_packet { +// timestamp: 1000 +// track_event { +// categories: ["my_cat"] +// name: "my_event" +// type: TYPE_INSTANT +// } +// } +// ``` +// +// To associate an event with a custom track (e.g. a thread), the track is +// defined in a separate packet and referred to from the TrackEvent by its UUID: +// ```protobuf +// trace_packet { +// track_descriptor { +// track_uuid: 1234 +// name: "my_track" +// +// // Optionally, associate the track with a thread. +// thread_descriptor { +// pid: 10 +// tid: 10 +// .. +// } +// } +// } +// ``` +// +// A pair of TYPE_SLICE_BEGIN and _END events form a slice on the track: +// +// ```protobuf +// trace_packet { +// timestamp: 1200 +// track_event { +// track_uuid: 1234 +// categories: ["my_cat"] +// name: "my_slice" +// type: TYPE_SLICE_BEGIN +// } +// } +// trace_packet { +// timestamp: 1400 +// track_event { +// track_uuid: 1234 +// type: TYPE_SLICE_END +// } +// } +// ``` +// TrackEvents also support optimizations to reduce data repetition and encoded +// data size, e.g. through data interning (names, categories, ...) and delta +// encoding of timestamps/counters. For details, see the InternedData message. +// Further, default values for attributes of events on the same sequence (e.g. +// their default track association) can be emitted as part of a +// TrackEventDefaults message. +// +// Next reserved id: 13 (up to 15). Next id: 57. +message TrackEvent { + // Names of categories of the event. In the client library, categories are a + // way to turn groups of individual events on or off. + // interned EventCategoryName. + repeated uint64 category_iids = 3; + // non-interned variant. + repeated string categories = 22; + + // Optional name of the event for its display in trace viewer. May be left + // unspecified for events with typed arguments. + // + // Note that metrics should not rely on event names, as they are prone to + // changing. Instead, they should use typed arguments to identify the events + // they are interested in. + oneof name_field { + // interned EventName. + uint64 name_iid = 10; + // non-interned variant. + string name = 23; + } + + // TODO(eseckler): Support using binary symbols for category/event names. + + // Type of the TrackEvent (required if |phase| in LegacyEvent is not set). + enum Type { + TYPE_UNSPECIFIED = 0; + + // Slice events are events that have a begin and end timestamp, i.e. a + // duration. They can be nested similar to a callstack: If, on the same + // track, event B begins after event A, but before A ends, B is a child + // event of A and will be drawn as a nested event underneath A in the UI. + // Note that child events should always end before their parents (e.g. B + // before A). + // + // Each slice event is formed by a pair of BEGIN + END events. The END event + // does not need to repeat any TrackEvent fields it has in common with its + // corresponding BEGIN event. Arguments and debug annotations of the BEGIN + + // END pair will be merged during trace import. + // + // Note that we deliberately chose not to support COMPLETE events (which + // would specify a duration directly) since clients would need to delay + // writing them until the slice is completed, which can result in reordered + // events in the trace and loss of unfinished events at the end of a trace. + TYPE_SLICE_BEGIN = 1; + TYPE_SLICE_END = 2; + + // Instant events are nestable events without duration. They can be children + // of slice events on the same track. + TYPE_INSTANT = 3; + + // Event that provides a value for a counter track. |track_uuid| should + // refer to a counter track and |counter_value| set to the new value. Note + // that most other TrackEvent fields (e.g. categories, name, ..) are not + // supported for TYPE_COUNTER events. See also CounterDescriptor. + TYPE_COUNTER = 4; + } + optional Type type = 9; + + // Identifies the track of the event. The default value may be overridden + // using TrackEventDefaults, e.g., to specify the track of the TraceWriter's + // sequence (in most cases sequence = one thread). If no value is specified + // here or in TrackEventDefaults, the TrackEvent will be associated with an + // implicit trace-global track (uuid 0). See TrackDescriptor::uuid. + optional uint64 track_uuid = 11; + + // A new value for a counter track. |track_uuid| should refer to a track with + // a CounterDescriptor, and |type| should be TYPE_COUNTER. For a more + // efficient encoding of counter values that are sampled at the beginning/end + // of a slice, see |extra_counter_values| and |extra_counter_track_uuids|. + // Counter values can optionally be encoded in as delta values (positive or + // negative) on each packet sequence (see CounterIncrementalBase). + oneof counter_value_field { + int64 counter_value = 30; + double double_counter_value = 44; + } + + // To encode counter values more efficiently, we support attaching additional + // counter values to a TrackEvent of any type. All values will share the same + // timestamp specified in the TracePacket. The value at + // extra_counter_values[N] is for the counter track referenced by + // extra_counter_track_uuids[N]. + // + // |extra_counter_track_uuids| may also be set via TrackEventDefaults. There + // should always be equal or more uuids than values. It is valid to set more + // uuids (e.g. via defaults) than values. If uuids are specified in + // TrackEventDefaults and a TrackEvent, the TrackEvent uuids override the + // default uuid list. + // + // For example, this allows snapshotting the thread time clock at each + // thread-track BEGIN and END event to capture the cpu time delta of a slice. + repeated uint64 extra_counter_track_uuids = 31; + repeated int64 extra_counter_values = 12; + + // Counter snapshots using floating point instead of integer values. + repeated uint64 extra_double_counter_track_uuids = 45; + repeated double extra_double_counter_values = 46; + + // IDs of flows originating, passing through, or ending at this event. + // Flow IDs are global within a trace. + // + // A flow connects a sequence of TrackEvents within or across tracks, e.g. + // an input event may be handled on one thread but cause another event on + // a different thread - a flow between the two events can associate them. + // + // The direction of the flows between events is inferred from the events' + // timestamps. The earliest event with the same flow ID becomes the source + // of the flow. Any events thereafter are intermediate steps of the flow, + // until the flow terminates at the last event with the flow ID. + // + // Flows can also be explicitly terminated (see |terminating_flow_ids|), so + // that the same ID can later be reused for another flow. + // DEPRECATED. Only kept for backwards compatibility. Use |flow_ids|. + repeated uint64 flow_ids_old = 36 [deprecated = true]; + // TODO(b/204341740): replace "flow_ids_old" with "flow_ids" to reduce memory + // consumption. + repeated fixed64 flow_ids = 47; + + // List of flow ids which should terminate on this event, otherwise same as + // |flow_ids|. + // Any one flow ID should be either listed as part of |flow_ids| OR + // |terminating_flow_ids|, not both. + // DEPRECATED. Only kept for backwards compatibility. Use + // |terminating_flow_ids|. + repeated uint64 terminating_flow_ids_old = 42 [deprecated = true]; + // TODO(b/204341740): replace "terminating_flow_ids_old" with + // "terminating_flow_ids" to reduce memory consumption. + repeated fixed64 terminating_flow_ids = 48; + + // An opaque identifier to correlate this slice with other slices that are + // considered part of the same logical operation, even if they are not + // causally connected. Examples uses of a correlation id might be the number + // of frame going through various stages of rendering in a GPU, the id for an + // RPC request going through a distributed system, or the id of a network + // request going through various stages of processing by the kernel. + // + // NOTE: if the events *are* causually connected, you probably want to use + // flows instead of OR in addition to correlation ids. + // + // UIs can use this identifier to visually link these slices, for instance, + // by assigning them a consistent color or highlighting the entire correlated + // set when one slice is hovered. + // + // Only one field within this 'oneof' should be set to define the correlation. + oneof correlation_id_field { + // A 64-bit unsigned integer used as the correlation ID. + // + // Best for performance and compact traces if the identifier is naturally + // numerical or can be easily mapped to one by the trace producer. + uint64 correlation_id = 52; + + // A string value used as the correlation ID. + // + // Offers maximum flexibility for human-readable or complex identifiers + // (e.g., GUIDs). Note: Using many unique, long strings may increase trace + // size. For frequently repeated string identifiers, consider + // 'correlation_id_string_iid'. + string correlation_id_str = 53; + + // An interned string identifier (an IID) for correlation. + // + // This 64-bit ID refers to a string defined in the 'correlation_id_str' + // field within the packet sequence's InternedData. This approach combines + // the descriptiveness and uniqueness of strings with the efficiency of + // integer IDs for storage and comparison, especially for identifiers that + // repeat across many events. + uint64 correlation_id_str_iid = 54; + } + + // Callstack associated with this event. This captures the program stack at + // the time the event occurred, useful for understanding what code path led + // to the event. + // + // Two variants are supported: + // - callstack: Inline callstack data (simpler when trace size is not a + // concern or callstacks are unique) + // - callstack_iid: Reference to an interned Callstack in InternedData + // (efficient for repeated callstacks) + // + // Only one of these fields should be set. + oneof callstack_field { + // Inline callstack data. Use this for simplicity when interning is not + // needed (e.g., for unique callstacks or when trace size is not critical). + Callstack callstack = 55; + + // Reference to interned Callstack (see InternedData.callstacks). + // This is the efficient option when callstacks are repeated. + // + // Note: iids *always* start from 1. A value of 0 is considered "not set". + uint64 callstack_iid = 56; + } + + // Inline callstack for TrackEvents when interning is not needed. + // This is a simplified version of the profiling Callstack/Frame messages, + // designed for cases where trace size is not critical or callstacks are + // unique. + // + // Use this for simple callstacks with function names and source locations. + // For binary/library information (mappings, build IDs, relative PCs), use + // interned callstacks via callstack_iid instead. + message Callstack { + // Frame within an inline callstack. + message Frame { + // Function name, e.g., "malloc" or "std::vector::push_back" + optional string function_name = 1; + + // Optional: Source file path, e.g., "/src/foo.cc" + optional string source_file = 2; + + // Optional: Line number in the source file + optional uint32 line_number = 3; + } + + // Frames of this callstack, ordered from bottom (outermost) to top + // (innermost). For example, if main() calls foo() which calls bar(), the + // frames would be: [main, foo, bar] + repeated Frame frames = 1; + } + + // Debug annotations associated with this event. These are arbitrary key-value + // pairs that can be used to attach additional information to the event. + // See DebugAnnotation message for details on supported value types. + // + // For example, debug annotations can be used to attach a URL or resource + // identifier to a network request event. Arrays, dictionaries and full + // nested structures (e.g. arrays of dictionaries of dictionaries) + // are supported. + repeated DebugAnnotation debug_annotations = 4; + + // --------------------------------------------------------------------------- + // TrackEvent arguments: + // --------------------------------------------------------------------------- + // + // NOTE: The fields below this point are NOT part of the stable public API. + // They are primarily intended for internal use by Chrome and Android. These + // fields may change or be removed without notice. For custom/synthetic + // traces, prefer using the fields above (name, categories, type, flows, + // correlation_id, callstack, etc.) along with custom debug_annotations. + + // Typed event arguments: + optional TaskExecution task_execution = 5; + optional LogMessage log_message = 21; + optional ChromeCompositorSchedulerState cc_scheduler_state = 24; + optional ChromeUserEvent chrome_user_event = 25; + optional ChromeKeyedService chrome_keyed_service = 26; + optional ChromeLegacyIpc chrome_legacy_ipc = 27; + optional ChromeHistogramSample chrome_histogram_sample = 28; + optional ChromeLatencyInfo chrome_latency_info = 29; + // DEPRECATED. Only kept for backwards compatibility. Use the + // |ChromeTrackEvent.frame_reporter| extension in + // https://source.chromium.org/chromium/chromium/src/+/main:base/tracing/protos/chrome_track_event.proto + // instead. + optional ChromeFrameReporter chrome_frame_reporter = 32 [deprecated = true]; + optional ChromeApplicationStateInfo chrome_application_state_info = 39; + optional ChromeRendererSchedulerState chrome_renderer_scheduler_state = 40; + optional ChromeWindowHandleEventInfo chrome_window_handle_event_info = 41; + optional ChromeContentSettingsEventInfo chrome_content_settings_event_info = + 43; + optional ChromeActiveProcesses chrome_active_processes = 49; + optional Screenshot screenshot = 50; + + // This field is used only if the source location represents the function that + // executes during this event. + oneof source_location_field { + // Non-interned field. + SourceLocation source_location = 33; + // Interned field. + uint64 source_location_iid = 34; + } + + optional ChromeMessagePump chrome_message_pump = 35; + optional ChromeMojoEventInfo chrome_mojo_event_info = 38; + + // New argument types go here :) + + // Extension range for typed events defined externally. + // See docs/design-docs/extensions.md for more details. + // + // Extension support is work-in-progress, in the future the way to reserve a + // subrange for a particular project will be described here and in the design + // document linked above. + // + // Contact perfetto-dev@googlegroups.com if you are interested in a subrange + // for your project. + + // Extension range reserved for chromium: + // https://source.chromium.org/chromium/chromium/src/+/main:base/tracing/protos/chrome_track_event.proto + extensions 1000 to 1999; + // Extension range reserved for https://b.corp.google.com/issues/301227627. + extensions 2000 to 2000; + // Extension range reserved for android: + // protos/perfetto/trace/android/android_track_event.proto + extensions 2001 to 2999; + // Extension range for future use. + extensions 3000 to 9899; + // Reserved for Perfetto unit and integration tests. + extensions 9900 to 10000; + + // --------------------------------------------------------------------------- + // Deprecated / legacy event fields, which will be removed in the future: + // --------------------------------------------------------------------------- + + // Deprecated. Use the |timestamp| and |timestamp_clock_id| fields in + // TracePacket instead. + // + // Timestamp in microseconds (usually CLOCK_MONOTONIC). + oneof timestamp { + // Delta timestamp value since the last TrackEvent or ThreadDescriptor. To + // calculate the absolute timestamp value, sum up all delta values of the + // preceding TrackEvents since the last ThreadDescriptor and add the sum to + // the |reference_timestamp| in ThreadDescriptor. This value should always + // be positive. + int64 timestamp_delta_us = 1; + // Absolute value (e.g. a manually specified timestamp in the macro). + // This is a one-off value that does not affect delta timestamp computation + // in subsequent TrackEvents. + int64 timestamp_absolute_us = 16; + } + + // Deprecated. Use |extra_counter_values| and |extra_counter_track_uuids| to + // encode thread time instead. + // + // CPU time for the current thread (e.g., CLOCK_THREAD_CPUTIME_ID) in + // microseconds. + oneof thread_time { + // Delta timestamp value since the last TrackEvent or ThreadDescriptor. To + // calculate the absolute timestamp value, sum up all delta values of the + // preceding TrackEvents since the last ThreadDescriptor and add the sum to + // the |reference_timestamp| in ThreadDescriptor. This value should always + // be positive. + int64 thread_time_delta_us = 2; + // This is a one-off absolute value that does not affect delta timestamp + // computation in subsequent TrackEvents. + int64 thread_time_absolute_us = 17; + } + + // Deprecated. Use |extra_counter_values| and |extra_counter_track_uuids| to + // encode thread instruction count instead. + // + // Value of the instruction counter for the current thread. + oneof thread_instruction_count { + // Same encoding as |thread_time| field above. + int64 thread_instruction_count_delta = 8; + int64 thread_instruction_count_absolute = 20; + } + + // Apart from {category, time, thread time, tid, pid}, other legacy trace + // event attributes are initially simply proxied for conversion to a JSON + // trace. We intend to gradually transition these attributes to similar native + // features in TrackEvent (e.g. async + flow events), or deprecate them + // without replacement where transition is unsuitable. + // + // Next reserved id: 16 (up to 16). + // Next id: 20. + message LegacyEvent { + // Deprecated, use TrackEvent::name(_iid) instead. + // interned EventName. + optional uint64 name_iid = 1; + optional int32 phase = 2; + optional int64 duration_us = 3; + optional int64 thread_duration_us = 4; + + // Elapsed retired instruction count during the event. + optional int64 thread_instruction_delta = 15; + + // used to be |flags|. + reserved 5; + + oneof id { + uint64 unscoped_id = 6; + uint64 local_id = 10; + uint64 global_id = 11; + } + // Additional optional scope for |id|. + optional string id_scope = 7; + + // Consider the thread timestamps for async BEGIN/END event pairs as valid. + optional bool use_async_tts = 9; + + // Idenfifies a flow. Flow events with the same bind_id are connected. + optional uint64 bind_id = 8; + // Use the enclosing slice as binding point for a flow end event instead of + // the next slice. Flow start/step events always bind to the enclosing + // slice. + optional bool bind_to_enclosing = 12; + + enum FlowDirection { + FLOW_UNSPECIFIED = 0; + FLOW_IN = 1; + FLOW_OUT = 2; + FLOW_INOUT = 3; + } + optional FlowDirection flow_direction = 13; + + enum InstantEventScope { + SCOPE_UNSPECIFIED = 0; + SCOPE_GLOBAL = 1; + SCOPE_PROCESS = 2; + SCOPE_THREAD = 3; + } + optional InstantEventScope instant_event_scope = 14; + + // Override the pid/tid if the writer needs to emit events on behalf of + // another process/thread. This should be the exception. Normally, the + // pid+tid from ThreadDescriptor is used. + optional int32 pid_override = 18; + optional int32 tid_override = 19; + } + + optional LegacyEvent legacy_event = 6; + + reserved 51; +} + +// Default values for fields of all TrackEvents on the same packet sequence. +// Should be emitted as part of TracePacketDefaults whenever incremental state +// is cleared. It's defined here because field IDs should match those of the +// corresponding fields in TrackEvent. +message TrackEventDefaults { + optional uint64 track_uuid = 11; + repeated uint64 extra_counter_track_uuids = 31; + repeated uint64 extra_double_counter_track_uuids = 45; + + // TODO(eseckler): Support default values for more TrackEvent fields. +} + +// -------------------- +// Interned data types: +// -------------------- + +message EventCategory { + optional uint64 iid = 1; + optional string name = 2; +} + +message EventName { + optional uint64 iid = 1; + optional string name = 2; +} + +// End of protos/perfetto/trace/track_event/track_event.proto + +// Begin of protos/perfetto/trace/interned_data/interned_data.proto + +// ------------------------------ DATA INTERNING: ------------------------------ +// Interning indexes are built up gradually by adding the entries contained in +// each TracePacket of the same packet sequence (packets emitted by the same +// producer and TraceWriter, see |trusted_packet_sequence_id|). Thus, packets +// can only refer to interned data from other packets in the same sequence. +// +// The writer will emit new entries when it encounters new internable values +// that aren't yet in the index. Data in current and subsequent TracePackets can +// then refer to the entry by its position (interning ID, abbreviated "iid") in +// its index. An interning ID with value 0 is considered invalid (not set). +// +// Because of the incremental build-up, the interning index will miss data when +// TracePackets are lost, e.g. because a chunk was overridden in the central +// ring buffer. To avoid invalidation of the whole trace in such a case, the +// index is periodically reset (see SEQ_INCREMENTAL_STATE_CLEARED). +// When packet loss occurs, the reader will only lose interning data up to the +// next reset. +// ----------------------------------------------------------------------------- + +// Message that contains new entries for the interning indices of a packet +// sequence. +// +// The writer will usually emit new entries in the same TracePacket that first +// refers to them (since the last reset of interning state). They may also be +// emitted proactively in advance of referring to them in later packets. +// +// Next reserved id: 8 (up to 15). +// Next id: 44. +message InternedData { + // TODO(eseckler): Replace iid fields inside interned messages with + // map type fields in InternedData. + + // Each field's message type needs to specify an |iid| field, which is the ID + // of the entry in the field's interning index. Each field constructs its own + // index, thus interning IDs are scoped to the tracing session and field + // (usually as a counter for efficient var-int encoding), and optionally to + // the incremental state generation of the packet sequence. + repeated EventCategory event_categories = 1; + repeated EventName event_names = 2; + repeated DebugAnnotationName debug_annotation_names = 3; + repeated DebugAnnotationValueTypeName debug_annotation_value_type_names = 27; + repeated SourceLocation source_locations = 4; + repeated UnsymbolizedSourceLocation unsymbolized_source_locations = 28; + repeated LogMessageBody log_message_body = 20; + repeated HistogramName histogram_names = 25; + + // Note: field IDs up to 15 should be used for frequent data only. + + // Build IDs of exectuable files. + repeated InternedString build_ids = 16; + // Paths to executable files. + repeated InternedString mapping_paths = 17; + // Paths to source files. + repeated InternedString source_paths = 18; + // Names of functions used in frames below. + repeated InternedString function_names = 5; + // Executable files mapped into processes. + repeated Mapping mappings = 19; + // Frames of callstacks of a program. + repeated Frame frames = 6; + // A callstack of a program. + repeated Callstack callstacks = 7; + + // Additional Vulkan information sent in a VulkanMemoryEvent message + repeated InternedString vulkan_memory_keys = 22; + + // Graphics context of a render stage event. This represent the GL + // context for an OpenGl app or the VkDevice for a Vulkan app. + repeated InternedGraphicsContext graphics_contexts = 23; + + // Description of a GPU hardware queue or render stage. + repeated InternedGpuRenderStageSpecification gpu_specifications = 24; + + // This is set when FtraceConfig.symbolize_ksyms = true. + // The id of each symbol the number that will be reported in ftrace events + // like sched_block_reason.caller and is obtained from a monotonic counter. + // The same symbol can have different indexes in different bundles. + // This is is NOT the real address. This is to avoid disclosing KASLR through + // traces. + repeated InternedString kernel_symbols = 26; + + // Interned string values in the DebugAnnotation proto. + repeated InternedString debug_annotation_string_values = 29; + + // Interned packet context for android.network_packets. + repeated NetworkPacketContext packet_context = 30; + + // Interned name of a js function. We only intern js functions as there is a + // lot of duplication for them, but less so for other strings in the V8 data + // source. + repeated InternedV8String v8_js_function_name = 31; + // Js functions can be emitted multiple times for various compilation tiers, + // so it makes sense to deduplicate all this. + repeated InternedV8JsFunction v8_js_function = 32; + // Interned JS script (there is one associated with each JS function) + repeated InternedV8JsScript v8_js_script = 33; + // Interned Wasm script (there is one associated with each Wasm function) + repeated InternedV8WasmScript v8_wasm_script = 34; + // Every V8 event is associated with an isolate, intern the isolate to remove + // duplication. + repeated InternedV8Isolate v8_isolate = 35; + + // Interned protolog strings args. + repeated InternedString protolog_string_args = 36; + // Interned protolog stacktraces. + repeated InternedString protolog_stacktrace = 37; + + // viewcapture + repeated InternedString viewcapture_package_name = 38; + repeated InternedString viewcapture_window_name = 39; + repeated InternedString viewcapture_view_id = 40; + repeated InternedString viewcapture_class_name = 41; + + // Interned context for android.app_wakelocks. + repeated AppWakelockInfo app_wakelock_info = 42; + + // Interned correlation ids in track_event. + repeated InternedString correlation_id_str = 43; + + // removed ProfiledFrameSymbols profiled_frame_symbols + reserved 21; +} + +// End of protos/perfetto/trace/interned_data/interned_data.proto + +// Begin of protos/perfetto/trace/memory_graph.proto + +// Message definitions for app-reported memory breakdowns. At the moment, this +// is a Chrome-only tracing feature, historically known as 'memory-infra'. See +// https://chromium.googlesource.com/chromium/src/+/master/docs/memory-infra/ . +// This is unrelated to the native or java heap profilers (those protos live +// in //protos/perfetto/trace/profiling/). + +message MemoryTrackerSnapshot { + // Memory snapshot of a process. The snapshot contains memory data that is + // from 2 different sources, namely system stats and instrumentation stats. + // The system memory usage stats come from the OS based on standard API + // available in the platform to query memory usage. The instrumentation stats + // are added by instrumenting specific piece of code which tracks memory + // allocations and deallocations made by a small sub-system within the + // application. + // The system stats of the global memory snapshot are recorded as part of + // ProcessStats and SmapsPacket fields in trace packet with the same + // timestamp. + message ProcessSnapshot { + // Process ID of the process + optional int32 pid = 1; + + // Memory dumps are represented as a graph of memory nodes which contain + // statistics. To avoid double counting the same memory across different + // nodes, edges are used to mark nodes that account for the same memory. See + // this doc for examples of the usage: + // https://docs.google.com/document/d/1WGQRJ1sjJrfVkNcgPVY6frm64UqPc94tsxUOXImZUZI + + // A single node in the memory graph. + message MemoryNode { + // Unique ID of the node across all processes involved in the global + // memory dump. The ID is only unique within this particular global dump + // identified by GlobalMemoryDumpPacket.global_dump_id. + optional uint64 id = 1; + + // Absolute name is a unique name for the memory node within the process + // with ProcessMemoryDump.pid. The name can contain multiple parts + // separated by '/', which traces the edges of the node from the root + // node. + // Eg: "partition_allocator/array_buffers/buffer1" refers to the child + // node "buffer1" in a graph structure of: + // root -> partition_allocator -> array_buffers -> buffer1. + optional string absolute_name = 2; + + // A weak node means that the instrumentation that added the current node + // is unsure about the existence of the actual memory. Unless a "strong" + // (non-weak is default) node that has an edge to the current node exists + // in the current global dump, the current node will be discarded. + optional bool weak = 3; + + // Size of the node in bytes, used to compute the effective size of the + // nodes without double counting. + optional uint64 size_bytes = 4; + + // Entries in the memory node that contain statistics and additional + // debuggable information about the memory. The size of the node is + // tracked separately in the |size_bytes| field. + message MemoryNodeEntry { + optional string name = 1; + + enum Units { + UNSPECIFIED = 0; + BYTES = 1; + COUNT = 2; + } + optional Units units = 2; + + // Contains either one of uint64 or string value. + optional uint64 value_uint64 = 3; + optional string value_string = 4; + } + repeated MemoryNodeEntry entries = 5; + } + repeated MemoryNode allocator_dumps = 2; + + // A directed edge that connects any 2 nodes in the graph above. These are + // in addition to the inherent edges added due to the tree structure of the + // node's absolute names. + // Node with id |source_id| owns the node with id |target_id|, and has the + // effect of attributing the memory usage of target to source. |importance| + // is optional and relevant only for the cases of co-ownership, where it + // acts as a z-index: the owner with the highest importance will be + // attributed target's memory. + message MemoryEdge { + optional uint64 source_id = 1; + optional uint64 target_id = 2; + optional uint32 importance = 3; + optional bool overridable = 4; + } + repeated MemoryEdge memory_edges = 3; + } + + // Unique ID that represents the global memory dump. + optional uint64 global_dump_id = 1; + + enum LevelOfDetail { + DETAIL_FULL = 0; + DETAIL_LIGHT = 1; + DETAIL_BACKGROUND = 2; + } + optional LevelOfDetail level_of_detail = 2; + + repeated ProcessSnapshot process_memory_dumps = 3; +} + +// End of protos/perfetto/trace/memory_graph.proto + +// Begin of protos/perfetto/trace/perfetto/perfetto_metatrace.proto + +// Used to trace the execution of perfetto itself. +message PerfettoMetatrace { + // See base/metatrace_events.h for definitions. + oneof record_type { + uint32 event_id = 1; + uint32 counter_id = 2; + + // For trace processor metatracing. + string event_name = 8; + uint64 event_name_iid = 11; + + string counter_name = 9; + } + message Arg { + oneof key_or_interned_key { + string key = 1; + uint64 key_iid = 3; + } + oneof value_or_interned_value { + string value = 2; + uint64 value_iid = 4; + } + } + + // Only when using |event_id|. + optional uint64 event_duration_ns = 3; + + // Only when using |counter_id|. + optional int32 counter_value = 4; + + // ID of the thread that emitted the event. + optional uint32 thread_id = 5; + + // If true the meta-tracing ring buffer had overruns and hence some data is + // missing from this point. + optional bool has_overruns = 6; + + // Args for the event. + repeated Arg args = 7; + + // Interned strings corresponding to the |event_name_iid|, |key_iid| and + // |value_iid| above. + message InternedString { + optional uint64 iid = 1; + optional string value = 2; + }; + repeated InternedString interned_strings = 10; +} + +// End of protos/perfetto/trace/perfetto/perfetto_metatrace.proto + +// Begin of protos/perfetto/trace/perfetto/tracing_service_event.proto + +// Events emitted by the tracing service. +// Next id: 12. +message TracingServiceEvent { + message DataSources { + message DataSource { + optional string producer_name = 1; + optional string data_source_name = 2; + } + repeated DataSource data_source = 1; + } + oneof event_type { + // When each of the following booleans are set to true, they report the + // point in time (through TracePacket's timestamp) where the condition + // they describe happened. + // The order of the booleans below matches the timestamp ordering + // they would generally be expected to have. + + // Emitted when we start tracing and specifically, this will be before any + // producer is notified about the existence of this trace. This is always + // emitted before the all_data_sources_started event. This event is also + // guaranteed to be seen (byte-offset wise) before any data packets from + // producers. + bool tracing_started = 2; + + // Emitted after all data sources saw the start event and ACKed it. + // This identifies the point in time when it's safe to assume that all data + // sources have been recording events. + bool all_data_sources_started = 1; + + // Emitted when a flush is started. + bool flush_started = 9; + + // Emitted when all data sources have been flushed successfully or with an + // error (including timeouts). This can generally happen many times over the + // course of the trace. + bool all_data_sources_flushed = 3; + + // Emitted when reading back the central tracing buffers has been completed. + // If |write_into_file| is specified, this can happen many times over the + // course of the trace. + bool read_tracing_buffers_completed = 4; + + // Emitted after tracing has been disabled and specifically, this will be + // after all packets from producers have been included in the central + // tracing buffer. + bool tracing_disabled = 5; + + // Emitted if perfetto --save-for-bugreport was invoked while the current + // tracing session was running and it had the highest bugreport_score. In + // this case the original consumer will see a nearly empty trace, because + // the contents are routed onto the bugreport file. This event flags the + // situation explicitly. Traces that contain this marker should be discarded + // by test infrastructures / pipelines. + // Deprecated since Android U, where --save-for-bugreport uses + // non-destructive cloning. + bool seized_for_bugreport = 6; + + // Emitted when not all data sources in all producers reply to a start + // request after some time. + DataSources slow_starting_data_sources = 7; + + // Emitted when the last flush request has failed. Lists data sources that + // did not reply on time. + DataSources last_flush_slow_data_sources = 8; + + // If this was a cloned tracing session, emitted when the tracing serice + // started the clone operation. + bool clone_started = 10; + + // If this was a cloned tracing session, emitted when the tracing service + // finished the clone operation (for a specific buffer). + uint32 buffer_cloned = 11; + } +} + +// End of protos/perfetto/trace/perfetto/tracing_service_event.proto + +// Begin of protos/perfetto/common/android_energy_consumer_descriptor.proto + +// Energy consumer based on aidl class: +// android.hardware.power.stats.EnergyConsumer. +message AndroidEnergyConsumer { + // Unique ID of this energy consumer. Matches the ID in a + // AndroidEnergyEstimationBreakdown. + optional int32 energy_consumer_id = 1; + + // For a group of energy consumers of the same logical type, sorting by + // ordinal gives their physical order. Ordinals must be consecutive integers + // starting from 0. + optional int32 ordinal = 2; + + // Type of this energy consumer. + optional string type = 3; + + // Unique name of this energy consumer. Vendor/device specific. Opaque to + // framework. + optional string name = 4; +} + +message AndroidEnergyConsumerDescriptor { + repeated AndroidEnergyConsumer energy_consumers = 1; +} + +// End of protos/perfetto/common/android_energy_consumer_descriptor.proto + +// Begin of protos/perfetto/trace/power/android_energy_estimation_breakdown.proto + +// Energy data retrieve using the ODPM(On Device Power Monitor) API. +// This proto represents the aidl class: +// android.hardware.power.stats.EnergyConsumerResult. +message AndroidEnergyEstimationBreakdown { + // The first trace packet of each session should include a energy consumer + // descriptor. + optional AndroidEnergyConsumerDescriptor energy_consumer_descriptor = 1; + + // ID of the AndroidEnergyConsumer associated with this result. Matches + // the energy_consumer_id in the AndroidEnergyConsumerDescriptor that + // should be sent at the beginning of a trace. + optional int32 energy_consumer_id = 2; + + // Total accumulated energy since boot in microwatt-seconds (uWs) + optional int64 energy_uws = 3; + + message EnergyUidBreakdown { + // Android ID/Linux UID, the accumulated energy is attributed to. + optional int32 uid = 1; + + // Accumulated energy since boot in microwatt-seconds (uWs). + optional int64 energy_uws = 2; + } + // Optional attributed energy per Android ID / Linux UID for this + // EnergyConsumer. Sum total of attributed energy must be less than or equal + // to total accumulated energy. + repeated EnergyUidBreakdown per_uid_breakdown = 4; +} + +// End of protos/perfetto/trace/power/android_energy_estimation_breakdown.proto + +// Begin of protos/perfetto/trace/power/android_entity_state_residency.proto + +message EntityStateResidency { + message PowerEntityState { + // Index corresponding to the entity + optional int32 entity_index = 1; + + // Index corresponding to the state + optional int32 state_index = 2; + + // Name of the entity. This is device-specific, determined by the PowerStats + // HAL, and cannot be configured by the user. An example would be + // "Bluetooth". + optional string entity_name = 3; + + // Name of the state. This is device-specific, determined by the PowerStats + // HAL, and cannot be configured by the user. An example would be + // "Active". + optional string state_name = 4; + } + + // This is only emitted at the beginning of the trace. + repeated PowerEntityState power_entity_state = 1; + + message StateResidency { + // Index corresponding to PowerEntityState.entity_index + optional int32 entity_index = 1; + + // Index corresponding to PowerEntityState.state_index + optional int32 state_index = 2; + + // Time since boot that this entity has been in this state + optional uint64 total_time_in_state_ms = 3; + + // Total number of times since boot that the entity has entered this state + optional uint64 total_state_entry_count = 4; + + // Timestamp of the last time the entity entered this state + optional uint64 last_entry_timestamp_ms = 5; + } + + repeated StateResidency residency = 2; +} + +// End of protos/perfetto/trace/power/android_entity_state_residency.proto + +// Begin of protos/perfetto/trace/power/battery_counters.proto + +message BatteryCounters { + // Battery capacity in microampere-hours(µAh). Also known as Coulomb counter. + optional int64 charge_counter_uah = 1; + + // Remaining battery capacity percentage of total capacity + optional float capacity_percent = 2; + + // Instantaneous battery current in microamperes(µA). + // Negative values indicate current being drained from the battery and + // positive values indicate current feeding the battery from a charge source + // (USB). + // + // See https://perfetto.dev/docs/data-sources/battery-counters for more info. + optional int64 current_ua = 3; + + // Instantaneous battery current in microamperes(µA). + optional int64 current_avg_ua = 4; + + // Battery name, emitted only on multiple batteries. + optional string name = 5; + + // Battery capacity in microwatt-hours(µWh). + optional int64 energy_counter_uwh = 6; + + // Battery voltage in microvolts(µV). + optional int64 voltage_uv = 7; +} + +// End of protos/perfetto/trace/power/battery_counters.proto + +// Begin of protos/perfetto/trace/power/power_rails.proto + +message PowerRails { + message RailDescriptor { + // Index corresponding to the rail + optional uint32 index = 1; + + // Name of the rail + optional string rail_name = 2; + + // Name of the subsystem to which this rail belongs + optional string subsys_name = 3; + + // Hardware sampling rate (Hz). + optional uint32 sampling_rate = 4; + } + + // This is only emitted at the beginning of the trace. + repeated RailDescriptor rail_descriptor = 1; + + message EnergyData { + // Index corresponding to RailDescriptor.index + optional uint32 index = 1; + + // Time since device boot(CLOCK_BOOTTIME) in milli-seconds. + optional uint64 timestamp_ms = 2; + + // Accumulated energy since device boot in microwatt-seconds (uWs). + optional uint64 energy = 3; + } + + repeated EnergyData energy_data = 2; + + // A unique session id that can be used to match energy data to sets of + // descriptors. The indices used by rail descriptors and energy data packets + // are meant to be unique to a given session uuid. When multiple data sources + // are running in parallel, each data source should use a unique id. + optional uint64 session_uuid = 3; +} + +// End of protos/perfetto/trace/power/power_rails.proto + +// Begin of protos/perfetto/trace/profiling/deobfuscation.proto + +message ObfuscatedMember { + // This is the obfuscated field name relative to the class containing the + // ObfuscatedMember. + optional string obfuscated_name = 1; + // If this is fully qualified (i.e. contains a '.') this is the deobfuscated + // field name including its class. Otherwise, this is this the unqualified + // deobfuscated field name relative to the class containing this + // ObfuscatedMember. + optional string deobfuscated_name = 2; +} + +message ObfuscatedClass { + optional string obfuscated_name = 1; + optional string deobfuscated_name = 2; + // fields. + repeated ObfuscatedMember obfuscated_members = 3; + repeated ObfuscatedMember obfuscated_methods = 4; +} + +message DeobfuscationMapping { + optional string package_name = 1; + optional int64 version_code = 2; + repeated ObfuscatedClass obfuscated_classes = 3; +} +// End of protos/perfetto/trace/profiling/deobfuscation.proto + +// Begin of protos/perfetto/trace/profiling/heap_graph.proto + +message HeapGraphRoot { + enum Type { + ROOT_UNKNOWN = 0; + ROOT_JNI_GLOBAL = 1; + ROOT_JNI_LOCAL = 2; + ROOT_JAVA_FRAME = 3; + ROOT_NATIVE_STACK = 4; + ROOT_STICKY_CLASS = 5; + ROOT_THREAD_BLOCK = 6; + ROOT_MONITOR_USED = 7; + ROOT_THREAD_OBJECT = 8; + ROOT_INTERNED_STRING = 9; + ROOT_FINALIZING = 10; + ROOT_DEBUGGER = 11; + ROOT_REFERENCE_CLEANUP = 12; + ROOT_VM_INTERNAL = 13; + ROOT_JNI_MONITOR = 14; + }; + // Objects retained by this root. + repeated uint64 object_ids = 1 [packed = true]; + + optional Type root_type = 2; +} + +message HeapGraphType { + enum Kind { + KIND_UNKNOWN = 0; + KIND_NORMAL = 1; + KIND_NOREFERENCES = 2; + KIND_STRING = 3; + KIND_ARRAY = 4; + KIND_CLASS = 5; + KIND_CLASSLOADER = 6; + KIND_DEXCACHE = 7; + KIND_SOFT_REFERENCE = 8; + KIND_WEAK_REFERENCE = 9; + KIND_FINALIZER_REFERENCE = 10; + KIND_PHANTOM_REFERENCE = 11; + }; + // TODO(fmayer): Consider removing this and using the index in the repeaed + // field to save space. + optional uint64 id = 1; + optional uint64 location_id = 2; + optional string class_name = 3; + // Size of objects of this type. + optional uint64 object_size = 4; + optional uint64 superclass_id = 5; + // Indices for InternedData.field_names for the names of the fields of + // instances of this class. This does NOT include the fields from + // superclasses. The consumer of this data needs to walk all super + // classes to get a full lists of fields. Objects always write the + // fields in order of most specific class to the furthest up superclass. + repeated uint64 reference_field_id = 6 [packed = true]; + optional Kind kind = 7; + optional uint64 classloader_id = 8; +} + +message HeapGraphObject { + oneof identifier { + uint64 id = 1; + uint64 id_delta = 7; + } + + // Index for InternedData.types for the name of the type of this object. + optional uint64 type_id = 2; + + // Bytes occupied by this objects. + optional uint64 self_size = 3; + + // Add this to all non-zero values in reference_object_id. This is used to + // get more compact varint encoding. + // + // The name is confusing, but this has always been used as a base for + // reference_object_id. The field should be named reference_object_id_base. + optional uint64 reference_field_id_base = 6; + + // Indices for InternedData.field_names for the name of the field referring + // to the object. For Android S+ and for instances of normal classes (e.g. + // not instances of java.lang.Class or arrays), this is instead set in the + // corresponding HeapGraphType, and this is left empty. + repeated uint64 reference_field_id = 4 [packed = true]; + + // Ids of the Object that is referred to. + repeated uint64 reference_object_id = 5 [packed = true]; + + // If this object is an instance of `libcore.util.NativeAllocationRegistry`, + // the value of the `size` field. + // + // N.B. This is not the native size of this object. + optional int64 native_allocation_registry_size_field = 8; + + enum HeapType { + HEAP_TYPE_UNKNOWN = 0; + HEAP_TYPE_APP = 1; + HEAP_TYPE_ZYGOTE = 2; + HEAP_TYPE_BOOT_IMAGE = 3; + } + // To reduce the space required we only emit the heap type if it has changed + // from the previous object we recorded. + optional HeapType heap_type_delta = 9; + + // Ids of the Objects referred by this object, not via fields, but via + // internal runtime structures. + repeated uint64 runtime_internal_object_id = 10 [packed = true]; +} + +message HeapGraph { + optional int32 pid = 1; + + // This contains all objects at the time this dump was taken. Some of these + // will be live, some of those unreachable (garbage). To find the live + // objects, the client needs to build the transitive closure of objects + // reachable from |roots|. + // All objects not contained within that transitive closure are garbage that + // has not yet been collected. + repeated HeapGraphObject objects = 2; + + // Roots at the time this dump was taken. + // All live objects are reachable from the roots. All other objects are + // garbage. + repeated HeapGraphRoot roots = 7; + + // Types used in HeapGraphObjects. + repeated HeapGraphType types = 9; + + reserved 3; + + // Field names for references in managed heap graph. + repeated InternedString field_names = 4; + + // Paths of files used in managed heap graph. + repeated InternedString location_names = 8; + + optional bool continued = 5; + optional uint64 index = 6; +} + +// End of protos/perfetto/trace/profiling/heap_graph.proto + +// Begin of protos/perfetto/trace/profiling/profile_packet.proto + +// This file contains a mixture of messages emitted by various sampling +// profilers: +// +// Memory allocator profiling +// ---------------- +// ProfilePacket: +// The packet emitted by heapprofd, which started off as a native heap +// (malloc/free) profiler, but now supports custom allocators as well. Each +// packet contains a preaggregated state of the heap at snapshot time, which +// report the total allocated/free bytes per callstack (plus other info such +// as the number of samples). +// StreamingAllocation/StreamingFree: +// Emitted by heapprofd when configured in streaming mode (i.e. when +// stream_allocations = true). This is only for local testing, and doesn't +// report callstacks (only address time and size of each alloc/free). It can +// lead to enormous traces, as it contains the stream of each alloc/free call. +// +// Callstack sampling +// ------------------ +// StreamingProfilePacket: +// The packet emitted by the chromium in-process sampling profiler, which is +// based on periodically sending a signal to itself, and unwinding the stack +// in the signal handler. Each packet contains a series of individual stack +// samples for a Chromium thread. +// +// Callstack and performance counter sampling +// --------------------- +// PerfSample: +// The packet emitted by traced_perf sampling performance profiler based on +// the perf_event_open syscall. Each packet represents an individual sample +// of a performance counter (which might be a timer), and optionally a +// callstack of the process that was scheduled at the time of the sample. +// + +// The packet emitted by heapprofd for each heap snapshot. A snapshot can +// involve more than one ProfilePacket if the snapshot is big (when |continued| +// is true). The cardinality and grouping is as follows: +// A ProfilePacket contains: +// - 1+ per-process heap snapshots (ProcessHeapSamples). Normally there is only +// one heap per process (the main malloc/free heap), but there can be more if +// the process is using the heapprofd API to profile custom allocators. +// - Globally interned strings, mappings and frames (to allow de-duplicating +// frames/mapping in common between different processes). +// A ProcessHeapSamples contains: +// - The process and heap identifier. +// - A number of HeapSample, one for each callsite that had some alloc/frees. +// - Statistics about heapprofd internals (e.g., sampling/unwinding timings). +// A HeapSample contains statistics about callsites: +// - Total number of bytes allocated and freed from that callsite. +// - Total number of alloc/free calls sampled. +// - Stats at the local maximum when dump_at_max = true. +// See https://perfetto.dev/docs/data-sources/native-heap-profiler for more. +message ProfilePacket { + // The following interning tables are only used in Android version Q. + // In newer versions, these tables are in InternedData + // (see protos/perfetto/trace/interned_data) and are shared across + // multiple ProfilePackets. + // For backwards compatibility, consumers need to first look up interned + // data in the tables within the ProfilePacket, and then, if they are empty, + // look up in the InternedData instead. + repeated InternedString strings = 1; + repeated Mapping mappings = 4; + repeated Frame frames = 2; + repeated Callstack callstacks = 3; + + // Next ID: 9 + message HeapSample { + optional uint64 callstack_id = 1; + // bytes allocated at this callstack. + optional uint64 self_allocated = 2; + // bytes allocated at this callstack that have been freed. + optional uint64 self_freed = 3; + // deprecated self_idle. + reserved 7; + // Bytes allocated by this callstack but not freed at the time the malloc + // heap usage of this process was maximal. This is only set if dump_at_max + // is true in HeapprofdConfig. In that case, self_allocated, self_freed and + // self_idle will not be set. + optional uint64 self_max = 8; + // Number of allocations that were sampled at this callstack but not freed + // at the time the malloc heap usage of this process was maximal. This is + // only set if dump_at_max is true in HeapprofdConfig. In that case, + // self_allocated, self_freed and self_idle will not be set. + optional uint64 self_max_count = 9; + // timestamp [opt] + optional uint64 timestamp = 4; + // Number of allocations that were sampled at this callstack. + optional uint64 alloc_count = 5; + // Number of allocations that were sampled at this callstack that have been + // freed. + optional uint64 free_count = 6; + } + + message Histogram { + message Bucket { + // This bucket counts values from the previous bucket's (or -infinity if + // this is the first bucket) upper_limit (inclusive) to this upper_limit + // (exclusive). + optional uint64 upper_limit = 1; + // This is the highest bucket. This is set instead of the upper_limit. Any + // values larger or equal to the previous bucket's upper_limit are counted + // in this bucket. + optional bool max_bucket = 2; + // Number of values that fall into this range. + optional uint64 count = 3; + } + repeated Bucket buckets = 1; + } + + message ProcessStats { + optional uint64 unwinding_errors = 1; + optional uint64 heap_samples = 2; + optional uint64 map_reparses = 3; + optional Histogram unwinding_time_us = 4; + optional uint64 total_unwinding_time_us = 5; + optional uint64 client_spinlock_blocked_us = 6; + } + + repeated ProcessHeapSamples process_dumps = 5; + message ProcessHeapSamples { + enum ClientError { + CLIENT_ERROR_NONE = 0; + CLIENT_ERROR_HIT_TIMEOUT = 1; + CLIENT_ERROR_INVALID_STACK_BOUNDS = 2; + } + optional uint64 pid = 1; + + // This process was profiled from startup. + // If false, this process was already running when profiling started. + optional bool from_startup = 3; + + // This process was not profiled because a concurrent session was active. + // If this is true, samples will be empty. + optional bool rejected_concurrent = 4; + + // This process disconnected while it was profiled. + // If false, the process outlived the profiling session. + optional bool disconnected = 6; + + // If disconnected, this disconnect was caused by the client overrunning + // the buffer. + // Equivalent to client_error == CLIENT_ERROR_HIT_TIMEOUT + // on new S builds. + optional bool buffer_overran = 7; + + optional ClientError client_error = 14; + + // If disconnected, this disconnected was caused by the shared memory + // buffer being corrupted. THIS IS ALWAYS A BUG IN HEAPPROFD OR CLIENT + // MEMORY CORRUPTION. + optional bool buffer_corrupted = 8; + + // If disconnected, this disconnect was caused by heapprofd exceeding + // guardrails during this profiling session. + optional bool hit_guardrail = 10; + + optional string heap_name = 11; + optional uint64 sampling_interval_bytes = 12; + optional uint64 orig_sampling_interval_bytes = 13; + + // Timestamp of the state of the target process that this dump represents. + // This can be different to the timestamp of the TracePackets for various + // reasons: + // * If disconnected is set above, this is the timestamp of last state + // heapprofd had of the process before it disconnected. + // * Otherwise, if the rate of events produced by the process is high, + // heapprofd might be behind. + // + // TODO(fmayer): This is MONOTONIC_COARSE. Refactor ClockSnapshot::Clock + // to have a type enum that we can reuse here. + optional uint64 timestamp = 9; + + // Metadata about heapprofd. + optional ProcessStats stats = 5; + + repeated HeapSample samples = 2; + } + + // If this is true, the next ProfilePacket in this package_sequence_id is a + // continuation of this one. + // To get all samples for a process, accummulate its + // ProcessHeapSamples.samples until you see continued=false. + optional bool continued = 6; + + // Index of this ProfilePacket on its package_sequence_id. Can be used + // to detect dropped data. + // Verify these are consecutive. + optional uint64 index = 7; +} + +// Packet emitted by heapprofd when stream_allocations = true. Only for local +// testing. Doesn't report the callsite. +message StreamingAllocation { + // TODO(fmayer): Add callstack. + repeated uint64 address = 1; + repeated uint64 size = 2; + repeated uint64 sample_size = 3; + repeated uint64 clock_monotonic_coarse_timestamp = 4; + repeated uint32 heap_id = 5; + repeated uint64 sequence_number = 6; +}; + +// Packet emitted by heapprofd when stream_allocations = true. Only for local +// testing. Doesn't report the callsite. +message StreamingFree { + // TODO(fmayer): Add callstack. + repeated uint64 address = 1; + repeated uint32 heap_id = 2; + repeated uint64 sequence_number = 3; +}; + +// Packet emitted by the chromium in-process signal-based callstack sampler. +// Represents a series of individual stack samples (sampled at discrete points +// in time), rather than aggregated over an interval. +message StreamingProfilePacket { + // Index into InternedData.callstacks + repeated uint64 callstack_iid = 1; + // TODO(eseckler): ThreadDescriptor-based timestamps are deprecated. Replace + // this with ClockSnapshot-based delta encoding instead. + repeated int64 timestamp_delta_us = 2; + optional int32 process_priority = 3; +} + +// Namespace for the contained enums. +message Profiling { + enum CpuMode { + MODE_UNKNOWN = 0; + MODE_KERNEL = 1; + MODE_USER = 2; + // The following values aren't expected, but included for completeness: + MODE_HYPERVISOR = 3; + MODE_GUEST_KERNEL = 4; + MODE_GUEST_USER = 5; + } + + // Enumeration of libunwindstack's error codes. + // NB: the integral representations of the two enums are different. + enum StackUnwindError { + UNWIND_ERROR_UNKNOWN = 0; + UNWIND_ERROR_NONE = 1; + UNWIND_ERROR_MEMORY_INVALID = 2; + UNWIND_ERROR_UNWIND_INFO = 3; + UNWIND_ERROR_UNSUPPORTED = 4; + UNWIND_ERROR_INVALID_MAP = 5; + UNWIND_ERROR_MAX_FRAMES_EXCEEDED = 6; + UNWIND_ERROR_REPEATED_FRAME = 7; + UNWIND_ERROR_INVALID_ELF = 8; + UNWIND_ERROR_SYSTEM_CALL = 9; + UNWIND_ERROR_THREAD_TIMEOUT = 10; + UNWIND_ERROR_THREAD_DOES_NOT_EXIST = 11; + UNWIND_ERROR_BAD_ARCH = 12; + UNWIND_ERROR_MAPS_PARSE = 13; + UNWIND_ERROR_INVALID_PARAMETER = 14; + UNWIND_ERROR_PTRACE_CALL = 15; + } +} + +// Packet emitted by the traced_perf sampling performance profiler, which +// gathers data via the perf_event_open syscall. Each packet contains an +// individual sample with a counter value, and optionally a +// callstack. +// +// Timestamps are within the root packet. The config can specify the clock, or +// the implementation will default to CLOCK_MONOTONIC_RAW. Within the Android R +// timeframe, the default was CLOCK_BOOTTIME. +// +// There are several distinct views of this message: +// * indication of kernel buffer data loss (kernel_records_lost set) +// * indication of skipped samples (sample_skipped_reason set) +// * notable event in the sampling implementation (producer_event set) +// * normal sample (timebase_count set, typically also callstack_iid) +message PerfSample { + optional uint32 cpu = 1; + optional uint32 pid = 2; + optional uint32 tid = 3; + + // Execution state that the process was sampled at. + optional Profiling.CpuMode cpu_mode = 5; + + // Value of the timebase counter (since the event was configured, no deltas). + optional uint64 timebase_count = 6; + + // Value of the followers counter (since the event was configured, no deltas). + repeated uint64 follower_counts = 7; + + // Unwound callstack. Might be partial, in which case a synthetic "error" + // frame is appended, and |unwind_error| is set accordingly. + optional uint64 callstack_iid = 4; + + // If set, stack unwinding was incomplete due to an error. + // Unset values should be treated as UNWIND_ERROR_NONE. + oneof optional_unwind_error { + Profiling.StackUnwindError unwind_error = 16; + }; + + // If set, indicates that this message is not a sample, but rather an + // indication of data loss in the ring buffer allocated for |cpu|. Such data + // loss occurs when the kernel has insufficient ring buffer capacity to write + // a record (which gets discarded). A record in this context is an individual + // ring buffer entry, and counts more than just sample records. + // + // The |timestamp| of the packet corresponds to the time that the producer + // wrote the packet for trace-sorting purposes alone, and should not be + // interpreted relative to the sample timestamps. This field is sufficient to + // detect that *some* kernel data loss happened within the trace, but not the + // specific time bounds of that loss (which would require tracking precedessor + // & successor timestamps, which is not deemed necessary at the moment). + optional uint64 kernel_records_lost = 17; + + // If set, indicates that the profiler encountered a sample that was relevant, + // but was skipped. + enum SampleSkipReason { + PROFILER_SKIP_UNKNOWN = 0; + PROFILER_SKIP_READ_STAGE = 1; + PROFILER_SKIP_UNWIND_STAGE = 2; + PROFILER_SKIP_UNWIND_ENQUEUE = 3; + PROFILER_SKIP_NOT_IN_SCOPE = 4; + } + oneof optional_sample_skipped_reason { + SampleSkipReason sample_skipped_reason = 18; + }; + + // A notable event within the sampling implementation. + message ProducerEvent { + enum DataSourceStopReason { + PROFILER_STOP_UNKNOWN = 0; + PROFILER_STOP_GUARDRAIL = 1; + } + oneof optional_source_stop_reason { + DataSourceStopReason source_stop_reason = 1; + } + } + optional ProducerEvent producer_event = 19; +} + +/* COMMENTED +// Submessage for TracePacketDefaults. +message PerfSampleDefaults { + // The sampling timebase. Might not be identical to the data source config if + // the implementation decided to default/override some parameters. + optional PerfEvents.Timebase timebase = 1; + + // Description of followers event + repeated FollowerEvent followers = 4; + + // If the config requested process sharding, report back the count and which + // of those bins was selected. Never changes for the duration of a trace. + optional uint32 process_shard_count = 2; + optional uint32 chosen_process_shard = 3; +} +*/ + +// End of protos/perfetto/trace/profiling/profile_packet.proto + +// Begin of protos/perfetto/trace/profiling/smaps.proto + +message SmapsEntry { + optional string path = 1; + optional uint64 size_kb = 2; + optional uint64 private_dirty_kb = 3; + optional uint64 swap_kb = 4; + + // for field upload (instead of path). + optional string file_name = 5; + + // TODO(crbug.com/1098746): Consider encoding this as incremental values. + optional uint64 start_address = 6; + optional uint64 module_timestamp = 7; + optional string module_debugid = 8; + optional string module_debug_path = 9; + optional uint32 protection_flags = 10; + + optional uint64 private_clean_resident_kb = 11; + optional uint64 shared_dirty_resident_kb = 12; + optional uint64 shared_clean_resident_kb = 13; + optional uint64 locked_kb = 14; + optional uint64 proportional_resident_kb = 15; +}; + +message SmapsPacket { + optional uint32 pid = 1; + repeated SmapsEntry entries = 2; +}; + +// End of protos/perfetto/trace/profiling/smaps.proto + +// Begin of protos/perfetto/trace/ps/process_stats.proto + +// Per-process periodically sampled stats. These samples are wrapped in a +// dedicated message (as opposite to be fields in process_tree.proto) because +// they are dumped at a different rate than cmdline and thread list. +// Note: not all of these stats will be present in every ProcessStats message +// and sometimes processes may be missing. This is because counters are +// cached to reduce emission of counters which do not change. +message ProcessStats { + // Per-thread periodically sampled stats. + // Note: not all of these stats will be present in every message. See the note + // for ProcessStats. + message Thread { + optional int32 tid = 1; + + // DEPRECATED cpu_freq_indices + reserved 2; + + // DEPRECATED cpu_freq_ticks + reserved 3; + + // DEPRECATED cpu_freq_full + reserved 4; + } + + message FDInfo { + optional uint64 fd = 1; + optional string path = 2; + } + + message Process { + optional int32 pid = 1; + + repeated Thread threads = 11; + + // See /proc/[pid]/status in `man 5 proc` for a description of these fields. + optional uint64 vm_size_kb = 2; + optional uint64 vm_rss_kb = 3; + optional uint64 rss_anon_kb = 4; + optional uint64 rss_file_kb = 5; + optional uint64 rss_shmem_kb = 6; + optional uint64 vm_swap_kb = 7; + optional uint64 vm_locked_kb = 8; + optional uint64 vm_hwm_kb = 9; + // When adding a new field remember to update kProcMemCounterSize in + // the trace processor. + + optional int64 oom_score_adj = 10; + + // The peak resident set size is resettable in newer Posix kernels. + // This field specifies if reset is supported and if the writer had reset + // the peaks after each process stats recording. + optional bool is_peak_rss_resettable = 12; + + // Private, shared and swap footprint of the process as measured by + // Chrome. To know more about these metrics refer to: + // https://docs.google.com/document/d/1_WmgE1F5WUrhwkPqJis3dWyOiUmQKvpXp5cd4w86TvA + optional uint32 chrome_private_footprint_kb = 13; + optional uint32 chrome_peak_resident_set_kb = 14; + + repeated FDInfo fds = 15; + + // These fields are set only when scan_smaps_rollup=true + optional uint64 smr_rss_kb = 16; + optional uint64 smr_pss_kb = 17; + optional uint64 smr_pss_anon_kb = 18; + optional uint64 smr_pss_file_kb = 19; + optional uint64 smr_pss_shmem_kb = 20; + optional uint64 smr_swap_pss_kb = 23; + + // Time spent scheduled in user mode in nanoseconds. Parsed from utime in + // /proc/pid/stat. Recorded if record_process_runtime config option is set. + // Resolution of "clock ticks", usually 10ms. + optional uint64 runtime_user_mode = 21; + + // Time spent scheduled in kernel mode in nanoseconds. Parsed from stime in + // /proc/pid/stat. Recorded if record_process_runtime config option is set. + // Resolution of "clock ticks", usually 10ms. + optional uint64 runtime_kernel_mode = 22; + + // The total size of all dmabufs referenced by a process via FDs or VMAs. + optional uint64 dmabuf_rss_kb = 24; + } + repeated Process processes = 1; + + // The time at which we finish collecting this batch of samples; + // the top-level packet timestamp is the time at which + // we begin collection. + optional uint64 collection_end_timestamp = 2; +} + +// End of protos/perfetto/trace/ps/process_stats.proto + +// Begin of protos/perfetto/trace/ps/process_tree.proto + +// Metadata about the processes and threads in the trace. +// Note: this proto was designed to be filled in by traced_probes and should +// only be populated with accurate information coming from the system. Other +// trace writers should prefer to fill ThreadDescriptor and ProcessDescriptor +// in TrackDescriptor. +message ProcessTree { + // Representation of a thread. + message Thread { + // The thread ID (as per gettid()) in the root PID namespace. + optional int32 tid = 1; + + // Thread group id (i.e. the PID of the process, == TID of the main thread) + optional int32 tgid = 3; + + // The name of the thread. + optional string name = 2; + + // The non-root-level thread IDs if the thread runs in a PID namespace. Read + // from the NSpid entry of /proc//status, with the first element (root- + // level thread ID) omitted. + repeated int32 nstid = 4; + } + + // Representation of a process. + message Process { + // The UNIX process ID, aka thread group ID (as per getpid()) in the root + // PID namespace. + optional int32 pid = 1; + + // The parent process ID, as per getppid(). + optional int32 ppid = 2; + + // The command line for the process, as per /proc/pid/cmdline, broken up on + // NUL bytes. + // If it is a kernel thread or a zombie, there will only be one cmdline + // field and it will contain /proc/pid/comm. + repeated string cmdline = 3; + + // If true, the |cmdline| field was filled with the main thread's "comm" + // field instead. + // Introduced in: perfetto v50. + optional bool cmdline_is_comm = 9; + + // The uid for the process, as per /proc/pid/status. + optional int32 uid = 5; + + // The non-root-level process IDs if the process runs in a PID namespace. + // Read from the NSpid entry of /proc//status, with the first element + // (root-level process ID) omitted. + repeated int32 nspid = 6; + + // Timestamp of when the process was created, in nanoseconds + // from boot. Parsed from starttime in /proc/pid/stat. + // Recorded if record_process_age config option is set. + // Resolution of "clock ticks", usually 10ms. + optional uint64 process_start_from_boot = 7; + + // If true, the process is a kernel thread. + // Set only on linux v6.4+. For traces from older devices, it is possible to + // infer most kthreads by checking that they're a descendant of kthreadd + // (pid=2), or are the idle process (pid=0). + // Introduced in: perfetto v50. + optional bool is_kthread = 8; + + // threads_deprecated + reserved 4; + } + + // List of processes and threads in the client. These lists are incremental + // and not exhaustive. A process and its threads might show up separately in + // different ProcessTree messages. A thread might event not show up at all, if + // no sched_switch activity was detected, for instance: + // #0 { processes: [{pid: 10, ...}], threads: [{pid: 11, tgid: 10}] } + // #1 { threads: [{pid: 12, tgid: 10}] } + // #2 { processes: [{pid: 20, ...}], threads: [{pid: 13, tgid: 10}] } + repeated Process processes = 1; + repeated Thread threads = 2; + + // The time at which we finish collecting this process tree; + // the top-level packet timestamp is the time at which + // we begin collection. + optional uint64 collection_end_timestamp = 3; +} + +// End of protos/perfetto/trace/ps/process_tree.proto + +// Begin of protos/perfetto/trace/remote_clock_sync.proto + +// Records the parameters for aligning clock readings between machines. +message RemoteClockSync { + // Synchronized clock snapshots taken on both sides of the relay port (the + // tracing service and the relay service). A round of clock synchronization + // IPC takes emits 2 SyncedClocks messages, i.e., client snapshot -> host + // snapshot -> client snapshot -> host snapshot. + message SyncedClocks { + optional ClockSnapshot client_clocks = 2; + optional ClockSnapshot host_clocks = 3; + } + + repeated SyncedClocks synced_clocks = 1; +} + +// End of protos/perfetto/trace/remote_clock_sync.proto + +// Begin of protos/perfetto/trace/statsd/statsd_atom.proto + +// Deliberate empty message. See comment on StatsdAtom#atom below. +message Atom {} + +// One or more statsd atoms. This must continue to match: +// perfetto/protos/third_party/statsd/shell_data.proto +// So that we can efficiently add data from statsd directly to the +// trace. +message StatsdAtom { + // Atom should be filled with an Atom proto from: + // https://cs.android.com/android/platform/superproject/main/+/main:frameworks/proto_logging/stats/atoms.proto?q=f:stats%2Fatoms.proto$%20message%5C%20Atom + // We don't reference Atom directly here since we don't want to import + // Atom.proto and all its transitive dependencies into Perfetto. + // atom and timestamp_nanos have the same cardinality + repeated Atom atom = 1; + repeated int64 timestamp_nanos = 2; +} + +// End of protos/perfetto/trace/statsd/statsd_atom.proto + +// Begin of protos/perfetto/trace/sys_stats/sys_stats.proto + +// Various Linux system stat counters from /proc. +// The fields in this message can be reported at different rates and with +// different granularity. See sys_stats_config.proto. +message SysStats { + // Counters from /proc/meminfo. Values are in KB. + message MeminfoValue { + optional MeminfoCounters key = 1; + optional uint64 value = 2; + }; + repeated MeminfoValue meminfo = 1; + + // Counter from /proc/vmstat. Units are often pages, not KB. + message VmstatValue { + optional VmstatCounters key = 1; + optional uint64 value = 2; + }; + repeated VmstatValue vmstat = 2; + + // Times in each mode, since boot. Unit: nanoseconds. + message CpuTimes { + optional uint32 cpu_id = 1; + + // Time spent in user mode. + optional uint64 user_ns = 2; + + // Time spent in user mode (low prio). + optional uint64 user_nice_ns = 3; + + // Time spent in system mode. + optional uint64 system_mode_ns = 4; + + // Time spent in the idle task. + optional uint64 idle_ns = 5; + + // Time spent waiting for I/O. + optional uint64 io_wait_ns = 6; + + // Time spent servicing interrupts. + optional uint64 irq_ns = 7; + + // Time spent servicing softirqs. + optional uint64 softirq_ns = 8; + + // Time spent executing something else on host than this guest. + optional uint64 steal_ns = 9; + } + // One entry per cpu. + repeated CpuTimes cpu_stat = 3; + + // Num processes forked since boot. + // Populated only if FORK_COUNT in config.stat_counters. + optional uint64 num_forks = 4; + + message InterruptCount { + optional int32 irq = 1; + optional uint64 count = 2; + } + + // Number of interrupts, broken by IRQ number. + // Populated only if IRQ_COUNTS in config.stat_counters. + + // Total num of irqs serviced since boot. + optional uint64 num_irq_total = 5; + repeated InterruptCount num_irq = 6; + + // Number of softirqs, broken by softirq number. + // Populated only if SOFTIRQ_COUNTS in config.stat_counters. + + // Total num of softirqs since boot. + optional uint64 num_softirq_total = 7; + + // Per-softirq count. + repeated InterruptCount num_softirq = 8; + + // The time at which we finish collecting this set of samples; + // the top-level packet timestamp is the time at which + // we begin collection. + optional uint64 collection_end_timestamp = 9; + + // Frequencies for /sys/class/devfreq/ entries in kHz. + message DevfreqValue { + optional string key = 1; + optional uint64 value = 2; + }; + + // One entry per device. + repeated DevfreqValue devfreq = 10; + + // Cpu current frequency from + // /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq in kHz. + // One entry per cpu. Report 0 for offline cpu + repeated uint32 cpufreq_khz = 11; + + message BuddyInfo { + optional string node = 1; + optional string zone = 2; + repeated uint32 order_pages = 3; + } + // One entry per each node's zones. + repeated BuddyInfo buddy_info = 12; + + // Counters from /proc/diskstats. + message DiskStat { + optional string device_name = 1; + optional uint64 read_sectors = 2; + optional uint64 read_time_ms = 3; + optional uint64 write_sectors = 4; + optional uint64 write_time_ms = 5; + optional uint64 discard_sectors = 6; + optional uint64 discard_time_ms = 7; + optional uint64 flush_count = 8; + optional uint64 flush_time_ms = 9; + } + // One entry per disk device. + repeated DiskStat disk_stat = 13; + + // Reading from /proc/pressure/*. + message PsiSample { + // Type of resource that may have exhibited pressure stalls. + // * _SOME indicates some resource tasks stalled. + // * _FULL indicates all non-idle resource tasks stalled simultaneously. + enum PsiResource { + PSI_RESOURCE_UNSPECIFIED = 0; + PSI_RESOURCE_CPU_SOME = 1; + PSI_RESOURCE_CPU_FULL = 2; + PSI_RESOURCE_IO_SOME = 3; + PSI_RESOURCE_IO_FULL = 4; + PSI_RESOURCE_MEMORY_SOME = 5; + PSI_RESOURCE_MEMORY_FULL = 6; + } + optional PsiResource resource = 1; + + // Total absolute stall time (in nanos) for a given resource. + // While PSI readings are in micros, we store in nanos for consistency with + // most other time-based counters. + optional uint64 total_ns = 2; + + // Note that /proc/pressure/* exposes historical average utilization values + // (as a %), but we don't yet sample those. They could easily be added as + // additional fields should the total stall time readings be insufficient. + } + // One entry per PsiResource type. + repeated PsiSample psi = 14; + + // Reading from /sys/class/thermal/*. + message ThermalZone { + optional string name = 1; + optional uint64 temp = 2; + optional string type = 3; + } + repeated ThermalZone thermal_zone = 15; + + // Reading from /sys/devices/system/cpu/cpu*/cpuidle/state*. + message CpuIdleStateEntry { + // Name of the idle state, e.g. C1-C10 + optional string state = 1; + optional uint64 duration_us = 2; + } + message CpuIdleState { + optional uint32 cpu_id = 1; + repeated CpuIdleStateEntry cpuidle_state_entry = 2; + } + repeated CpuIdleState cpuidle_state = 16; + + // Read GPU frequency info on Intel/AMD devices. + repeated uint64 gpufreq_mhz = 17; +} + +// End of protos/perfetto/trace/sys_stats/sys_stats.proto + +// Begin of protos/perfetto/trace/system_info/cpu_info.proto + +// Information about CPUs from procfs and sysfs. +message CpuInfo { + message ArmCpuIdentifier { + // Implementer code + optional uint32 implementer = 1; + + // Architecture code + optional uint32 architecture = 2; + + // CPU variant + optional uint32 variant = 3; + + // CPU part + optional uint32 part = 4; + + // CPU revision + optional uint32 revision = 5; + } + + // Information about a single CPU. + message Cpu { + // Value of "Processor" field from /proc/cpuinfo for this CPU. + // Example: "AArch64 Processor rev 12 (aarch64)" + optional string processor = 1; + + // Frequencies from + // /sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies + // where X is the index of this CPU. + repeated uint32 frequencies = 2; + + // Cpu capacity from /sys/devices/system/cpu/cpuX/cpu_capacity where X is + // the index of this CPU. + optional uint32 capacity = 3; + + // Code to identify the CPU + oneof identifier { + ArmCpuIdentifier arm_identifier = 4; + } + + // Features is a bitmap containing a bit set for each feature defined in + // kCpuInfoFlags (cpu_info_flags_allowlist.h) for the corresponding array + // index. + optional uint64 features = 5; + } + + // Describes available CPUs, one entry per CPU. + repeated Cpu cpus = 1; +} + +// End of protos/perfetto/trace/system_info/cpu_info.proto + +// Begin of protos/perfetto/trace/test_event.proto + +// Event used by testing code. +message TestEvent { + // Arbitrary string used in tests. + optional string str = 1; + + // The current value of the random number sequence used in tests. + optional uint32 seq_value = 2; + + // Monotonically increased on each packet. + optional uint64 counter = 3; + + // No more packets should follow (from the current sequence). + optional bool is_last = 4; + + message TestPayload { + repeated string str = 1; + repeated TestPayload nested = 2; + + optional string single_string = 4; + + optional int32 single_int = 5; + repeated int32 repeated_ints = 6; + + // When 0 this is the bottom-most nested message. + optional uint32 remaining_nesting_depth = 3; + + repeated DebugAnnotation debug_annotations = 7; + } + optional TestPayload payload = 5; +} + +// End of protos/perfetto/trace/test_event.proto + +// Begin of protos/perfetto/trace/trace_packet_defaults.proto + +// Default values for TracePacket fields that hold for a particular TraceWriter +// packet sequence. This message contains a subset of the TracePacket fields +// with matching IDs. When provided, these fields define the default values +// that should be applied, at import time, to all TracePacket(s) with the same +// |trusted_packet_sequence_id|, unless otherwise specified in each packet. +// +// Should be reemitted whenever incremental state is cleared on the sequence. +message TracePacketDefaults { + optional uint32 timestamp_clock_id = 58; + + // Default values for TrackEvents (e.g. default track). + optional TrackEventDefaults track_event_defaults = 11; + + // Defaults for perf profiler packets (PerfSample). + // COMMENTED optional PerfSampleDefaults perf_sample_defaults = 12; + + // Defaults for V8 code packets (V8JsCode, V8InternalCode, V8WasmCode, + // V8RegexpCode) + optional V8CodeDefaults v8_code_defaults = 99; +} +// End of protos/perfetto/trace/trace_packet_defaults.proto + +// Begin of protos/perfetto/trace/trace_uuid.proto + +// A random unique ID that identifies the trace. +// This message has been introduced in v32. Prior to that, the UUID was +// only (optionally) present in the TraceConfig.trace_uuid_msb/lsb fields. +// This has been moved to a standalone packet to deal with new use-cases for +// go/gapless-aot, where the same tracing session can be serialized several +// times, in which case the UUID is changed on each snapshot and does not match +// the one in the TraceConfig. +message TraceUuid { + optional int64 msb = 1; + optional int64 lsb = 2; +} + +// End of protos/perfetto/trace/trace_uuid.proto + +// Begin of protos/perfetto/trace/track_event/process_descriptor.proto + +// Describes a process's attributes. Emitted as part of a TrackDescriptor, +// usually by the process's main thread. +// +// Next id: 9. +message ProcessDescriptor { + optional int32 pid = 1; + repeated string cmdline = 2; + optional string process_name = 6; + + optional int32 process_priority = 5; + // Process start time in nanoseconds. + // The timestamp refers to the trace clock by default. Other clock IDs + // provided in TracePacket are not supported. + optional int64 start_timestamp_ns = 7; + + // --------------------------------------------------------------------------- + // Deprecated / legacy fields, which will be removed in the future: + // --------------------------------------------------------------------------- + + // See chromium's content::ProcessType. + enum ChromeProcessType { + PROCESS_UNSPECIFIED = 0; + PROCESS_BROWSER = 1; + PROCESS_RENDERER = 2; + PROCESS_UTILITY = 3; + PROCESS_ZYGOTE = 4; + PROCESS_SANDBOX_HELPER = 5; + PROCESS_GPU = 6; + PROCESS_PPAPI_PLUGIN = 7; + PROCESS_PPAPI_BROKER = 8; + } + optional ChromeProcessType chrome_process_type = 4; + + // To support old UI. New UI should determine default sorting by process_type. + optional int32 legacy_sort_index = 3; + + // Labels can be used to further describe properties of the work performed by + // the process. For example, these can be used by Chrome renderer process to + // provide titles of frames being rendered. + repeated string process_labels = 8; +} + +// End of protos/perfetto/trace/track_event/process_descriptor.proto + +// Begin of protos/perfetto/trace/track_event/range_of_interest.proto + +// This message specifies the "range of interest" for track events. With the +// `drop_track_event_data_before` option set to `kTrackEventRangeOfInterest`, +// Trace Processor drops track events outside of this range. +message TrackEventRangeOfInterest { + optional int64 start_us = 1; +} +// End of protos/perfetto/trace/track_event/range_of_interest.proto + +// Begin of protos/perfetto/trace/track_event/thread_descriptor.proto + +// Describes a thread's attributes. Emitted as part of a TrackDescriptor, +// usually by the thread's trace writer. +// +// Next id: 9. +message ThreadDescriptor { + optional int32 pid = 1; + optional int32 tid = 2; + + optional string thread_name = 5; + + // --------------------------------------------------------------------------- + // Deprecated / legacy fields, which will be removed in the future: + // --------------------------------------------------------------------------- + + enum ChromeThreadType { + CHROME_THREAD_UNSPECIFIED = 0; + + CHROME_THREAD_MAIN = 1; + CHROME_THREAD_IO = 2; + + // Scheduler: + CHROME_THREAD_POOL_BG_WORKER = 3; + CHROME_THREAD_POOL_FG_WORKER = 4; + CHROME_THREAD_POOL_FB_BLOCKING = 5; + CHROME_THREAD_POOL_BG_BLOCKING = 6; + CHROME_THREAD_POOL_SERVICE = 7; + + // Compositor: + CHROME_THREAD_COMPOSITOR = 8; + CHROME_THREAD_VIZ_COMPOSITOR = 9; + CHROME_THREAD_COMPOSITOR_WORKER = 10; + + // Renderer: + CHROME_THREAD_SERVICE_WORKER = 11; + + // Tracing related threads: + CHROME_THREAD_MEMORY_INFRA = 50; + CHROME_THREAD_SAMPLING_PROFILER = 51; + }; + optional ChromeThreadType chrome_thread_type = 4; + + // Deprecated. Use ClockSnapshot in combination with TracePacket's timestamp + // and timestamp_clock_id fields instead. + optional int64 reference_timestamp_us = 6; + + // Absolute reference values. Clock values in subsequent TrackEvents can be + // encoded accumulatively and relative to these. This reduces their var-int + // encoding size. + // TODO(eseckler): Deprecated. Replace these with ClockSnapshot encoding. + optional int64 reference_thread_time_us = 7; + optional int64 reference_thread_instruction_count = 8; + + // To support old UI. New UI should determine default sorting by thread_type. + optional int32 legacy_sort_index = 3; +} + +// End of protos/perfetto/trace/track_event/thread_descriptor.proto + +// Begin of protos/perfetto/trace/track_event/chrome_process_descriptor.proto + +// Describes the attributes for a Chrome process. Must be paired with a +// ProcessDescriptor in the same TrackDescriptor. +// +// Next id: 6. +message ChromeProcessDescriptor { + // This is a chrome_enums::ProcessType from + // //protos/third_party/chromium/chrome_enums.proto. The enum definition can't + // be imported here because of a dependency loop. + optional int32 process_type = 1; + + optional int32 process_priority = 2; + + // To support old UI. New UI should determine default sorting by process_type. + optional int32 legacy_sort_index = 3; + + // Name of the hosting app for WebView. Used to match renderer processes to + // their hosting apps. + optional string host_app_package_name = 4; + + // The ID to link crashes to trace. + // Notes: + // * The ID is per process. So, each trace may contain many IDs, and you need + // to look for the ID from crashed process to find the crash report. + // * Having a "chrome-trace-id" in crash doesn't necessarily mean we can + // get an uploaded trace, since uploads could have failed. + // * On the other hand, if there was a crash during the session and trace was + // uploaded, it is very likely to find a crash report with the trace ID. + // * This is not crash ID or trace ID. It is just a random 64-bit number + // recorded in both traces and crashes. It is possible to have collisions, + // though very rare. + optional uint64 crash_trace_id = 5; +} + +// End of protos/perfetto/trace/track_event/chrome_process_descriptor.proto + +// Begin of protos/perfetto/trace/track_event/chrome_thread_descriptor.proto + +// Describes a Chrome thread's attributes. Emitted as part of a TrackDescriptor, +// usually by the thread's trace writer. Must be paired with a ThreadDescriptor +// in the same TrackDescriptor. +// +// Next id: 3. +message ChromeThreadDescriptor { + // This is a chrome_enums::ThreadType from + // //protos/third_party/chromium/chrome_enums.proto. The enum definition can't + // be imported here because of a dependency loop. + optional int32 thread_type = 1; + + // To support old UI. New UI should determine default sorting by thread_type. + optional int32 legacy_sort_index = 2; + + // Indicates whether the thread's tid specified in the thread descriptor is + // namespaced by Chromium's sandbox. Only set on Linux, and from Chrome M140. + optional bool is_sandboxed_tid = 3; +} + +// End of protos/perfetto/trace/track_event/chrome_thread_descriptor.proto + +// Begin of protos/perfetto/trace/track_event/counter_descriptor.proto + +// Defines properties of a counter track, e.g. for built-in counters (thread +// time, instruction count, ..) or user-specified counters (e.g. memory usage of +// a specific app component). +// +// Counter tracks only support TYPE_COUNTER track events, which specify new +// values for the counter. For counters that require per-slice values, counter +// values can instead be provided in a more efficient encoding via TrackEvent's +// |extra_counter_track_uuids| and |extra_counter_values| fields. However, +// slice-type events cannot be emitted onto a counter track. +// +// Values for counters that are only emitted on a single packet sequence can +// optionally be delta-encoded, see |is_incremental|. +// +// Next id: 7. +message CounterDescriptor { + // Built-in counters, usually with special meaning in the client library, + // trace processor, legacy JSON format, or UI. Trace processor will infer a + // track name from the enum value if none is provided in TrackDescriptor. + enum BuiltinCounterType { + COUNTER_UNSPECIFIED = 0; + + // Thread-scoped counters. The thread's track should be specified via + // |parent_uuid| in the TrackDescriptor for such a counter. + + // implies UNIT_TIME_NS. + COUNTER_THREAD_TIME_NS = 1; + + // implies UNIT_COUNT. + COUNTER_THREAD_INSTRUCTION_COUNT = 2; + } + + // Type of the values for the counters - to supply lower granularity units, + // see also |unit_multiplier|. + enum Unit { + UNIT_UNSPECIFIED = 0; + UNIT_TIME_NS = 1; + UNIT_COUNT = 2; + UNIT_SIZE_BYTES = 3; + // TODO(eseckler): Support more units as necessary. + } + + // For built-in counters (e.g. thread time). Custom user-specified counters + // (e.g. those emitted by TRACE_COUNTER macros of the client library) + // shouldn't set this, and instead provide a counter name via TrackDescriptor. + optional BuiltinCounterType type = 1; + + // Names of categories of the counter (usually for user-specified counters). + // In the client library, categories are a way to turn groups of individual + // counters (or events) on or off. + repeated string categories = 2; + + // Type of the counter's values. Built-in counters imply a value for this + // field. + optional Unit unit = 3; + + // In order to use a unit not defined as a part of |Unit|, a free-form unit + // name can be used instead. + optional string unit_name = 6; + + // Multiplication factor of this counter's values, e.g. to supply + // COUNTER_THREAD_TIME_NS timestamps in microseconds instead. + optional int64 unit_multiplier = 4; + + // Whether values for this counter are provided as delta values. Only + // supported for counters that are emitted on a single packet-sequence (e.g. + // thread time). Counter values in subsequent packets on the current packet + // sequence will be interpreted as delta values from the sequence's most + // recent value for the counter. When incremental state is cleared, the + // counter value is considered to be reset to 0. Thus, the first value after + // incremental state is cleared is effectively an absolute value. + optional bool is_incremental = 5; + + // TODO(eseckler): Support arguments describing the counter (?). + // repeated DebugAnnotation debug_annotations; + + // When visualizing multiple counter tracks, it is often useful to have them + // share the same Y-axis range. This allows for easy comparison of their + // values. + // + // All counter tracks with the same |y_axis_share_key| and the same parent + // track (e.g. grouped under the same process track) will share their y-axis + // range in the UI. + optional string y_axis_share_key = 7; +} + +// End of protos/perfetto/trace/track_event/counter_descriptor.proto + +// Begin of protos/perfetto/trace/track_event/track_descriptor.proto + +// Defines a track for TrackEvents. Slices and instant events on the same track +// will be nested based on their timestamps, see TrackEvent::Type. +// +// A TrackDescriptor only needs to be emitted by one trace writer / producer and +// is valid for the entirety of the trace. To ensure the descriptor isn't lost +// when the ring buffer wraps, it should be reemitted whenever incremental state +// is cleared. +// +// As a fallback, TrackEvents emitted without an explicit track association will +// be associated with an implicit trace-global track (uuid = 0), see also +// |TrackEvent::track_uuid|. It is possible but not necessary to emit a +// TrackDescriptor for this implicit track. +// +// Next id: 18. +message TrackDescriptor { + // Unique ID that identifies this track. This ID is global to the whole trace. + // Producers should ensure that it is unlikely to clash with IDs emitted by + // other producers. A value of 0 denotes the implicit trace-global track. + // + // For example, legacy TRACE_EVENT macros may use a hash involving the async + // event id + id_scope, pid, and/or tid to compute this ID. + optional uint64 uuid = 1; + + // A parent track reference can be used to describe relationships between + // tracks. For example, to define an asynchronous track which is scoped to a + // specific process, specify the uuid for that process's process track here. + // Similarly, to associate a COUNTER_THREAD_TIME_NS counter track with a + // thread, specify the uuid for that thread's thread track here. In general, + // setting a parent will *nest* that track under the parent in the UI and in + // the trace processor data model (with the important exception noted below). + // + // If not specified, the track will be a root track, i.e. not nested under any + // other track. + // + // Note: if the `thread` or `process` fields are set, this value will be + // *ignored* as priority is given to those fields. + // + // Note: if the parent is set to a track with `thread` or `process` fields + // set, the track will *not* be nested under the parent in the UI and in the + // trace processor data model. Instead, the track will inherit the parent's + // thread/process association and will appear as a *sibling* of the parent. + // This semantic exists for back-compat reasons as the UI used to work this + // way for years and changing this leads to a lot of traces subtly breaking. + // If you want to force nesting, create *another* intermediate track to act as + // the parent. + optional uint64 parent_uuid = 5; + + // Name of the track. + // + // Optional but *strongly recommended* to be specified in a `TrackDescriptor` + // emitted before any `TrackEvent`s on the same track. + // + // Note: any name specified here will be *ignored* for the root thread scoped + // tracks when `disallow_merging_with_system_tracks` is not set, as in this + // case, the name of the track is shared by many different data sources and so + // is centrally controlled by trace processor. + // + // It's strongly recommended to only emit the name for a track uuid *once*. If + // a descriptor *has* to be emitted multiple times (e.g. between different + // processes), it's recommended to ensure that the name is consistent across + // all TrackDescriptors with the same `uuid`. + // + // If the the above recommendation is not followed and the same uuid is + // emitted with different names, it is implementation defined how the final + // name will be chosen and may change at any time. + // + // The current implementation of trace processor chooses the name in the + // following way, depending on the value of the `sibling_merge_behavior` + // field: + // + // 1. If `sibling_merge_behavior` is set to `SIBLING_MERGE_BEHAVIOR_NONE`: + // * The *last* non-null name in the whole trace according to trace order + // will be used. + // * If no non-null name is present in the whole trace, the trace processor + // may fall back to other sources to provide a name for the track (e.g. + // the first event name for slice tracks, the counter name for counter + // tracks). This is implementation defined and may change at any time. + // + // 2. If `sibling_merge_behavior` is set to any other value: + // * The first non-null name before the first event on the track *or on any + // descendant tracks* is processed will be used. For example, consider + // the following sequence of events: + // ts=100: TrackDescriptor(uuid=A) + // ts=200: TrackDescriptor(uuid=B, parent_uuid=A) + // ts=300: TrackDescriptor(uuid=A, name="Track A") + // ts=400: TrackEvent(track_uuid=B) + // In this case, the name for track A will be "Track A" because the + // descriptor with the name was emitted before the first event on a + // descendant track (B). + // * If no non-null name is present before the event is processed, the trace + // processor may fall back to other sources to provide a name for the + // track (e.g. the first event name for slice tracks, the counter name for + // counter tracks). This is implementation defined and may change at any + // time. + // * Note on processing order: In the standard trace processor pipeline, + // `TrackDescriptor`s are processed during a "tokenization" phase, which + // occurs before any `TrackEvent`s are parsed. This means that for a given + // track, all its descriptors in the trace are processed before its + // events. Consequently, the "first non-null name before the first event" + // will be the name from the first `TrackDescriptor` for that track in the + // trace file that has a non-null name. However, in a streaming parsing + // scenario, the timestamp order of descriptors and events is significant, + // and a descriptor arriving after an event has been processed will not be + // used to name the track. + oneof static_or_dynamic_name { + string name = 2; + // This field is only set by the SDK when perfetto::StaticString is + // provided. + string static_name = 10; + // Equivalent to name, used just to mark that the data is coming from + // android.os.Trace. + string atrace_name = 13; + } + + // A human-readable description of the track providing more context about its + // data. In the UI, this is shown in a popup when the track's help button is + // clicked. + optional string description = 14; + + // Associate the track with a process, making it the process-global track. + // There should only be one such track per process (usually for instant + // events; trace processor uses this fact to detect pid reuse). If you need + // more (e.g. for asynchronous events), create child tracks using parent_uuid. + // + // Trace processor will merge events on a process track with slice-type events + // from other sources (e.g. ftrace) for the same process into a single + // timeline view. + optional ProcessDescriptor process = 3; + optional ChromeProcessDescriptor chrome_process = 6; + + // Associate the track with a thread, indicating that the track's events + // describe synchronous code execution on the thread. There should only be one + // such track per thread (trace processor uses this fact to detect tid reuse). + // + // Trace processor will merge events on a thread track with slice-type events + // from other sources (e.g. ftrace) for the same thread into a single timeline + // view. + optional ThreadDescriptor thread = 4; + optional ChromeThreadDescriptor chrome_thread = 7; + + // Descriptor for a counter track. If set, the track will only support + // TYPE_COUNTER TrackEvents (and values provided via TrackEvent's + // |extra_counter_values|). + optional CounterDescriptor counter = 8; + + // If true, forces Trace Processor to use separate tracks for track events + // and system events for the same thread. + // + // Track events timestamps in Chrome have microsecond resolution, while + // system events use nanoseconds. It results in broken event nesting when + // track events and system events share a track. + optional bool disallow_merging_with_system_tracks = 9; + + // Specifies how the UI should display child tracks of this track (i.e. tracks + // where `parent_uuid` is specified to this track `uuid`). Note that this + // value is simply a *hint* to the UI: the UI is not guarnateed to respect + // this if it has a good reason not to do so. + // + // Note: for tracks where `thread` or `process` are set, this option is + // *ignored*. See `parent_uuid` for details. + enum ChildTracksOrdering { + // The default ordering, with no bearing on how the UI will visualise the + // tracks. + UNKNOWN = 0; + + // Order tracks by `name` or `static_name` depending on which one has been + // specified. + LEXICOGRAPHIC = 1; + + // Order tracks by the first `ts` event in a track. + CHRONOLOGICAL = 2; + + // Order tracks by `sibling_order_rank` of child tracks. Child tracks with + // the lower values will be shown before tracks with higher values. Tracks + // with no value will be treated as having 0 rank. + EXPLICIT = 3; + } + optional ChildTracksOrdering child_ordering = 11; + + // An opaque value which allows specifying how two sibling tracks should be + // ordered relative to each other: tracks with lower ranks will appear before + // tracks with higher ranks. An unspecified rank will be treated as a rank of + // 0. + // + // Note: this option is only relevant for tracks where the parent has + // `child_ordering` set to `EXPLICIT`. It is ignored otherwise. + // + // Note: for tracks where the parent has `thread` or `process` are set, this + // option is *ignored* (even if the parent's `child_ordering` is `EXPLICIT``). + // See `parent_uuid` for details. + optional int32 sibling_order_rank = 12; + + // Specifies how the analysis tools should "merge" different sibling + // TrackEvent tracks. + // + // For two or more tracks to be merged, they must be "eligible" siblings. + // Eligibility is determined by the following rules: + // 1. All tracks must have the same parent. + // 2. All tracks must have the same `sibling_merge_behavior`. The only + // exception is `SIBLING_MERGE_BEHAVIOR_UNSPECIFIED` which is treated as + // `SIBLING_MERGE_BEHAVIOR_BY_TRACK_NAME`. + // 3. Depending on the behavior, the corresponding key must match (e.g. `name` + // for `BY_TRACK_NAME`, `sibling_merge_key` for `BY_SIBLING_MERGE_KEY`). + // + // Specifically: + // - in the UI, all tracks which are merged together will be + // displayed as a single "visual" track. + // - in the trace processor, all tracks which are merged together will be + // "multiplexed" into n "analysis" tracks where n is the maximum number + // of tracks which have an active event at the same time. + // + // When tracks are merged togther, the properties for the merged track will be + // chosen from the source tracks based on the following rules: + // - for `sibling_order_rank`: the rank of the merged track will be the + // smallest rank among the source tracks. + // - for all other properties: the property taken is unspecified and can + // be any value provided by one of the source tracks. This can lead to + // non-deterministic behavior. + // - examples of other properties include `name`, `child_ordering` etc. + // - because of this, it's strongly recommended to ensure that all source + // tracks have the same value for these properties. + // - the trace processor will also emit an error stat if it detects + // that the properties are not the same across all source tracks. + // + // Note: merging is done *recursively* so entire trees of tracks can be merged + // together. To make this clearer, consider an example track hierarchy (in + // the diagrams: "smk" refers to "sibling_merge_key", the first word on a + // track line, like "Updater", is its 'name' property): + // + // Initial track hierarchy: + // SystemActivity + // ├── AuthService (smk: "auth_main_cluster") + // │ └── LoginOp (smk: "login_v1") + // ├── AuthService (smk: "auth_main_cluster") + // │ └── LoginOp (smk: "login_v1") + // ├── AuthService (smk: "auth_backup_cluster") + // │ └── GuestOp (smk: "guest_v1") + // └── UserProfileService (smk: "profile_cluster") + // └── GetProfileOp (smk: "getprofile_v1") + // + // Merging outcomes: + // + // Scenario 1: Merging by `SIBLING_MERGE_BEHAVIOR_BY_SIBLING_MERGE_KEY` + // - The first two "AuthService" tracks merge because they share + // `smk: "auth_main_cluster"`. Their names are consistent ("AuthService"), + // aligning with recommendations. The merged track is named "AuthService". + // - The third "AuthService" track (with `smk: "auth_backup_cluster"`) + // remains separate, as its `sibling_merge_key` is different. + // - "UserProfileService" also remains separate. + // - Within the merged "AuthService" (from "auth_main_cluster"): + // "LoginOp" get merged as they have the same sibling merge key. + // + // Resulting UI (when merging by SIBLING_MERGE_KEY): + // SystemActivity + // ├── AuthService (merged by smk: "auth_main_cluster") + // │ ├── LoginOp (merged by smk: "login_v1") + // ├── AuthService (smk: "auth_backup_cluster") + // │ └── GuestOp (smk: "guest_v1") + // └── UserProfileService (smk: "profile_cluster") + // └── GetProfileOp (smk: "getprofile_v1") + // + // Scenario 2: Merging by `SIBLING_MERGE_BEHAVIOR_BY_TRACK_NAME` + // - All three tracks named "AuthService" merge because they share the same + // name. The merged track is named "AuthService". The `sibling_merge_key` + // for this merged track would be taken from one of the source tracks + // (e.g., "auth_main_cluster" or "auth_backup_cluster"), which could be + // relevant if its children had key-based merge behaviors. + // - "UserProfileService" remains separate due to its different name. + // - Within the single merged "AuthService" track: + // "LoginOp", "GuestOp" become siblings. "LoginOp" tracks gets merged as + // they have the same name. + // + // Resulting UI (when merging by SIBLING_MERGE_BEHAVIOR_BY_TRACK_NAME): + // SystemActivity + // ├── AuthService (merged from 3 "AuthService" tracks) + // │ ├── LoginOp (smk: "login_v1") + // │ └── GuestOp (smk: "guest_v1") + // └── UserProfileService (smk: "profile_cluster") + // └── GetProfileOp (smk: "getprofile_v1") + // + // Note: for tracks where `thread` or `process` are set, this option is + // *ignored*. See `parent_uuid` for details. + enum SiblingMergeBehavior { + // When unspecified or not set, defaults to + // `SIBLING_MERGE_BEHAVIOR_BY_TRACK_NAME`. + SIBLING_MERGE_BEHAVIOR_UNSPECIFIED = 0; + + // Merge this track with eligible siblings which have the same `name`. + // + // This is the default behavior.option. + // + // Fun fact: this is the default beahavior for legacy reasons as the UI has + // worked this way for years and inherited this behavior from + // chrome://tracing which has worked this way for even longer + SIBLING_MERGE_BEHAVIOR_BY_TRACK_NAME = 1; + + // Never merge this track with any siblings. Useful if if this track has a + // specific meaning and you want to see separately from any others. + SIBLING_MERGE_BEHAVIOR_NONE = 2; + + // Merge this track with eligible siblings which have the same + // `sibling_merge_key`. + SIBLING_MERGE_BEHAVIOR_BY_SIBLING_MERGE_KEY = 3; + } + optional SiblingMergeBehavior sibling_merge_behavior = 15; + + // An opaque value which allows specifying which tracks should be merged + // together. + // + // Only meaningful when `sibling_merge_behavior` is set to + // `SIBLING_MERGE_BEHAVIOR_BY_SIBLING_MERGE_KEY`. + oneof sibling_merge_key_field { + string sibling_merge_key = 16; + uint64 sibling_merge_key_int = 17; + } +} + +// End of protos/perfetto/trace/track_event/track_descriptor.proto + +// Begin of protos/perfetto/trace/translation/translation_table.proto + +// Translation rules for the trace processor. +// See the comments for each rule type for specific meaning. +message TranslationTable { + oneof table { + ChromeHistorgramTranslationTable chrome_histogram = 1; + ChromeUserEventTranslationTable chrome_user_event = 2; + ChromePerformanceMarkTranslationTable chrome_performance_mark = 3; + SliceNameTranslationTable slice_name = 4; + ProcessTrackNameTranslationTable process_track_name = 5; + ChromeStudyTranslationTable chrome_study = 6; + } +} + +// Chrome histogram sample hash -> name translation rules. +message ChromeHistorgramTranslationTable { + map hash_to_name = 1; +} + +// Chrome user event action hash -> name translation rules. +message ChromeUserEventTranslationTable { + map action_hash_to_name = 1; +} + +// Chrome performance mark translation rules. +message ChromePerformanceMarkTranslationTable { + map site_hash_to_name = 1; + map mark_hash_to_name = 2; +}; + +// Raw -> deobfuscated slice name translation rules. +message SliceNameTranslationTable { + map raw_to_deobfuscated_name = 1; +}; + +// Raw -> deobfuscated process track name translation rules. +message ProcessTrackNameTranslationTable { + map raw_to_deobfuscated_name = 1; +}; + +// Chrome study hash -> name translation rules. +message ChromeStudyTranslationTable { + map hash_to_name = 1; +}; + +// End of protos/perfetto/trace/translation/translation_table.proto + +// Begin of protos/perfetto/trace/trigger.proto + +// When a TracingSession receives a trigger it records the boot time nanoseconds +// in the TracePacket's timestamp field as well as the name of the producer that +// triggered it. We emit this data so filtering can be done on triggers received +// in the trace. +message Trigger { + // Name of the trigger which was received. + optional string trigger_name = 1; + // The actual producer that activated |trigger|. + optional string producer_name = 2; + // The verified UID of the producer. + optional int32 trusted_producer_uid = 3; + // The value of stop_delay_ms from the configuration. + optional uint64 stop_delay_ms = 4; +} + +// End of protos/perfetto/trace/trigger.proto + +// Begin of protos/perfetto/trace/ui_state.proto + +// Common state for UIs visualizing Perfetto traces. +// This message can be appended as a TracePacket by UIs to save the +// visible state (e.g. scroll position/zoom state) for future opening +// of the trace. +// Design doc: go/trace-ui-state. +message UiState { + // The start and end bounds of the viewport of the UI in nanoseconds. + // + // This is the absolute time associated to slices and other events in + // trace processor tables (i.e. the |ts| column of most tables) + optional int64 timeline_start_ts = 1; + optional int64 timeline_end_ts = 2; + + // Indicates that the given process should be highlighted by the UI. + message HighlightProcess { + oneof selector { + // The pid of the process to highlight. This is useful for UIs to focus + // on tracks of a particular process in the trace. + // + // If more than one process in a trace has the same pid, it is UI + // implementation specific how the process to be focused will be + // chosen. + uint32 pid = 1; + + // The command line of the process to highlight; for most Android apps, + // this is the package name of the app. This is useful for UIs to focus + // on a particular app in the trace. + // + // If more than one process hasthe same cmdline, it is UI implementation + // specific how the process to be focused will be chosen. + string cmdline = 2; + } + } + optional HighlightProcess highlight_process = 3; +} +// End of protos/perfetto/trace/ui_state.proto + +// Begin of protos/perfetto/trace/trace_packet.proto + +// TracePacket is the root object of a Perfetto trace. +// A Perfetto trace is a linear sequence of TracePacket(s). +// +// The tracing service guarantees that all TracePacket(s) written by a given +// TraceWriter are seen in-order, without gaps or duplicates. If, for any +// reason, a TraceWriter sequence becomes invalid, no more packets are returned +// to the Consumer (or written into the trace file). +// TracePacket(s) written by different TraceWriter(s), hence even different +// data sources, can be seen in arbitrary order. +// The consumer can re-establish a total order, if interested, using the packet +// timestamps, after having synchronized the different clocks onto a global +// clock. +// +// The tracing service is agnostic of the content of TracePacket, with the +// exception of few fields (e.g.. trusted_*, trace_config) that are written by +// the service itself. +// +// See the [Buffers and Dataflow](/docs/concepts/buffers.md) doc for details. +// +// Next reserved id: 14 (up to 15). +// Next id: 123. +message TracePacket { + // The timestamp of the TracePacket. + // By default this timestamps refers to the trace clock (CLOCK_BOOTTIME on + // Android). It can be overridden using a different timestamp_clock_id. + // The clock domain definition in ClockSnapshot can also override: + // - The unit (default: 1ns). + // - The absolute vs delta encoding (default: absolute timestamp). + optional uint64 timestamp = 8; + + // Specifies the ID of the clock used for the TracePacket |timestamp|. Can be + // one of the built-in types from ClockSnapshot::BuiltinClocks, or a + // producer-defined clock id. + // If unspecified and if no default per-sequence value has been provided via + // TracePacketDefaults, it defaults to BuiltinClocks::BOOTTIME. + optional uint32 timestamp_clock_id = 58; + + oneof data { + ProcessTree process_tree = 2; + ProcessStats process_stats = 9; + InodeFileMap inode_file_map = 4; + ChromeEventBundle chrome_events = 5; + ClockSnapshot clock_snapshot = 6; + SysStats sys_stats = 7; + TrackEvent track_event = 11; + + // IDs up to 15 are reserved. They take only one byte to encode their + // preamble so should be used for frequent events. + + TraceUuid trace_uuid = 89; + TraceConfig trace_config = 33; + // COMMENTED FtraceStats ftrace_stats = 34; + TraceStats trace_stats = 35; + ProfilePacket profile_packet = 37; + StreamingAllocation streaming_allocation = 74; + StreamingFree streaming_free = 75; + BatteryCounters battery = 38; + PowerRails power_rails = 40; + AndroidLogPacket android_log = 39; + SystemInfo system_info = 45; + Trigger trigger = 46; + ChromeTrigger chrome_trigger = 109; + PackagesList packages_list = 47; + ChromeBenchmarkMetadata chrome_benchmark_metadata = 48; + PerfettoMetatrace perfetto_metatrace = 49; + ChromeMetadataPacket chrome_metadata = 51; + GpuCounterEvent gpu_counter_event = 52; + GpuRenderStageEvent gpu_render_stage_event = 53; + StreamingProfilePacket streaming_profile_packet = 54; + HeapGraph heap_graph = 56; + GraphicsFrameEvent graphics_frame_event = 57; + VulkanMemoryEvent vulkan_memory_event = 62; + GpuLog gpu_log = 63; + VulkanApiEvent vulkan_api_event = 65; + PerfSample perf_sample = 66; + CpuInfo cpu_info = 67; + SmapsPacket smaps_packet = 68; + TracingServiceEvent service_event = 69; + InitialDisplayState initial_display_state = 70; + GpuMemTotalEvent gpu_mem_total_event = 71; + MemoryTrackerSnapshot memory_tracker_snapshot = 73; + FrameTimelineEvent frame_timeline_event = 76; + AndroidEnergyEstimationBreakdown android_energy_estimation_breakdown = 77; + UiState ui_state = 78; + AndroidCameraFrameEvent android_camera_frame_event = 80; + AndroidCameraSessionStats android_camera_session_stats = 81; + TranslationTable translation_table = 82; + AndroidGameInterventionList android_game_intervention_list = 83; + StatsdAtom statsd_atom = 84; + AndroidSystemProperty android_system_property = 86; + EntityStateResidency entity_state_residency = 91; + + // Only used in profile packets. + ModuleSymbols module_symbols = 61; + DeobfuscationMapping deobfuscation_mapping = 64; + + // Only used by TrackEvent. + TrackDescriptor track_descriptor = 60; + + // Deprecated, use TrackDescriptor instead. + ProcessDescriptor process_descriptor = 43; + + // Deprecated, use TrackDescriptor instead. + ThreadDescriptor thread_descriptor = 44; + + // Events from the Linux kernel ftrace infrastructure. + // COMMENTED FtraceEventBundle ftrace_events = 1; + + // This field is emitted at periodic intervals (~10s) and + // contains always the binary representation of the UUID + // {82477a76-b28d-42ba-81dc-33326d57a079}. This is used to be able to + // efficiently partition long traces without having to fully parse them. + bytes synchronization_marker = 36; + + // Zero or more proto encoded trace packets compressed using deflate. + // Each compressed_packets TracePacket (including the two field ids and + // sizes) should be less than 512KB. + bytes compressed_packets = 50; + + // Data sources can extend the trace proto with custom extension protos (see + // docs/design-docs/extensions.md). When they do that, the descriptor of + // their extension proto descriptor is serialized in this packet. This + // allows trace_processor to deserialize extended messages using reflection + // even if the extension proto is not checked in the Perfetto repo. + ExtensionDescriptor extension_descriptor = 72; + + // Represents a single packet sent or received by the network. + NetworkPacketEvent network_packet = 88; + + // Represents one or more packets sent or received by the network. + NetworkPacketBundle network_packet_bundle = 92; + + // The "range of interest" for track events. See the message definition + // comments for more details. + TrackEventRangeOfInterest track_event_range_of_interest = 90; + + // Winscope traces + LayersSnapshotProto surfaceflinger_layers_snapshot = 93; + TransactionTraceEntry surfaceflinger_transactions = 94; + ShellTransition shell_transition = 96; + ShellHandlerMappings shell_handler_mappings = 97; + ProtoLogMessage protolog_message = 104; + ProtoLogViewerConfig protolog_viewer_config = 105; + WinscopeExtensions winscope_extensions = 112; + + // Events from the Windows etw infrastructure. + EtwTraceEventBundle etw_events = 95; + + V8JsCode v8_js_code = 99; + V8InternalCode v8_internal_code = 100; + V8WasmCode v8_wasm_code = 101; + V8RegExpCode v8_reg_exp_code = 102; + V8CodeMove v8_code_move = 103; + // Clock synchronization with remote machines. + RemoteClockSync remote_clock_sync = 107; + + PixelModemEvents pixel_modem_events = 110; + PixelModemTokenDatabase pixel_modem_token_database = 111; + + Trigger clone_snapshot_trigger = 113; + + BluetoothTraceEvent bluetooth_trace_event = 114; + + KernelWakelockData kernel_wakelock_data = 115; + + AppWakelockBundle app_wakelock_bundle = 116; + + // Generic events for a standard kernel implementation + GenericKernelTaskStateEvent generic_kernel_task_state_event = 117; + GenericKernelCpuFrequencyEvent generic_kernel_cpu_freq_event = 118; + GenericKernelTaskRenameEvent generic_kernel_task_rename_event = 120; + GenericKernelProcessTree generic_kernel_process_tree = 122; + + CpuPerUidData cpu_per_uid_data = 119; + + EvdevEvent evdev_event = 121; + + // This field is only used for testing. + // In previous versions of this proto this field had the id 268435455 + // This caused many problems: + // - protozero decoder does not handle field ids larger than 999. + // - old versions of protoc produce Java bindings with syntax errors when + // the field id is large enough. + TestEvent for_testing = 900; + } + + // AndroidInputEvent android_input_event (moved to winscope_extensions) + reserved 106; + + // removed ProfiledFrameSymbols profiled_frame_symbols + reserved 55; + + // Trusted user id of the producer which generated this packet. Keep in sync + // with TrustedPacket.trusted_uid. + // + // TODO(eseckler): Emit this field in a PacketSequenceDescriptor message + // instead. + oneof optional_trusted_uid { + int32 trusted_uid = 3; + }; + + // Service-assigned identifier of the packet sequence this packet belongs to. + // Uniquely identifies a producer + writer pair within the tracing session. A + // value of zero denotes an invalid ID. Keep in sync with + // TrustedPacket.trusted_packet_sequence_id. + oneof optional_trusted_packet_sequence_id { + uint32 trusted_packet_sequence_id = 10; + } + + // Trusted process id of the producer which generated this packet, written by + // the service. + optional int32 trusted_pid = 79; + + // Incrementally emitted interned data, valid only on the packet's sequence + // (packets with the same |trusted_packet_sequence_id|). The writer will + // usually emit new interned data in the same TracePacket that first refers to + // it (since the last reset of interning state). It may also be emitted + // proactively in advance of referring to them in later packets. + optional InternedData interned_data = 12; + + enum SequenceFlags { + SEQ_UNSPECIFIED = 0; + + // Set by the writer to indicate that it will re-emit any incremental data + // for the packet's sequence before referring to it again. This includes + // interned data as well as periodically emitted data like + // Process/ThreadDescriptors. This flag only affects the current packet + // sequence (see |trusted_packet_sequence_id|). + // + // When set, this TracePacket and subsequent TracePackets on the same + // sequence will not refer to any incremental data emitted before this + // TracePacket. For example, previously emitted interned data will be + // re-emitted if it is referred to again. + // + // When the reader detects packet loss (|previous_packet_dropped|), it needs + // to skip packets in the sequence until the next one with this flag set, to + // ensure intact incremental data. + SEQ_INCREMENTAL_STATE_CLEARED = 1; + + // This packet requires incremental state, such as TracePacketDefaults or + // InternedData, to be parsed correctly. The trace reader should skip this + // packet if incremental state is not valid on this sequence, i.e. if no + // packet with the SEQ_INCREMENTAL_STATE_CLEARED flag has been seen on the + // current |trusted_packet_sequence_id|. + SEQ_NEEDS_INCREMENTAL_STATE = 2; + }; + optional uint32 sequence_flags = 13; + + // DEPRECATED. Moved to SequenceFlags::SEQ_INCREMENTAL_STATE_CLEARED. + optional bool incremental_state_cleared = 41; + + // Default values for fields of later TracePackets emitted on this packet's + // sequence (TracePackets with the same |trusted_packet_sequence_id|). + // It must be reemitted when incremental state is cleared (see + // |incremental_state_cleared|). + // Requires that any future packet emitted on the same sequence specifies + // the SEQ_NEEDS_INCREMENTAL_STATE flag. + // TracePacketDefaults always override the global defaults for any future + // packet on this sequence (regardless of SEQ_NEEDS_INCREMENTAL_STATE). + optional TracePacketDefaults trace_packet_defaults = 59; + + // Flag set by the service if, for the current packet sequence (see + // |trusted_packet_sequence_id|), either: + // * this is the first packet, or + // * one or multiple packets were dropped since the last packet that the + // consumer read from the sequence. This can happen if chunks in the trace + // buffer are overridden before the consumer could read them when the trace + // is configured in ring buffer mode. + // + // When packet loss occurs, incrementally emitted data (including interned + // data) on the sequence should be considered invalid up until the next packet + // with SEQ_INCREMENTAL_STATE_CLEARED set. + optional bool previous_packet_dropped = 42; + + // Flag set by a producer (starting from SDK v29) if, for the current packet + // sequence (see |trusted_packet_sequence_id|), this is the first packet. + // + // This flag can be used for distinguishing the two situations when + // processing the trace: + // 1. There are no prior events for the sequence because of data loss, e.g. + // due to ring buffer wrapping. + // 2. There are no prior events for the sequence because it didn't start + // before this packet (= there's definitely no preceding data loss). + // + // Given that older SDK versions do not support this flag, this flag not + // being present for a particular sequence does not necessarily imply data + // loss. + optional bool first_packet_on_sequence = 87; + + // The machine ID for identifying trace packets in a multi-machine tracing + // session. Is emitted by the tracing service for producers running on a + // remote host (e.g. a VM guest). For more context: go/crosetto-vm-tracing. + optional uint32 machine_id = 98; +} + +// End of protos/perfetto/trace/trace_packet.proto + +// Begin of protos/perfetto/trace/trace.proto + +message Trace { + repeated TracePacket packet = 1; + + // Do NOT add any other field here. This is just a convenience wrapper for + // the use case of a trace being saved to a file. There are other cases + // (streaming) where TracePacket are directly streamed without being wrapped + // in a Trace proto. Nothing should ever rely on the full trace, all the + // logic should be based on TracePacket(s). +} + +// End of protos/perfetto/trace/trace.proto + diff --git a/trace-perfetto.opam b/trace-perfetto.opam new file mode 100644 index 0000000..feab2ab --- /dev/null +++ b/trace-perfetto.opam @@ -0,0 +1,36 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +version: "0.10" +synopsis: "A backend for trace based on perfetto's protobuf format" +maintainer: ["Simon Cruanes"] +authors: ["Simon Cruanes"] +license: "MIT" +tags: ["trace" "tracing" "perfetto"] +homepage: "https://github.com/c-cube/ocaml-trace" +bug-reports: "https://github.com/c-cube/ocaml-trace/issues" +depends: [ + "ocaml" {>= "4.08"} + "trace" {= version} + "mtime" {>= "2.0"} + "thread-local-storage" {>= "0.2"} + "pbrt" + "dune" {>= "2.9"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "--promote-install-files=false" + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] + ["dune" "install" "-p" name "--create-install-files" name] +] +dev-repo: "git+https://github.com/c-cube/ocaml-trace.git"