| // 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; |
| } |
| |
| 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; |
| |
| // 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; |
| } |
| |
| // 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; |
| } |
| |
| // 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_MAX_ID = 63; |
| |
| reserved 7, 8; |
| |
| // An internal CL (ag/16521245) has taken this for BUILTIN_CLOCK_TSC. |
| // That might get upstreamed later on. Avoid diverging on this ID in future. |
| reserved 9; |
| } |
| |
| // 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/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_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/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; |
| } |
| |
| // End of protos/perfetto/config/android/packages_list_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; |
| } |
| |
| // End of protos/perfetto/config/chrome/chrome_config.proto |
| |
| // Begin of protos/perfetto/config/ftrace/ftrace_config.proto |
| |
| // Next id: 19. |
| message FtraceConfig { |
| repeated string ftrace_events = 1; |
| repeated string atrace_categories = 2; |
| repeated string atrace_apps = 3; |
| // *Per-CPU* buffer size. |
| optional uint32 buffer_size_kb = 10; |
| optional uint32 drain_period_ms = 11; |
| |
| // 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. |
| optional bool enabled = 1; |
| } |
| optional CompactSchedConfig compact_sched = 12; |
| |
| // 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, tetermines 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; |
| |
| // By default the kernel symbolizer is lazily initialized on a deferred task |
| // to reduce ftrace's time-to-start-recording. Unfortunately that makes |
| // ksyms integration tests hard. This flag forces the kernel symbolizer to be |
| // initialized synchronously on the data source start and hence avoiding |
| // timing races in tests. |
| // DEPRECATED in v28 / Android U. This is now the default behavior, setting it |
| // to true is a no-op. |
| optional bool initialize_ksyms_synchronously_for_testing = 14 |
| [deprecated = true]; |
| |
| // 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 instad 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. |
| // TODO(kaleshsingh): implement the logic behind this. Right now this flag |
| // does nothing. |
| optional bool throttle_rss_stat = 15; |
| |
| // 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 list of syscalls that should be recorded by sys_{enter,exit} ftrace |
| // events. When empty, all syscalls are recorded. If neither sys_{enter,exit} |
| // are enabled, this setting has no effect. Example: ["sys_read", "sys_open"]. |
| // Introduced in: Android U. |
| repeated string syscall_events = 18; |
| } |
| |
| // 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/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 |
| |
| 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 [lazy = true]; |
| } |
| |
| // 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; |
| } |
| 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; |
| } |
| |
| // End of protos/perfetto/config/power/android_power_config.proto |
| |
| // Begin of protos/perfetto/config/process_stats/process_stats_config.proto |
| |
| 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]; |
| |
| 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. |
| // TODO(primiano): add CPU cost for change this value. |
| optional uint32 proc_stats_poll_ms = 4; |
| |
| // If empty samples stats for all processes. If non empty samples stats only |
| // for processes matching the given string in their argv0 (i.e. the first |
| // entry of /proc/pid/cmdline). |
| // TODO(primiano): implement this feature. |
| // repeated string proc_stats_filter = 5; |
| |
| // This is required to be either = 0 or a multiple of |proc_stats_poll_ms| |
| // (default: |proc_stats_poll_ms|). If = 0, will be set to |
| // |proc_stats_poll_ms|. Non-multiples will be rounded down to the nearest |
| // multiple. |
| optional uint32 proc_stats_cache_ttl_ms = 6; |
| |
| // DEPRECATED record_thread_time_in_state |
| reserved 7; |
| |
| // DEPRECATED 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: 27 |
| 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 |
| |
| // 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/<pid>/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 |
| |
| // Begin of protos/perfetto/common/perf_events.proto |
| |
| // Next id: 12 |
| message PerfEvents { |
| // What event to sample on, and how often. Commented from the perspective of |
| // its use in |PerfEventConfig|. |
| message Timebase { |
| // How often the per-cpu sampling will occur. Not guaranteed to be honored |
| // as the kernel can throttle the sampling rate if it's too high. |
| // If unset, an implementation-defined 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. |
| 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. |
| uint64 period = 1; |
| } |
| |
| // Counting event to use as a timebase for the sampling. |
| // If unset, implies the CPU timer (SW_CPU_CLOCK) as the event, |
| // which is what you usually want. |
| // See common/perf_events.proto for the definitions. |
| oneof event { |
| Counter counter = 4; |
| Tracepoint tracepoint = 3; |
| RawEvent raw_event = 5; |
| } |
| |
| // 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; |
| } |
| } |
| |
| // End of protos/perfetto/common/perf_events.proto |
| |
| // 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: 19 |
| message PerfEventConfig { |
| // What event to sample on, and how often. |
| // Defined in common/perf_events.proto. |
| optional PerfEvents.Timebase timebase = 15; |
| |
| // 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; |
| |
| // |
| // 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; |
| |
| // |
| // Uncommon options: |
| // |
| |
| // Timeout for the remote /proc/<pid>/{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 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. |
| // If unset, the cached state will not be cleared. |
| 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/<pid>/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; |
| } |
| } |
| |
| // End of protos/perfetto/config/profiling/perf_event_config.proto |
| |
| // Begin of protos/perfetto/config/statsd/atom_ids.proto |
| |
| enum AtomId { |
| BLE_SCAN_STATE_CHANGED = 2; |
| PROCESS_STATE_CHANGED = 3; |
| BLE_SCAN_RESULT_RECEIVED = 4; |
| SENSOR_STATE_CHANGED = 5; |
| GPS_SCAN_STATE_CHANGED = 6; |
| SYNC_STATE_CHANGED = 7; |
| SCHEDULED_JOB_STATE_CHANGED = 8; |
| SCREEN_BRIGHTNESS_CHANGED = 9; |
| WAKELOCK_STATE_CHANGED = 10; |
| LONG_PARTIAL_WAKELOCK_STATE_CHANGED = 11; |
| MOBILE_RADIO_POWER_STATE_CHANGED = 12; |
| WIFI_RADIO_POWER_STATE_CHANGED = 13; |
| ACTIVITY_MANAGER_SLEEP_STATE_CHANGED = 14; |
| MEMORY_FACTOR_STATE_CHANGED = 15; |
| EXCESSIVE_CPU_USAGE_REPORTED = 16; |
| CACHED_KILL_REPORTED = 17; |
| PROCESS_MEMORY_STAT_REPORTED = 18; |
| LAUNCHER_EVENT = 19; |
| BATTERY_SAVER_MODE_STATE_CHANGED = 20; |
| DEVICE_IDLE_MODE_STATE_CHANGED = 21; |
| DEVICE_IDLING_MODE_STATE_CHANGED = 22; |
| AUDIO_STATE_CHANGED = 23; |
| MEDIA_CODEC_STATE_CHANGED = 24; |
| CAMERA_STATE_CHANGED = 25; |
| FLASHLIGHT_STATE_CHANGED = 26; |
| UID_PROCESS_STATE_CHANGED = 27; |
| PROCESS_LIFE_CYCLE_STATE_CHANGED = 28; |
| SCREEN_STATE_CHANGED = 29; |
| BATTERY_LEVEL_CHANGED = 30; |
| CHARGING_STATE_CHANGED = 31; |
| PLUGGED_STATE_CHANGED = 32; |
| INTERACTIVE_STATE_CHANGED = 33; |
| TOUCH_EVENT_REPORTED = 34; |
| WAKEUP_ALARM_OCCURRED = 35; |
| KERNEL_WAKEUP_REPORTED = 36; |
| WIFI_LOCK_STATE_CHANGED = 37; |
| WIFI_SIGNAL_STRENGTH_CHANGED = 38; |
| WIFI_SCAN_STATE_CHANGED = 39; |
| PHONE_SIGNAL_STRENGTH_CHANGED = 40; |
| SETTING_CHANGED = 41; |
| ACTIVITY_FOREGROUND_STATE_CHANGED = 42; |
| ISOLATED_UID_CHANGED = 43; |
| PACKET_WAKEUP_OCCURRED = 44; |
| WALL_CLOCK_TIME_SHIFTED = 45; |
| ANOMALY_DETECTED = 46; |
| APP_BREADCRUMB_REPORTED = 47; |
| APP_START_OCCURRED = 48; |
| APP_START_CANCELED = 49; |
| APP_START_FULLY_DRAWN = 50; |
| LMK_KILL_OCCURRED = 51; |
| PICTURE_IN_PICTURE_STATE_CHANGED = 52; |
| WIFI_MULTICAST_LOCK_STATE_CHANGED = 53; |
| LMK_STATE_CHANGED = 54; |
| APP_START_MEMORY_STATE_CAPTURED = 55; |
| SHUTDOWN_SEQUENCE_REPORTED = 56; |
| BOOT_SEQUENCE_REPORTED = 57; |
| DAVEY_OCCURRED = 58; |
| OVERLAY_STATE_CHANGED = 59; |
| FOREGROUND_SERVICE_STATE_CHANGED = 60; |
| CALL_STATE_CHANGED = 61; |
| KEYGUARD_STATE_CHANGED = 62; |
| KEYGUARD_BOUNCER_STATE_CHANGED = 63; |
| KEYGUARD_BOUNCER_PASSWORD_ENTERED = 64; |
| APP_DIED = 65; |
| RESOURCE_CONFIGURATION_CHANGED = 66; |
| BLUETOOTH_ENABLED_STATE_CHANGED = 67; |
| BLUETOOTH_CONNECTION_STATE_CHANGED = 68; |
| GPS_SIGNAL_QUALITY_CHANGED = 69; |
| USB_CONNECTOR_STATE_CHANGED = 70; |
| SPEAKER_IMPEDANCE_REPORTED = 71; |
| HARDWARE_FAILED = 72; |
| PHYSICAL_DROP_DETECTED = 73; |
| CHARGE_CYCLES_REPORTED = 74; |
| MOBILE_CONNECTION_STATE_CHANGED = 75; |
| MOBILE_RADIO_TECHNOLOGY_CHANGED = 76; |
| USB_DEVICE_ATTACHED = 77; |
| APP_CRASH_OCCURRED = 78; |
| ANR_OCCURRED = 79; |
| WTF_OCCURRED = 80; |
| LOW_MEM_REPORTED = 81; |
| GENERIC_ATOM = 82; |
| KEY_VALUE_PAIRS_ATOM = 83; |
| VIBRATOR_STATE_CHANGED = 84; |
| DEFERRED_JOB_STATS_REPORTED = 85; |
| THERMAL_THROTTLING = 86; |
| BIOMETRIC_ACQUIRED = 87; |
| BIOMETRIC_AUTHENTICATED = 88; |
| BIOMETRIC_ERROR_OCCURRED = 89; |
| UI_EVENT_REPORTED = 90; |
| BATTERY_HEALTH_SNAPSHOT = 91; |
| SLOW_IO = 92; |
| BATTERY_CAUSED_SHUTDOWN = 93; |
| PHONE_SERVICE_STATE_CHANGED = 94; |
| PHONE_STATE_CHANGED = 95; |
| USER_RESTRICTION_CHANGED = 96; |
| SETTINGS_UI_CHANGED = 97; |
| CONNECTIVITY_STATE_CHANGED = 98; |
| SERVICE_STATE_CHANGED = 99; |
| SERVICE_LAUNCH_REPORTED = 100; |
| FLAG_FLIP_UPDATE_OCCURRED = 101; |
| BINARY_PUSH_STATE_CHANGED = 102; |
| DEVICE_POLICY_EVENT = 103; |
| DOCS_UI_FILE_OP_CANCELED = 104; |
| DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED = 105; |
| DOCS_UI_FILE_OP_FAILURE = 106; |
| DOCS_UI_PROVIDER_FILE_OP = 107; |
| DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST = 108; |
| DOCS_UI_LAUNCH_REPORTED = 109; |
| DOCS_UI_ROOT_VISITED = 110; |
| DOCS_UI_STARTUP_MS = 111; |
| DOCS_UI_USER_ACTION_REPORTED = 112; |
| WIFI_ENABLED_STATE_CHANGED = 113; |
| WIFI_RUNNING_STATE_CHANGED = 114; |
| APP_COMPACTED = 115; |
| NETWORK_DNS_EVENT_REPORTED = 116; |
| DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED = 117; |
| DOCS_UI_PICK_RESULT_REPORTED = 118; |
| DOCS_UI_SEARCH_MODE_REPORTED = 119; |
| DOCS_UI_SEARCH_TYPE_REPORTED = 120; |
| DATA_STALL_EVENT = 121; |
| RESCUE_PARTY_RESET_REPORTED = 122; |
| SIGNED_CONFIG_REPORTED = 123; |
| GNSS_NI_EVENT_REPORTED = 124; |
| BLUETOOTH_LINK_LAYER_CONNECTION_EVENT = 125; |
| BLUETOOTH_ACL_CONNECTION_STATE_CHANGED = 126; |
| BLUETOOTH_SCO_CONNECTION_STATE_CHANGED = 127; |
| APP_DOWNGRADED = 128; |
| APP_OPTIMIZED_AFTER_DOWNGRADED = 129; |
| LOW_STORAGE_STATE_CHANGED = 130; |
| GNSS_NFW_NOTIFICATION_REPORTED = 131; |
| GNSS_CONFIGURATION_REPORTED = 132; |
| USB_PORT_OVERHEAT_EVENT_REPORTED = 133; |
| NFC_ERROR_OCCURRED = 134; |
| NFC_STATE_CHANGED = 135; |
| NFC_BEAM_OCCURRED = 136; |
| NFC_CARDEMULATION_OCCURRED = 137; |
| NFC_TAG_OCCURRED = 138; |
| NFC_HCE_TRANSACTION_OCCURRED = 139; |
| SE_STATE_CHANGED = 140; |
| SE_OMAPI_REPORTED = 141; |
| BROADCAST_DISPATCH_LATENCY_REPORTED = 142; |
| ATTENTION_MANAGER_SERVICE_RESULT_REPORTED = 143; |
| ADB_CONNECTION_CHANGED = 144; |
| SPEECH_DSP_STAT_REPORTED = 145; |
| USB_CONTAMINANT_REPORTED = 146; |
| WATCHDOG_ROLLBACK_OCCURRED = 147; |
| BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED = 148; |
| BUBBLE_UI_CHANGED = 149; |
| SCHEDULED_JOB_CONSTRAINT_CHANGED = 150; |
| BLUETOOTH_ACTIVE_DEVICE_CHANGED = 151; |
| BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED = 152; |
| BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED = 153; |
| BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED = 154; |
| BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED = 155; |
| BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED = 156; |
| BLUETOOTH_DEVICE_RSSI_REPORTED = 157; |
| BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED = 158; |
| BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED = 159; |
| BLUETOOTH_HCI_TIMEOUT_REPORTED = 160; |
| BLUETOOTH_QUALITY_REPORT_REPORTED = 161; |
| BLUETOOTH_DEVICE_INFO_REPORTED = 162; |
| BLUETOOTH_REMOTE_VERSION_INFO_REPORTED = 163; |
| BLUETOOTH_SDP_ATTRIBUTE_REPORTED = 164; |
| BLUETOOTH_BOND_STATE_CHANGED = 165; |
| BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED = 166; |
| BLUETOOTH_SMP_PAIRING_EVENT_REPORTED = 167; |
| SCREEN_TIMEOUT_EXTENSION_REPORTED = 168; |
| PROCESS_START_TIME = 169; |
| PERMISSION_GRANT_REQUEST_RESULT_REPORTED = 170; |
| BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED = 171; |
| DEVICE_IDENTIFIER_ACCESS_DENIED = 172; |
| BUBBLE_DEVELOPER_ERROR_REPORTED = 173; |
| ASSIST_GESTURE_STAGE_REPORTED = 174; |
| ASSIST_GESTURE_FEEDBACK_REPORTED = 175; |
| ASSIST_GESTURE_PROGRESS_REPORTED = 176; |
| TOUCH_GESTURE_CLASSIFIED = 177; |
| HIDDEN_API_USED = 178; |
| STYLE_UI_CHANGED = 179; |
| PRIVACY_INDICATORS_INTERACTED = 180; |
| APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED = 181; |
| NETWORK_STACK_REPORTED = 182; |
| APP_MOVED_STORAGE_REPORTED = 183; |
| BIOMETRIC_ENROLLED = 184; |
| SYSTEM_SERVER_WATCHDOG_OCCURRED = 185; |
| TOMB_STONE_OCCURRED = 186; |
| BLUETOOTH_CLASS_OF_DEVICE_REPORTED = 187; |
| INTELLIGENCE_EVENT_REPORTED = 188; |
| THERMAL_THROTTLING_SEVERITY_STATE_CHANGED = 189; |
| ROLE_REQUEST_RESULT_REPORTED = 190; |
| MEDIAMETRICS_AUDIOPOLICY_REPORTED = 191; |
| MEDIAMETRICS_AUDIORECORD_REPORTED = 192; |
| MEDIAMETRICS_AUDIOTHREAD_REPORTED = 193; |
| MEDIAMETRICS_AUDIOTRACK_REPORTED = 194; |
| MEDIAMETRICS_CODEC_REPORTED = 195; |
| MEDIAMETRICS_DRM_WIDEVINE_REPORTED = 196; |
| MEDIAMETRICS_EXTRACTOR_REPORTED = 197; |
| MEDIAMETRICS_MEDIADRM_REPORTED = 198; |
| MEDIAMETRICS_NUPLAYER_REPORTED = 199; |
| MEDIAMETRICS_RECORDER_REPORTED = 200; |
| MEDIAMETRICS_DRMMANAGER_REPORTED = 201; |
| CAR_POWER_STATE_CHANGED = 203; |
| GARAGE_MODE_INFO = 204; |
| TEST_ATOM_REPORTED = 205; |
| CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED = 206; |
| CONTENT_CAPTURE_SERVICE_EVENTS = 207; |
| CONTENT_CAPTURE_SESSION_EVENTS = 208; |
| CONTENT_CAPTURE_FLUSHED = 209; |
| LOCATION_MANAGER_API_USAGE_REPORTED = 210; |
| REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED = 211; |
| RUNTIME_PERMISSIONS_UPGRADE_RESULT = 212; |
| GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS = 213; |
| LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION = 214; |
| APP_PERMISSION_FRAGMENT_ACTION_REPORTED = 215; |
| APP_PERMISSION_FRAGMENT_VIEWED = 216; |
| APP_PERMISSIONS_FRAGMENT_VIEWED = 217; |
| PERMISSION_APPS_FRAGMENT_VIEWED = 218; |
| TEXT_SELECTION_EVENT = 219; |
| TEXT_LINKIFY_EVENT = 220; |
| CONVERSATION_ACTIONS_EVENT = 221; |
| LANGUAGE_DETECTION_EVENT = 222; |
| EXCLUSION_RECT_STATE_CHANGED = 223; |
| BACK_GESTURE_REPORTED_REPORTED = 224; |
| UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED = 225; |
| UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED = 226; |
| CAMERA_ACTION_EVENT = 227; |
| APP_COMPATIBILITY_CHANGE_REPORTED = 228; |
| PERFETTO_UPLOADED = 229; |
| VMS_CLIENT_CONNECTION_STATE_CHANGED = 230; |
| MEDIA_PROVIDER_SCAN_OCCURRED = 233; |
| MEDIA_CONTENT_DELETED = 234; |
| MEDIA_PROVIDER_PERMISSION_REQUESTED = 235; |
| MEDIA_PROVIDER_SCHEMA_CHANGED = 236; |
| MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED = 237; |
| REBOOT_ESCROW_RECOVERY_REPORTED = 238; |
| BOOT_TIME_EVENT_DURATION_REPORTED = 239; |
| BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED = 240; |
| BOOT_TIME_EVENT_UTC_TIME_REPORTED = 241; |
| BOOT_TIME_EVENT_ERROR_CODE_REPORTED = 242; |
| USERSPACE_REBOOT_REPORTED = 243; |
| NOTIFICATION_REPORTED = 244; |
| NOTIFICATION_PANEL_REPORTED = 245; |
| NOTIFICATION_CHANNEL_MODIFIED = 246; |
| INTEGRITY_CHECK_RESULT_REPORTED = 247; |
| INTEGRITY_RULES_PUSHED = 248; |
| CB_MESSAGE_REPORTED = 249; |
| CB_MESSAGE_ERROR = 250; |
| WIFI_HEALTH_STAT_REPORTED = 251; |
| WIFI_FAILURE_STAT_REPORTED = 252; |
| WIFI_CONNECTION_RESULT_REPORTED = 253; |
| APP_FREEZE_CHANGED = 254; |
| SNAPSHOT_MERGE_REPORTED = 255; |
| FOREGROUND_SERVICE_APP_OP_SESSION_ENDED = 256; |
| DISPLAY_JANK_REPORTED = 257; |
| APP_STANDBY_BUCKET_CHANGED = 258; |
| SHARESHEET_STARTED = 259; |
| RANKING_SELECTED = 260; |
| TVSETTINGS_UI_INTERACTED = 261; |
| LAUNCHER_SNAPSHOT = 262; |
| PACKAGE_INSTALLER_V2_REPORTED = 263; |
| USER_LIFECYCLE_JOURNEY_REPORTED = 264; |
| USER_LIFECYCLE_EVENT_OCCURRED = 265; |
| ACCESSIBILITY_SHORTCUT_REPORTED = 266; |
| ACCESSIBILITY_SERVICE_REPORTED = 267; |
| DOCS_UI_DRAG_AND_DROP_REPORTED = 268; |
| APP_USAGE_EVENT_OCCURRED = 269; |
| AUTO_REVOKE_NOTIFICATION_CLICKED = 270; |
| AUTO_REVOKE_FRAGMENT_APP_VIEWED = 271; |
| AUTO_REVOKED_APP_INTERACTION = 272; |
| APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION = 273; |
| EVS_USAGE_STATS_REPORTED = 274; |
| AUDIO_POWER_USAGE_DATA_REPORTED = 275; |
| TV_TUNER_STATE_CHANGED = 276; |
| MEDIAOUTPUT_OP_SWITCH_REPORTED = 277; |
| CB_MESSAGE_FILTERED = 278; |
| TV_TUNER_DVR_STATUS = 279; |
| TV_CAS_SESSION_OPEN_STATUS = 280; |
| ASSISTANT_INVOCATION_REPORTED = 281; |
| DISPLAY_WAKE_REPORTED = 282; |
| CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED = 283; |
| CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED = 284; |
| CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED = 285; |
| CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED = 286; |
| CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED = 287; |
| CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED = 288; |
| CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED = 289; |
| NETWORK_IP_PROVISIONING_REPORTED = 290; |
| NETWORK_DHCP_RENEW_REPORTED = 291; |
| NETWORK_VALIDATION_REPORTED = 292; |
| NETWORK_STACK_QUIRK_REPORTED = 293; |
| MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED = 294; |
| MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED = 295; |
| MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED = 296; |
| MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED = 297; |
| BLOB_COMMITTED = 298; |
| BLOB_LEASED = 299; |
| BLOB_OPENED = 300; |
| CONTACTS_PROVIDER_STATUS_REPORTED = 301; |
| KEYSTORE_KEY_EVENT_REPORTED = 302; |
| NETWORK_TETHERING_REPORTED = 303; |
| IME_TOUCH_REPORTED = 304; |
| UI_INTERACTION_FRAME_INFO_REPORTED = 305; |
| UI_ACTION_LATENCY_REPORTED = 306; |
| WIFI_DISCONNECT_REPORTED = 307; |
| WIFI_CONNECTION_STATE_CHANGED = 308; |
| HDMI_CEC_ACTIVE_SOURCE_CHANGED = 309; |
| HDMI_CEC_MESSAGE_REPORTED = 310; |
| AIRPLANE_MODE = 311; |
| MODEM_RESTART = 312; |
| CARRIER_ID_MISMATCH_REPORTED = 313; |
| CARRIER_ID_TABLE_UPDATED = 314; |
| DATA_STALL_RECOVERY_REPORTED = 315; |
| MEDIAMETRICS_MEDIAPARSER_REPORTED = 316; |
| TLS_HANDSHAKE_REPORTED = 317; |
| TEXT_CLASSIFIER_API_USAGE_REPORTED = 318; |
| CAR_WATCHDOG_KILL_STATS_REPORTED = 319; |
| MEDIAMETRICS_PLAYBACK_REPORTED = 320; |
| MEDIA_NETWORK_INFO_CHANGED = 321; |
| MEDIA_PLAYBACK_STATE_CHANGED = 322; |
| MEDIA_PLAYBACK_ERROR_REPORTED = 323; |
| MEDIA_PLAYBACK_TRACK_CHANGED = 324; |
| WIFI_SCAN_REPORTED = 325; |
| WIFI_PNO_SCAN_REPORTED = 326; |
| TIF_TUNE_CHANGED = 327; |
| AUTO_ROTATE_REPORTED = 328; |
| PERFETTO_TRIGGER = 329; |
| TRANSCODING_DATA = 330; |
| IMS_SERVICE_ENTITLEMENT_UPDATED = 331; |
| ART_DATUM_REPORTED = 332; |
| DEVICE_ROTATED = 333; |
| SIM_SPECIFIC_SETTINGS_RESTORED = 334; |
| PIN_STORAGE_EVENT = 336; |
| FACE_DOWN_REPORTED = 337; |
| BLUETOOTH_HAL_CRASH_REASON_REPORTED = 338; |
| REBOOT_ESCROW_PREPARATION_REPORTED = 339; |
| REBOOT_ESCROW_LSKF_CAPTURE_REPORTED = 340; |
| REBOOT_ESCROW_REBOOT_REPORTED = 341; |
| BINDER_LATENCY_REPORTED = 342; |
| MEDIAMETRICS_AAUDIOSTREAM_REPORTED = 343; |
| MEDIA_TRANSCODING_SESSION_ENDED = 344; |
| MAGNIFICATION_USAGE_REPORTED = 345; |
| MAGNIFICATION_MODE_WITH_IME_ON_REPORTED = 346; |
| APP_SEARCH_CALL_STATS_REPORTED = 347; |
| APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED = 348; |
| DEVICE_CONTROL_CHANGED = 349; |
| DEVICE_STATE_CHANGED = 350; |
| INPUTDEVICE_REGISTERED = 351; |
| SMARTSPACE_CARD_REPORTED = 352; |
| AUTH_PROMPT_AUTHENTICATE_INVOKED = 353; |
| AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED = 354; |
| AUTH_ENROLL_ACTION_INVOKED = 355; |
| AUTH_DEPRECATED_API_USED = 356; |
| UNATTENDED_REBOOT_OCCURRED = 357; |
| LONG_REBOOT_BLOCKING_REPORTED = 358; |
| LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED = 359; |
| FDTRACK_EVENT_OCCURRED = 364; |
| TIMEOUT_AUTO_EXTENDED_REPORTED = 365; |
| ODREFRESH_REPORTED = 366; |
| ALARM_BATCH_DELIVERED = 367; |
| ALARM_SCHEDULED = 368; |
| CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED = 369; |
| USER_LEVEL_HIBERNATION_STATE_CHANGED = 370; |
| APP_SEARCH_INITIALIZE_STATS_REPORTED = 371; |
| APP_SEARCH_QUERY_STATS_REPORTED = 372; |
| APP_PROCESS_DIED = 373; |
| NETWORK_IP_REACHABILITY_MONITOR_REPORTED = 374; |
| SLOW_INPUT_EVENT_REPORTED = 375; |
| ANR_OCCURRED_PROCESSING_STARTED = 376; |
| APP_SEARCH_REMOVE_STATS_REPORTED = 377; |
| MEDIA_CODEC_REPORTED = 378; |
| PERMISSION_USAGE_FRAGMENT_INTERACTION = 379; |
| PERMISSION_DETAILS_INTERACTION = 380; |
| PRIVACY_SENSOR_TOGGLE_INTERACTION = 381; |
| PRIVACY_TOGGLE_DIALOG_INTERACTION = 382; |
| APP_SEARCH_OPTIMIZE_STATS_REPORTED = 383; |
| APP_COMPAT_STATE_CHANGED = 386; |
| SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED = 387; |
| SPLITSCREEN_UI_CHANGED = 388; |
| BLUETOOTH_CODE_PATH_COUNTER = 390; |
| BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY = 392; |
| ACCESSIBILITY_FLOATING_MENU_UI_CHANGED = 393; |
| NEURALNETWORKS_COMPILATION_COMPLETED = 394; |
| NEURALNETWORKS_EXECUTION_COMPLETED = 395; |
| NEURALNETWORKS_COMPILATION_FAILED = 396; |
| NEURALNETWORKS_EXECUTION_FAILED = 397; |
| VM_CREATION_REQUESTED = 409; |
| CAMERA_COMPAT_CONTROL_EVENT_REPORTED = 411; |
| TRACING_SERVICE_REPORT_EVENT = 424; |
| EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED = 419; |
| ISOLATED_COMPILATION_SCHEDULED = 457; |
| ISOLATED_COMPILATION_ENDED = 458; |
| TELEPHONY_ANOMALY_DETECTED = 461; |
| HOTWORD_DETECTOR_CREATE_REQUESTED = 430; |
| HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED = 431; |
| HOTWORD_DETECTION_SERVICE_RESTARTED = 432; |
| HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED = 433; |
| HOTWORD_DETECTOR_EVENTS = 434; |
| REMOTE_KEY_PROVISIONING_ATTEMPT = 463; |
| REMOTE_KEY_PROVISIONING_NETWORK_INFO = 464; |
| REMOTE_KEY_PROVISIONING_TIMING = 465; |
| WIFI_BYTES_TRANSFER = 10000; |
| WIFI_BYTES_TRANSFER_BY_FG_BG = 10001; |
| MOBILE_BYTES_TRANSFER = 10002; |
| MOBILE_BYTES_TRANSFER_BY_FG_BG = 10003; |
| BLUETOOTH_BYTES_TRANSFER = 10006; |
| KERNEL_WAKELOCK = 10004; |
| SUBSYSTEM_SLEEP_STATE = 10005; |
| CPU_TIME_PER_UID = 10009; |
| CPU_TIME_PER_UID_FREQ = 10010; |
| WIFI_ACTIVITY_INFO = 10011; |
| MODEM_ACTIVITY_INFO = 10012; |
| BLUETOOTH_ACTIVITY_INFO = 10007; |
| PROCESS_MEMORY_STATE = 10013; |
| SYSTEM_ELAPSED_REALTIME = 10014; |
| SYSTEM_UPTIME = 10015; |
| CPU_ACTIVE_TIME = 10016; |
| CPU_CLUSTER_TIME = 10017; |
| DISK_SPACE = 10018; |
| REMAINING_BATTERY_CAPACITY = 10019; |
| FULL_BATTERY_CAPACITY = 10020; |
| TEMPERATURE = 10021; |
| BINDER_CALLS = 10022; |
| BINDER_CALLS_EXCEPTIONS = 10023; |
| LOOPER_STATS = 10024; |
| DISK_STATS = 10025; |
| DIRECTORY_USAGE = 10026; |
| APP_SIZE = 10027; |
| CATEGORY_SIZE = 10028; |
| PROC_STATS = 10029; |
| BATTERY_VOLTAGE = 10030; |
| NUM_FINGERPRINTS_ENROLLED = 10031; |
| DISK_IO = 10032; |
| POWER_PROFILE = 10033; |
| PROC_STATS_PKG_PROC = 10034; |
| PROCESS_CPU_TIME = 10035; |
| CPU_TIME_PER_THREAD_FREQ = 10037; |
| ON_DEVICE_POWER_MEASUREMENT = 10038; |
| DEVICE_CALCULATED_POWER_USE = 10039; |
| DEVICE_CALCULATED_POWER_BLAME_UID = 10040; |
| DEVICE_CALCULATED_POWER_BLAME_OTHER = 10041; |
| PROCESS_MEMORY_HIGH_WATER_MARK = 10042; |
| BATTERY_LEVEL = 10043; |
| BUILD_INFORMATION = 10044; |
| BATTERY_CYCLE_COUNT = 10045; |
| DEBUG_ELAPSED_CLOCK = 10046; |
| DEBUG_FAILING_ELAPSED_CLOCK = 10047; |
| NUM_FACES_ENROLLED = 10048; |
| ROLE_HOLDER = 10049; |
| DANGEROUS_PERMISSION_STATE = 10050; |
| TRAIN_INFO = 10051; |
| TIME_ZONE_DATA_INFO = 10052; |
| EXTERNAL_STORAGE_INFO = 10053; |
| GPU_STATS_GLOBAL_INFO = 10054; |
| GPU_STATS_APP_INFO = 10055; |
| SYSTEM_ION_HEAP_SIZE = 10056; |
| APPS_ON_EXTERNAL_STORAGE_INFO = 10057; |
| FACE_SETTINGS = 10058; |
| COOLING_DEVICE = 10059; |
| APP_OPS = 10060; |
| PROCESS_SYSTEM_ION_HEAP_SIZE = 10061; |
| SURFACEFLINGER_STATS_GLOBAL_INFO = 10062; |
| SURFACEFLINGER_STATS_LAYER_INFO = 10063; |
| PROCESS_MEMORY_SNAPSHOT = 10064; |
| VMS_CLIENT_STATS = 10065; |
| NOTIFICATION_REMOTE_VIEWS = 10066; |
| DANGEROUS_PERMISSION_STATE_SAMPLED = 10067; |
| GRAPHICS_STATS = 10068; |
| RUNTIME_APP_OP_ACCESS = 10069; |
| ION_HEAP_SIZE = 10070; |
| PACKAGE_NOTIFICATION_PREFERENCES = 10071; |
| PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES = 10072; |
| PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES = 10073; |
| GNSS_STATS = 10074; |
| ATTRIBUTED_APP_OPS = 10075; |
| VOICE_CALL_SESSION = 10076; |
| VOICE_CALL_RAT_USAGE = 10077; |
| SIM_SLOT_STATE = 10078; |
| SUPPORTED_RADIO_ACCESS_FAMILY = 10079; |
| SETTING_SNAPSHOT = 10080; |
| BLOB_INFO = 10081; |
| DATA_USAGE_BYTES_TRANSFER = 10082; |
| BYTES_TRANSFER_BY_TAG_AND_METERED = 10083; |
| DND_MODE_RULE = 10084; |
| GENERAL_EXTERNAL_STORAGE_ACCESS_STATS = 10085; |
| INCOMING_SMS = 10086; |
| OUTGOING_SMS = 10087; |
| CARRIER_ID_TABLE_VERSION = 10088; |
| DATA_CALL_SESSION = 10089; |
| CELLULAR_SERVICE_STATE = 10090; |
| CELLULAR_DATA_SERVICE_SWITCH = 10091; |
| SYSTEM_MEMORY = 10092; |
| IMS_REGISTRATION_TERMINATION = 10093; |
| IMS_REGISTRATION_STATS = 10094; |
| CPU_TIME_PER_CLUSTER_FREQ = 10095; |
| CPU_CYCLES_PER_UID_CLUSTER = 10096; |
| DEVICE_ROTATED_DATA = 10097; |
| CPU_CYCLES_PER_THREAD_GROUP_CLUSTER = 10098; |
| MEDIA_DRM_ACTIVITY_INFO = 10099; |
| OEM_MANAGED_BYTES_TRANSFER = 10100; |
| GNSS_POWER_STATS = 10101; |
| TIME_ZONE_DETECTOR_STATE = 10102; |
| KEYSTORE2_STORAGE_STATS = 10103; |
| RKP_POOL_STATS = 10104; |
| PROCESS_DMABUF_MEMORY = 10105; |
| PENDING_ALARM_INFO = 10106; |
| USER_LEVEL_HIBERNATED_APPS = 10107; |
| LAUNCHER_LAYOUT_SNAPSHOT = 10108; |
| GLOBAL_HIBERNATED_APPS = 10109; |
| INPUT_EVENT_LATENCY_SKETCH = 10110; |
| BATTERY_USAGE_STATS_BEFORE_RESET = 10111; |
| BATTERY_USAGE_STATS_SINCE_RESET = 10112; |
| BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL = 10113; |
| INSTALLED_INCREMENTAL_PACKAGE = 10114; |
| TELEPHONY_NETWORK_REQUESTS = 10115; |
| APP_SEARCH_STORAGE_INFO = 10116; |
| VMSTAT = 10117; |
| KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO = 10118; |
| KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO = 10119; |
| KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO = 10120; |
| KEYSTORE2_ATOM_WITH_OVERFLOW = 10121; |
| KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO = 10122; |
| KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO = 10123; |
| RKP_ERROR_STATS = 10124; |
| KEYSTORE2_CRASH_STATS = 10125; |
| ACCESSIBILITY_SHORTCUT_STATS = 10127; |
| ACCESSIBILITY_FLOATING_MENU_STATS = 10128; |
| CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY = 10131; |
| CAR_WATCHDOG_UID_IO_USAGE_SUMMARY = 10132; |
| IMS_REGISTRATION_FEATURE_TAG_STATS = 10133; |
| RCS_CLIENT_PROVISIONING_STATS = 10134; |
| RCS_ACS_PROVISIONING_STATS = 10135; |
| SIP_DELEGATE_STATS = 10136; |
| SIP_TRANSPORT_FEATURE_TAG_STATS = 10137; |
| SIP_MESSAGE_RESPONSE = 10138; |
| SIP_TRANSPORT_SESSION = 10139; |
| IMS_DEDICATED_BEARER_LISTENER_EVENT = 10140; |
| IMS_DEDICATED_BEARER_EVENT = 10141; |
| IMS_REGISTRATION_SERVICE_DESC_STATS = 10142; |
| UCE_EVENT_STATS = 10143; |
| PRESENCE_NOTIFY_EVENT = 10144; |
| GBA_EVENT = 10145; |
| REMOTE_KEY_PROVISIONING_ERROR_COUNTS = 10155; |
| } |
| |
| // 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 { |
| repeated AtomId push_atom_id = 1; |
| 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; |
| } |
| |
| // 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; |
| } |
| // 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; |
| } |
| |
| // End of protos/perfetto/config/sys_stats/sys_stats_config.proto |
| |
| // Begin of protos/perfetto/config/system_info/system_info.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.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, the category is enabled by default. |
| // |
| // Examples: |
| // |
| // - To enable all non-slow/debug categories: |
| // |
| // No configuration needed, happens by default. |
| // |
| // - To enable a specific category: |
| // |
| // disabled_categories = ["*"] |
| // enabled_categories = ["my_category"] |
| // |
| // - 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. Note that if a |
| // thread is not scheduled by OS for some duration, that time won't be |
| // included in thread_time. |
| // Learn more : "CLOCK_THREAD_CPUTIME_ID" flag at |
| // https://linux.die.net/man/3/clock_gettime |
| optional bool enable_thread_time_sampling = 8; |
| |
| // 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: 120 |
| 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; |
| |
| // 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; |
| |
| // Keeep 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. |
| 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]; |
| // TODO(fmayer): Add data source name for this. |
| optional GpuCounterConfig gpu_counter_config = 108 [lazy = true]; |
| // Data source name: android.game_intervention_list |
| 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 |
| 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; |
| |
| // 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; |
| |
| // 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; |
| |
| // 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: 35. |
| 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; |
| } |
| 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; |
| } |
| 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; |
| } |
| 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; |
| |
| // 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. |
| optional uint64 max_upload_per_day_bytes = 1; |
| } |
| 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; |
| |
| // 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), will steal its contents, save the trace into |
| // a known path and stop prematurely. |
| // This field was introduced in Android S. |
| optional int32 bugreport_score = 30; |
| |
| // 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; |
| } |
| optional TriggerMode trigger_mode = 1; |
| |
| 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. |
| 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; |
| |
| // Additional guardrail used by the Perfetto command line client. |
| // On user builds when --dropbox is set perfetto will refuse to trace unless |
| // this is also set. |
| // Added in Q. |
| optional bool allow_user_build_tracing = 19; |
| |
| // 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; |
| |
| // 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. |
| // Alternative encoding of trace_uuid as two int64s. |
| optional int64 trace_uuid_msb = 27; |
| optional int64 trace_uuid_lsb = 28; |
| |
| // 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. |
| message TraceFilter { |
| optional bytes bytecode = 1; |
| } |
| // 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; |
| } |
| |
| // End of protos/perfetto/config/trace_config.proto |