• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// AUTOGENERATED - DO NOT EDIT
2// ---------------------------
3// This file has been generated by
4// AOSP://external/perfetto/tools/gen_merged_protos
5// merging the perfetto config protos.
6// This fused proto is intended to be copied in:
7//  - Android tree, for statsd.
8//  - Google internal repos.
9
10syntax = "proto2";
11
12package perfetto.protos;
13
14option go_package = "github.com/google/perfetto/perfetto_proto";
15
16// Begin of protos/perfetto/common/ftrace_descriptor.proto
17
18message FtraceDescriptor {
19  message AtraceCategory {
20    optional string name = 1;
21    optional string description = 2;
22  }
23
24  // Report the available atrace categories.
25  //
26  // Used by Traceur via `perfetto --query`.
27  repeated AtraceCategory atrace_categories = 1;
28}
29
30// End of protos/perfetto/common/ftrace_descriptor.proto
31
32// Begin of protos/perfetto/common/gpu_counter_descriptor.proto
33
34// Description of GPU counters.
35// This message is sent by a GPU counter producer to specify the counters
36// available in the hardware.
37message GpuCounterDescriptor {
38  // Logical groups for a counter.  This is used in the UI to present the
39  // related counters together.
40  enum GpuCounterGroup {
41    UNCLASSIFIED = 0;
42    SYSTEM = 1;
43    VERTICES = 2;
44    FRAGMENTS = 3;
45    PRIMITIVES = 4;
46    // Includes counters relating to caching and bandwidth.
47    MEMORY = 5;
48    COMPUTE = 6;
49  }
50
51  message GpuCounterSpec {
52    optional uint32 counter_id = 1;
53    optional string name = 2;
54    optional string description = 3;
55    // MeasureUnit unit (deprecated)
56    reserved 4;
57    oneof peak_value {
58      int64 int_peak_value = 5;
59      double double_peak_value = 6;
60    }
61    repeated MeasureUnit numerator_units = 7;
62    repeated MeasureUnit denominator_units = 8;
63    optional bool select_by_default = 9;
64    repeated GpuCounterGroup groups = 10;
65  }
66  repeated GpuCounterSpec specs = 1;
67
68  // Allow producer to group counters into block to represent counter islands.
69  // A capacity may be specified to indicate the number of counters that can be
70  // enable simultaneously in that block.
71  message GpuCounterBlock {
72    // required. Unique ID for the counter group.
73    optional uint32 block_id = 1;
74    // optional. Number of counters supported by the block. No limit if unset.
75    optional uint32 block_capacity = 2;
76    // optional. Name of block.
77    optional string name = 3;
78    // optional. Description for the block.
79    optional string description = 4;
80    // list of counters that are part of the block.
81    repeated uint32 counter_ids = 5;
82  }
83  repeated GpuCounterBlock blocks = 2;
84
85  // optional.  Minimum sampling period supported by the producer in
86  // nanoseconds.
87  optional uint64 min_sampling_period_ns = 3;
88
89  // optional.  Maximum sampling period supported by the producer in
90  // nanoseconds.
91  optional uint64 max_sampling_period_ns = 4;
92
93  // optional.  The producer supports counter sampling by instrumenting the
94  // command buffer.
95  optional bool supports_instrumented_sampling = 5;
96
97  // next id: 41
98  enum MeasureUnit {
99    NONE = 0;
100
101    BIT = 1;
102    KILOBIT = 2;
103    MEGABIT = 3;
104    GIGABIT = 4;
105    TERABIT = 5;
106    PETABIT = 6;
107
108    BYTE = 7;
109    KILOBYTE = 8;
110    MEGABYTE = 9;
111    GIGABYTE = 10;
112    TERABYTE = 11;
113    PETABYTE = 12;
114
115    HERTZ = 13;
116    KILOHERTZ = 14;
117    MEGAHERTZ = 15;
118    GIGAHERTZ = 16;
119    TERAHERTZ = 17;
120    PETAHERTZ = 18;
121
122    NANOSECOND = 19;
123    MICROSECOND = 20;
124    MILLISECOND = 21;
125    SECOND = 22;
126    MINUTE = 23;
127    HOUR = 24;
128
129    VERTEX = 25;
130    PIXEL = 26;
131    TRIANGLE = 27;
132    PRIMITIVE = 38;
133    FRAGMENT = 39;
134
135    MILLIWATT = 28;
136    WATT = 29;
137    KILOWATT = 30;
138
139    JOULE = 31;
140    VOLT = 32;
141    AMPERE = 33;
142
143    CELSIUS = 34;
144    FAHRENHEIT = 35;
145    KELVIN = 36;
146
147    // Values should be out of 100.
148    PERCENT = 37;
149
150    INSTRUCTION = 40;
151  }
152}
153
154// End of protos/perfetto/common/gpu_counter_descriptor.proto
155
156// Begin of protos/perfetto/common/track_event_descriptor.proto
157
158message TrackEventCategory {
159  optional string name = 1;
160  optional string description = 2;
161  repeated string tags = 3;
162}
163
164message TrackEventDescriptor {
165  repeated TrackEventCategory available_categories = 1;
166}
167
168// End of protos/perfetto/common/track_event_descriptor.proto
169
170// Begin of protos/perfetto/common/data_source_descriptor.proto
171
172// This message is sent from Producer(s) to the tracing Service when registering
173// to advertise their capabilities. It describes the structure of tracing
174// protos that will be produced by the data source and the supported filters.
175message DataSourceDescriptor {
176  // e.g., "linux.ftrace", "chromium.tracing"
177  optional string name = 1;
178
179  // When non-zero, this is a unique ID within the scope of the Producer for
180  // this data source (it is NOT globally unique). This is useful to
181  // differentiate between data sources with matching names when calling
182  // UpdateDataSource(). This field has been introduced in November 2021
183  // (v22, Android T) and is not supported on older versions.
184  optional uint64 id = 7;
185
186  // When true the data source is expected to ack the stop request through the
187  // NotifyDataSourceStopped() IPC. This field has been introduced after
188  // Android P in Jul 2018 and is not supported on older versions.
189  optional bool will_notify_on_stop = 2;
190
191  // When true the data source is expected to ack the start request through the
192  // NotifyDataSourceStarted() IPC. This field has been introduced after
193  // Android P in March 2019 and is not supported on older versions.
194  optional bool will_notify_on_start = 3;
195
196  // If true, opt into receiving the ClearIncrementalState() IPC. This should be
197  // set if the data source writes packets that refer to previous trace
198  // contents, and knows how to stop referring to the already-emitted data.
199  optional bool handles_incremental_state_clear = 4;
200
201  // If true, indicates that the data source does nothing upon Flush. This
202  // allows the service to reduce the flush-related IPC traffic and better deal
203  // with frozen producers (see go/perfetto-frozen). This is usually the case
204  // for data sources like 'track_event' that don't have access to the various
205  // thread task runners to post a flush task and rely purely on server-side
206  // scraping.
207  // Introduced in v39 / Android V.
208  optional bool no_flush = 9;
209
210  // Optional specification about available GPU counters.
211  optional GpuCounterDescriptor gpu_counter_descriptor = 5 [lazy = true];
212
213  optional TrackEventDescriptor track_event_descriptor = 6 [lazy = true];
214
215  optional FtraceDescriptor ftrace_descriptor = 8 [lazy = true];
216}
217
218// End of protos/perfetto/common/data_source_descriptor.proto
219
220// Begin of protos/perfetto/common/tracing_service_state.proto
221
222// Reports the state of the tracing service. Used to gather details about the
223// data sources connected.
224// See ConsumerPort::QueryServiceState().
225message TracingServiceState {
226  // Describes a producer process.
227  message Producer {
228    // Unique ID of the producer (monotonic counter).
229    optional int32 id = 1;
230
231    // Typically matches the process name.
232    optional string name = 2;
233
234    // Unix pid of the remote process. Supported only on Linux-based systems.
235    // Introduced in v24 / Android T.
236    optional int32 pid = 5;
237
238    // Unix uid of the remote process.
239    optional int32 uid = 3;
240
241    // The version of the client library used by the producer.
242    // This is a human readable string with and its format varies depending on
243    // the build system and the repo (standalone vs AOSP).
244    // This is intended for human debugging only.
245    optional string sdk_version = 4;
246
247    // Returns true if the process appears to be frozen (Android only).
248    // Introduced in Perfetto V49 / Android 24Q4.
249    optional bool frozen = 6;
250  }
251
252  // Describes a data source registered by a producer. Data sources are listed
253  // regardless of the fact that they are being used or not.
254  message DataSource {
255    // Descriptor passed by the data source when calling RegisterDataSource().
256    optional DataSourceDescriptor ds_descriptor = 1;
257
258    // ID of the producer, as per Producer.id.
259    optional int32 producer_id = 2;
260  }
261
262  message TracingSession {
263    // The TracingSessionID.
264    optional uint64 id = 1;
265
266    // The Unix uid of the consumer that started the session.
267    // This is meaningful only if the caller is root. In all other cases only
268    // tracing sessions that match the caller UID will be displayed.
269    optional int32 consumer_uid = 2;
270
271    // Internal state of the tracing session.
272    // These strings are FYI only and subjected to change.
273    optional string state = 3;
274
275    // The unique_session_name as set in the trace config (might be empty).
276    optional string unique_session_name = 4;
277
278    // The number and size of each buffer.
279    repeated uint32 buffer_size_kb = 5;
280
281    // Duration, as specified in the TraceConfig.duration_ms.
282    optional uint32 duration_ms = 6;
283
284    // Number of data sources involved in the session.
285    optional uint32 num_data_sources = 7;
286
287    // Time when the session was started, in the CLOCK_REALTIME domain.
288    // Available only on Linux-based systems.
289    optional int64 start_realtime_ns = 8;
290
291    // The fields below have been introduced in v42.
292
293    // The bugreport_score, as set in TraceConfig.bugreport_score.
294    optional int32 bugreport_score = 9;
295
296    // As per TraceConfig.bugreport_filename.
297    optional string bugreport_filename = 10;
298
299    // If true, the session is in the STARTED state. If false the session is in
300    // any other state (see `state` field).
301    optional bool is_started = 11;
302  }
303
304  // Lists all the producers connected.
305  repeated Producer producers = 1;
306
307  // Lists the data sources available.
308  repeated DataSource data_sources = 2;
309
310  // Lists the tracing sessions active AND owned by a consumer that has the same
311  // UID of the caller (or all of them if the caller is root).
312  // Introduced in v24 / Android T.
313  repeated TracingSession tracing_sessions = 6;
314
315  // This is always set to true from v24 and beyond. This flag is only used to
316  // tell the difference between: (1) talking to a recent service which happens
317  // to have no tracing session active; (2) talking to an older version of the
318  // service which will never report any tracing session.
319  optional bool supports_tracing_sessions = 7;
320
321  // Total number of tracing sessions.
322  optional int32 num_sessions = 3;
323
324  // Number of tracing sessions in the started state. Always <= num_sessions.
325  optional int32 num_sessions_started = 4;
326
327  // The version of traced (the same returned by `traced --version`).
328  // This is a human readable string with and its format varies depending on
329  // the build system and the repo (standalone vs AOSP).
330  // This is intended for human debugging only.
331  optional string tracing_service_version = 5;
332}
333
334// End of protos/perfetto/common/tracing_service_state.proto
335
336// Begin of protos/perfetto/common/builtin_clock.proto
337
338enum BuiltinClock {
339  BUILTIN_CLOCK_UNKNOWN = 0;
340  BUILTIN_CLOCK_REALTIME = 1;
341  BUILTIN_CLOCK_REALTIME_COARSE = 2;
342  BUILTIN_CLOCK_MONOTONIC = 3;
343  BUILTIN_CLOCK_MONOTONIC_COARSE = 4;
344  BUILTIN_CLOCK_MONOTONIC_RAW = 5;
345  BUILTIN_CLOCK_BOOTTIME = 6;
346  BUILTIN_CLOCK_TSC = 9;
347  BUILTIN_CLOCK_PERF = 10;
348  BUILTIN_CLOCK_MAX_ID = 63;
349
350  reserved 7, 8;
351}
352
353// End of protos/perfetto/common/builtin_clock.proto
354
355// Begin of protos/perfetto/config/android/android_game_intervention_list_config.proto
356
357// Data source that lists game modes and game interventions of games
358// on an Android device.
359message AndroidGameInterventionListConfig {
360  // If not empty, emit info about only the following list of package names
361  // (exact match, no regex). Otherwise, emit info about all packages.
362  repeated string package_name_filter = 1;
363}
364
365// End of protos/perfetto/config/android/android_game_intervention_list_config.proto
366
367// Begin of protos/perfetto/config/android/android_input_event_config.proto
368
369// Custom configuration for the "android.input.inputevent" data source.
370//
371// NOTE: Input traces can only be taken on debuggable (userdebug/eng) builds!
372//
373// Next ID: 5
374message AndroidInputEventConfig {
375  // Trace modes are tracing presets that are included in the system.
376  enum TraceMode {
377    // Preset mode for maximal tracing.
378    // WARNING: This will bypass all privacy measures on debuggable builds, and
379    // will record all
380    //          input events processed by the system, regardless of the context
381    //          in which they were processed. It should only be used for tracing
382    //          on a local device or for tests. It should NEVER be used for
383    //          field tracing.
384    TRACE_MODE_TRACE_ALL = 0;
385    // Use the tracing rules defined in this config to specify what events to
386    // trace.
387    TRACE_MODE_USE_RULES = 1;
388  }
389
390  // The tracing mode to use. If unspecified, it will default to
391  // TRACE_MODE_USE_RULES.
392  optional TraceMode mode = 1;
393
394  // The level of tracing that should be applied to an event.
395  enum TraceLevel {
396    // Do not trace the input event.
397    TRACE_LEVEL_NONE = 0;
398    // Trace the event as a redacted event, where certain sensitive fields are
399    // omitted from the trace, including the coordinates of pointer events and
400    // the key/scan codes of key events.
401    TRACE_LEVEL_REDACTED = 1;
402    // Trace the complete event.
403    TRACE_LEVEL_COMPLETE = 2;
404  }
405
406  // A rule that specifies the TraceLevel for an event based on matching
407  // conditions. All matchers in the rule are optional. To trigger this rule, an
408  // event must match all of its specified matchers (i.e. the matchers function
409  // like a series of conditions connected by a logical 'AND' operator). A rule
410  // with no specified matchers will match all events. Next ID: 6
411  message TraceRule {
412    // The trace level to be used for events that trigger this rule.
413    // If unspecified, TRACE_LEVEL_NONE will be used by default.
414    optional TraceLevel trace_level = 1;
415
416    // --- Optional Matchers ---
417
418    // Package matchers
419    //
420    // Respectively matches if all or any of the target apps for this event are
421    // contained in the specified list of package names.
422    //
423    // Intended usage:
424    //   - Use match_all_packages to selectively allow tracing for the listed
425    //   packages.
426    //   - Use match_any_packages to selectively deny tracing for certain
427    //   packages.
428    //
429    // WARNING: Great care must be taken when designing rules for field tracing!
430    //          This is because each event is almost always sent to more than
431    //          one app.
432    //              For example, when allowing tracing for a package that has a
433    //              spy window
434    //          over the display (e.g. SystemUI) using match_any_packages,
435    //          essentially all input will be recorded on that display. This is
436    //          because the events will be sent to the spy as well as the
437    //          foreground app, and regardless of what the foreground app is,
438    //          the event will end up being traced.
439    //              Alternatively, when attempting to block tracing for specific
440    //              packages using
441    //          match_all_packages, no events will likely be blocked. This is
442    //          because the event will also be sent to other apps (such as, but
443    //          not limited to, ones with spy windows), so the matcher will not
444    //          match unless all other targets are also listed under the
445    //          match_all_packages list.
446    repeated string match_all_packages = 2;
447    repeated string match_any_packages = 3;
448
449    // Matches if the event is secure, which means that at least one of the
450    // targets of this event is using the window flag FLAG_SECURE.
451    optional bool match_secure = 4;
452
453    // Matches if there was an active IME connection while this event was being
454    // processed.
455    optional bool match_ime_connection_active = 5;
456  }
457
458  // The list of rules to use to determine the trace level of events.
459  // Each event will be traced using the TraceLevel of the first rule that it
460  // triggers from this list. The rules are evaluated in the order in which they
461  // are specified. If an event does not match any of the rules,
462  // TRACE_LEVEL_NONE will be used by default.
463  repeated TraceRule rules = 2;
464
465  // --- Control flags ---
466
467  // Trace input events processed by the system as they are being dispatched
468  // to application windows. All trace rules will apply.
469  //   - If this flag is used without enabling trace_dispatcher_window_dispatch,
470  //   it will
471  //     trace InputDispatcher's inbound events (which does not include events
472  //     synthesized within InputDispatcher) that match the rules.
473  //   - If used with trace_dispatcher_window_dispatch, all inbound and outbound
474  //   events
475  //     matching the rules, including all events synthesized within
476  //     InputDispatcher, will be traced.
477  optional bool trace_dispatcher_input_events = 3;
478
479  // Trace details about which windows the system is sending each input event
480  // to. All trace rules will apply.
481  optional bool trace_dispatcher_window_dispatch = 4;
482}
483
484// End of protos/perfetto/config/android/android_input_event_config.proto
485
486// Begin of protos/perfetto/common/android_log_constants.proto
487
488// Values from NDK's android/log.h.
489enum AndroidLogId {
490  // MAIN.
491  LID_DEFAULT = 0;
492
493  LID_RADIO = 1;
494  LID_EVENTS = 2;
495  LID_SYSTEM = 3;
496  LID_CRASH = 4;
497  LID_STATS = 5;
498  LID_SECURITY = 6;
499  LID_KERNEL = 7;
500}
501
502enum AndroidLogPriority {
503  PRIO_UNSPECIFIED = 0;
504
505  // _DEFAULT, but should never be seen in logs.
506  PRIO_UNUSED = 1;
507
508  PRIO_VERBOSE = 2;
509  PRIO_DEBUG = 3;
510  PRIO_INFO = 4;
511  PRIO_WARN = 5;
512  PRIO_ERROR = 6;
513  PRIO_FATAL = 7;
514}
515
516// End of protos/perfetto/common/android_log_constants.proto
517
518// Begin of protos/perfetto/config/android/android_log_config.proto
519
520message AndroidLogConfig {
521  repeated AndroidLogId log_ids = 1;
522
523  // Was |poll_ms|, deprecated.
524  reserved 2;
525
526  // If set ignores all log messages whose prio is < the given value.
527  optional AndroidLogPriority min_prio = 3;
528
529  // If non-empty ignores all log messages whose tag doesn't match one of the
530  // specified values.
531  repeated string filter_tags = 4;
532}
533
534// End of protos/perfetto/config/android/android_log_config.proto
535
536// Begin of protos/perfetto/config/android/android_polled_state_config.proto
537
538// Data source that polls for display state. This should only be used for
539// backward-compatibility; AndroidSystemPropertyConfig should be preferred.
540message AndroidPolledStateConfig {
541  // Frequency of polling. If absent the state will be recorded once, at the
542  // start of the trace.
543  // This is required to be > 100ms to avoid excessive CPU usage.
544  optional uint32 poll_ms = 1;
545}
546
547// End of protos/perfetto/config/android/android_polled_state_config.proto
548
549// Begin of protos/perfetto/config/android/android_sdk_sysprop_guard_config.proto
550
551// Data source that controls the system properties used to guard initialization
552// of track_event producers (i.e. Skia) in apps using HWUI, and certain
553// processes like SurfaceFlinger.
554//
555// This data source only tells Skia to initialized the Perfetto SDK and start
556// routing data to the Track Event system instead of ATrace. For those events
557// to actually show up in a trace, the track_event data source must be used as
558// well. The Perfetto SDK cannot be de-initialized, so some long-lived apps and
559// processes may need to be restarted for Skia to revert to using ATrace if
560// Track Events are no longer desired.
561//
562// In addition to switching Skia to use Perfetto's track_event data source,
563// this "guard" also controls Skia's "broad tracing", which removes Skia's
564// internal tracing constraints and allows the track_event config to specify
565// which categories should be traced. Filtering to the "skia.always" category
566// *tag* in a track_event config can be used to re-enable the standard
567// constraints typically used with ATrace.
568//
569// Data source name: android.sdk_sysprop_guard
570// Introduced in Android 14 (U) QPR1.
571// Next id: 4
572message AndroidSdkSyspropGuardConfig {
573  // If true, configures SurfaceFlinger to initialize Skia's Perfetto
574  // integration with the track_event data source in RenderEngine.
575  // If false or omitted, the simpler ATrace fallback is used.
576  //
577  // NOTE: once enabled, Skia will only revert to ATrace if SurfaceFlinger is
578  // restarted.
579  //
580  // Specifically this sets the following system properties:
581  //   - debug.tracing.ctl.renderengine.skia_tracing_enabled
582  //   - debug.tracing.ctl.renderengine.skia_use_perfetto_track_events
583  //
584  // Does not affect actual track_event data *collection*, which must be
585  // configured separately.
586  optional bool surfaceflinger_skia_track_events = 1;
587
588  // If true, configures HWUI apps to initialize Skia's Perfetto integration
589  // with the track_event data source. hwui_package_name_filter
590  // can be used to control which apps are affected.
591  // If false or omitted, the simpler ATrace fallback is used.
592  //
593  // NOTE: once enabled, Skia will only revert to ATrace if the app is
594  // restarted.
595  //
596  // ATTENTION: affects ALL HWUI APPS if hwui_package_name_filter is not set!
597  // If filtering is NOT set, this controls these GLOBAL system properties:
598  //   - debug.tracing.ctl.hwui.skia_tracing_enabled
599  //   - debug.tracing.ctl.hwui.skia_use_perfetto_track_events
600  // If filtering IS set, this controls these APP-SPECIFIC system properties,
601  // for each package listed in the filter:
602  //   - debug.tracing.ctl.hwui.skia_tracing_enabled.<package.name>
603  //   - debug.tracing.ctl.hwui.skia_use_perfetto_track_events.<package.name>
604  //
605  // Does not affect actual track_event data *collection*, which must be
606  // configured separately.
607  optional bool hwui_skia_track_events = 2;
608
609  // If non-empty, hwui_skia_track_events applies to only the packages listed.
610  // Otherwise, hwui_skia_track_events applies globally to all HWUI apps.
611  repeated string hwui_package_name_filter = 3;
612}
613
614// End of protos/perfetto/config/android/android_sdk_sysprop_guard_config.proto
615
616// Begin of protos/perfetto/config/android/android_system_property_config.proto
617
618// Data source that polls for system properties.
619message AndroidSystemPropertyConfig {
620  // Frequency of polling. If absent the state will be recorded once, at the
621  // start of the trace.
622  // This is required to be > 100ms to avoid excessive CPU usage.
623  optional uint32 poll_ms = 1;
624
625  // Properties to poll. All property names must start with "debug.tracing.".
626  repeated string property_name = 2;
627}
628
629// End of protos/perfetto/config/android/android_system_property_config.proto
630
631// Begin of protos/perfetto/config/android/app_wakelock_config.proto
632
633// Configuration for the android.app_wakelocks data source.
634message AppWakelocksConfig {
635  // Specifies the delay (in milliseconds) after which the data source will
636  // attempt to write events. Writing less frequently reduces the trace size by
637  // making better use of the packed arrays and reducing the total number of
638  // TracePackets needed (which each have dozens of bytes of overhead). The
639  // suggested delay is 5000ms.
640  optional int32 write_delay_ms = 1;
641
642  // When set, wakelocks held for less than this amount of time are filtered
643  // from the resulting trace. Note: duration is computed by matching wakelocks
644  // with identical attributes, not by tracking the underlying objects. The
645  // threshold should be < the trace's flush_period_ms.
646  optional int32 filter_duration_below_ms = 2;
647
648  // When true, the owner_pid is dropped from the resulting output, reducing the
649  // size of the interning tables.
650  optional bool drop_owner_pid = 3;
651}
652
653// End of protos/perfetto/config/android/app_wakelock_config.proto
654
655// Begin of protos/perfetto/config/android/kernel_wakelocks_config.proto
656
657// Data source that records kernel (and native) wakelock data.
658message KernelWakelocksConfig {
659  // Record at this frequency.
660  optional uint32 poll_ms = 1;
661}
662
663// End of protos/perfetto/config/android/kernel_wakelocks_config.proto
664
665// Begin of protos/perfetto/config/android/network_trace_config.proto
666
667// Network tracing data source that records details on all packets sent or
668// received by the network.
669message NetworkPacketTraceConfig {
670  // Polling frequency in milliseconds. Network tracing writes to a fixed size
671  // ring buffer. The polling interval should be such that the ring buffer is
672  // unlikely to fill in that interval (or that filling is an acceptable risk).
673  // The minimum polling rate is 100ms (values below this are ignored).
674  // Introduced in Android 14 (U).
675  optional uint32 poll_ms = 1;
676
677  // The aggregation_threshold is the number of packets at which an event will
678  // switch from per-packet details to aggregate details. For example, a value
679  // of 50 means that if a particular event (grouped by the unique combinations
680  // of metadata fields: {interface, direction, uid, etc}) has fewer than 50
681  // packets, the exact timestamp and length are recorded for each packet. If
682  // there were 50 or more packets in an event, it would only record the total
683  // duration, packets, and length. A value of zero or unspecified will always
684  /// record per-packet details. A value of 1 always records aggregate details.
685  optional uint32 aggregation_threshold = 2;
686
687  // Specifies the maximum number of packet contexts to intern at a time. This
688  // prevents the interning table from growing too large and controls whether
689  // interning is enabled or disabled (a value of zero disables interning and
690  // is the default). When a data sources interning table reaches this amount,
691  // packet contexts will be inlined into NetworkPacketEvents.
692  optional uint32 intern_limit = 3;
693
694  // The following fields specify whether certain fields should be dropped from
695  // the output. Dropping fields improves normalization results, reduces the
696  // size of the interning table, and slightly reduces event size.
697  optional bool drop_local_port = 4;
698  optional bool drop_remote_port = 5;
699  optional bool drop_tcp_flags = 6;
700}
701
702// End of protos/perfetto/config/android/network_trace_config.proto
703
704// Begin of protos/perfetto/config/android/packages_list_config.proto
705
706// Data source that lists details (such as version code) about packages on an
707// Android device.
708message PackagesListConfig {
709  // If not empty, emit info about only the following list of package names
710  // (exact match, no regex). Otherwise, emit info about all packages.
711  repeated string package_name_filter = 1;
712}
713
714// End of protos/perfetto/config/android/packages_list_config.proto
715
716// Begin of protos/perfetto/config/android/pixel_modem_config.proto
717
718// Data source that records events from the modem.
719message PixelModemConfig {
720  // Event group to record, as defined by the modem.
721  enum EventGroup {
722    EVENT_GROUP_UNKNOWN = 0;
723
724    // Events suitable for low bandwidth tracing only.
725    EVENT_GROUP_LOW_BANDWIDTH = 1;
726
727    // Events suitable for high and low bandwidth tracing.
728    EVENT_GROUP_HIGH_AND_LOW_BANDWIDTH = 2;
729  }
730
731  optional EventGroup event_group = 1;
732
733  // If set, record only events with these hashes.
734  repeated int64 pigweed_hash_allow_list = 2;
735
736  // If set and allow_list is not set, deny events with these hashes.
737  repeated int64 pigweed_hash_deny_list = 3;
738}
739
740// End of protos/perfetto/config/android/pixel_modem_config.proto
741
742// Begin of protos/perfetto/common/protolog_common.proto
743
744enum ProtoLogLevel {
745  PROTOLOG_LEVEL_UNDEFINED = 0;
746  PROTOLOG_LEVEL_DEBUG = 1;
747  PROTOLOG_LEVEL_VERBOSE = 2;
748  PROTOLOG_LEVEL_INFO = 3;
749  PROTOLOG_LEVEL_WARN = 4;
750  PROTOLOG_LEVEL_ERROR = 5;
751  PROTOLOG_LEVEL_WTF = 6;
752}
753// End of protos/perfetto/common/protolog_common.proto
754
755// Begin of protos/perfetto/config/android/protolog_config.proto
756
757// Custom configuration for the "android.protolog" data source.
758// ProtoLog is a logging mechanism that is intented to be more efficient than
759// logcat. This configures what logs to capture in the tracing instance.
760message ProtoLogConfig {
761  enum TracingMode {
762    // When using the DEFAULT tracing mode, only log groups and levels specified
763    // in the group_overrides are traced.
764    DEFAULT = 0;
765    // When using the ENABLE_ALL tracing mode, all log groups and levels are
766    // traced, unless specified in the group_overrides.
767    ENABLE_ALL = 1;
768  }
769
770  // Specified the configurations for each of the logging groups. If none is
771  // specified for a group the defaults will be used.
772  repeated ProtoLogGroup group_overrides = 1;
773  // Specified what tracing mode to use for the tracing instance.
774  optional TracingMode tracing_mode = 2;
775  // If set, any message with log level higher than this level (inclusive) will
776  // be traced. Group overrides take precedence over this value.
777  optional ProtoLogLevel default_log_from_level = 3;
778}
779
780message ProtoLogGroup {
781  // The ProtoLog group name this configuration entry applies to.
782  optional string group_name = 1;
783  // Specify the level from which to start capturing protologs.
784  // e.g. if ProtoLogLevel.WARN is specified only warning, errors and fatal log
785  // message will be traced.
786  optional ProtoLogLevel log_from = 2;
787  // When set to true we will collect the stacktrace for each protolog message
788  // in this group that we are tracing.
789  optional bool collect_stacktrace = 3;
790}
791
792// End of protos/perfetto/config/android/protolog_config.proto
793
794// Begin of protos/perfetto/config/android/surfaceflinger_layers_config.proto
795
796// Custom configuration for the "android.surfaceflinger.layers" data source.
797message SurfaceFlingerLayersConfig {
798  enum Mode {
799    MODE_UNSPECIFIED = 0;
800
801    // Trace layers snapshots. A snapshot is taken every time a layers change
802    // occurs.
803    MODE_ACTIVE = 1;
804
805    // Generate layers snapshots from the transactions kept in the
806    // SurfaceFlinger's internal ring buffer.
807    // The layers snapshots generation occurs when this data source is flushed.
808    MODE_GENERATED = 2;
809
810    // Trace a single layers snapshot.
811    MODE_DUMP = 3;
812
813    // Default mode (applied by SurfaceFlinger if no mode is specified).
814    // Same as MODE_GENERATED, but triggers the layers snapshots generation only when a bugreport
815    // is taken.
816    MODE_GENERATED_BUGREPORT_ONLY = 4;
817  }
818  optional Mode mode = 1;
819
820  enum TraceFlag {
821    TRACE_FLAG_UNSPECIFIED = 0;
822    TRACE_FLAG_INPUT = 0x02;
823    TRACE_FLAG_COMPOSITION = 0x04;
824    TRACE_FLAG_EXTRA = 0x08;
825    TRACE_FLAG_HWC = 0x10;
826    TRACE_FLAG_BUFFERS = 0x20;
827    TRACE_FLAG_VIRTUAL_DISPLAYS = 0x40;
828
829    // INPUT | COMPOSITION | EXTRA
830    TRACE_FLAG_ALL = 0x0e;
831  }
832  repeated TraceFlag trace_flags = 2;
833}
834
835// End of protos/perfetto/config/android/surfaceflinger_layers_config.proto
836
837// Begin of protos/perfetto/config/android/surfaceflinger_transactions_config.proto
838
839// Custom configuration for the "android.surfaceflinger.transactions" data
840// source.
841message SurfaceFlingerTransactionsConfig {
842  enum Mode {
843    MODE_UNSPECIFIED = 0;
844
845    // Default mode (applied by SurfaceFlinger if no mode is specified).
846    // SurfaceFlinger writes its internal ring buffer of transactions every time
847    // the data source is flushed. The ring buffer contains the SurfaceFlinger's
848    // initial state and the latest transactions.
849    MODE_CONTINUOUS = 1;
850
851    // SurfaceFlinger writes the initial state and then each incoming
852    // transaction until the data source is stopped.
853    MODE_ACTIVE = 2;
854  }
855  optional Mode mode = 1;
856}
857
858// End of protos/perfetto/config/android/surfaceflinger_transactions_config.proto
859
860// Begin of protos/perfetto/config/android/windowmanager_config.proto
861
862// Custom configuration for the "android.windowmanager" data source.
863message WindowManagerConfig {
864  enum LogFrequency {
865    LOG_FREQUENCY_UNSPECIFIED = 0;
866
867    // Trace state snapshots when a frame is committed.
868    LOG_FREQUENCY_FRAME = 1;
869
870    // Trace state snapshots every time a transaction is committed.
871    LOG_FREQUENCY_TRANSACTION = 2;
872
873    // Trace single state snapshots when the data source is started.
874    LOG_FREQUENCY_SINGLE_DUMP = 3;
875  }
876  optional LogFrequency log_frequency = 1;
877
878  enum LogLevel {
879    LOG_LEVEL_UNSPECIFIED = 0;
880
881    // Logs all elements with maximum amount of information.
882    LOG_LEVEL_VERBOSE = 1;
883
884    // Logs all elements but doesn't write all configuration data.
885    LOG_LEVEL_DEBUG = 2;
886
887    // Logs only visible elements, with the minimum amount of performance
888    // overhead
889    LOG_LEVEL_CRITICAL = 3;
890  }
891  optional LogLevel log_level = 2;
892}
893
894// End of protos/perfetto/config/android/windowmanager_config.proto
895
896// Begin of protos/perfetto/config/chrome/chrome_config.proto
897
898message ChromeConfig {
899  optional string trace_config = 1;
900
901  // When enabled, the data source should only fill in fields in the output that
902  // are not potentially privacy sensitive.
903  optional bool privacy_filtering_enabled = 2;
904
905  // Instead of emitting binary protobuf, convert the trace data to the legacy
906  // JSON format. Note that the trace data will still be returned as a series of
907  // TracePackets, but the embedded data will be JSON instead of serialized
908  // protobuf.
909  optional bool convert_to_legacy_json = 3;
910
911  // Priority of the tracing session client. A higher priority session may
912  // preempt a lower priority one in configurations where concurrent sessions
913  // aren't supported.
914  enum ClientPriority {
915    UNKNOWN = 0;
916    BACKGROUND = 1;
917    USER_INITIATED = 2;
918  }
919  optional ClientPriority client_priority = 4;
920
921  // Applicable only when using legacy JSON format.
922  // If |json_agent_label_filter| is not empty, only data pertaining to
923  // the specified tracing agent label (e.g. "traceEvents") will be returned.
924  optional string json_agent_label_filter = 5;
925}
926
927// End of protos/perfetto/config/chrome/chrome_config.proto
928
929// Begin of protos/perfetto/config/chrome/histogram_samples.proto
930
931message ChromiumHistogramSamplesConfig {
932  // Records when a value within the specified bounds [min_value, max_value] is
933  // emitted into a Chrome histogram.
934  message HistogramSample {
935    optional string histogram_name = 1;
936    optional int64 min_value = 2;
937    optional int64 max_value = 3;
938  }
939  // List of histograms to record. If no histogram is specified, all histograms
940  // are recorded.
941  repeated HistogramSample histograms = 1;
942
943  // Default: false (i.e. histogram names are NOT filtered out by default)
944  // When true, histogram_name will be filtered out.
945  optional bool filter_histogram_names = 2;
946}
947
948// End of protos/perfetto/config/chrome/histogram_samples.proto
949
950// Begin of protos/perfetto/config/chrome/system_metrics.proto
951
952message ChromiumSystemMetricsConfig {
953  // Samples counters every X ms.
954  optional uint32 sampling_interval_ms = 1;
955}
956
957// End of protos/perfetto/config/chrome/system_metrics.proto
958
959// Begin of protos/perfetto/config/chrome/v8_config.proto
960
961message V8Config {
962  // Whether to log the actual content of scripts (e.g. content of the JS file
963  // that was compiled to generate code).
964  // ATTENTION: This could considerably increase the size of the resuling trace
965  //            file.
966  optional bool log_script_sources = 1;
967  // Whether to log the generated code for jitted functions (machine code or
968  // bytecode).
969  // ATTENTION: This could considerably increase the size of the resuling trace
970  //            file.
971  optional bool log_instructions = 2;
972}
973
974// End of protos/perfetto/config/chrome/v8_config.proto
975
976// Begin of protos/perfetto/config/etw/etw_config.proto
977
978// Proto definition based on the struct _EVENT_TRACE_PROPERTIES definition
979// See: https://learn.microsoft.com/en-us/windows/win32/api/evntrace/
980// ns-evntrace-event_trace_properties
981message EtwConfig {
982  // The KernelFlag represent list of kernel flags that we are intrested in.
983  // To get a more extensive list run 'xperf -providers k'.
984  enum KernelFlag {
985    CSWITCH = 0;
986    DISPATCHER = 1;
987  }
988
989  // The kernel_flags determines the flags that will be used by the etw tracing
990  // session. These kernel flags have been built to expose the useful events
991  // captured from the kernel mode only.
992  repeated KernelFlag kernel_flags = 1;
993}
994// End of protos/perfetto/config/etw/etw_config.proto
995
996// Begin of protos/perfetto/config/ftrace/ftrace_config.proto
997
998// Next id: 31
999message FtraceConfig {
1000  // Ftrace events to record, example: "sched/sched_switch".
1001  repeated string ftrace_events = 1;
1002
1003  message KprobeEvent {
1004    enum KprobeType {
1005      KPROBE_TYPE_UNKNOWN = 0;
1006      KPROBE_TYPE_KPROBE = 1;
1007      KPROBE_TYPE_KRETPROBE = 2;
1008      KPROBE_TYPE_BOTH = 3;
1009    }
1010    // Kernel function name to attach to, for example "fuse_file_write_iter"
1011    optional string probe = 1;
1012    optional KprobeType type = 2;
1013  }
1014
1015  // Ftrace events to record, specific for kprobes and kretprobes
1016  repeated KprobeEvent kprobe_events = 30;
1017
1018  // Android-specific event categories:
1019  repeated string atrace_categories = 2;
1020  repeated string atrace_apps = 3;
1021  // Some processes can emit data through atrace or through the perfetto SDK via
1022  // the "track_event" data source. For these categories, the SDK will be
1023  // preferred, if possible, for this config.
1024  repeated string atrace_categories_prefer_sdk = 28;
1025
1026  // Size of each per-cpu kernel ftrace ring buffer.
1027  // Not guaranteed if there are multiple concurrent tracing sessions, as the
1028  // buffers cannot be resized without pausing recording in the kernel.
1029  optional uint32 buffer_size_kb = 10;
1030
1031  // If set, specifies how often the tracing daemon reads from the kernel ring
1032  // buffer. Not guaranteed if there are multiple concurrent tracing sessions.
1033  // Leave unset unless you're fine-tuning a local config.
1034  optional uint32 drain_period_ms = 11;
1035
1036  // If set, the tracing daemon will read kernel ring buffers as soon as
1037  // they're filled past this percentage of occupancy. In other words, a value
1038  // of 50 means that a read pass is triggered as soon as any per-cpu buffer is
1039  // half-full. Not guaranteed if there are multiple concurrent tracing
1040  // sessions.
1041  // Currently does nothing on Linux kernels below v6.9.
1042  // Introduced in: perfetto v48.
1043  optional uint32 drain_buffer_percent = 29;
1044
1045  // Configuration for compact encoding of scheduler events. When enabled (and
1046  // recording the relevant ftrace events), specific high-volume events are
1047  // encoded in a denser format than normal.
1048  message CompactSchedConfig {
1049    // If true, and sched_switch or sched_waking ftrace events are enabled,
1050    // record those events in the compact format.
1051    //
1052    // If the field is unset, the default is:
1053    // * perfetto v42.0+: enabled
1054    // * before: disabled
1055    optional bool enabled = 1;
1056  }
1057  optional CompactSchedConfig compact_sched = 12;
1058
1059  // Optional filter for "ftrace/print" events.
1060  //
1061  // The filter consists of multiple rules. As soon as a rule matches (the rules
1062  // are processed in order), its `allow` field will be used as the outcome: if
1063  // `allow` is true, the event will be included in the trace, otherwise it will
1064  // be discarded. If an event does not match any rule, it will be allowed by
1065  // default (a rule with an empty prefix and allow=false, disallows everything
1066  // by default).
1067  message PrintFilter {
1068    message Rule {
1069      // Matches an atrace message of the form:
1070      // <type>|pid|<prefix>...
1071      message AtraceMessage {
1072        optional string type = 1;
1073        optional string prefix = 2;
1074      }
1075      oneof match {
1076        // This rule matches if `prefix` matches exactly with the beginning of
1077        // the "ftrace/print" "buf" field.
1078        string prefix = 1;
1079        // This rule matches if the "buf" field contains an atrace-style print
1080        // message as specified in `atrace_msg`.
1081        AtraceMessage atrace_msg = 3;
1082      }
1083      optional bool allow = 2;
1084    }
1085    repeated Rule rules = 1;
1086  }
1087  optional PrintFilter print_filter = 22;
1088
1089  // Enables symbol name resolution against /proc/kallsyms.
1090  // It requires that either traced_probes is running as root or that
1091  // kptr_restrict has been manually lowered.
1092  // It does not disclose KASLR, symbol addresses are mangled.
1093  optional bool symbolize_ksyms = 13;
1094
1095  // When symbolize_ksyms=true, determines whether the traced_probes daemon
1096  // should keep the symbol map in memory (and reuse it for future tracing
1097  // sessions) or clear it (saving memory) and re-create it on each tracing
1098  // session (wasting cpu and wall time).
1099  // The tradeoff is roughly:
1100  //  KSYMS_RETAIN: pay a fixed ~1.2 MB cost after the first trace.
1101  //  KSYMS_CLEANUP_ON_STOP: pay a ~300-500ms cost when starting each trace.
1102  // Default behavior: KSYMS_CLEANUP_ON_STOP.
1103  enum KsymsMemPolicy {
1104    KSYMS_UNSPECIFIED = 0;
1105    KSYMS_CLEANUP_ON_STOP = 1;
1106    KSYMS_RETAIN = 2;
1107  }
1108  optional KsymsMemPolicy ksyms_mem_policy = 17;
1109
1110  // By default the kernel symbolizer is lazily initialized on a deferred task
1111  // to reduce ftrace's time-to-start-recording. Unfortunately that makes
1112  // ksyms integration tests hard. This flag forces the kernel symbolizer to be
1113  // initialized synchronously on the data source start and hence avoiding
1114  // timing races in tests.
1115  // DEPRECATED in v28 / Android U. This is now the default behavior, setting it
1116  // to true is a no-op.
1117  optional bool initialize_ksyms_synchronously_for_testing = 14
1118      [deprecated = true];
1119
1120  // When this boolean is true AND the ftrace_events contains "kmem/rss_stat",
1121  // this option causes traced_probes to enable the "kmem/rss_stat_throttled"
1122  // event instead if present, and fall back to "kmem/rss_stat" if not present.
1123  // The historical context for this is the following:
1124  // - Up to Android S (12), the rss_stat was internally throttled in its
1125  //   kernel implementation.
1126  // - A change introduced in the kernels after S has introduced a new
1127  //   "rss_stat_throttled" making the original "rss_stat" event unthrottled
1128  //   (hence very spammy).
1129  // - Not all Android T/13 devices will receive a new kernel though, hence we
1130  //   need to deal with both cases.
1131  // For more context: go/rss-stat-throttled.
1132  optional bool throttle_rss_stat = 15;
1133
1134  // If true, avoid enabling events that aren't statically known by
1135  // traced_probes. Otherwise, the default is to emit such events as
1136  // GenericFtraceEvent protos.
1137  // Prefer to keep this flag at its default. This was added for Android
1138  // tracing, where atrace categories and/or atrace HAL requested events can
1139  // expand to events that aren't of interest to the tracing user.
1140  // Introduced in: Android T.
1141  optional bool disable_generic_events = 16;
1142
1143  // The subset of syscalls to record. To record all syscalls, leave this unset
1144  // and add "ftrace_events: raw_syscalls/sys_{enter,exit}" to the config.
1145  // * before perfetto v43, requires the config to also enable
1146  //   raw_syscalls/sys_{enter,exit}.
1147  // * perfetto v43+ does the right thing if you set only this field.
1148  // Example: ["sys_read", "sys_open"].
1149  // Introduced in: Android U.
1150  repeated string syscall_events = 18;
1151
1152  // If true, enable the "function_graph" kernel tracer that emits events
1153  // whenever a kernel function is entered and exited
1154  // (funcgraph_entry/funcgraph_exit).
1155  // Notes on use:
1156  // * Requires |symbolize_ksyms| for function name resolution.
1157  // * Use |function_filters| or |function_graph_roots| to constrain the traced
1158  //   set of functions, otherwise the event bandwidth will be too high for
1159  //   practical use.
1160  // * The data source might be rejected if there is already a concurrent
1161  //   ftrace data source that does not use function graph itself, as we do not
1162  //   support switching kernel tracers mid-trace.
1163  // * Requires a kernel compiled with CONFIG_FUNCTION_GRAPH_TRACER. This is
1164  //   enabled if "cat /sys/kernel/tracing/available_tracers" includes
1165  //   "function_graph".
1166  // Android:
1167  // * Available only on debuggable builds.
1168  // * Introduced in: Android U.
1169  optional bool enable_function_graph = 19;
1170
1171  // Constrains the set of functions traced when |enable_function_graph| is
1172  // true. Supports globs, e.g. "sched*". You can specify multiple filters,
1173  // in which case all matching functions will be traced. See kernel
1174  // documentation on ftrace "set_ftrace_filter" file for more details.
1175  // Android:
1176  // * Available only on debuggable builds.
1177  // * Introduced in: Android U.
1178  repeated string function_filters = 20;
1179
1180  // If |enable_function_graph| is true, trace this set of functions *and* all
1181  // of its callees. Supports globs. Can be set together with
1182  // |function_filters|, in which case only callees matching the filter will be
1183  // traced. If setting both, you most likely want all roots to also be
1184  // included in |function_filters|.
1185  // Android:
1186  // * Available only on debuggable builds.
1187  // * Introduced in: Android U.
1188  repeated string function_graph_roots = 21;
1189
1190  // If true, does not clear ftrace buffers before the start of the program.
1191  // This makes sense only if this is the first ftrace data source instance
1192  // created after the daemon has been started. Can be useful for gathering boot
1193  // traces, if ftrace has been separately configured (e.g. via kernel
1194  // commandline).
1195  optional bool preserve_ftrace_buffer = 23;
1196
1197  // If true, overrides the default timestamp clock and uses a raw hardware
1198  // based monotonic clock for getting timestamps.
1199  // * Introduced in: Android U.
1200  optional bool use_monotonic_raw_clock = 24;
1201
1202  // If |instance_name| is not empty, then attempt to use that tracefs instance
1203  // for event recording. Normally, this means
1204  // `/sys/kernel/tracing/instances/$instance_name`.
1205  //
1206  // The name "hyp" is reserved.
1207  //
1208  // The instance must already exist, the tracing daemon *will not* create it
1209  // for you as it typically doesn't have such permissions.
1210  // Only a subset of features is guaranteed to work with non-default instances,
1211  // at the time of writing:
1212  //  * ftrace_events
1213  //  * buffer_size_kb
1214  optional string instance_name = 25;
1215
1216  // If true, |buffer_size_kb| is interpreted as a lower bound, allowing the
1217  // implementation to choose a bigger buffer size.
1218  //
1219  // Most configs for perfetto v43+ should simply leave both fields unset.
1220  //
1221  // If you need a config compatible with a range of perfetto builds and you
1222  // used to set a non-default buffer_size_kb, consider setting both fields.
1223  // Example:
1224  //   buffer_size_kb: 4096
1225  //   buffer_size_lower_bound: true
1226  // On older builds, the per-cpu buffers will be exactly 4 MB.
1227  // On v43+, buffers will be at least 4 MB.
1228  // In both cases, neither is guaranteed if there are other concurrent
1229  // perfetto ftrace sessions, as the buffers cannot be resized without pausing
1230  // the recording in the kernel.
1231  // Introduced in: perfetto v43.
1232  optional bool buffer_size_lower_bound = 27;
1233
1234  // Previously drain_buffer_percent, perfetto v43-v47.
1235  reserved 26;
1236}
1237
1238// End of protos/perfetto/config/ftrace/ftrace_config.proto
1239
1240// Begin of protos/perfetto/config/gpu/gpu_counter_config.proto
1241
1242message GpuCounterConfig {
1243  // Desired sampling interval for counters.
1244  optional uint64 counter_period_ns = 1;
1245
1246  // List of counters to be sampled. Counter IDs correspond to the ones
1247  // described in GpuCounterSpec in the data source descriptor.
1248  repeated uint32 counter_ids = 2;
1249
1250  // Sample counters by instrumenting command buffers.
1251  optional bool instrumented_sampling = 3;
1252
1253  // Fix gpu clock rate during trace session.
1254  optional bool fix_gpu_clock = 4;
1255}
1256
1257// End of protos/perfetto/config/gpu/gpu_counter_config.proto
1258
1259// Begin of protos/perfetto/config/gpu/gpu_renderstages_config.proto
1260
1261message GpuRenderStagesConfig {
1262  // Enable to separate the color and depth/stencil load and store stages
1263  // into a separate stages. If disabled, the depth/stencil load and store
1264  // stages will be combined.  Disabled by default. This option has no effect if
1265  // Low Overhead mode is enabled.
1266  optional bool full_loadstore = 1;
1267
1268  // Use the low overhead mode for traces. In this mode render stages are
1269  // combined into a single workload stage. This provides less granular data but
1270  // induces minimal GPU overhead. Disabled by default.
1271  optional bool low_overhead = 2;
1272
1273  // Trace metrics to capture for each render stage
1274  repeated string trace_metrics = 3;
1275}
1276
1277// End of protos/perfetto/config/gpu/gpu_renderstages_config.proto
1278
1279// Begin of protos/perfetto/config/gpu/vulkan_memory_config.proto
1280
1281message VulkanMemoryConfig {
1282  // Tracking driver memory usage events
1283  optional bool track_driver_memory_usage = 1;
1284
1285  // Tracking device memory usage events
1286  optional bool track_device_memory_usage = 2;
1287}
1288
1289// End of protos/perfetto/config/gpu/vulkan_memory_config.proto
1290
1291// Begin of protos/perfetto/config/inode_file/inode_file_config.proto
1292
1293message InodeFileConfig {
1294  message MountPointMappingEntry {
1295    optional string mountpoint = 1;
1296    repeated string scan_roots = 2;
1297  }
1298
1299  // How long to pause between batches.
1300  optional uint32 scan_interval_ms = 1;
1301
1302  // How long to wait before the first scan in order to accumulate inodes.
1303  optional uint32 scan_delay_ms = 2;
1304
1305  // How many inodes to scan in one batch.
1306  optional uint32 scan_batch_size = 3;
1307
1308  // Do not scan for inodes not found in the static map.
1309  optional bool do_not_scan = 4;
1310
1311  // If non-empty, only scan inodes corresponding to block devices named in
1312  // this list.
1313  repeated string scan_mount_points = 5;
1314
1315  // When encountering an inode belonging to a block device corresponding
1316  // to one of the mount points in this map, scan its scan_roots instead.
1317  repeated MountPointMappingEntry mount_point_mapping = 6;
1318}
1319
1320// End of protos/perfetto/config/inode_file/inode_file_config.proto
1321
1322// Begin of protos/perfetto/config/interceptors/console_config.proto
1323
1324message ConsoleConfig {
1325  enum Output {
1326    OUTPUT_UNSPECIFIED = 0;
1327    OUTPUT_STDOUT = 1;
1328    OUTPUT_STDERR = 2;
1329  }
1330  optional Output output = 1;
1331  optional bool enable_colors = 2;
1332}
1333
1334// End of protos/perfetto/config/interceptors/console_config.proto
1335
1336// Begin of protos/perfetto/config/interceptor_config.proto
1337
1338// Configuration for trace packet interception. Used for diverting trace data to
1339// non-Perfetto sources (e.g., logging to the console, ETW) when using the
1340// Perfetto SDK.
1341message InterceptorConfig {
1342  // Matches the name given to RegisterInterceptor().
1343  optional string name = 1;
1344
1345  optional ConsoleConfig console_config = 100;
1346}
1347
1348// End of protos/perfetto/config/interceptor_config.proto
1349
1350// Begin of protos/perfetto/config/power/android_power_config.proto
1351
1352message AndroidPowerConfig {
1353  enum BatteryCounters {
1354    BATTERY_COUNTER_UNSPECIFIED = 0;
1355
1356    // Coulomb counter.
1357    BATTERY_COUNTER_CHARGE = 1;
1358
1359    // Charge (%).
1360    BATTERY_COUNTER_CAPACITY_PERCENT = 2;
1361
1362    // Instantaneous current.
1363    BATTERY_COUNTER_CURRENT = 3;
1364
1365    // Avg current.
1366    BATTERY_COUNTER_CURRENT_AVG = 4;
1367
1368    // Instantaneous voltage.
1369    BATTERY_COUNTER_VOLTAGE = 5;
1370  }
1371  optional uint32 battery_poll_ms = 1;
1372  repeated BatteryCounters battery_counters = 2;
1373
1374  // Where available enables per-power-rail measurements.
1375  optional bool collect_power_rails = 3;
1376
1377  // Provides a breakdown of energy estimation for various subsystem (e.g. GPU).
1378  // Available from Android S.
1379  optional bool collect_energy_estimation_breakdown = 4;
1380
1381  // Provides a breakdown of time in state for various subsystems.
1382  // Available from Android U.
1383  optional bool collect_entity_state_residency = 5;
1384}
1385
1386// End of protos/perfetto/config/power/android_power_config.proto
1387
1388// Begin of protos/perfetto/config/process_stats/process_stats_config.proto
1389
1390message ProcessStatsConfig {
1391  enum Quirks {
1392    QUIRKS_UNSPECIFIED = 0;
1393
1394    // This has been deprecated and ignored as per 2018-05-01. Full scan at
1395    // startup is now disabled by default and can be re-enabled using the
1396    // |scan_all_processes_on_start| arg.
1397    DISABLE_INITIAL_DUMP = 1 [deprecated = true];
1398
1399    DISABLE_ON_DEMAND = 2;
1400  }
1401  repeated Quirks quirks = 1;
1402
1403  // If enabled all processes will be scanned and dumped when the trace starts.
1404  optional bool scan_all_processes_on_start = 2;
1405
1406  // If enabled thread names are also recoded (this is redundant if sched_switch
1407  // is enabled).
1408  optional bool record_thread_names = 3;
1409
1410  // If > 0 samples counters (see process_stats.proto) from
1411  // /proc/pid/status and oom_score_adj every X ms.
1412  // It will also sample /proc/pid/smaps_rollup if scan_smaps_rollup = true.
1413  // This is required to be > 100ms to avoid excessive CPU usage.
1414  optional uint32 proc_stats_poll_ms = 4;
1415
1416  // id 5 never used
1417
1418  // This is required to be either = 0 or a multiple of |proc_stats_poll_ms|
1419  // (default: |proc_stats_poll_ms|). If = 0, will be set to
1420  // |proc_stats_poll_ms|. Non-multiples will be rounded down to the nearest
1421  // multiple.
1422  optional uint32 proc_stats_cache_ttl_ms = 6;
1423
1424  // Niche feature: If true this will resolve file descriptors for each process
1425  // so these can be mapped to their actual device or file.
1426  // Requires raw_syscalls/sys_{enter,exit} ftrace events to be enabled or
1427  // new fds opened after initially scanning a process will not be
1428  // recognized.
1429  optional bool resolve_process_fds = 9;
1430
1431  // If true, output will include memory stats from /proc/pid/smaps_rollup.
1432  //
1433  // Does NOT work with the Android system daemon by default, as it requires
1434  // running the recording process (traced_probes or tracebox) as root. It is
1435  // possible to avoid the root requirement, but the exact steps depend on the
1436  // Linux distibution. The proc file requires passing a PTRACE_MODE_READ
1437  // check, and might be further covered by the procfs "hidepid" mount option.
1438  optional bool scan_smaps_rollup = 10;
1439
1440  // If true: process descriptions will include process age (starttime in
1441  // /proc/pid/stat).
1442  // Introduced in: perfetto v44.
1443  optional bool record_process_age = 11;
1444
1445  // If true and |proc_stats_poll_ms| is true, process stats will include time
1446  // spent running in user/kernel mode (utime/stime in /proc/pid/stat).
1447  // Introduced in: perfetto v44.
1448  optional bool record_process_runtime = 12;
1449
1450  // record_thread_time_in_state
1451  reserved 7;
1452  // thread_time_in_state_cache_size
1453  reserved 8;
1454}
1455
1456// End of protos/perfetto/config/process_stats/process_stats_config.proto
1457
1458// Begin of protos/perfetto/config/profiling/heapprofd_config.proto
1459
1460// Configuration for go/heapprofd.
1461// Next id: 28
1462message HeapprofdConfig {
1463  message ContinuousDumpConfig {
1464    // ms to wait before first dump.
1465    optional uint32 dump_phase_ms = 5;
1466    // ms to wait between following dumps.
1467    optional uint32 dump_interval_ms = 6;
1468  }
1469
1470  // Sampling rate for all heaps not specified via heap_sampling_intervals.
1471  //
1472  // These are:
1473  // * All heaps if heap_sampling_intervals is empty.
1474  // * Those profiled due to all_heaps and not named in heaps if
1475  //   heap_sampling_intervals is not empty.
1476  // * The implicit libc.malloc heap if heaps is empty.
1477  //
1478  // Set to 1 for perfect accuracy.
1479  // Otherwise, sample every sample_interval_bytes on average.
1480  //
1481  // See
1482  // https://perfetto.dev/docs/data-sources/native-heap-profiler#sampling-interval
1483  // for more details.
1484  //
1485  // BUGS
1486  // Before Android 12, setting this to 0 would crash the target process.
1487  //
1488  // N.B. This must be explicitly set to a non-zero value for all heaps (with
1489  // this field or with heap_sampling_intervals), otherwise the producer will
1490  // not start.
1491  optional uint64 sampling_interval_bytes = 1;
1492
1493  // If less than the given numbers of bytes are left free in the shared
1494  // memory buffer, increase sampling interval by a factor of two.
1495  // Adaptive sampling is disabled when set to 0.
1496  optional uint64 adaptive_sampling_shmem_threshold = 24;
1497  // Stop doubling the sampling_interval once the sampling interval has reached
1498  // this value.
1499  optional uint64 adaptive_sampling_max_sampling_interval_bytes = 25;
1500
1501  // E.g. surfaceflinger, com.android.phone
1502  // This input is normalized in the following way: if it contains slashes,
1503  // everything up to the last slash is discarded. If it contains "@",
1504  // everything after the first @ is discared.
1505  // E.g. /system/bin/surfaceflinger@1.0 normalizes to surfaceflinger.
1506  // This transformation is also applied to the processes' command lines when
1507  // matching.
1508  repeated string process_cmdline = 2;
1509
1510  // For watermark based triggering or local debugging.
1511  repeated uint64 pid = 4;
1512
1513  // Only profile target if it was installed by one of the packages given.
1514  // Special values are:
1515  // * @system: installed on the system partition
1516  // * @product: installed on the product partition
1517  // * @null: sideloaded
1518  // Supported on Android 12+.
1519  repeated string target_installed_by = 26;
1520
1521  // Which heaps to sample, e.g. "libc.malloc". If left empty, only samples
1522  // "malloc".
1523  //
1524  // Introduced in Android 12.
1525  repeated string heaps = 20;
1526
1527  // Which heaps not to sample, e.g. "libc.malloc". This is useful when used in
1528  // combination with all_heaps;
1529  //
1530  // Introduced in Android 12.
1531  repeated string exclude_heaps = 27;
1532
1533  optional bool stream_allocations = 23;
1534
1535  // If given, needs to be the same length as heaps and gives the sampling
1536  // interval for the respective entry in heaps.
1537  //
1538  // Otherwise, sampling_interval_bytes is used.
1539  //
1540  // It is recommended to set sampling_interval_bytes to a reasonable default
1541  // value when using this, as a value of 0 for sampling_interval_bytes will
1542  // crash the target process before Android 12.
1543  //
1544  // Introduced in Android 12.
1545  //
1546  // All values must be non-zero or the producer will not start.
1547  repeated uint64 heap_sampling_intervals = 22;
1548
1549  // Sample all heaps registered by target process. Introduced in Android 12.
1550  optional bool all_heaps = 21;
1551
1552  // Profile all processes eligible for profiling on the system.
1553  // See
1554  // https://perfetto.dev/docs/data-sources/native-heap-profiler#heapprofd-targets
1555  // for which processes are eligible.
1556  //
1557  // On unmodified userdebug builds, this will lead to system crashes. Zygote
1558  // will crash when trying to launch a new process as it will have an
1559  // unexpected open socket to heapprofd.
1560  //
1561  // heapprofd will likely be overloaded by the amount of data for low
1562  // sampling intervals.
1563  optional bool all = 5;
1564
1565  // Do not profile processes whose anon RSS + swap < given value.
1566  // Introduced in Android 11.
1567  optional uint32 min_anonymous_memory_kb = 15;
1568
1569  // Stop profile if heapprofd memory usage goes beyond the given value.
1570  // Introduced in Android 11.
1571  optional uint32 max_heapprofd_memory_kb = 16;
1572
1573  // Stop profile if heapprofd CPU time since start of this data-source
1574  // goes beyond given value.
1575  // Introduced in Android 11.
1576  optional uint64 max_heapprofd_cpu_secs = 17;
1577
1578  // Do not emit function names for mappings starting with this prefix.
1579  // E.g. /system to not emit symbols for any system libraries.
1580  repeated string skip_symbol_prefix = 7;
1581
1582  // Dump at a predefined interval.
1583  optional ContinuousDumpConfig continuous_dump_config = 6;
1584
1585  // Size of the shared memory buffer between the profiled processes and
1586  // heapprofd. Defaults to 8 MiB. If larger than 500 MiB, truncated to 500
1587  // MiB.
1588  //
1589  // Needs to be:
1590  // * at least 8192,
1591  // * a power of two,
1592  // * a multiple of 4096.
1593  optional uint64 shmem_size_bytes = 8;
1594
1595  // When the shmem buffer is full, block the client instead of ending the
1596  // trace. Use with caution as this will significantly slow down the target
1597  // process.
1598  optional bool block_client = 9;
1599
1600  // If set, stop the trace session after blocking the client for this
1601  // timeout. Needs to be larger than 100 us, otherwise no retries are done.
1602  // Introduced in Android 11.
1603  optional uint32 block_client_timeout_us = 14;
1604
1605  // Do not profile processes from startup, only match already running
1606  // processes.
1607  //
1608  // Can not be set at the same time as no_running.
1609  // Introduced in Android 11.
1610  optional bool no_startup = 10;
1611
1612  // Do not profile running processes. Only match processes on startup.
1613  //
1614  // Can not be set at the same time as no_startup.
1615  // Introduced in Android 11.
1616  optional bool no_running = 11;
1617
1618  // deprecated idle_allocations.
1619  reserved 12;
1620
1621  // Cause heapprofd to emit a single dump at the end, showing the memory usage
1622  // at the point in time when the sampled heap usage of the process was at its
1623  // maximum. This causes ProfilePacket.HeapSample.self_max to be set, and
1624  // self_allocated and self_freed to not be set.
1625  // Introduced in Android 11.
1626  optional bool dump_at_max = 13;
1627
1628  // FEATURE FLAGS. THERE BE DRAGONS.
1629
1630  // Escape hatch if the session is being torn down because of a forked child
1631  // that shares memory space, but is not correctly identified as a vforked
1632  // child.
1633  // Introduced in Android 11.
1634  optional bool disable_fork_teardown = 18;
1635
1636  // We try to automatically detect when a target applicatation vforks but then
1637  // does a memory allocation (or free). This auto-detection can be disabled
1638  // with this.
1639  // Introduced in Android 11.
1640  optional bool disable_vfork_detection = 19;
1641}
1642
1643// End of protos/perfetto/config/profiling/heapprofd_config.proto
1644
1645// Begin of protos/perfetto/config/profiling/java_hprof_config.proto
1646
1647// Configuration for managed app heap graph snapshots.
1648message JavaHprofConfig {
1649  // If dump_interval_ms != 0, the following configuration is used.
1650  message ContinuousDumpConfig {
1651    // ms to wait before first continuous dump.
1652    // A dump is always created at the beginning of the trace.
1653    optional uint32 dump_phase_ms = 1;
1654    // ms to wait between following dumps.
1655    optional uint32 dump_interval_ms = 2;
1656    // If true, scans all the processes to find `process_cmdline` and filter by
1657    // `min_anonymous_memory_kb` only at data source start. Default on Android
1658    // S-.
1659    //
1660    // If false, rescans all the processes to find on every dump. Default on
1661    // Android T+.
1662    optional bool scan_pids_only_on_start = 3;
1663  }
1664
1665  // Command line allowlist, matched against the /proc/<pid>/cmdline (not the
1666  // comm string). The semantics of this field were changed since its original
1667  // introduction.
1668  //
1669  // On Android T+ (13+), this field can specify a single wildcard (*), and
1670  // the profiler will attempt to match it in two possible ways:
1671  // * if the pattern starts with a '/', then it is matched against the first
1672  //   segment of the cmdline (i.e. argv0). For example "/bin/e*" would match
1673  //   "/bin/echo".
1674  // * otherwise the pattern is matched against the part of argv0
1675  //   corresponding to the binary name (this is unrelated to /proc/pid/exe).
1676  //   For example "echo" would match "/bin/echo".
1677  //
1678  // On Android S (12) and below, both this pattern and /proc/pid/cmdline get
1679  // normalized prior to an exact string comparison. Normalization is as
1680  // follows: (1) trim everything beyond the first null or "@" byte; (2) if
1681  // the string contains forward slashes, trim everything up to and including
1682  // the last one.
1683  //
1684  // Implementation note: in either case, at most 511 characters of cmdline
1685  // are considered.
1686  repeated string process_cmdline = 1;
1687
1688  // For watermark based triggering or local debugging.
1689  repeated uint64 pid = 2;
1690
1691  // Only profile target if it was installed by one of the packages given.
1692  // Special values are:
1693  // * @system: installed on the system partition
1694  // * @product: installed on the product partition
1695  // * @null: sideloaded
1696  // Supported on Android 12+.
1697  repeated string target_installed_by = 7;
1698
1699  // Dump at a predefined interval.
1700  optional ContinuousDumpConfig continuous_dump_config = 3;
1701
1702  // Do not profile processes whose anon RSS + swap < given value.
1703  optional uint32 min_anonymous_memory_kb = 4;
1704
1705  // Include the process' /proc/self/smaps.
1706  // This only shows maps that:
1707  // * start with /system
1708  // * start with /vendor
1709  // * start with /data/app
1710  // * contain "extracted in memory from Y", where Y matches any of the above
1711  optional bool dump_smaps = 5;
1712
1713  // Exclude objects of the following types from the profile. This can be
1714  // useful if lots of uninteresting objects, e.g. "sun.misc.Cleaner".
1715  repeated string ignored_types = 6;
1716}
1717
1718// End of protos/perfetto/config/profiling/java_hprof_config.proto
1719
1720// Begin of protos/perfetto/common/perf_events.proto
1721
1722message PerfEvents {
1723  // The primary event to count. If recording multiple events, this
1724  // counter is the "group leader".
1725  // Commented from the perspective of its use in |PerfEventConfig|.
1726  // Next id: 12
1727  message Timebase {
1728    // How often to snapshot the counter, along with any follower events and
1729    // any additional sampled data such as callstacks.
1730    //
1731    // This choice also controls how the readings are taken:
1732    // * With |frequency| or |period|, samples are taken by the kernel
1733    //   into a ring buffer. Analogous to `perf record`.
1734    // * With |poll_period_ms|, the userspace periodically snapshots
1735    //   the counters using the read syscall. Analogous to `perf stat -I`.
1736    // Prefer the sampling options unless you're recording PMUs whose
1737    // perf drivers only support the reading mode.
1738    //
1739    // If unset, an implementation-defined sampling default is used.
1740    oneof interval {
1741      // Per-cpu sampling frequency in Hz, as requested from the kernel. Not the
1742      // same as 1/period.
1743      // Details: the actual sampling will still be based on a period, but the
1744      // kernel will dynamically adjust it based on the observed event rate, to
1745      // approximate this frequency. Works best with steady-rate events like
1746      // timers.
1747      // Not guaranteed to be honored as the kernel can throttle the sampling
1748      // rate if it's too high.
1749      uint64 frequency = 2;
1750
1751      // Per-cpu sampling will occur every |period| counts of |event|.
1752      // Prefer |frequency| by default, as it's easier to oversample with a
1753      // fixed period.
1754      // Not guaranteed to be honored as the kernel can throttle the sampling
1755      // rate if it's too high.
1756      uint64 period = 1;
1757
1758      // Per-cpu values are read by the userspace every interval. If using this
1759      // mode, only follower events are supported. Options such as
1760      // |PerfEventConfig.CallstackSampling| are incompatible.
1761      // The period can't be guaranteed to be exact since the readings are taken
1762      // by userspace.
1763      uint32 poll_period_ms = 6;
1764    }
1765
1766    // Counting event to use as the timebase.
1767    // If unset, implies the CPU timer (SW_CPU_CLOCK) as the event,
1768    // which is what you usually want.
1769    oneof event {
1770      Counter counter = 4;
1771      Tracepoint tracepoint = 3;
1772      RawEvent raw_event = 5;
1773    }
1774
1775    // If set, samples will be timestamped with the given clock.
1776    // If unset, the clock is chosen by the implementation.
1777    // For software events, prefer PERF_CLOCK_BOOTTIME. However it cannot be
1778    // used for hardware events (due to interrupt safety), for which the
1779    // recommendation is to use one of the monotonic clocks.
1780    optional PerfClock timestamp_clock = 11;
1781
1782    // Optional arbitrary name for the event, to identify it in the parsed
1783    // trace. Does *not* affect the profiling itself. If unset, the trace
1784    // parser will choose a suitable name.
1785    optional string name = 10;
1786  }
1787
1788  // Builtin counter names from the uapi header. Commented with their perf tool
1789  // aliases.
1790  // TODO(rsavitski): consider generating enums for cache events (should be
1791  // finite), and generally make this list as extensive as possible. Excluding
1792  // things like dynamic PMUs since those don't fit into a static enum.
1793  // Next id: 21
1794  enum Counter {
1795    UNKNOWN_COUNTER = 0;
1796
1797    // cpu-clock
1798    SW_CPU_CLOCK = 1;
1799    // page-faults, faults
1800    SW_PAGE_FAULTS = 2;
1801    // task-clock
1802    SW_TASK_CLOCK = 3;
1803    // context-switches, cs
1804    SW_CONTEXT_SWITCHES = 4;
1805    // cpu-migrations, migrations
1806    SW_CPU_MIGRATIONS = 5;
1807    // minor-faults
1808    SW_PAGE_FAULTS_MIN = 6;
1809    // major-faults
1810    SW_PAGE_FAULTS_MAJ = 7;
1811    // alignment-faults
1812    SW_ALIGNMENT_FAULTS = 8;
1813    // emulation-faults
1814    SW_EMULATION_FAULTS = 9;
1815    // dummy
1816    SW_DUMMY = 20;
1817
1818    // cpu-cycles, cycles
1819    HW_CPU_CYCLES = 10;
1820    // instructions
1821    HW_INSTRUCTIONS = 11;
1822    // cache-references
1823    HW_CACHE_REFERENCES = 12;
1824    // cache-misses
1825    HW_CACHE_MISSES = 13;
1826    // branch-instructions, branches
1827    HW_BRANCH_INSTRUCTIONS = 14;
1828    // branch-misses
1829    HW_BRANCH_MISSES = 15;
1830    // bus-cycles
1831    HW_BUS_CYCLES = 16;
1832    // stalled-cycles-frontend, idle-cycles-frontend
1833    HW_STALLED_CYCLES_FRONTEND = 17;
1834    // stalled-cycles-backend, idle-cycles-backend
1835    HW_STALLED_CYCLES_BACKEND = 18;
1836    // ref-cycles
1837    HW_REF_CPU_CYCLES = 19;
1838  }
1839
1840  message Tracepoint {
1841    // Group and name for the tracepoint, acceptable forms:
1842    // * "sched/sched_switch"
1843    // * "sched:sched_switch"
1844    optional string name = 1;
1845
1846    // Optional field-level filter for the tracepoint. Only events matching this
1847    // filter will be counted (and therefore contribute to the sampling period).
1848    // Example: "prev_pid >= 42 && next_pid == 0".
1849    // For full syntax, see kernel documentation on "Event filtering":
1850    // https://www.kernel.org/doc/Documentation/trace/events.txt
1851    optional string filter = 2;
1852  }
1853
1854  // Syscall-level description of the event, propagated to the perf_event_attr
1855  // struct. Primarily for local use-cases, since the event availability and
1856  // encoding is hardware-specific.
1857  message RawEvent {
1858    optional uint32 type = 1;
1859    optional uint64 config = 2;
1860    optional uint64 config1 = 3;
1861    optional uint64 config2 = 4;
1862  }
1863
1864  // Subset of clocks that is supported by perf timestamping.
1865  // CLOCK_TAI is excluded since it's not expected to be used in practice, but
1866  // would require additions to the trace clock synchronisation logic.
1867  enum PerfClock {
1868    UNKNOWN_PERF_CLOCK = 0;
1869    PERF_CLOCK_REALTIME = 1;
1870    PERF_CLOCK_MONOTONIC = 2;
1871    PERF_CLOCK_MONOTONIC_RAW = 3;
1872    PERF_CLOCK_BOOTTIME = 4;
1873  }
1874}
1875
1876// Additional events associated with a leader.
1877// Configuration is similar to Timebase event. Because data acquisition is
1878// driven by the leader there is no option to configure the clock or the
1879// frequency.
1880message FollowerEvent {
1881  oneof event {
1882    PerfEvents.Counter counter = 1;
1883    PerfEvents.Tracepoint tracepoint = 2;
1884    PerfEvents.RawEvent raw_event = 3;
1885  }
1886  optional string name = 4;
1887}
1888
1889// End of protos/perfetto/common/perf_events.proto
1890
1891// Begin of protos/perfetto/config/profiling/perf_event_config.proto
1892
1893// Configuration for the traced_perf profiler.
1894//
1895// Example config for basic cpu profiling:
1896//   perf_event_config {
1897//     timebase {
1898//       frequency: 80
1899//     }
1900//     callstack_sampling {
1901//       scope {
1902//         target_cmdline: "surfaceflinger"
1903//         target_cmdline: "system_server"
1904//       }
1905//       kernel_frames: true
1906//     }
1907//   }
1908//
1909// Next id: 21
1910message PerfEventConfig {
1911  // What event to sample on, and how often.
1912  // Defined in common/perf_events.proto.
1913  optional PerfEvents.Timebase timebase = 15;
1914
1915  // Other events associated with the leader described in the timebase.
1916  repeated FollowerEvent followers = 19;
1917
1918  // If set, the profiler will sample userspace processes' callstacks at the
1919  // interval specified by the |timebase|.
1920  // If unset, the profiler will record only the event counts.
1921  optional CallstackSampling callstack_sampling = 16;
1922
1923  // List of cpu indices for counting. If empty, the default is all cpus.
1924  //
1925  // Note: this is not inside |callstack_sampling.scope| as it also applies to
1926  // counter-only traces. A future change will likely reorganise the options,
1927  // but this field will continue to be supported.
1928  //
1929  // Available since: perfetto v50.
1930  repeated uint32 target_cpu = 20;
1931
1932  //
1933  // Kernel <-> userspace ring buffer options:
1934  //
1935
1936  // How often the per-cpu ring buffers are read by the producer.
1937  // If unset, an implementation-defined default is used.
1938  optional uint32 ring_buffer_read_period_ms = 8;
1939
1940  // Size (in 4k pages) of each per-cpu ring buffer that is filled by the
1941  // kernel. If set, must be a power of two.
1942  // If unset, an implementation-defined default is used.
1943  optional uint32 ring_buffer_pages = 3;
1944
1945  //
1946  // Daemon's resource usage limits:
1947  //
1948
1949  // Drop samples if the heap memory held by the samples in the unwinder queue
1950  // is above the given limit. This counts the memory across all concurrent data
1951  // sources (not just this one's), and there is no fairness guarantee - the
1952  // whole quota might be used up by a concurrent source.
1953  optional uint64 max_enqueued_footprint_kb = 17;
1954
1955  // Stop the data source if traced_perf's combined {RssAnon + Swap} memory
1956  // footprint exceeds this value.
1957  optional uint32 max_daemon_memory_kb = 13;
1958
1959  //
1960  // Uncommon options:
1961  //
1962
1963  // Timeout for the remote /proc/<pid>/{maps,mem} file descriptors for a
1964  // sampled process. This is primarily for Android, where this lookup is
1965  // asynchronous. As long as the producer is waiting, the associated samples
1966  // will be kept enqueued (putting pressure on the capacity of the shared
1967  // unwinding queue). Once a lookup for a process expires, all associated
1968  // samples are discarded. However, if the lookup still succeeds after the
1969  // timeout, future samples will be handled normally.
1970  // If unset, an implementation-defined default is used.
1971  optional uint32 remote_descriptor_timeout_ms = 9;
1972
1973  // Optional period for clearing state cached by the unwinder. This is a heavy
1974  // operation that is only necessary for traces that target a wide set of
1975  // processes, and require the memory footprint to be reset periodically.
1976  // If unset, the cached state will not be cleared.
1977  optional uint32 unwind_state_clear_period_ms = 10;
1978
1979  // If set, only profile target if it was installed by a package with one of
1980  // these names. Special values:
1981  // * "@system": installed on the system partition
1982  // * "@product": installed on the product partition
1983  // * "@null": sideloaded
1984  // Supported on Android 12+.
1985  repeated string target_installed_by = 18;
1986
1987  //
1988  // Deprecated (superseded by options above):
1989  //
1990  // Do not set *any* of these fields in new configs.
1991  //
1992
1993  // Note: legacy configs had to set |all_cpus| to true to pass parsing.
1994  // We rely on this to detect such configs.
1995  optional bool all_cpus = 1;
1996  optional uint32 sampling_frequency = 2;
1997  optional bool kernel_frames = 12;
1998  repeated int32 target_pid = 4;
1999  repeated string target_cmdline = 5;
2000  repeated int32 exclude_pid = 6;
2001  repeated string exclude_cmdline = 7;
2002  optional uint32 additional_cmdline_count = 11;
2003  // previously |tracepoint|
2004  reserved 14;
2005
2006  //
2007  // Sub-messages (nested for generated code namespacing).
2008  //
2009
2010  message CallstackSampling {
2011    // Defines a set of processes for which samples are retained/skipped. If
2012    // unset, all samples are kept, but beware that it will be very heavy on the
2013    // stack unwinder, which might start dropping samples due to overload.
2014    optional Scope scope = 1;
2015
2016    // If true, callstacks will include the kernel-space frames. Such frames can
2017    // be identified by a magical "kernel" string as their mapping name.
2018    // Requires traced_perf to be running as root, or kptr_restrict to have been
2019    // manually unrestricted. On Android, the platform should do the right thing
2020    // on debug builds.
2021    // This does *not* disclose KASLR, as only the function names are emitted.
2022    optional bool kernel_frames = 2;
2023
2024    // Whether to record and unwind userspace callstacks. If unset, defaults to
2025    // including userspace (UNWIND_DWARF) both for backwards compatibility and
2026    // as the most common default (this defaulting is only applicable if the
2027    // outer CallstackSampling message is explicitly set).
2028    optional UnwindMode user_frames = 3;
2029  }
2030
2031  message Scope {
2032    // Process ID (TGID) allowlist. If this list is not empty, only matching
2033    // samples will be retained. If multiple allow/deny-lists are
2034    // specified by the config, then all of them are evaluated for each sampled
2035    // process.
2036    repeated int32 target_pid = 1;
2037
2038    // Command line allowlist, matched against the /proc/<pid>/cmdline (not the
2039    // comm string). The semantics of this field were changed since its original
2040    // introduction.
2041    //
2042    // On Android T+ (13+), this field can specify a single wildcard (*), and
2043    // the profiler will attempt to match it in two possible ways:
2044    // * if the pattern starts with a '/', then it is matched against the first
2045    //   segment of the cmdline (i.e. argv0). For example "/bin/e*" would match
2046    //   "/bin/echo".
2047    // * otherwise the pattern is matched against the part of argv0
2048    //   corresponding to the binary name (this is unrelated to /proc/pid/exe).
2049    //   For example "echo" would match "/bin/echo".
2050    //
2051    // On Android S (12) and below, both this pattern and /proc/pid/cmdline get
2052    // normalized prior to an exact string comparison. Normalization is as
2053    // follows: (1) trim everything beyond the first null or "@" byte; (2) if
2054    // the string contains forward slashes, trim everything up to and including
2055    // the last one.
2056    //
2057    // Implementation note: in either case, at most 511 characters of cmdline
2058    // are considered.
2059    repeated string target_cmdline = 2;
2060
2061    // List of excluded pids.
2062    repeated int32 exclude_pid = 3;
2063
2064    // List of excluded cmdlines. See description of |target_cmdline| for how
2065    // this is handled.
2066    repeated string exclude_cmdline = 4;
2067
2068    // Niche features for systemwide callstacks:
2069
2070    // Number of additional command lines to sample. Only those which are
2071    // neither explicitly included nor excluded will be considered. Processes
2072    // are accepted on a first come, first served basis.
2073    optional uint32 additional_cmdline_count = 5;
2074
2075    // If set to N, all encountered processes will be put into one of the N
2076    // possible bins, and only one randomly-chosen bin will be selected for
2077    // unwinding. The binning is simply "pid % N", under the assumption that
2078    // low-order bits of pids are roughly uniformly distributed. Other explicit
2079    // inclusions/exclusions in this |Scope| message are still respected.
2080    //
2081    // The profiler will report the chosen shard in PerfSampleDefaults, and the
2082    // values will be queryable in trace processor under the "stats" table as
2083    // "perf_process_shard_count" and "perf_chosen_process_shard".
2084    //
2085    // NB: all data sources in a config that set |process_shard_count| must set
2086    // it to the same value. The profiler will choose one bin for all those data
2087    // sources.
2088    optional uint32 process_shard_count = 6;
2089  }
2090
2091  // Userspace unwinding mode. A possible future addition is kernel-unwound
2092  // callchains for frame pointer based systems.
2093  enum UnwindMode {
2094    UNWIND_UNKNOWN = 0;
2095    // Do not unwind userspace:
2096    UNWIND_SKIP = 1;
2097    // Use libunwindstack (default):
2098    UNWIND_DWARF = 2;
2099    // Use userspace frame pointer unwinder:
2100    UNWIND_FRAME_POINTER = 3;
2101  }
2102}
2103
2104// End of protos/perfetto/config/profiling/perf_event_config.proto
2105
2106// Begin of protos/perfetto/config/statsd/atom_ids.proto
2107
2108// This enum is obtained by post-processing
2109// AOSP/frameworks/proto_logging/stats/atoms.proto through
2110// AOSP/external/perfetto/tools/update-statsd-descriptor, which extracts one
2111// enum value for each proto field defined in the upstream atoms.proto.
2112enum AtomId {
2113  ATOM_UNSPECIFIED = 0;
2114  ATOM_BLE_SCAN_STATE_CHANGED = 2;
2115  ATOM_PROCESS_STATE_CHANGED = 3;
2116  ATOM_BLE_SCAN_RESULT_RECEIVED = 4;
2117  ATOM_SENSOR_STATE_CHANGED = 5;
2118  ATOM_GPS_SCAN_STATE_CHANGED = 6;
2119  ATOM_SYNC_STATE_CHANGED = 7;
2120  ATOM_SCHEDULED_JOB_STATE_CHANGED = 8;
2121  ATOM_SCREEN_BRIGHTNESS_CHANGED = 9;
2122  ATOM_WAKELOCK_STATE_CHANGED = 10;
2123  ATOM_LONG_PARTIAL_WAKELOCK_STATE_CHANGED = 11;
2124  ATOM_MOBILE_RADIO_POWER_STATE_CHANGED = 12;
2125  ATOM_WIFI_RADIO_POWER_STATE_CHANGED = 13;
2126  ATOM_ACTIVITY_MANAGER_SLEEP_STATE_CHANGED = 14;
2127  ATOM_MEMORY_FACTOR_STATE_CHANGED = 15;
2128  ATOM_EXCESSIVE_CPU_USAGE_REPORTED = 16;
2129  ATOM_CACHED_KILL_REPORTED = 17;
2130  ATOM_PROCESS_MEMORY_STAT_REPORTED = 18;
2131  ATOM_LAUNCHER_EVENT = 19;
2132  ATOM_BATTERY_SAVER_MODE_STATE_CHANGED = 20;
2133  ATOM_DEVICE_IDLE_MODE_STATE_CHANGED = 21;
2134  ATOM_DEVICE_IDLING_MODE_STATE_CHANGED = 22;
2135  ATOM_AUDIO_STATE_CHANGED = 23;
2136  ATOM_MEDIA_CODEC_STATE_CHANGED = 24;
2137  ATOM_CAMERA_STATE_CHANGED = 25;
2138  ATOM_FLASHLIGHT_STATE_CHANGED = 26;
2139  ATOM_UID_PROCESS_STATE_CHANGED = 27;
2140  ATOM_PROCESS_LIFE_CYCLE_STATE_CHANGED = 28;
2141  ATOM_SCREEN_STATE_CHANGED = 29;
2142  ATOM_BATTERY_LEVEL_CHANGED = 30;
2143  ATOM_CHARGING_STATE_CHANGED = 31;
2144  ATOM_PLUGGED_STATE_CHANGED = 32;
2145  ATOM_INTERACTIVE_STATE_CHANGED = 33;
2146  ATOM_TOUCH_EVENT_REPORTED = 34;
2147  ATOM_WAKEUP_ALARM_OCCURRED = 35;
2148  ATOM_KERNEL_WAKEUP_REPORTED = 36;
2149  ATOM_WIFI_LOCK_STATE_CHANGED = 37;
2150  ATOM_WIFI_SIGNAL_STRENGTH_CHANGED = 38;
2151  ATOM_WIFI_SCAN_STATE_CHANGED = 39;
2152  ATOM_PHONE_SIGNAL_STRENGTH_CHANGED = 40;
2153  ATOM_SETTING_CHANGED = 41;
2154  ATOM_ACTIVITY_FOREGROUND_STATE_CHANGED = 42;
2155  ATOM_ISOLATED_UID_CHANGED = 43;
2156  ATOM_PACKET_WAKEUP_OCCURRED = 44;
2157  ATOM_WALL_CLOCK_TIME_SHIFTED = 45;
2158  ATOM_ANOMALY_DETECTED = 46;
2159  ATOM_APP_BREADCRUMB_REPORTED = 47;
2160  ATOM_APP_START_OCCURRED = 48;
2161  ATOM_APP_START_CANCELED = 49;
2162  ATOM_APP_START_FULLY_DRAWN = 50;
2163  ATOM_LMK_KILL_OCCURRED = 51;
2164  ATOM_PICTURE_IN_PICTURE_STATE_CHANGED = 52;
2165  ATOM_WIFI_MULTICAST_LOCK_STATE_CHANGED = 53;
2166  ATOM_APP_START_MEMORY_STATE_CAPTURED = 55;
2167  ATOM_SHUTDOWN_SEQUENCE_REPORTED = 56;
2168  ATOM_BOOT_SEQUENCE_REPORTED = 57;
2169  ATOM_OVERLAY_STATE_CHANGED = 59;
2170  ATOM_FOREGROUND_SERVICE_STATE_CHANGED = 60;
2171  ATOM_CALL_STATE_CHANGED = 61;
2172  ATOM_KEYGUARD_STATE_CHANGED = 62;
2173  ATOM_KEYGUARD_BOUNCER_STATE_CHANGED = 63;
2174  ATOM_KEYGUARD_BOUNCER_PASSWORD_ENTERED = 64;
2175  ATOM_APP_DIED = 65;
2176  ATOM_RESOURCE_CONFIGURATION_CHANGED = 66;
2177  ATOM_BLUETOOTH_ENABLED_STATE_CHANGED = 67;
2178  ATOM_BLUETOOTH_CONNECTION_STATE_CHANGED = 68;
2179  ATOM_GPS_SIGNAL_QUALITY_CHANGED = 69;
2180  ATOM_USB_CONNECTOR_STATE_CHANGED = 70;
2181  ATOM_SPEAKER_IMPEDANCE_REPORTED = 71;
2182  ATOM_HARDWARE_FAILED = 72;
2183  ATOM_PHYSICAL_DROP_DETECTED = 73;
2184  ATOM_CHARGE_CYCLES_REPORTED = 74;
2185  ATOM_MOBILE_CONNECTION_STATE_CHANGED = 75;
2186  ATOM_MOBILE_RADIO_TECHNOLOGY_CHANGED = 76;
2187  ATOM_USB_DEVICE_ATTACHED = 77;
2188  ATOM_APP_CRASH_OCCURRED = 78;
2189  ATOM_ANR_OCCURRED = 79;
2190  ATOM_WTF_OCCURRED = 80;
2191  ATOM_LOW_MEM_REPORTED = 81;
2192  ATOM_GENERIC_ATOM = 82;
2193  ATOM_VIBRATOR_STATE_CHANGED = 84;
2194  ATOM_DEFERRED_JOB_STATS_REPORTED = 85;
2195  ATOM_THERMAL_THROTTLING = 86;
2196  ATOM_BIOMETRIC_ACQUIRED = 87;
2197  ATOM_BIOMETRIC_AUTHENTICATED = 88;
2198  ATOM_BIOMETRIC_ERROR_OCCURRED = 89;
2199  ATOM_UI_EVENT_REPORTED = 90;
2200  ATOM_BATTERY_HEALTH_SNAPSHOT = 91;
2201  ATOM_SLOW_IO = 92;
2202  ATOM_BATTERY_CAUSED_SHUTDOWN = 93;
2203  ATOM_PHONE_SERVICE_STATE_CHANGED = 94;
2204  ATOM_PHONE_STATE_CHANGED = 95;
2205  ATOM_USER_RESTRICTION_CHANGED = 96;
2206  ATOM_SETTINGS_UI_CHANGED = 97;
2207  ATOM_CONNECTIVITY_STATE_CHANGED = 98;
2208  ATOM_SERVICE_STATE_CHANGED = 99;
2209  ATOM_SERVICE_LAUNCH_REPORTED = 100;
2210  ATOM_FLAG_FLIP_UPDATE_OCCURRED = 101;
2211  ATOM_BINARY_PUSH_STATE_CHANGED = 102;
2212  ATOM_DEVICE_POLICY_EVENT = 103;
2213  ATOM_DOCS_UI_FILE_OP_CANCELED = 104;
2214  ATOM_DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED = 105;
2215  ATOM_DOCS_UI_FILE_OP_FAILURE = 106;
2216  ATOM_DOCS_UI_PROVIDER_FILE_OP = 107;
2217  ATOM_DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST = 108;
2218  ATOM_DOCS_UI_LAUNCH_REPORTED = 109;
2219  ATOM_DOCS_UI_ROOT_VISITED = 110;
2220  ATOM_DOCS_UI_STARTUP_MS = 111;
2221  ATOM_DOCS_UI_USER_ACTION_REPORTED = 112;
2222  ATOM_WIFI_ENABLED_STATE_CHANGED = 113;
2223  ATOM_WIFI_RUNNING_STATE_CHANGED = 114;
2224  ATOM_APP_COMPACTED = 115;
2225  ATOM_NETWORK_DNS_EVENT_REPORTED = 116;
2226  ATOM_DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED = 117;
2227  ATOM_DOCS_UI_PICK_RESULT_REPORTED = 118;
2228  ATOM_DOCS_UI_SEARCH_MODE_REPORTED = 119;
2229  ATOM_DOCS_UI_SEARCH_TYPE_REPORTED = 120;
2230  ATOM_DATA_STALL_EVENT = 121;
2231  ATOM_RESCUE_PARTY_RESET_REPORTED = 122;
2232  ATOM_SIGNED_CONFIG_REPORTED = 123;
2233  ATOM_GNSS_NI_EVENT_REPORTED = 124;
2234  ATOM_BLUETOOTH_LINK_LAYER_CONNECTION_EVENT = 125;
2235  ATOM_BLUETOOTH_ACL_CONNECTION_STATE_CHANGED = 126;
2236  ATOM_BLUETOOTH_SCO_CONNECTION_STATE_CHANGED = 127;
2237  ATOM_APP_DOWNGRADED = 128;
2238  ATOM_APP_OPTIMIZED_AFTER_DOWNGRADED = 129;
2239  ATOM_LOW_STORAGE_STATE_CHANGED = 130;
2240  ATOM_GNSS_NFW_NOTIFICATION_REPORTED = 131;
2241  ATOM_GNSS_CONFIGURATION_REPORTED = 132;
2242  ATOM_USB_PORT_OVERHEAT_EVENT_REPORTED = 133;
2243  ATOM_NFC_ERROR_OCCURRED = 134;
2244  ATOM_NFC_STATE_CHANGED = 135;
2245  ATOM_NFC_BEAM_OCCURRED = 136;
2246  ATOM_NFC_CARDEMULATION_OCCURRED = 137;
2247  ATOM_NFC_TAG_OCCURRED = 138;
2248  ATOM_NFC_HCE_TRANSACTION_OCCURRED = 139;
2249  ATOM_SE_STATE_CHANGED = 140;
2250  ATOM_SE_OMAPI_REPORTED = 141;
2251  ATOM_BROADCAST_DISPATCH_LATENCY_REPORTED = 142;
2252  ATOM_ATTENTION_MANAGER_SERVICE_RESULT_REPORTED = 143;
2253  ATOM_ADB_CONNECTION_CHANGED = 144;
2254  ATOM_SPEECH_DSP_STAT_REPORTED = 145;
2255  ATOM_USB_CONTAMINANT_REPORTED = 146;
2256  ATOM_WATCHDOG_ROLLBACK_OCCURRED = 147;
2257  ATOM_BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED = 148;
2258  ATOM_BUBBLE_UI_CHANGED = 149;
2259  ATOM_SCHEDULED_JOB_CONSTRAINT_CHANGED = 150;
2260  ATOM_BLUETOOTH_ACTIVE_DEVICE_CHANGED = 151;
2261  ATOM_BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED = 152;
2262  ATOM_BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED = 153;
2263  ATOM_BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED = 154;
2264  ATOM_BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED = 155;
2265  ATOM_BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED = 156;
2266  ATOM_BLUETOOTH_DEVICE_RSSI_REPORTED = 157;
2267  ATOM_BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED = 158;
2268  ATOM_BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED = 159;
2269  ATOM_BLUETOOTH_HCI_TIMEOUT_REPORTED = 160;
2270  ATOM_BLUETOOTH_QUALITY_REPORT_REPORTED = 161;
2271  ATOM_BLUETOOTH_DEVICE_INFO_REPORTED = 162;
2272  ATOM_BLUETOOTH_REMOTE_VERSION_INFO_REPORTED = 163;
2273  ATOM_BLUETOOTH_SDP_ATTRIBUTE_REPORTED = 164;
2274  ATOM_BLUETOOTH_BOND_STATE_CHANGED = 165;
2275  ATOM_BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED = 166;
2276  ATOM_BLUETOOTH_SMP_PAIRING_EVENT_REPORTED = 167;
2277  ATOM_SCREEN_TIMEOUT_EXTENSION_REPORTED = 168;
2278  ATOM_PROCESS_START_TIME = 169;
2279  ATOM_PERMISSION_GRANT_REQUEST_RESULT_REPORTED = 170;
2280  ATOM_BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED = 171;
2281  ATOM_DEVICE_IDENTIFIER_ACCESS_DENIED = 172;
2282  ATOM_BUBBLE_DEVELOPER_ERROR_REPORTED = 173;
2283  ATOM_ASSIST_GESTURE_STAGE_REPORTED = 174;
2284  ATOM_ASSIST_GESTURE_FEEDBACK_REPORTED = 175;
2285  ATOM_ASSIST_GESTURE_PROGRESS_REPORTED = 176;
2286  ATOM_TOUCH_GESTURE_CLASSIFIED = 177;
2287  ATOM_HIDDEN_API_USED = 178;
2288  ATOM_STYLE_UI_CHANGED = 179;
2289  ATOM_PRIVACY_INDICATORS_INTERACTED = 180;
2290  ATOM_APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED = 181;
2291  ATOM_NETWORK_STACK_REPORTED = 182;
2292  ATOM_APP_MOVED_STORAGE_REPORTED = 183;
2293  ATOM_BIOMETRIC_ENROLLED = 184;
2294  ATOM_SYSTEM_SERVER_WATCHDOG_OCCURRED = 185;
2295  ATOM_TOMB_STONE_OCCURRED = 186;
2296  ATOM_BLUETOOTH_CLASS_OF_DEVICE_REPORTED = 187;
2297  ATOM_INTELLIGENCE_EVENT_REPORTED = 188;
2298  ATOM_THERMAL_THROTTLING_SEVERITY_STATE_CHANGED = 189;
2299  ATOM_ROLE_REQUEST_RESULT_REPORTED = 190;
2300  ATOM_MEDIAMETRICS_AUDIOPOLICY_REPORTED = 191;
2301  ATOM_MEDIAMETRICS_AUDIORECORD_REPORTED = 192;
2302  ATOM_MEDIAMETRICS_AUDIOTHREAD_REPORTED = 193;
2303  ATOM_MEDIAMETRICS_AUDIOTRACK_REPORTED = 194;
2304  ATOM_MEDIAMETRICS_CODEC_REPORTED = 195;
2305  ATOM_MEDIAMETRICS_DRM_WIDEVINE_REPORTED = 196;
2306  ATOM_MEDIAMETRICS_EXTRACTOR_REPORTED = 197;
2307  ATOM_MEDIAMETRICS_MEDIADRM_REPORTED = 198;
2308  ATOM_MEDIAMETRICS_NUPLAYER_REPORTED = 199;
2309  ATOM_MEDIAMETRICS_RECORDER_REPORTED = 200;
2310  ATOM_MEDIAMETRICS_DRMMANAGER_REPORTED = 201;
2311  ATOM_CAR_POWER_STATE_CHANGED = 203;
2312  ATOM_GARAGE_MODE_INFO = 204;
2313  ATOM_TEST_ATOM_REPORTED = 205;
2314  ATOM_CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED = 206;
2315  ATOM_CONTENT_CAPTURE_SERVICE_EVENTS = 207;
2316  ATOM_CONTENT_CAPTURE_SESSION_EVENTS = 208;
2317  ATOM_CONTENT_CAPTURE_FLUSHED = 209;
2318  ATOM_LOCATION_MANAGER_API_USAGE_REPORTED = 210;
2319  ATOM_REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED = 211;
2320  ATOM_RUNTIME_PERMISSIONS_UPGRADE_RESULT = 212;
2321  ATOM_GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS = 213;
2322  ATOM_LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION = 214;
2323  ATOM_APP_PERMISSION_FRAGMENT_ACTION_REPORTED = 215;
2324  ATOM_APP_PERMISSION_FRAGMENT_VIEWED = 216;
2325  ATOM_APP_PERMISSIONS_FRAGMENT_VIEWED = 217;
2326  ATOM_PERMISSION_APPS_FRAGMENT_VIEWED = 218;
2327  ATOM_TEXT_SELECTION_EVENT = 219;
2328  ATOM_TEXT_LINKIFY_EVENT = 220;
2329  ATOM_CONVERSATION_ACTIONS_EVENT = 221;
2330  ATOM_LANGUAGE_DETECTION_EVENT = 222;
2331  ATOM_EXCLUSION_RECT_STATE_CHANGED = 223;
2332  ATOM_BACK_GESTURE_REPORTED_REPORTED = 224;
2333  ATOM_UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED = 225;
2334  ATOM_UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED = 226;
2335  ATOM_CAMERA_ACTION_EVENT = 227;
2336  ATOM_APP_COMPATIBILITY_CHANGE_REPORTED = 228;
2337  ATOM_PERFETTO_UPLOADED = 229;
2338  ATOM_VMS_CLIENT_CONNECTION_STATE_CHANGED = 230;
2339  ATOM_MEDIA_PROVIDER_SCAN_OCCURRED = 233;
2340  ATOM_MEDIA_CONTENT_DELETED = 234;
2341  ATOM_MEDIA_PROVIDER_PERMISSION_REQUESTED = 235;
2342  ATOM_MEDIA_PROVIDER_SCHEMA_CHANGED = 236;
2343  ATOM_MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED = 237;
2344  ATOM_REBOOT_ESCROW_RECOVERY_REPORTED = 238;
2345  ATOM_BOOT_TIME_EVENT_DURATION_REPORTED = 239;
2346  ATOM_BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED = 240;
2347  ATOM_BOOT_TIME_EVENT_UTC_TIME_REPORTED = 241;
2348  ATOM_BOOT_TIME_EVENT_ERROR_CODE_REPORTED = 242;
2349  ATOM_USERSPACE_REBOOT_REPORTED = 243;
2350  ATOM_NOTIFICATION_REPORTED = 244;
2351  ATOM_NOTIFICATION_PANEL_REPORTED = 245;
2352  ATOM_NOTIFICATION_CHANNEL_MODIFIED = 246;
2353  ATOM_INTEGRITY_CHECK_RESULT_REPORTED = 247;
2354  ATOM_INTEGRITY_RULES_PUSHED = 248;
2355  ATOM_CB_MESSAGE_REPORTED = 249;
2356  ATOM_CB_MESSAGE_ERROR = 250;
2357  ATOM_WIFI_HEALTH_STAT_REPORTED = 251;
2358  ATOM_WIFI_FAILURE_STAT_REPORTED = 252;
2359  ATOM_WIFI_CONNECTION_RESULT_REPORTED = 253;
2360  ATOM_APP_FREEZE_CHANGED = 254;
2361  ATOM_SNAPSHOT_MERGE_REPORTED = 255;
2362  ATOM_FOREGROUND_SERVICE_APP_OP_SESSION_ENDED = 256;
2363  ATOM_DISPLAY_JANK_REPORTED = 257;
2364  ATOM_APP_STANDBY_BUCKET_CHANGED = 258;
2365  ATOM_SHARESHEET_STARTED = 259;
2366  ATOM_RANKING_SELECTED = 260;
2367  ATOM_TVSETTINGS_UI_INTERACTED = 261;
2368  ATOM_LAUNCHER_SNAPSHOT = 262;
2369  ATOM_PACKAGE_INSTALLER_V2_REPORTED = 263;
2370  ATOM_USER_LIFECYCLE_JOURNEY_REPORTED = 264;
2371  ATOM_USER_LIFECYCLE_EVENT_OCCURRED = 265;
2372  ATOM_ACCESSIBILITY_SHORTCUT_REPORTED = 266;
2373  ATOM_ACCESSIBILITY_SERVICE_REPORTED = 267;
2374  ATOM_DOCS_UI_DRAG_AND_DROP_REPORTED = 268;
2375  ATOM_APP_USAGE_EVENT_OCCURRED = 269;
2376  ATOM_AUTO_REVOKE_NOTIFICATION_CLICKED = 270;
2377  ATOM_AUTO_REVOKE_FRAGMENT_APP_VIEWED = 271;
2378  ATOM_AUTO_REVOKED_APP_INTERACTION = 272;
2379  ATOM_APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION = 273;
2380  ATOM_EVS_USAGE_STATS_REPORTED = 274;
2381  ATOM_AUDIO_POWER_USAGE_DATA_REPORTED = 275;
2382  ATOM_TV_TUNER_STATE_CHANGED = 276;
2383  ATOM_MEDIAOUTPUT_OP_SWITCH_REPORTED = 277;
2384  ATOM_CB_MESSAGE_FILTERED = 278;
2385  ATOM_TV_TUNER_DVR_STATUS = 279;
2386  ATOM_TV_CAS_SESSION_OPEN_STATUS = 280;
2387  ATOM_ASSISTANT_INVOCATION_REPORTED = 281;
2388  ATOM_DISPLAY_WAKE_REPORTED = 282;
2389  ATOM_CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED = 283;
2390  ATOM_CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED = 284;
2391  ATOM_CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED = 285;
2392  ATOM_CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED = 286;
2393  ATOM_CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED = 287;
2394  ATOM_CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED = 288;
2395  ATOM_CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED = 289;
2396  ATOM_NETWORK_IP_PROVISIONING_REPORTED = 290;
2397  ATOM_NETWORK_DHCP_RENEW_REPORTED = 291;
2398  ATOM_NETWORK_VALIDATION_REPORTED = 292;
2399  ATOM_NETWORK_STACK_QUIRK_REPORTED = 293;
2400  ATOM_MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED = 294;
2401  ATOM_MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED = 295;
2402  ATOM_MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED = 296;
2403  ATOM_MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED = 297;
2404  ATOM_BLOB_COMMITTED = 298;
2405  ATOM_BLOB_LEASED = 299;
2406  ATOM_BLOB_OPENED = 300;
2407  ATOM_CONTACTS_PROVIDER_STATUS_REPORTED = 301;
2408  ATOM_KEYSTORE_KEY_EVENT_REPORTED = 302;
2409  ATOM_NETWORK_TETHERING_REPORTED = 303;
2410  ATOM_IME_TOUCH_REPORTED = 304;
2411  ATOM_UI_INTERACTION_FRAME_INFO_REPORTED = 305;
2412  ATOM_UI_ACTION_LATENCY_REPORTED = 306;
2413  ATOM_WIFI_DISCONNECT_REPORTED = 307;
2414  ATOM_WIFI_CONNECTION_STATE_CHANGED = 308;
2415  ATOM_HDMI_CEC_ACTIVE_SOURCE_CHANGED = 309;
2416  ATOM_HDMI_CEC_MESSAGE_REPORTED = 310;
2417  ATOM_AIRPLANE_MODE = 311;
2418  ATOM_MODEM_RESTART = 312;
2419  ATOM_CARRIER_ID_MISMATCH_REPORTED = 313;
2420  ATOM_CARRIER_ID_TABLE_UPDATED = 314;
2421  ATOM_DATA_STALL_RECOVERY_REPORTED = 315;
2422  ATOM_MEDIAMETRICS_MEDIAPARSER_REPORTED = 316;
2423  ATOM_TLS_HANDSHAKE_REPORTED = 317;
2424  ATOM_TEXT_CLASSIFIER_API_USAGE_REPORTED = 318;
2425  ATOM_CAR_WATCHDOG_KILL_STATS_REPORTED = 319;
2426  ATOM_MEDIAMETRICS_PLAYBACK_REPORTED = 320;
2427  ATOM_MEDIA_NETWORK_INFO_CHANGED = 321;
2428  ATOM_MEDIA_PLAYBACK_STATE_CHANGED = 322;
2429  ATOM_MEDIA_PLAYBACK_ERROR_REPORTED = 323;
2430  ATOM_MEDIA_PLAYBACK_TRACK_CHANGED = 324;
2431  ATOM_WIFI_SCAN_REPORTED = 325;
2432  ATOM_WIFI_PNO_SCAN_REPORTED = 326;
2433  ATOM_TIF_TUNE_CHANGED = 327;
2434  ATOM_AUTO_ROTATE_REPORTED = 328;
2435  ATOM_PERFETTO_TRIGGER = 329;
2436  ATOM_TRANSCODING_DATA = 330;
2437  ATOM_IMS_SERVICE_ENTITLEMENT_UPDATED = 331;
2438  ATOM_DEVICE_ROTATED = 333;
2439  ATOM_SIM_SPECIFIC_SETTINGS_RESTORED = 334;
2440  ATOM_TEXT_CLASSIFIER_DOWNLOAD_REPORTED = 335;
2441  ATOM_PIN_STORAGE_EVENT = 336;
2442  ATOM_FACE_DOWN_REPORTED = 337;
2443  ATOM_BLUETOOTH_HAL_CRASH_REASON_REPORTED = 338;
2444  ATOM_REBOOT_ESCROW_PREPARATION_REPORTED = 339;
2445  ATOM_REBOOT_ESCROW_LSKF_CAPTURE_REPORTED = 340;
2446  ATOM_REBOOT_ESCROW_REBOOT_REPORTED = 341;
2447  ATOM_BINDER_LATENCY_REPORTED = 342;
2448  ATOM_MEDIAMETRICS_AAUDIOSTREAM_REPORTED = 343;
2449  ATOM_MEDIA_TRANSCODING_SESSION_ENDED = 344;
2450  ATOM_MAGNIFICATION_USAGE_REPORTED = 345;
2451  ATOM_MAGNIFICATION_MODE_WITH_IME_ON_REPORTED = 346;
2452  ATOM_APP_SEARCH_CALL_STATS_REPORTED = 347;
2453  ATOM_APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED = 348;
2454  ATOM_DEVICE_CONTROL_CHANGED = 349;
2455  ATOM_DEVICE_STATE_CHANGED = 350;
2456  ATOM_INPUTDEVICE_REGISTERED = 351;
2457  ATOM_SMARTSPACE_CARD_REPORTED = 352;
2458  ATOM_AUTH_PROMPT_AUTHENTICATE_INVOKED = 353;
2459  ATOM_AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED = 354;
2460  ATOM_AUTH_ENROLL_ACTION_INVOKED = 355;
2461  ATOM_AUTH_DEPRECATED_API_USED = 356;
2462  ATOM_UNATTENDED_REBOOT_OCCURRED = 357;
2463  ATOM_LONG_REBOOT_BLOCKING_REPORTED = 358;
2464  ATOM_LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED = 359;
2465  ATOM_FDTRACK_EVENT_OCCURRED = 364;
2466  ATOM_TIMEOUT_AUTO_EXTENDED_REPORTED = 365;
2467  ATOM_ALARM_BATCH_DELIVERED = 367;
2468  ATOM_ALARM_SCHEDULED = 368;
2469  ATOM_CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED = 369;
2470  ATOM_USER_LEVEL_HIBERNATION_STATE_CHANGED = 370;
2471  ATOM_APP_SEARCH_INITIALIZE_STATS_REPORTED = 371;
2472  ATOM_APP_SEARCH_QUERY_STATS_REPORTED = 372;
2473  ATOM_APP_PROCESS_DIED = 373;
2474  ATOM_NETWORK_IP_REACHABILITY_MONITOR_REPORTED = 374;
2475  ATOM_SLOW_INPUT_EVENT_REPORTED = 375;
2476  ATOM_ANR_OCCURRED_PROCESSING_STARTED = 376;
2477  ATOM_APP_SEARCH_REMOVE_STATS_REPORTED = 377;
2478  ATOM_MEDIA_CODEC_REPORTED = 378;
2479  ATOM_PERMISSION_USAGE_FRAGMENT_INTERACTION = 379;
2480  ATOM_PERMISSION_DETAILS_INTERACTION = 380;
2481  ATOM_PRIVACY_SENSOR_TOGGLE_INTERACTION = 381;
2482  ATOM_PRIVACY_TOGGLE_DIALOG_INTERACTION = 382;
2483  ATOM_APP_SEARCH_OPTIMIZE_STATS_REPORTED = 383;
2484  ATOM_NON_A11Y_TOOL_SERVICE_WARNING_REPORT = 384;
2485  ATOM_APP_COMPAT_STATE_CHANGED = 386;
2486  ATOM_SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED = 387;
2487  ATOM_SPLITSCREEN_UI_CHANGED = 388;
2488  ATOM_NETWORK_DNS_HANDSHAKE_REPORTED = 389;
2489  ATOM_BLUETOOTH_CODE_PATH_COUNTER = 390;
2490  ATOM_BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY = 392;
2491  ATOM_ACCESSIBILITY_FLOATING_MENU_UI_CHANGED = 393;
2492  ATOM_NEURALNETWORKS_COMPILATION_COMPLETED = 394;
2493  ATOM_NEURALNETWORKS_EXECUTION_COMPLETED = 395;
2494  ATOM_NEURALNETWORKS_COMPILATION_FAILED = 396;
2495  ATOM_NEURALNETWORKS_EXECUTION_FAILED = 397;
2496  ATOM_CONTEXT_HUB_BOOTED = 398;
2497  ATOM_CONTEXT_HUB_RESTARTED = 399;
2498  ATOM_CONTEXT_HUB_LOADED_NANOAPP_SNAPSHOT_REPORTED = 400;
2499  ATOM_CHRE_CODE_DOWNLOAD_TRANSACTED = 401;
2500  ATOM_UWB_SESSION_INITED = 402;
2501  ATOM_UWB_SESSION_CLOSED = 403;
2502  ATOM_UWB_FIRST_RANGING_RECEIVED = 404;
2503  ATOM_UWB_RANGING_MEASUREMENT_RECEIVED = 405;
2504  ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_SCHEDULED = 406;
2505  ATOM_TEXT_CLASSIFIER_DOWNLOAD_WORK_COMPLETED = 407;
2506  ATOM_CLIPBOARD_CLEARED = 408;
2507  ATOM_VM_CREATION_REQUESTED = 409;
2508  ATOM_NEARBY_DEVICE_SCAN_STATE_CHANGED = 410;
2509  ATOM_APPLICATION_LOCALES_CHANGED = 412;
2510  ATOM_MEDIAMETRICS_AUDIOTRACKSTATUS_REPORTED = 413;
2511  ATOM_FOLD_STATE_DURATION_REPORTED = 414;
2512  ATOM_LOCATION_TIME_ZONE_PROVIDER_CONTROLLER_STATE_CHANGED = 415;
2513  ATOM_DISPLAY_HBM_STATE_CHANGED = 416;
2514  ATOM_DISPLAY_HBM_BRIGHTNESS_CHANGED = 417;
2515  ATOM_PERSISTENT_URI_PERMISSIONS_FLUSHED = 418;
2516  ATOM_EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED = 419;
2517  ATOM_VBMETA_DIGEST_REPORTED = 420;
2518  ATOM_APEX_INFO_GATHERED = 421;
2519  ATOM_PVM_INFO_GATHERED = 422;
2520  ATOM_WEAR_SETTINGS_UI_INTERACTED = 423;
2521  ATOM_TRACING_SERVICE_REPORT_EVENT = 424;
2522  ATOM_MEDIAMETRICS_AUDIORECORDSTATUS_REPORTED = 425;
2523  ATOM_LAUNCHER_LATENCY = 426;
2524  ATOM_DROPBOX_ENTRY_DROPPED = 427;
2525  ATOM_WIFI_P2P_CONNECTION_REPORTED = 428;
2526  ATOM_GAME_STATE_CHANGED = 429;
2527  ATOM_HOTWORD_DETECTOR_CREATE_REQUESTED = 430;
2528  ATOM_HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED = 431;
2529  ATOM_HOTWORD_DETECTION_SERVICE_RESTARTED = 432;
2530  ATOM_HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED = 433;
2531  ATOM_HOTWORD_DETECTOR_EVENTS = 434;
2532  ATOM_BOOT_COMPLETED_BROADCAST_COMPLETION_LATENCY_REPORTED = 437;
2533  ATOM_CONTACTS_INDEXER_UPDATE_STATS_REPORTED = 440;
2534  ATOM_APP_BACKGROUND_RESTRICTIONS_INFO = 441;
2535  ATOM_MMS_SMS_PROVIDER_GET_THREAD_ID_FAILED = 442;
2536  ATOM_MMS_SMS_DATABASE_HELPER_ON_UPGRADE_FAILED = 443;
2537  ATOM_PERMISSION_REMINDER_NOTIFICATION_INTERACTED = 444;
2538  ATOM_RECENT_PERMISSION_DECISIONS_INTERACTED = 445;
2539  ATOM_GNSS_PSDS_DOWNLOAD_REPORTED = 446;
2540  ATOM_LE_AUDIO_CONNECTION_SESSION_REPORTED = 447;
2541  ATOM_LE_AUDIO_BROADCAST_SESSION_REPORTED = 448;
2542  ATOM_DREAM_UI_EVENT_REPORTED = 449;
2543  ATOM_TASK_MANAGER_EVENT_REPORTED = 450;
2544  ATOM_CDM_ASSOCIATION_ACTION = 451;
2545  ATOM_MAGNIFICATION_TRIPLE_TAP_AND_HOLD_ACTIVATED_SESSION_REPORTED = 452;
2546  ATOM_MAGNIFICATION_FOLLOW_TYPING_FOCUS_ACTIVATED_SESSION_REPORTED = 453;
2547  ATOM_ACCESSIBILITY_TEXT_READING_OPTIONS_CHANGED = 454;
2548  ATOM_WIFI_SETUP_FAILURE_CRASH_REPORTED = 455;
2549  ATOM_UWB_DEVICE_ERROR_REPORTED = 456;
2550  ATOM_ISOLATED_COMPILATION_SCHEDULED = 457;
2551  ATOM_ISOLATED_COMPILATION_ENDED = 458;
2552  ATOM_ONS_OPPORTUNISTIC_ESIM_PROVISIONING_COMPLETE = 459;
2553  ATOM_SYSTEM_SERVER_PRE_WATCHDOG_OCCURRED = 460;
2554  ATOM_TELEPHONY_ANOMALY_DETECTED = 461;
2555  ATOM_LETTERBOX_POSITION_CHANGED = 462;
2556  ATOM_REMOTE_KEY_PROVISIONING_ATTEMPT = 463;
2557  ATOM_REMOTE_KEY_PROVISIONING_NETWORK_INFO = 464;
2558  ATOM_REMOTE_KEY_PROVISIONING_TIMING = 465;
2559  ATOM_MEDIAOUTPUT_OP_INTERACTION_REPORT = 466;
2560  ATOM_SYNC_EXEMPTION_OCCURRED = 468;
2561  ATOM_AUTOFILL_PRESENTATION_EVENT_REPORTED = 469;
2562  ATOM_DOCK_STATE_CHANGED = 470;
2563  ATOM_SAFETY_SOURCE_STATE_COLLECTED = 471;
2564  ATOM_SAFETY_CENTER_SYSTEM_EVENT_REPORTED = 472;
2565  ATOM_SAFETY_CENTER_INTERACTION_REPORTED = 473;
2566  ATOM_SETTINGS_PROVIDER_SETTING_CHANGED = 474;
2567  ATOM_BROADCAST_DELIVERY_EVENT_REPORTED = 475;
2568  ATOM_SERVICE_REQUEST_EVENT_REPORTED = 476;
2569  ATOM_PROVIDER_ACQUISITION_EVENT_REPORTED = 477;
2570  ATOM_BLUETOOTH_DEVICE_NAME_REPORTED = 478;
2571  ATOM_CB_CONFIG_UPDATED = 479;
2572  ATOM_CB_MODULE_ERROR_REPORTED = 480;
2573  ATOM_CB_SERVICE_FEATURE_CHANGED = 481;
2574  ATOM_CB_RECEIVER_FEATURE_CHANGED = 482;
2575  ATOM_PRIVACY_SIGNAL_NOTIFICATION_INTERACTION = 484;
2576  ATOM_PRIVACY_SIGNAL_ISSUE_CARD_INTERACTION = 485;
2577  ATOM_PRIVACY_SIGNALS_JOB_FAILURE = 486;
2578  ATOM_VIBRATION_REPORTED = 487;
2579  ATOM_UWB_RANGING_START = 489;
2580  ATOM_APP_COMPACTED_V2 = 491;
2581  ATOM_DISPLAY_BRIGHTNESS_CHANGED = 494;
2582  ATOM_ACTIVITY_ACTION_BLOCKED = 495;
2583  ATOM_NETWORK_DNS_SERVER_SUPPORT_REPORTED = 504;
2584  ATOM_VM_BOOTED = 505;
2585  ATOM_VM_EXITED = 506;
2586  ATOM_AMBIENT_BRIGHTNESS_STATS_REPORTED = 507;
2587  ATOM_MEDIAMETRICS_SPATIALIZERCAPABILITIES_REPORTED = 508;
2588  ATOM_MEDIAMETRICS_SPATIALIZERDEVICEENABLED_REPORTED = 509;
2589  ATOM_MEDIAMETRICS_HEADTRACKERDEVICEENABLED_REPORTED = 510;
2590  ATOM_MEDIAMETRICS_HEADTRACKERDEVICESUPPORTED_REPORTED = 511;
2591  ATOM_HEARING_AID_INFO_REPORTED = 513;
2592  ATOM_DEVICE_WIDE_JOB_CONSTRAINT_CHANGED = 514;
2593  ATOM_AMBIENT_MODE_CHANGED = 515;
2594  ATOM_ANR_LATENCY_REPORTED = 516;
2595  ATOM_RESOURCE_API_INFO = 517;
2596  ATOM_SYSTEM_DEFAULT_NETWORK_CHANGED = 518;
2597  ATOM_IWLAN_SETUP_DATA_CALL_RESULT_REPORTED = 519;
2598  ATOM_IWLAN_PDN_DISCONNECTED_REASON_REPORTED = 520;
2599  ATOM_AIRPLANE_MODE_SESSION_REPORTED = 521;
2600  ATOM_VM_CPU_STATUS_REPORTED = 522;
2601  ATOM_VM_MEM_STATUS_REPORTED = 523;
2602  ATOM_PACKAGE_INSTALLATION_SESSION_REPORTED = 524;
2603  ATOM_DEFAULT_NETWORK_REMATCH_INFO = 525;
2604  ATOM_NETWORK_SELECTION_PERFORMANCE = 526;
2605  ATOM_NETWORK_NSD_REPORTED = 527;
2606  ATOM_BLUETOOTH_DISCONNECTION_REASON_REPORTED = 529;
2607  ATOM_BLUETOOTH_LOCAL_VERSIONS_REPORTED = 530;
2608  ATOM_BLUETOOTH_REMOTE_SUPPORTED_FEATURES_REPORTED = 531;
2609  ATOM_BLUETOOTH_LOCAL_SUPPORTED_FEATURES_REPORTED = 532;
2610  ATOM_BLUETOOTH_GATT_APP_INFO = 533;
2611  ATOM_BRIGHTNESS_CONFIGURATION_UPDATED = 534;
2612  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_LAUNCHED = 538;
2613  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_FINISHED = 539;
2614  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_CONNECTION_REPORTED = 540;
2615  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_DEVICE_SCAN_TRIGGERED = 541;
2616  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_FIRST_DEVICE_SCAN_LATENCY = 542;
2617  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_CONNECT_DEVICE_LATENCY = 543;
2618  ATOM_PACKAGE_MANAGER_SNAPSHOT_REPORTED = 544;
2619  ATOM_PACKAGE_MANAGER_APPS_FILTER_CACHE_BUILD_REPORTED = 545;
2620  ATOM_PACKAGE_MANAGER_APPS_FILTER_CACHE_UPDATE_REPORTED = 546;
2621  ATOM_LAUNCHER_IMPRESSION_EVENT = 547;
2622  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_ALL_DEVICES_SCAN_LATENCY = 549;
2623  ATOM_WS_WATCH_FACE_EDITED = 551;
2624  ATOM_WS_WATCH_FACE_FAVORITE_ACTION_REPORTED = 552;
2625  ATOM_WS_WATCH_FACE_SET_ACTION_REPORTED = 553;
2626  ATOM_PACKAGE_UNINSTALLATION_REPORTED = 554;
2627  ATOM_GAME_MODE_CHANGED = 555;
2628  ATOM_GAME_MODE_CONFIGURATION_CHANGED = 556;
2629  ATOM_BEDTIME_MODE_STATE_CHANGED = 557;
2630  ATOM_NETWORK_SLICE_SESSION_ENDED = 558;
2631  ATOM_NETWORK_SLICE_DAILY_DATA_USAGE_REPORTED = 559;
2632  ATOM_NFC_TAG_TYPE_OCCURRED = 560;
2633  ATOM_NFC_AID_CONFLICT_OCCURRED = 561;
2634  ATOM_NFC_READER_CONFLICT_OCCURRED = 562;
2635  ATOM_WS_TILE_LIST_CHANGED = 563;
2636  ATOM_GET_TYPE_ACCESSED_WITHOUT_PERMISSION = 564;
2637  ATOM_MOBILE_BUNDLED_APP_INFO_GATHERED = 566;
2638  ATOM_WS_WATCH_FACE_COMPLICATION_SET_CHANGED = 567;
2639  ATOM_MEDIA_DRM_CREATED = 568;
2640  ATOM_MEDIA_DRM_ERRORED = 569;
2641  ATOM_MEDIA_DRM_SESSION_OPENED = 570;
2642  ATOM_MEDIA_DRM_SESSION_CLOSED = 571;
2643  ATOM_USER_SELECTED_RESOLUTION = 572;
2644  ATOM_UNSAFE_INTENT_EVENT_REPORTED = 573;
2645  ATOM_PERFORMANCE_HINT_SESSION_REPORTED = 574;
2646  ATOM_MEDIAMETRICS_MIDI_DEVICE_CLOSE_REPORTED = 576;
2647  ATOM_BIOMETRIC_TOUCH_REPORTED = 577;
2648  ATOM_HOTWORD_AUDIO_EGRESS_EVENT_REPORTED = 578;
2649  ATOM_LOCATION_ENABLED_STATE_CHANGED = 580;
2650  ATOM_IME_REQUEST_FINISHED = 581;
2651  ATOM_USB_COMPLIANCE_WARNINGS_REPORTED = 582;
2652  ATOM_APP_SUPPORTED_LOCALES_CHANGED = 583;
2653  ATOM_MEDIA_PROVIDER_VOLUME_RECOVERY_REPORTED = 586;
2654  ATOM_BIOMETRIC_PROPERTIES_COLLECTED = 587;
2655  ATOM_KERNEL_WAKEUP_ATTRIBUTED = 588;
2656  ATOM_SCREEN_STATE_CHANGED_V2 = 589;
2657  ATOM_WS_BACKUP_ACTION_REPORTED = 590;
2658  ATOM_WS_RESTORE_ACTION_REPORTED = 591;
2659  ATOM_DEVICE_LOG_ACCESS_EVENT_REPORTED = 592;
2660  ATOM_MEDIA_SESSION_UPDATED = 594;
2661  ATOM_WEAR_OOBE_STATE_CHANGED = 595;
2662  ATOM_WS_NOTIFICATION_UPDATED = 596;
2663  ATOM_NETWORK_VALIDATION_FAILURE_STATS_DAILY_REPORTED = 601;
2664  ATOM_WS_COMPLICATION_TAPPED = 602;
2665  ATOM_WS_NOTIFICATION_BLOCKING = 780;
2666  ATOM_WS_NOTIFICATION_BRIDGEMODE_UPDATED = 822;
2667  ATOM_WS_NOTIFICATION_DISMISSAL_ACTIONED = 823;
2668  ATOM_WS_NOTIFICATION_ACTIONED = 824;
2669  ATOM_WS_NOTIFICATION_LATENCY = 880;
2670  ATOM_WIFI_BYTES_TRANSFER = 10000;
2671  ATOM_WIFI_BYTES_TRANSFER_BY_FG_BG = 10001;
2672  ATOM_MOBILE_BYTES_TRANSFER = 10002;
2673  ATOM_MOBILE_BYTES_TRANSFER_BY_FG_BG = 10003;
2674  ATOM_BLUETOOTH_BYTES_TRANSFER = 10006;
2675  ATOM_KERNEL_WAKELOCK = 10004;
2676  ATOM_SUBSYSTEM_SLEEP_STATE = 10005;
2677  ATOM_CPU_TIME_PER_UID = 10009;
2678  ATOM_CPU_TIME_PER_UID_FREQ = 10010;
2679  ATOM_WIFI_ACTIVITY_INFO = 10011;
2680  ATOM_MODEM_ACTIVITY_INFO = 10012;
2681  ATOM_BLUETOOTH_ACTIVITY_INFO = 10007;
2682  ATOM_PROCESS_MEMORY_STATE = 10013;
2683  ATOM_SYSTEM_ELAPSED_REALTIME = 10014;
2684  ATOM_SYSTEM_UPTIME = 10015;
2685  ATOM_CPU_ACTIVE_TIME = 10016;
2686  ATOM_CPU_CLUSTER_TIME = 10017;
2687  ATOM_DISK_SPACE = 10018;
2688  ATOM_REMAINING_BATTERY_CAPACITY = 10019;
2689  ATOM_FULL_BATTERY_CAPACITY = 10020;
2690  ATOM_TEMPERATURE = 10021;
2691  ATOM_BINDER_CALLS = 10022;
2692  ATOM_BINDER_CALLS_EXCEPTIONS = 10023;
2693  ATOM_LOOPER_STATS = 10024;
2694  ATOM_DISK_STATS = 10025;
2695  ATOM_DIRECTORY_USAGE = 10026;
2696  ATOM_APP_SIZE = 10027;
2697  ATOM_CATEGORY_SIZE = 10028;
2698  ATOM_PROC_STATS = 10029;
2699  ATOM_BATTERY_VOLTAGE = 10030;
2700  ATOM_NUM_FINGERPRINTS_ENROLLED = 10031;
2701  ATOM_DISK_IO = 10032;
2702  ATOM_POWER_PROFILE = 10033;
2703  ATOM_PROC_STATS_PKG_PROC = 10034;
2704  ATOM_PROCESS_CPU_TIME = 10035;
2705  ATOM_CPU_TIME_PER_THREAD_FREQ = 10037;
2706  ATOM_ON_DEVICE_POWER_MEASUREMENT = 10038;
2707  ATOM_DEVICE_CALCULATED_POWER_USE = 10039;
2708  ATOM_PROCESS_MEMORY_HIGH_WATER_MARK = 10042;
2709  ATOM_BATTERY_LEVEL = 10043;
2710  ATOM_BUILD_INFORMATION = 10044;
2711  ATOM_BATTERY_CYCLE_COUNT = 10045;
2712  ATOM_DEBUG_ELAPSED_CLOCK = 10046;
2713  ATOM_DEBUG_FAILING_ELAPSED_CLOCK = 10047;
2714  ATOM_NUM_FACES_ENROLLED = 10048;
2715  ATOM_ROLE_HOLDER = 10049;
2716  ATOM_DANGEROUS_PERMISSION_STATE = 10050;
2717  ATOM_TRAIN_INFO = 10051;
2718  ATOM_TIME_ZONE_DATA_INFO = 10052;
2719  ATOM_EXTERNAL_STORAGE_INFO = 10053;
2720  ATOM_GPU_STATS_GLOBAL_INFO = 10054;
2721  ATOM_GPU_STATS_APP_INFO = 10055;
2722  ATOM_SYSTEM_ION_HEAP_SIZE = 10056;
2723  ATOM_APPS_ON_EXTERNAL_STORAGE_INFO = 10057;
2724  ATOM_FACE_SETTINGS = 10058;
2725  ATOM_COOLING_DEVICE = 10059;
2726  ATOM_APP_OPS = 10060;
2727  ATOM_PROCESS_SYSTEM_ION_HEAP_SIZE = 10061;
2728  ATOM_SURFACEFLINGER_STATS_GLOBAL_INFO = 10062;
2729  ATOM_SURFACEFLINGER_STATS_LAYER_INFO = 10063;
2730  ATOM_PROCESS_MEMORY_SNAPSHOT = 10064;
2731  ATOM_VMS_CLIENT_STATS = 10065;
2732  ATOM_NOTIFICATION_REMOTE_VIEWS = 10066;
2733  ATOM_DANGEROUS_PERMISSION_STATE_SAMPLED = 10067;
2734  ATOM_GRAPHICS_STATS = 10068;
2735  ATOM_RUNTIME_APP_OP_ACCESS = 10069;
2736  ATOM_ION_HEAP_SIZE = 10070;
2737  ATOM_PACKAGE_NOTIFICATION_PREFERENCES = 10071;
2738  ATOM_PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES = 10072;
2739  ATOM_PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES = 10073;
2740  ATOM_GNSS_STATS = 10074;
2741  ATOM_ATTRIBUTED_APP_OPS = 10075;
2742  ATOM_VOICE_CALL_SESSION = 10076;
2743  ATOM_VOICE_CALL_RAT_USAGE = 10077;
2744  ATOM_SIM_SLOT_STATE = 10078;
2745  ATOM_SUPPORTED_RADIO_ACCESS_FAMILY = 10079;
2746  ATOM_SETTING_SNAPSHOT = 10080;
2747  ATOM_BLOB_INFO = 10081;
2748  ATOM_DATA_USAGE_BYTES_TRANSFER = 10082;
2749  ATOM_BYTES_TRANSFER_BY_TAG_AND_METERED = 10083;
2750  ATOM_DND_MODE_RULE = 10084;
2751  ATOM_GENERAL_EXTERNAL_STORAGE_ACCESS_STATS = 10085;
2752  ATOM_INCOMING_SMS = 10086;
2753  ATOM_OUTGOING_SMS = 10087;
2754  ATOM_CARRIER_ID_TABLE_VERSION = 10088;
2755  ATOM_DATA_CALL_SESSION = 10089;
2756  ATOM_CELLULAR_SERVICE_STATE = 10090;
2757  ATOM_CELLULAR_DATA_SERVICE_SWITCH = 10091;
2758  ATOM_SYSTEM_MEMORY = 10092;
2759  ATOM_IMS_REGISTRATION_TERMINATION = 10093;
2760  ATOM_IMS_REGISTRATION_STATS = 10094;
2761  ATOM_CPU_TIME_PER_CLUSTER_FREQ = 10095;
2762  ATOM_CPU_CYCLES_PER_UID_CLUSTER = 10096;
2763  ATOM_DEVICE_ROTATED_DATA = 10097;
2764  ATOM_CPU_CYCLES_PER_THREAD_GROUP_CLUSTER = 10098;
2765  ATOM_MEDIA_DRM_ACTIVITY_INFO = 10099;
2766  ATOM_OEM_MANAGED_BYTES_TRANSFER = 10100;
2767  ATOM_GNSS_POWER_STATS = 10101;
2768  ATOM_TIME_ZONE_DETECTOR_STATE = 10102;
2769  ATOM_KEYSTORE2_STORAGE_STATS = 10103;
2770  ATOM_RKP_POOL_STATS = 10104;
2771  ATOM_PROCESS_DMABUF_MEMORY = 10105;
2772  ATOM_PENDING_ALARM_INFO = 10106;
2773  ATOM_USER_LEVEL_HIBERNATED_APPS = 10107;
2774  ATOM_LAUNCHER_LAYOUT_SNAPSHOT = 10108;
2775  ATOM_GLOBAL_HIBERNATED_APPS = 10109;
2776  ATOM_INPUT_EVENT_LATENCY_SKETCH = 10110;
2777  ATOM_BATTERY_USAGE_STATS_BEFORE_RESET = 10111;
2778  ATOM_BATTERY_USAGE_STATS_SINCE_RESET = 10112;
2779  ATOM_BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL = 10113;
2780  ATOM_INSTALLED_INCREMENTAL_PACKAGE = 10114;
2781  ATOM_TELEPHONY_NETWORK_REQUESTS = 10115;
2782  ATOM_APP_SEARCH_STORAGE_INFO = 10116;
2783  ATOM_VMSTAT = 10117;
2784  ATOM_KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO = 10118;
2785  ATOM_KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO = 10119;
2786  ATOM_KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO = 10120;
2787  ATOM_KEYSTORE2_ATOM_WITH_OVERFLOW = 10121;
2788  ATOM_KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO = 10122;
2789  ATOM_KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO = 10123;
2790  ATOM_RKP_ERROR_STATS = 10124;
2791  ATOM_KEYSTORE2_CRASH_STATS = 10125;
2792  ATOM_VENDOR_APEX_INFO = 10126;
2793  ATOM_ACCESSIBILITY_SHORTCUT_STATS = 10127;
2794  ATOM_ACCESSIBILITY_FLOATING_MENU_STATS = 10128;
2795  ATOM_DATA_USAGE_BYTES_TRANSFER_V2 = 10129;
2796  ATOM_MEDIA_CAPABILITIES = 10130;
2797  ATOM_CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY = 10131;
2798  ATOM_CAR_WATCHDOG_UID_IO_USAGE_SUMMARY = 10132;
2799  ATOM_IMS_REGISTRATION_FEATURE_TAG_STATS = 10133;
2800  ATOM_RCS_CLIENT_PROVISIONING_STATS = 10134;
2801  ATOM_RCS_ACS_PROVISIONING_STATS = 10135;
2802  ATOM_SIP_DELEGATE_STATS = 10136;
2803  ATOM_SIP_TRANSPORT_FEATURE_TAG_STATS = 10137;
2804  ATOM_SIP_MESSAGE_RESPONSE = 10138;
2805  ATOM_SIP_TRANSPORT_SESSION = 10139;
2806  ATOM_IMS_DEDICATED_BEARER_LISTENER_EVENT = 10140;
2807  ATOM_IMS_DEDICATED_BEARER_EVENT = 10141;
2808  ATOM_IMS_REGISTRATION_SERVICE_DESC_STATS = 10142;
2809  ATOM_UCE_EVENT_STATS = 10143;
2810  ATOM_PRESENCE_NOTIFY_EVENT = 10144;
2811  ATOM_GBA_EVENT = 10145;
2812  ATOM_PER_SIM_STATUS = 10146;
2813  ATOM_GPU_WORK_PER_UID = 10147;
2814  ATOM_PERSISTENT_URI_PERMISSIONS_AMOUNT_PER_PACKAGE = 10148;
2815  ATOM_SIGNED_PARTITION_INFO = 10149;
2816  ATOM_PINNED_FILE_SIZES_PER_PACKAGE = 10150;
2817  ATOM_PENDING_INTENTS_PER_PACKAGE = 10151;
2818  ATOM_USER_INFO = 10152;
2819  ATOM_TELEPHONY_NETWORK_REQUESTS_V2 = 10153;
2820  ATOM_DEVICE_TELEPHONY_PROPERTIES = 10154;
2821  ATOM_REMOTE_KEY_PROVISIONING_ERROR_COUNTS = 10155;
2822  ATOM_SAFETY_STATE = 10156;
2823  ATOM_INCOMING_MMS = 10157;
2824  ATOM_OUTGOING_MMS = 10158;
2825  ATOM_MULTI_USER_INFO = 10160;
2826  ATOM_NETWORK_BPF_MAP_INFO = 10161;
2827  ATOM_OUTGOING_SHORT_CODE_SMS = 10162;
2828  ATOM_CONNECTIVITY_STATE_SAMPLE = 10163;
2829  ATOM_NETWORK_SELECTION_REMATCH_REASONS_INFO = 10164;
2830  ATOM_GAME_MODE_INFO = 10165;
2831  ATOM_GAME_MODE_CONFIGURATION = 10166;
2832  ATOM_GAME_MODE_LISTENER = 10167;
2833  ATOM_NETWORK_SLICE_REQUEST_COUNT = 10168;
2834  ATOM_WS_TILE_SNAPSHOT = 10169;
2835  ATOM_WS_ACTIVE_WATCH_FACE_COMPLICATION_SET_SNAPSHOT = 10170;
2836  ATOM_PROCESS_STATE = 10171;
2837  ATOM_PROCESS_ASSOCIATION = 10172;
2838  ATOM_ADPF_SYSTEM_COMPONENT_INFO = 10173;
2839  ATOM_NOTIFICATION_MEMORY_USE = 10174;
2840  ATOM_HDR_CAPABILITIES = 10175;
2841  ATOM_WS_FAVOURITE_WATCH_FACE_LIST_SNAPSHOT = 10176;
2842  ATOM_ACCESSIBILITY_CHECK_RESULT_REPORTED = 910;
2843  ATOM_ADAPTIVE_AUTH_UNLOCK_AFTER_LOCK_REPORTED = 820;
2844  ATOM_THERMAL_STATUS_CALLED = 772;
2845  ATOM_THERMAL_HEADROOM_CALLED = 773;
2846  ATOM_THERMAL_HEADROOM_THRESHOLDS_CALLED = 774;
2847  ATOM_ADPF_HINT_SESSION_TID_CLEANUP = 839;
2848  ATOM_THERMAL_HEADROOM_THRESHOLDS = 10201;
2849  ATOM_ADPF_SESSION_SNAPSHOT = 10218;
2850  ATOM_JSSCRIPTENGINE_LATENCY_REPORTED = 483;
2851  ATOM_AD_SERVICES_API_CALLED = 435;
2852  ATOM_AD_SERVICES_MESUREMENT_REPORTS_UPLOADED = 436;
2853  ATOM_MOBILE_DATA_DOWNLOAD_FILE_GROUP_STATUS_REPORTED = 490;
2854  ATOM_MOBILE_DATA_DOWNLOAD_DOWNLOAD_RESULT_REPORTED = 502;
2855  ATOM_AD_SERVICES_SETTINGS_USAGE_REPORTED = 493;
2856  ATOM_BACKGROUND_FETCH_PROCESS_REPORTED = 496;
2857  ATOM_UPDATE_CUSTOM_AUDIENCE_PROCESS_REPORTED = 497;
2858  ATOM_RUN_AD_BIDDING_PROCESS_REPORTED = 498;
2859  ATOM_RUN_AD_SCORING_PROCESS_REPORTED = 499;
2860  ATOM_RUN_AD_SELECTION_PROCESS_REPORTED = 500;
2861  ATOM_RUN_AD_BIDDING_PER_CA_PROCESS_REPORTED = 501;
2862  ATOM_MOBILE_DATA_DOWNLOAD_FILE_GROUP_STORAGE_STATS_REPORTED = 503;
2863  ATOM_AD_SERVICES_MEASUREMENT_REGISTRATIONS = 512;
2864  ATOM_AD_SERVICES_GET_TOPICS_REPORTED = 535;
2865  ATOM_AD_SERVICES_EPOCH_COMPUTATION_GET_TOP_TOPICS_REPORTED = 536;
2866  ATOM_AD_SERVICES_EPOCH_COMPUTATION_CLASSIFIER_REPORTED = 537;
2867  ATOM_AD_SERVICES_BACK_COMPAT_GET_TOPICS_REPORTED = 598;
2868  ATOM_AD_SERVICES_BACK_COMPAT_EPOCH_COMPUTATION_CLASSIFIER_REPORTED = 599;
2869  ATOM_AD_SERVICES_MEASUREMENT_DEBUG_KEYS = 640;
2870  ATOM_AD_SERVICES_ERROR_REPORTED = 662;
2871  ATOM_AD_SERVICES_BACKGROUND_JOBS_EXECUTION_REPORTED = 663;
2872  ATOM_AD_SERVICES_MEASUREMENT_DELAYED_SOURCE_REGISTRATION = 673;
2873  ATOM_AD_SERVICES_MEASUREMENT_ATTRIBUTION = 674;
2874  ATOM_AD_SERVICES_MEASUREMENT_JOBS = 675;
2875  ATOM_AD_SERVICES_MEASUREMENT_WIPEOUT = 676;
2876  ATOM_AD_SERVICES_MEASUREMENT_AD_ID_MATCH_FOR_DEBUG_KEYS = 695;
2877  ATOM_AD_SERVICES_ENROLLMENT_DATA_STORED = 697;
2878  ATOM_AD_SERVICES_ENROLLMENT_FILE_DOWNLOADED = 698;
2879  ATOM_AD_SERVICES_ENROLLMENT_MATCHED = 699;
2880  ATOM_AD_SERVICES_CONSENT_MIGRATED = 702;
2881  ATOM_AD_SERVICES_ENROLLMENT_FAILED = 714;
2882  ATOM_AD_SERVICES_MEASUREMENT_CLICK_VERIFICATION = 756;
2883  ATOM_AD_SERVICES_ENCRYPTION_KEY_FETCHED = 765;
2884  ATOM_AD_SERVICES_ENCRYPTION_KEY_DB_TRANSACTION_ENDED = 766;
2885  ATOM_DESTINATION_REGISTERED_BEACONS = 767;
2886  ATOM_REPORT_INTERACTION_API_CALLED = 768;
2887  ATOM_INTERACTION_REPORTING_TABLE_CLEARED = 769;
2888  ATOM_APP_MANIFEST_CONFIG_HELPER_CALLED = 788;
2889  ATOM_AD_FILTERING_PROCESS_JOIN_CA_REPORTED = 793;
2890  ATOM_AD_FILTERING_PROCESS_AD_SELECTION_REPORTED = 794;
2891  ATOM_AD_COUNTER_HISTOGRAM_UPDATER_REPORTED = 795;
2892  ATOM_SIGNATURE_VERIFICATION = 807;
2893  ATOM_K_ANON_IMMEDIATE_SIGN_JOIN_STATUS_REPORTED = 808;
2894  ATOM_K_ANON_BACKGROUND_JOB_STATUS_REPORTED = 809;
2895  ATOM_K_ANON_INITIALIZE_STATUS_REPORTED = 810;
2896  ATOM_K_ANON_SIGN_STATUS_REPORTED = 811;
2897  ATOM_K_ANON_JOIN_STATUS_REPORTED = 812;
2898  ATOM_K_ANON_KEY_ATTESTATION_STATUS_REPORTED = 813;
2899  ATOM_GET_AD_SELECTION_DATA_API_CALLED = 814;
2900  ATOM_GET_AD_SELECTION_DATA_BUYER_INPUT_GENERATED = 815;
2901  ATOM_BACKGROUND_JOB_SCHEDULING_REPORTED = 834;
2902  ATOM_TOPICS_ENCRYPTION_EPOCH_COMPUTATION_REPORTED = 840;
2903  ATOM_TOPICS_ENCRYPTION_GET_TOPICS_REPORTED = 841;
2904  ATOM_ADSERVICES_SHELL_COMMAND_CALLED = 842;
2905  ATOM_UPDATE_SIGNALS_API_CALLED = 843;
2906  ATOM_ENCODING_JOB_RUN = 844;
2907  ATOM_ENCODING_JS_FETCH = 845;
2908  ATOM_ENCODING_JS_EXECUTION = 846;
2909  ATOM_PERSIST_AD_SELECTION_RESULT_CALLED = 847;
2910  ATOM_SERVER_AUCTION_KEY_FETCH_CALLED = 848;
2911  ATOM_SERVER_AUCTION_BACKGROUND_KEY_FETCH_ENABLED = 849;
2912  ATOM_AD_SERVICES_MEASUREMENT_PROCESS_ODP_REGISTRATION = 864;
2913  ATOM_AD_SERVICES_MEASUREMENT_NOTIFY_REGISTRATION_TO_ODP = 865;
2914  ATOM_SELECT_ADS_FROM_OUTCOMES_API_CALLED = 876;
2915  ATOM_REPORT_IMPRESSION_API_CALLED = 877;
2916  ATOM_AD_SERVICES_ENROLLMENT_TRANSACTION_STATS = 885;
2917  ATOM_AD_SERVICES_COBALT_LOGGER_EVENT_REPORTED = 902;
2918  ATOM_AD_SERVICES_COBALT_PERIODIC_JOB_EVENT_REPORTED = 903;
2919  ATOM_UPDATE_SIGNALS_PROCESS_REPORTED = 905;
2920  ATOM_TOPICS_SCHEDULE_EPOCH_JOB_SETTING_REPORTED = 930;
2921  ATOM_AI_WALLPAPERS_BUTTON_PRESSED = 706;
2922  ATOM_AI_WALLPAPERS_TEMPLATE_SELECTED = 707;
2923  ATOM_AI_WALLPAPERS_TERM_SELECTED = 708;
2924  ATOM_AI_WALLPAPERS_WALLPAPER_SET = 709;
2925  ATOM_AI_WALLPAPERS_SESSION_SUMMARY = 710;
2926  ATOM_APEX_INSTALLATION_REQUESTED = 732;
2927  ATOM_APEX_INSTALLATION_STAGED = 733;
2928  ATOM_APEX_INSTALLATION_ENDED = 734;
2929  ATOM_APP_SEARCH_SET_SCHEMA_STATS_REPORTED = 385;
2930  ATOM_APP_SEARCH_SCHEMA_MIGRATION_STATS_REPORTED = 579;
2931  ATOM_APP_SEARCH_USAGE_SEARCH_INTENT_STATS_REPORTED = 825;
2932  ATOM_APP_SEARCH_USAGE_SEARCH_INTENT_RAW_QUERY_STATS_REPORTED = 826;
2933  ATOM_APP_SEARCH_APPS_INDEXER_STATS_REPORTED = 909;
2934  ATOM_ART_DATUM_REPORTED = 332;
2935  ATOM_ART_DEVICE_DATUM_REPORTED = 550;
2936  ATOM_ART_DATUM_DELTA_REPORTED = 565;
2937  ATOM_ART_DEX2OAT_REPORTED = 929;
2938  ATOM_ART_DEVICE_STATUS = 10205;
2939  ATOM_BACKGROUND_DEXOPT_JOB_ENDED = 467;
2940  ATOM_PREREBOOT_DEXOPT_JOB_ENDED = 883;
2941  ATOM_ODREFRESH_REPORTED = 366;
2942  ATOM_ODSIGN_REPORTED = 548;
2943  ATOM_AUTOFILL_UI_EVENT_REPORTED = 603;
2944  ATOM_AUTOFILL_FILL_REQUEST_REPORTED = 604;
2945  ATOM_AUTOFILL_FILL_RESPONSE_REPORTED = 605;
2946  ATOM_AUTOFILL_SAVE_EVENT_REPORTED = 606;
2947  ATOM_AUTOFILL_SESSION_COMMITTED = 607;
2948  ATOM_AUTOFILL_FIELD_CLASSIFICATION_EVENT_REPORTED = 659;
2949  ATOM_CAR_RECENTS_EVENT_REPORTED = 770;
2950  ATOM_CAR_CALM_MODE_EVENT_REPORTED = 797;
2951  ATOM_CAR_WAKEUP_FROM_SUSPEND_REPORTED = 852;
2952  ATOM_PLUGIN_INITIALIZED = 655;
2953  ATOM_BLUETOOTH_HASHED_DEVICE_NAME_REPORTED = 613;
2954  ATOM_BLUETOOTH_L2CAP_COC_CLIENT_CONNECTION = 614;
2955  ATOM_BLUETOOTH_L2CAP_COC_SERVER_CONNECTION = 615;
2956  ATOM_BLUETOOTH_LE_SESSION_CONNECTED = 656;
2957  ATOM_RESTRICTED_BLUETOOTH_DEVICE_NAME_REPORTED = 666;
2958  ATOM_BLUETOOTH_PROFILE_CONNECTION_ATTEMPTED = 696;
2959  ATOM_BLUETOOTH_CONTENT_PROFILE_ERROR_REPORTED = 781;
2960  ATOM_BLUETOOTH_RFCOMM_CONNECTION_ATTEMPTED = 782;
2961  ATOM_REMOTE_DEVICE_INFORMATION_WITH_METRIC_ID = 862;
2962  ATOM_LE_APP_SCAN_STATE_CHANGED = 870;
2963  ATOM_LE_RADIO_SCAN_STOPPED = 871;
2964  ATOM_LE_SCAN_RESULT_RECEIVED = 872;
2965  ATOM_LE_SCAN_ABUSED = 873;
2966  ATOM_LE_ADV_STATE_CHANGED = 874;
2967  ATOM_LE_ADV_ERROR_REPORTED = 875;
2968  ATOM_A2DP_SESSION_REPORTED = 904;
2969  ATOM_BLUETOOTH_CROSS_LAYER_EVENT_REPORTED = 916;
2970  ATOM_BROADCAST_AUDIO_SESSION_REPORTED = 927;
2971  ATOM_BROADCAST_AUDIO_SYNC_REPORTED = 928;
2972  ATOM_BLUETOOTH_RFCOMM_CONNECTION_REPORTED_AT_CLOSE = 982;
2973  ATOM_BLUETOOTH_LE_CONNECTION = 988;
2974  ATOM_BROADCAST_SENT = 922;
2975  ATOM_CAMERA_FEATURE_COMBINATION_QUERY_EVENT = 900;
2976  ATOM_CERTIFICATE_TRANSPARENCY_LOG_LIST_STATE_CHANGED = 934;
2977  ATOM_CERTIFICATE_TRANSPARENCY_LOG_LIST_UPDATE_FAILED = 972;
2978  ATOM_DAILY_KEEPALIVE_INFO_REPORTED = 650;
2979  ATOM_NETWORK_REQUEST_STATE_CHANGED = 779;
2980  ATOM_TETHERING_ACTIVE_SESSIONS_REPORTED = 925;
2981  ATOM_NETWORK_STATS_RECORDER_FILE_OPERATED = 783;
2982  ATOM_CORE_NETWORKING_TERRIBLE_ERROR_OCCURRED = 979;
2983  ATOM_APF_SESSION_INFO_REPORTED = 777;
2984  ATOM_IP_CLIENT_RA_INFO_REPORTED = 778;
2985  ATOM_VPN_CONNECTION_STATE_CHANGED = 850;
2986  ATOM_VPN_CONNECTION_REPORTED = 851;
2987  ATOM_CPU_POLICY = 10199;
2988  ATOM_CREDENTIAL_MANAGER_API_CALLED = 585;
2989  ATOM_CREDENTIAL_MANAGER_INIT_PHASE_REPORTED = 651;
2990  ATOM_CREDENTIAL_MANAGER_CANDIDATE_PHASE_REPORTED = 652;
2991  ATOM_CREDENTIAL_MANAGER_FINAL_PHASE_REPORTED = 653;
2992  ATOM_CREDENTIAL_MANAGER_TOTAL_REPORTED = 667;
2993  ATOM_CREDENTIAL_MANAGER_FINALNOUID_REPORTED = 668;
2994  ATOM_CREDENTIAL_MANAGER_GET_REPORTED = 669;
2995  ATOM_CREDENTIAL_MANAGER_AUTH_CLICK_REPORTED = 670;
2996  ATOM_CREDENTIAL_MANAGER_APIV2_CALLED = 671;
2997  ATOM_CRONET_ENGINE_CREATED = 703;
2998  ATOM_CRONET_TRAFFIC_REPORTED = 704;
2999  ATOM_CRONET_ENGINE_BUILDER_INITIALIZED = 762;
3000  ATOM_CRONET_HTTP_FLAGS_INITIALIZED = 763;
3001  ATOM_CRONET_INITIALIZED = 764;
3002  ATOM_DESKTOP_MODE_UI_CHANGED = 818;
3003  ATOM_DESKTOP_MODE_SESSION_TASK_UPDATE = 819;
3004  ATOM_DESKTOP_MODE_TASK_SIZE_UPDATED = 935;
3005  ATOM_DEVICE_LOCK_CHECK_IN_REQUEST_REPORTED = 726;
3006  ATOM_DEVICE_LOCK_PROVISIONING_COMPLETE_REPORTED = 727;
3007  ATOM_DEVICE_LOCK_KIOSK_APP_REQUEST_REPORTED = 728;
3008  ATOM_DEVICE_LOCK_CHECK_IN_RETRY_REPORTED = 789;
3009  ATOM_DEVICE_LOCK_PROVISION_FAILURE_REPORTED = 790;
3010  ATOM_DEVICE_LOCK_LOCK_UNLOCK_DEVICE_FAILURE_REPORTED = 791;
3011  ATOM_DEVICE_POLICY_MANAGEMENT_MODE = 10216;
3012  ATOM_DEVICE_POLICY_STATE = 10217;
3013  ATOM_DISPLAY_MODE_DIRECTOR_VOTE_CHANGED = 792;
3014  ATOM_EXTERNAL_DISPLAY_STATE_CHANGED = 806;
3015  ATOM_DND_STATE_CHANGED = 657;
3016  ATOM_DREAM_SETTING_CHANGED = 705;
3017  ATOM_DREAM_SETTING_SNAPSHOT = 10192;
3018  ATOM_EXPRESS_EVENT_REPORTED = 528;
3019  ATOM_EXPRESS_HISTOGRAM_SAMPLE_REPORTED = 593;
3020  ATOM_EXPRESS_UID_EVENT_REPORTED = 644;
3021  ATOM_EXPRESS_UID_HISTOGRAM_SAMPLE_REPORTED = 658;
3022  ATOM_FEDERATED_COMPUTE_API_CALLED = 712;
3023  ATOM_FEDERATED_COMPUTE_TRAINING_EVENT_REPORTED = 771;
3024  ATOM_EXAMPLE_ITERATOR_NEXT_LATENCY_REPORTED = 838;
3025  ATOM_FULL_SCREEN_INTENT_LAUNCHED = 631;
3026  ATOM_BAL_ALLOWED = 632;
3027  ATOM_IN_TASK_ACTIVITY_STARTED = 685;
3028  ATOM_DEVICE_ORIENTATION_CHANGED = 906;
3029  ATOM_CACHED_APPS_HIGH_WATERMARK = 10189;
3030  ATOM_STYLUS_PREDICTION_METRICS_REPORTED = 718;
3031  ATOM_USER_RISK_EVENT_REPORTED = 725;
3032  ATOM_MEDIA_PROJECTION_STATE_CHANGED = 729;
3033  ATOM_MEDIA_PROJECTION_TARGET_CHANGED = 730;
3034  ATOM_EXCESSIVE_BINDER_PROXY_COUNT_REPORTED = 853;
3035  ATOM_PROXY_BYTES_TRANSFER_BY_FG_BG = 10200;
3036  ATOM_MOBILE_BYTES_TRANSFER_BY_PROC_STATE = 10204;
3037  ATOM_BIOMETRIC_FRR_NOTIFICATION = 817;
3038  ATOM_SENSITIVE_CONTENT_MEDIA_PROJECTION_SESSION = 830;
3039  ATOM_SENSITIVE_NOTIFICATION_APP_PROTECTION_SESSION = 831;
3040  ATOM_SENSITIVE_NOTIFICATION_APP_PROTECTION_APPLIED = 832;
3041  ATOM_SENSITIVE_NOTIFICATION_REDACTION = 833;
3042  ATOM_SENSITIVE_CONTENT_APP_PROTECTION = 835;
3043  ATOM_APP_RESTRICTION_STATE_CHANGED = 866;
3044  ATOM_BATTERY_USAGE_STATS_PER_UID = 10209;
3045  ATOM_POSTGC_MEMORY_SNAPSHOT = 924;
3046  ATOM_POWER_SAVE_TEMP_ALLOWLIST_CHANGED = 926;
3047  ATOM_APP_OP_ACCESS_TRACKED = 931;
3048  ATOM_CONTENT_OR_FILE_URI_EVENT_REPORTED = 933;
3049  ATOM_APPLICATION_GRAMMATICAL_INFLECTION_CHANGED = 584;
3050  ATOM_SYSTEM_GRAMMATICAL_INFLECTION_CHANGED = 816;
3051  ATOM_BATTERY_HEALTH = 10220;
3052  ATOM_HDMI_EARC_STATUS_REPORTED = 701;
3053  ATOM_HDMI_SOUNDBAR_MODE_STATUS_REPORTED = 724;
3054  ATOM_HEALTH_CONNECT_API_CALLED = 616;
3055  ATOM_HEALTH_CONNECT_USAGE_STATS = 617;
3056  ATOM_HEALTH_CONNECT_STORAGE_STATS = 618;
3057  ATOM_HEALTH_CONNECT_API_INVOKED = 643;
3058  ATOM_EXERCISE_ROUTE_API_CALLED = 654;
3059  ATOM_HEALTH_CONNECT_EXPORT_INVOKED = 907;
3060  ATOM_HEALTH_CONNECT_IMPORT_INVOKED = 918;
3061  ATOM_HEALTH_CONNECT_EXPORT_IMPORT_STATS_REPORTED = 919;
3062  ATOM_HEALTH_CONNECT_UI_IMPRESSION = 623;
3063  ATOM_HEALTH_CONNECT_UI_INTERACTION = 624;
3064  ATOM_HEALTH_CONNECT_APP_OPENED_REPORTED = 625;
3065  ATOM_HOTWORD_EGRESS_SIZE_ATOM_REPORTED = 761;
3066  ATOM_IKE_SESSION_TERMINATED = 678;
3067  ATOM_IKE_LIVENESS_CHECK_SESSION_VALIDATED = 760;
3068  ATOM_NEGOTIATED_SECURITY_ASSOCIATION = 821;
3069  ATOM_KEYBOARD_CONFIGURED = 682;
3070  ATOM_KEYBOARD_SYSTEMS_EVENT_REPORTED = 683;
3071  ATOM_INPUTDEVICE_USAGE_REPORTED = 686;
3072  ATOM_INPUT_EVENT_LATENCY_REPORTED = 932;
3073  ATOM_TOUCHPAD_USAGE = 10191;
3074  ATOM_KERNEL_OOM_KILL_OCCURRED = 754;
3075  ATOM_EMERGENCY_STATE_CHANGED = 633;
3076  ATOM_CHRE_SIGNIFICANT_MOTION_STATE_CHANGED = 868;
3077  ATOM_POPULATION_DENSITY_PROVIDER_LOADING_REPORTED = 1002;
3078  ATOM_DENSITY_BASED_COARSE_LOCATIONS_USAGE_REPORTED = 1003;
3079  ATOM_DENSITY_BASED_COARSE_LOCATIONS_PROVIDER_QUERY_REPORTED = 1004;
3080  ATOM_MEDIA_CODEC_RECLAIM_REQUEST_COMPLETED = 600;
3081  ATOM_MEDIA_CODEC_STARTED = 641;
3082  ATOM_MEDIA_CODEC_STOPPED = 642;
3083  ATOM_MEDIA_CODEC_RENDERED = 684;
3084  ATOM_MEDIA_EDITING_ENDED_REPORTED = 798;
3085  ATOM_MTE_STATE = 10181;
3086  ATOM_MICROXR_DEVICE_BOOT_COMPLETE_REPORTED = 901;
3087  ATOM_NFC_OBSERVE_MODE_STATE_CHANGED = 855;
3088  ATOM_NFC_FIELD_CHANGED = 856;
3089  ATOM_NFC_POLLING_LOOP_NOTIFICATION_REPORTED = 857;
3090  ATOM_NFC_PROPRIETARY_CAPABILITIES_REPORTED = 858;
3091  ATOM_ONDEVICEPERSONALIZATION_API_CALLED = 711;
3092  ATOM_COMPONENT_STATE_CHANGED_REPORTED = 863;
3093  ATOM_PDF_LOAD_REPORTED = 859;
3094  ATOM_PDF_API_USAGE_REPORTED = 860;
3095  ATOM_PDF_SEARCH_REPORTED = 861;
3096  ATOM_PRESSURE_STALL_INFORMATION = 10229;
3097  ATOM_PERMISSION_RATIONALE_DIALOG_VIEWED = 645;
3098  ATOM_PERMISSION_RATIONALE_DIALOG_ACTION_REPORTED = 646;
3099  ATOM_APP_DATA_SHARING_UPDATES_NOTIFICATION_INTERACTION = 647;
3100  ATOM_APP_DATA_SHARING_UPDATES_FRAGMENT_VIEWED = 648;
3101  ATOM_APP_DATA_SHARING_UPDATES_FRAGMENT_ACTION_REPORTED = 649;
3102  ATOM_ENHANCED_CONFIRMATION_DIALOG_RESULT_REPORTED = 827;
3103  ATOM_ENHANCED_CONFIRMATION_RESTRICTION_CLEARED = 828;
3104  ATOM_PHOTOPICKER_SESSION_INFO_REPORTED = 886;
3105  ATOM_PHOTOPICKER_API_INFO_REPORTED = 887;
3106  ATOM_PHOTOPICKER_UI_EVENT_LOGGED = 888;
3107  ATOM_PHOTOPICKER_MEDIA_ITEM_STATUS_REPORTED = 889;
3108  ATOM_PHOTOPICKER_PREVIEW_INFO_LOGGED = 890;
3109  ATOM_PHOTOPICKER_MENU_INTERACTION_LOGGED = 891;
3110  ATOM_PHOTOPICKER_BANNER_INTERACTION_LOGGED = 892;
3111  ATOM_PHOTOPICKER_MEDIA_LIBRARY_INFO_LOGGED = 893;
3112  ATOM_PHOTOPICKER_PAGE_INFO_LOGGED = 894;
3113  ATOM_PHOTOPICKER_MEDIA_GRID_SYNC_INFO_REPORTED = 895;
3114  ATOM_PHOTOPICKER_ALBUM_SYNC_INFO_REPORTED = 896;
3115  ATOM_PHOTOPICKER_SEARCH_INFO_REPORTED = 897;
3116  ATOM_SEARCH_DATA_EXTRACTION_DETAILS_REPORTED = 898;
3117  ATOM_EMBEDDED_PHOTOPICKER_INFO_REPORTED = 899;
3118  ATOM_ATOM_9999 = 9999;
3119  ATOM_ATOM_99999 = 99999;
3120  ATOM_SCREEN_OFF_REPORTED = 776;
3121  ATOM_SCREEN_TIMEOUT_OVERRIDE_REPORTED = 836;
3122  ATOM_SCREEN_INTERACTIVE_SESSION_REPORTED = 837;
3123  ATOM_SCREEN_DIM_REPORTED = 867;
3124  ATOM_MEDIA_PROVIDER_DATABASE_ROLLBACK_REPORTED = 784;
3125  ATOM_BACKUP_SETUP_STATUS_REPORTED = 785;
3126  ATOM_RANGING_SESSION_CONFIGURED = 993;
3127  ATOM_RANGING_SESSION_STARTED = 994;
3128  ATOM_RANGING_SESSION_CLOSED = 995;
3129  ATOM_RANGING_TECHNOLOGY_STARTED = 996;
3130  ATOM_RANGING_TECHNOLOGY_STOPPED = 997;
3131  ATOM_RKPD_POOL_STATS = 664;
3132  ATOM_RKPD_CLIENT_OPERATION = 665;
3133  ATOM_SANDBOX_API_CALLED = 488;
3134  ATOM_SANDBOX_ACTIVITY_EVENT_OCCURRED = 735;
3135  ATOM_SDK_SANDBOX_RESTRICTED_ACCESS_IN_SESSION = 796;
3136  ATOM_SANDBOX_SDK_STORAGE = 10159;
3137  ATOM_SELINUX_AUDIT_LOG = 799;
3138  ATOM_SETTINGS_SPA_REPORTED = 622;
3139  ATOM_TEST_EXTENSION_ATOM_REPORTED = 660;
3140  ATOM_TEST_RESTRICTED_ATOM_REPORTED = 672;
3141  ATOM_STATS_SOCKET_LOSS_REPORTED = 752;
3142  ATOM_LOCKSCREEN_SHORTCUT_SELECTED = 611;
3143  ATOM_LOCKSCREEN_SHORTCUT_TRIGGERED = 612;
3144  ATOM_LAUNCHER_IMPRESSION_EVENT_V2 = 716;
3145  ATOM_DISPLAY_SWITCH_LATENCY_TRACKED = 753;
3146  ATOM_NOTIFICATION_LISTENER_SERVICE = 829;
3147  ATOM_NAV_HANDLE_TOUCH_POINTS = 869;
3148  ATOM_COMMUNAL_HUB_WIDGET_EVENT_REPORTED = 908;
3149  ATOM_COMMUNAL_HUB_SNAPSHOT = 10226;
3150  ATOM_EMERGENCY_NUMBER_DIALED = 637;
3151  ATOM_CALL_STATS = 10221;
3152  ATOM_CALL_AUDIO_ROUTE_STATS = 10222;
3153  ATOM_TELECOM_API_STATS = 10223;
3154  ATOM_TELECOM_ERROR_STATS = 10224;
3155  ATOM_CELLULAR_RADIO_POWER_STATE_CHANGED = 713;
3156  ATOM_EMERGENCY_NUMBERS_INFO = 10180;
3157  ATOM_DATA_NETWORK_VALIDATION = 10207;
3158  ATOM_DATA_RAT_STATE_CHANGED = 854;
3159  ATOM_CONNECTED_CHANNEL_CHANGED = 882;
3160  ATOM_IWLAN_UNDERLYING_NETWORK_VALIDATION_RESULT_REPORTED = 923;
3161  ATOM_QUALIFIED_RAT_LIST_CHANGED = 634;
3162  ATOM_QNS_IMS_CALL_DROP_STATS = 635;
3163  ATOM_QNS_FALLBACK_RESTRICTION_CHANGED = 636;
3164  ATOM_QNS_RAT_PREFERENCE_MISMATCH_INFO = 10177;
3165  ATOM_QNS_HANDOVER_TIME_MILLIS = 10178;
3166  ATOM_QNS_HANDOVER_PINGPONG = 10179;
3167  ATOM_SATELLITE_CONTROLLER = 10182;
3168  ATOM_SATELLITE_SESSION = 10183;
3169  ATOM_SATELLITE_INCOMING_DATAGRAM = 10184;
3170  ATOM_SATELLITE_OUTGOING_DATAGRAM = 10185;
3171  ATOM_SATELLITE_PROVISION = 10186;
3172  ATOM_SATELLITE_SOS_MESSAGE_RECOMMENDER = 10187;
3173  ATOM_CARRIER_ROAMING_SATELLITE_SESSION = 10211;
3174  ATOM_CARRIER_ROAMING_SATELLITE_CONTROLLER_STATS = 10212;
3175  ATOM_CONTROLLER_STATS_PER_PACKAGE = 10213;
3176  ATOM_SATELLITE_ENTITLEMENT = 10214;
3177  ATOM_SATELLITE_CONFIG_UPDATER = 10215;
3178  ATOM_SATELLITE_ACCESS_CONTROLLER = 10219;
3179  ATOM_CELLULAR_IDENTIFIER_DISCLOSED = 800;
3180  ATOM_THREADNETWORK_TELEMETRY_DATA_REPORTED = 738;
3181  ATOM_THREADNETWORK_TOPO_ENTRY_REPEATED = 739;
3182  ATOM_THREADNETWORK_DEVICE_INFO_REPORTED = 740;
3183  ATOM_BOOT_INTEGRITY_INFO_REPORTED = 775;
3184  ATOM_TV_LOW_POWER_STANDBY_POLICY = 679;
3185  ATOM_EXTERNAL_TV_INPUT_EVENT = 717;
3186  ATOM_TEST_UPROBESTATS_ATOM_REPORTED = 915;
3187  ATOM_UWB_ACTIVITY_INFO = 10188;
3188  ATOM_MEDIATOR_UPDATED = 721;
3189  ATOM_SYSPROXY_BLUETOOTH_BYTES_TRANSFER = 10196;
3190  ATOM_SYSPROXY_CONNECTION_UPDATED = 786;
3191  ATOM_WEAR_COMPANION_CONNECTION_STATE = 921;
3192  ATOM_MEDIA_ACTION_REPORTED = 608;
3193  ATOM_MEDIA_CONTROLS_LAUNCHED = 609;
3194  ATOM_MEDIA_SESSION_STATE_CHANGED = 677;
3195  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_DEVICE_SCAN_API_LATENCY = 757;
3196  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_SASS_DEVICE_UNAVAILABLE = 758;
3197  ATOM_WEAR_MEDIA_OUTPUT_SWITCHER_FASTPAIR_API_TIMEOUT = 759;
3198  ATOM_WEAR_MODE_STATE_CHANGED = 715;
3199  ATOM_RENDERER_INITIALIZED = 736;
3200  ATOM_SCHEMA_VERSION_RECEIVED = 737;
3201  ATOM_LAYOUT_INSPECTED = 741;
3202  ATOM_LAYOUT_EXPRESSION_INSPECTED = 742;
3203  ATOM_LAYOUT_ANIMATIONS_INSPECTED = 743;
3204  ATOM_MATERIAL_COMPONENTS_INSPECTED = 744;
3205  ATOM_TILE_REQUESTED = 745;
3206  ATOM_STATE_RESPONSE_RECEIVED = 746;
3207  ATOM_TILE_RESPONSE_RECEIVED = 747;
3208  ATOM_INFLATION_FINISHED = 748;
3209  ATOM_INFLATION_FAILED = 749;
3210  ATOM_IGNORED_INFLATION_FAILURES_REPORTED = 750;
3211  ATOM_DRAWABLE_RENDERED = 751;
3212  ATOM_WEAR_TIME_SYNC_REQUESTED = 911;
3213  ATOM_WEAR_TIME_UPDATE_STARTED = 912;
3214  ATOM_WEAR_TIME_SYNC_ATTEMPT_COMPLETED = 913;
3215  ATOM_WEAR_TIME_CHANGED = 914;
3216  ATOM_WEAR_ADAPTIVE_SUSPEND_STATS_REPORTED = 619;
3217  ATOM_WEAR_POWER_ANOMALY_SERVICE_OPERATIONAL_STATS_REPORTED = 620;
3218  ATOM_WEAR_POWER_ANOMALY_SERVICE_EVENT_STATS_REPORTED = 621;
3219  ATOM_WS_WEAR_TIME_SESSION = 610;
3220  ATOM_WS_INCOMING_CALL_ACTION_REPORTED = 626;
3221  ATOM_WS_CALL_DISCONNECTION_REPORTED = 627;
3222  ATOM_WS_CALL_DURATION_REPORTED = 628;
3223  ATOM_WS_CALL_USER_EXPERIENCE_LATENCY_REPORTED = 629;
3224  ATOM_WS_CALL_INTERACTION_REPORTED = 630;
3225  ATOM_WS_ON_BODY_STATE_CHANGED = 787;
3226  ATOM_WS_WATCH_FACE_RESTRICTED_COMPLICATIONS_IMPACTED = 802;
3227  ATOM_WS_WATCH_FACE_DEFAULT_RESTRICTED_COMPLICATIONS_REMOVED = 803;
3228  ATOM_WS_COMPLICATIONS_IMPACTED_NOTIFICATION_EVENT_REPORTED = 804;
3229  ATOM_WS_REMOTE_EVENT_USAGE_REPORTED = 920;
3230  ATOM_WS_BUGREPORT_REQUESTED = 936;
3231  ATOM_WS_BUGREPORT_TRIGGERED = 937;
3232  ATOM_WS_BUGREPORT_FINISHED = 938;
3233  ATOM_WS_BUGREPORT_RESULT_RECEIVED = 939;
3234  ATOM_WS_STANDALONE_MODE_SNAPSHOT = 10197;
3235  ATOM_WS_FAVORITE_WATCH_FACE_SNAPSHOT = 10206;
3236  ATOM_WS_PHOTOS_WATCH_FACE_FEATURE_SNAPSHOT = 10225;
3237  ATOM_WS_WATCH_FACE_CUSTOMIZATION_SNAPSHOT = 10227;
3238  ATOM_WEAR_POWER_MENU_OPENED = 731;
3239  ATOM_WEAR_ASSISTANT_OPENED = 755;
3240  ATOM_FIRST_OVERLAY_STATE_CHANGED = 917;
3241  ATOM_WIFI_AWARE_NDP_REPORTED = 638;
3242  ATOM_WIFI_AWARE_ATTACH_REPORTED = 639;
3243  ATOM_WIFI_SELF_RECOVERY_TRIGGERED = 661;
3244  ATOM_SOFT_AP_STARTED = 680;
3245  ATOM_SOFT_AP_STOPPED = 681;
3246  ATOM_WIFI_LOCK_RELEASED = 687;
3247  ATOM_WIFI_LOCK_DEACTIVATED = 688;
3248  ATOM_WIFI_CONFIG_SAVED = 689;
3249  ATOM_WIFI_AWARE_RESOURCE_USING_CHANGED = 690;
3250  ATOM_WIFI_AWARE_HAL_API_CALLED = 691;
3251  ATOM_WIFI_LOCAL_ONLY_REQUEST_RECEIVED = 692;
3252  ATOM_WIFI_LOCAL_ONLY_REQUEST_SCAN_TRIGGERED = 693;
3253  ATOM_WIFI_THREAD_TASK_EXECUTED = 694;
3254  ATOM_WIFI_STATE_CHANGED = 700;
3255  ATOM_PNO_SCAN_STARTED = 719;
3256  ATOM_PNO_SCAN_STOPPED = 720;
3257  ATOM_WIFI_IS_UNUSABLE_REPORTED = 722;
3258  ATOM_WIFI_AP_CAPABILITIES_REPORTED = 723;
3259  ATOM_SOFT_AP_STATE_CHANGED = 805;
3260  ATOM_SCORER_PREDICTION_RESULT_REPORTED = 884;
3261  ATOM_WIFI_AWARE_CAPABILITIES = 10190;
3262  ATOM_WIFI_MODULE_INFO = 10193;
3263  ATOM_WIFI_SETTING_INFO = 10194;
3264  ATOM_WIFI_COMPLEX_SETTING_INFO = 10195;
3265  ATOM_WIFI_CONFIGURED_NETWORK_INFO = 10198;
3266}
3267// End of protos/perfetto/config/statsd/atom_ids.proto
3268
3269// Begin of protos/perfetto/config/statsd/statsd_tracing_config.proto
3270
3271// This file is named 'statsd_tracing_config.proto' rather than
3272// 'statsd_config.proto' (which would be more consistent with the other
3273// config protos) so it doesn't show up and confuse folks looking for
3274// the existing statsd_config.proto for configuring statsd itself.
3275// Same for the config proto itself.
3276message StatsdTracingConfig {
3277  // This is for the common case of the atom id being known in the enum AtomId.
3278  repeated AtomId push_atom_id = 1;
3279
3280  // Escape hatch for Atom IDs that are not yet in the AtomId enum
3281  // (e.g. non-upstream atoms that don't exist in AOSP).
3282  repeated int32 raw_push_atom_id = 2;
3283  repeated StatsdPullAtomConfig pull_config = 3;
3284}
3285
3286message StatsdPullAtomConfig {
3287  repeated AtomId pull_atom_id = 1;
3288  repeated int32 raw_pull_atom_id = 2;
3289
3290  optional int32 pull_frequency_ms = 3;
3291  repeated string packages = 4;
3292}
3293
3294// End of protos/perfetto/config/statsd/statsd_tracing_config.proto
3295
3296// Begin of protos/perfetto/common/sys_stats_counters.proto
3297
3298// When editing entries here remember also to update "sys_stats_counters.h" with
3299// the corresponding string definitions for the actual /proc files parser.
3300
3301// Counter definitions for Linux's /proc/meminfo.
3302enum MeminfoCounters {
3303  MEMINFO_UNSPECIFIED = 0;
3304  MEMINFO_MEM_TOTAL = 1;
3305  MEMINFO_MEM_FREE = 2;
3306  MEMINFO_MEM_AVAILABLE = 3;
3307  MEMINFO_BUFFERS = 4;
3308  MEMINFO_CACHED = 5;
3309  MEMINFO_SWAP_CACHED = 6;
3310  MEMINFO_ACTIVE = 7;
3311  MEMINFO_INACTIVE = 8;
3312  MEMINFO_ACTIVE_ANON = 9;
3313  MEMINFO_INACTIVE_ANON = 10;
3314  MEMINFO_ACTIVE_FILE = 11;
3315  MEMINFO_INACTIVE_FILE = 12;
3316  MEMINFO_UNEVICTABLE = 13;
3317  MEMINFO_MLOCKED = 14;
3318  MEMINFO_SWAP_TOTAL = 15;
3319  MEMINFO_SWAP_FREE = 16;
3320  MEMINFO_DIRTY = 17;
3321  MEMINFO_WRITEBACK = 18;
3322  MEMINFO_ANON_PAGES = 19;
3323  MEMINFO_MAPPED = 20;
3324  MEMINFO_SHMEM = 21;
3325  MEMINFO_SLAB = 22;
3326  MEMINFO_SLAB_RECLAIMABLE = 23;
3327  MEMINFO_SLAB_UNRECLAIMABLE = 24;
3328  MEMINFO_KERNEL_STACK = 25;
3329  MEMINFO_PAGE_TABLES = 26;
3330  MEMINFO_COMMIT_LIMIT = 27;
3331  MEMINFO_COMMITED_AS = 28;
3332  MEMINFO_VMALLOC_TOTAL = 29;
3333  MEMINFO_VMALLOC_USED = 30;
3334  MEMINFO_VMALLOC_CHUNK = 31;
3335  MEMINFO_CMA_TOTAL = 32;
3336  MEMINFO_CMA_FREE = 33;
3337  MEMINFO_GPU = 34;
3338  MEMINFO_ZRAM = 35;
3339  MEMINFO_MISC = 36;
3340  MEMINFO_ION_HEAP = 37;
3341  MEMINFO_ION_HEAP_POOL = 38;
3342}
3343
3344// Counter definitions for Linux's /proc/vmstat.
3345enum VmstatCounters {
3346  VMSTAT_UNSPECIFIED = 0;
3347  VMSTAT_NR_FREE_PAGES = 1;
3348  VMSTAT_NR_ALLOC_BATCH = 2;
3349  VMSTAT_NR_INACTIVE_ANON = 3;
3350  VMSTAT_NR_ACTIVE_ANON = 4;
3351  VMSTAT_NR_INACTIVE_FILE = 5;
3352  VMSTAT_NR_ACTIVE_FILE = 6;
3353  VMSTAT_NR_UNEVICTABLE = 7;
3354  VMSTAT_NR_MLOCK = 8;
3355  VMSTAT_NR_ANON_PAGES = 9;
3356  VMSTAT_NR_MAPPED = 10;
3357  VMSTAT_NR_FILE_PAGES = 11;
3358  VMSTAT_NR_DIRTY = 12;
3359  VMSTAT_NR_WRITEBACK = 13;
3360  VMSTAT_NR_SLAB_RECLAIMABLE = 14;
3361  VMSTAT_NR_SLAB_UNRECLAIMABLE = 15;
3362  VMSTAT_NR_PAGE_TABLE_PAGES = 16;
3363  VMSTAT_NR_KERNEL_STACK = 17;
3364  VMSTAT_NR_OVERHEAD = 18;
3365  VMSTAT_NR_UNSTABLE = 19;
3366  VMSTAT_NR_BOUNCE = 20;
3367  VMSTAT_NR_VMSCAN_WRITE = 21;
3368  VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM = 22;
3369  VMSTAT_NR_WRITEBACK_TEMP = 23;
3370  VMSTAT_NR_ISOLATED_ANON = 24;
3371  VMSTAT_NR_ISOLATED_FILE = 25;
3372  VMSTAT_NR_SHMEM = 26;
3373  VMSTAT_NR_DIRTIED = 27;
3374  VMSTAT_NR_WRITTEN = 28;
3375  VMSTAT_NR_PAGES_SCANNED = 29;
3376  VMSTAT_WORKINGSET_REFAULT = 30;
3377  VMSTAT_WORKINGSET_ACTIVATE = 31;
3378  VMSTAT_WORKINGSET_NODERECLAIM = 32;
3379  VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES = 33;
3380  VMSTAT_NR_FREE_CMA = 34;
3381  VMSTAT_NR_SWAPCACHE = 35;
3382  VMSTAT_NR_DIRTY_THRESHOLD = 36;
3383  VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD = 37;
3384  VMSTAT_PGPGIN = 38;
3385  VMSTAT_PGPGOUT = 39;
3386  VMSTAT_PGPGOUTCLEAN = 40;
3387  VMSTAT_PSWPIN = 41;
3388  VMSTAT_PSWPOUT = 42;
3389  VMSTAT_PGALLOC_DMA = 43;
3390  VMSTAT_PGALLOC_NORMAL = 44;
3391  VMSTAT_PGALLOC_MOVABLE = 45;
3392  VMSTAT_PGFREE = 46;
3393  VMSTAT_PGACTIVATE = 47;
3394  VMSTAT_PGDEACTIVATE = 48;
3395  VMSTAT_PGFAULT = 49;
3396  VMSTAT_PGMAJFAULT = 50;
3397  VMSTAT_PGREFILL_DMA = 51;
3398  VMSTAT_PGREFILL_NORMAL = 52;
3399  VMSTAT_PGREFILL_MOVABLE = 53;
3400  VMSTAT_PGSTEAL_KSWAPD_DMA = 54;
3401  VMSTAT_PGSTEAL_KSWAPD_NORMAL = 55;
3402  VMSTAT_PGSTEAL_KSWAPD_MOVABLE = 56;
3403  VMSTAT_PGSTEAL_DIRECT_DMA = 57;
3404  VMSTAT_PGSTEAL_DIRECT_NORMAL = 58;
3405  VMSTAT_PGSTEAL_DIRECT_MOVABLE = 59;
3406  VMSTAT_PGSCAN_KSWAPD_DMA = 60;
3407  VMSTAT_PGSCAN_KSWAPD_NORMAL = 61;
3408  VMSTAT_PGSCAN_KSWAPD_MOVABLE = 62;
3409  VMSTAT_PGSCAN_DIRECT_DMA = 63;
3410  VMSTAT_PGSCAN_DIRECT_NORMAL = 64;
3411  VMSTAT_PGSCAN_DIRECT_MOVABLE = 65;
3412  VMSTAT_PGSCAN_DIRECT_THROTTLE = 66;
3413  VMSTAT_PGINODESTEAL = 67;
3414  VMSTAT_SLABS_SCANNED = 68;
3415  VMSTAT_KSWAPD_INODESTEAL = 69;
3416  VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY = 70;
3417  VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY = 71;
3418  VMSTAT_PAGEOUTRUN = 72;
3419  VMSTAT_ALLOCSTALL = 73;
3420  VMSTAT_PGROTATED = 74;
3421  VMSTAT_DROP_PAGECACHE = 75;
3422  VMSTAT_DROP_SLAB = 76;
3423  VMSTAT_PGMIGRATE_SUCCESS = 77;
3424  VMSTAT_PGMIGRATE_FAIL = 78;
3425  VMSTAT_COMPACT_MIGRATE_SCANNED = 79;
3426  VMSTAT_COMPACT_FREE_SCANNED = 80;
3427  VMSTAT_COMPACT_ISOLATED = 81;
3428  VMSTAT_COMPACT_STALL = 82;
3429  VMSTAT_COMPACT_FAIL = 83;
3430  VMSTAT_COMPACT_SUCCESS = 84;
3431  VMSTAT_COMPACT_DAEMON_WAKE = 85;
3432  VMSTAT_UNEVICTABLE_PGS_CULLED = 86;
3433  VMSTAT_UNEVICTABLE_PGS_SCANNED = 87;
3434  VMSTAT_UNEVICTABLE_PGS_RESCUED = 88;
3435  VMSTAT_UNEVICTABLE_PGS_MLOCKED = 89;
3436  VMSTAT_UNEVICTABLE_PGS_MUNLOCKED = 90;
3437  VMSTAT_UNEVICTABLE_PGS_CLEARED = 91;
3438  VMSTAT_UNEVICTABLE_PGS_STRANDED = 92;
3439  VMSTAT_NR_ZSPAGES = 93;
3440  VMSTAT_NR_ION_HEAP = 94;
3441  VMSTAT_NR_GPU_HEAP = 95;
3442  VMSTAT_ALLOCSTALL_DMA = 96;
3443  VMSTAT_ALLOCSTALL_MOVABLE = 97;
3444  VMSTAT_ALLOCSTALL_NORMAL = 98;
3445  VMSTAT_COMPACT_DAEMON_FREE_SCANNED = 99;
3446  VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED = 100;
3447  VMSTAT_NR_FASTRPC = 101;
3448  VMSTAT_NR_INDIRECTLY_RECLAIMABLE = 102;
3449  VMSTAT_NR_ION_HEAP_POOL = 103;
3450  VMSTAT_NR_KERNEL_MISC_RECLAIMABLE = 104;
3451  VMSTAT_NR_SHADOW_CALL_STACK_BYTES = 105;
3452  VMSTAT_NR_SHMEM_HUGEPAGES = 106;
3453  VMSTAT_NR_SHMEM_PMDMAPPED = 107;
3454  VMSTAT_NR_UNRECLAIMABLE_PAGES = 108;
3455  VMSTAT_NR_ZONE_ACTIVE_ANON = 109;
3456  VMSTAT_NR_ZONE_ACTIVE_FILE = 110;
3457  VMSTAT_NR_ZONE_INACTIVE_ANON = 111;
3458  VMSTAT_NR_ZONE_INACTIVE_FILE = 112;
3459  VMSTAT_NR_ZONE_UNEVICTABLE = 113;
3460  VMSTAT_NR_ZONE_WRITE_PENDING = 114;
3461  VMSTAT_OOM_KILL = 115;
3462  VMSTAT_PGLAZYFREE = 116;
3463  VMSTAT_PGLAZYFREED = 117;
3464  VMSTAT_PGREFILL = 118;
3465  VMSTAT_PGSCAN_DIRECT = 119;
3466  VMSTAT_PGSCAN_KSWAPD = 120;
3467  VMSTAT_PGSKIP_DMA = 121;
3468  VMSTAT_PGSKIP_MOVABLE = 122;
3469  VMSTAT_PGSKIP_NORMAL = 123;
3470  VMSTAT_PGSTEAL_DIRECT = 124;
3471  VMSTAT_PGSTEAL_KSWAPD = 125;
3472  VMSTAT_SWAP_RA = 126;
3473  VMSTAT_SWAP_RA_HIT = 127;
3474  VMSTAT_WORKINGSET_RESTORE = 128;
3475  VMSTAT_ALLOCSTALL_DEVICE = 129;
3476  VMSTAT_ALLOCSTALL_DMA32 = 130;
3477  VMSTAT_BALLOON_DEFLATE = 131;
3478  VMSTAT_BALLOON_INFLATE = 132;
3479  VMSTAT_BALLOON_MIGRATE = 133;
3480  VMSTAT_CMA_ALLOC_FAIL = 134;
3481  VMSTAT_CMA_ALLOC_SUCCESS = 135;
3482  VMSTAT_NR_FILE_HUGEPAGES = 136;
3483  VMSTAT_NR_FILE_PMDMAPPED = 137;
3484  VMSTAT_NR_FOLL_PIN_ACQUIRED = 138;
3485  VMSTAT_NR_FOLL_PIN_RELEASED = 139;
3486  VMSTAT_NR_SEC_PAGE_TABLE_PAGES = 140;
3487  VMSTAT_NR_SHADOW_CALL_STACK = 141;
3488  VMSTAT_NR_SWAPCACHED = 142;
3489  VMSTAT_NR_THROTTLED_WRITTEN = 143;
3490  VMSTAT_PGALLOC_DEVICE = 144;
3491  VMSTAT_PGALLOC_DMA32 = 145;
3492  VMSTAT_PGDEMOTE_DIRECT = 146;
3493  VMSTAT_PGDEMOTE_KSWAPD = 147;
3494  VMSTAT_PGREUSE = 148;
3495  VMSTAT_PGSCAN_ANON = 149;
3496  VMSTAT_PGSCAN_FILE = 150;
3497  VMSTAT_PGSKIP_DEVICE = 151;
3498  VMSTAT_PGSKIP_DMA32 = 152;
3499  VMSTAT_PGSTEAL_ANON = 153;
3500  VMSTAT_PGSTEAL_FILE = 154;
3501  VMSTAT_THP_COLLAPSE_ALLOC = 155;
3502  VMSTAT_THP_COLLAPSE_ALLOC_FAILED = 156;
3503  VMSTAT_THP_DEFERRED_SPLIT_PAGE = 157;
3504  VMSTAT_THP_FAULT_ALLOC = 158;
3505  VMSTAT_THP_FAULT_FALLBACK = 159;
3506  VMSTAT_THP_FAULT_FALLBACK_CHARGE = 160;
3507  VMSTAT_THP_FILE_ALLOC = 161;
3508  VMSTAT_THP_FILE_FALLBACK = 162;
3509  VMSTAT_THP_FILE_FALLBACK_CHARGE = 163;
3510  VMSTAT_THP_FILE_MAPPED = 164;
3511  VMSTAT_THP_MIGRATION_FAIL = 165;
3512  VMSTAT_THP_MIGRATION_SPLIT = 166;
3513  VMSTAT_THP_MIGRATION_SUCCESS = 167;
3514  VMSTAT_THP_SCAN_EXCEED_NONE_PTE = 168;
3515  VMSTAT_THP_SCAN_EXCEED_SHARE_PTE = 169;
3516  VMSTAT_THP_SCAN_EXCEED_SWAP_PTE = 170;
3517  VMSTAT_THP_SPLIT_PAGE = 171;
3518  VMSTAT_THP_SPLIT_PAGE_FAILED = 172;
3519  VMSTAT_THP_SPLIT_PMD = 173;
3520  VMSTAT_THP_SWPOUT = 174;
3521  VMSTAT_THP_SWPOUT_FALLBACK = 175;
3522  VMSTAT_THP_ZERO_PAGE_ALLOC = 176;
3523  VMSTAT_THP_ZERO_PAGE_ALLOC_FAILED = 177;
3524  VMSTAT_VMA_LOCK_ABORT = 178;
3525  VMSTAT_VMA_LOCK_MISS = 179;
3526  VMSTAT_VMA_LOCK_RETRY = 180;
3527  VMSTAT_VMA_LOCK_SUCCESS = 181;
3528  VMSTAT_WORKINGSET_ACTIVATE_ANON = 182;
3529  VMSTAT_WORKINGSET_ACTIVATE_FILE = 183;
3530  VMSTAT_WORKINGSET_NODES = 184;
3531  VMSTAT_WORKINGSET_REFAULT_ANON = 185;
3532  VMSTAT_WORKINGSET_REFAULT_FILE = 186;
3533  VMSTAT_WORKINGSET_RESTORE_ANON = 187;
3534  VMSTAT_WORKINGSET_RESTORE_FILE = 188;
3535}
3536
3537// End of protos/perfetto/common/sys_stats_counters.proto
3538
3539// Begin of protos/perfetto/config/sys_stats/sys_stats_config.proto
3540
3541// This file defines the configuration for the Linux /proc poller data source,
3542// which injects counters in the trace.
3543// Counters that are needed in the trace must be explicitly listed in the
3544// *_counters fields. This is to avoid spamming the trace with all counters
3545// at all times.
3546// The sampling rate is configurable. All polling rates (*_period_ms) need
3547// to be integer multiples of each other.
3548// OK:     [10ms, 10ms, 10ms],  [10ms, 20ms, 10ms],  [10ms, 20ms, 60ms]
3549// Not OK: [10ms, 10ms, 11ms],  [10ms, 15ms, 20ms]
3550message SysStatsConfig {
3551  // Polls /proc/meminfo every X ms, if non-zero.
3552  // This is required to be > 10ms to avoid excessive CPU usage.
3553  // Cost: 0.3 ms [read] + 0.07 ms [parse + trace injection]
3554  optional uint32 meminfo_period_ms = 1;
3555
3556  // If empty all known counters are reported. Otherwise, only the counters
3557  // specified below are reported.
3558  repeated MeminfoCounters meminfo_counters = 2;
3559
3560  // Polls /proc/vmstat every X ms, if non-zero.
3561  // This is required to be > 10ms to avoid excessive CPU usage.
3562  // Cost: 0.2 ms [read] + 0.3 ms [parse + trace injection]
3563  optional uint32 vmstat_period_ms = 3;
3564  repeated VmstatCounters vmstat_counters = 4;
3565
3566  // Pols /proc/stat every X ms, if non-zero.
3567  // This is required to be > 10ms to avoid excessive CPU usage.
3568  // Cost: 4.1 ms [read] + 1.9 ms [parse + trace injection]
3569  optional uint32 stat_period_ms = 5;
3570  enum StatCounters {
3571    STAT_UNSPECIFIED = 0;
3572    STAT_CPU_TIMES = 1;
3573    STAT_IRQ_COUNTS = 2;
3574    STAT_SOFTIRQ_COUNTS = 3;
3575    STAT_FORK_COUNT = 4;
3576  }
3577  repeated StatCounters stat_counters = 6;
3578
3579  // Polls /sys/devfreq/*/curfreq every X ms, if non-zero.
3580  // This is required to be > 10ms to avoid excessive CPU usage.
3581  // This option can be used to record unchanging values.
3582  // Updates from frequency changes can come from ftrace/set_clock_rate.
3583  optional uint32 devfreq_period_ms = 7;
3584
3585  // Polls /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq every X ms.
3586  // This is required to be > 10ms to avoid excessive CPU usage.
3587  optional uint32 cpufreq_period_ms = 8;
3588
3589  // Polls /proc/buddyinfo every X ms, if non-zero.
3590  // This is required to be > 10ms to avoid excessive CPU usage.
3591  optional uint32 buddyinfo_period_ms = 9;
3592
3593  // Polls /proc/diskstats every X ms, if non-zero.
3594  // This is required to be > 10ms to avoid excessive CPU usage.
3595  optional uint32 diskstat_period_ms = 10;
3596
3597  // Polls /proc/pressure/* every X ms, if non-zero.
3598  // This is required to be > 10ms to avoid excessive CPU usage.
3599  optional uint32 psi_period_ms = 11;
3600
3601  // Polls /sys/class/thermal/* every X ms, if non-zero.
3602  // This is required to be > 10ms to avoid excessive CPU usage.
3603  optional uint32 thermal_period_ms = 12;
3604
3605  // Polls /sys/devices/system/cpu/cpu*/cpuidle/state* every X ms, if non-zero.
3606  // This is required to be > 10ms to avoid excessive CPU usage.
3607  optional uint32 cpuidle_period_ms = 13;
3608
3609  // Polls device-specific GPU frequency info every X ms, if non-zero.
3610  // This is required to be > 10ms to avoid excessive CPU usage.
3611  optional uint32 gpufreq_period_ms = 14;
3612}
3613
3614// End of protos/perfetto/config/sys_stats/sys_stats_config.proto
3615
3616// Begin of protos/perfetto/config/system_info/system_info.proto
3617
3618// This data-source does a one-off recording of system information when
3619// the trace starts.
3620// Currently this includes:
3621// - Values of
3622// /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies This
3623// datasource has no configuration options at present.
3624message SystemInfoConfig {}
3625
3626// End of protos/perfetto/config/system_info/system_info.proto
3627
3628// Begin of protos/perfetto/config/test_config.proto
3629
3630// The configuration for a fake producer used in tests.
3631message TestConfig {
3632  message DummyFields {
3633    optional uint32 field_uint32 = 1;
3634    optional int32 field_int32 = 2;
3635    optional uint64 field_uint64 = 3;
3636    optional int64 field_int64 = 4;
3637    optional fixed64 field_fixed64 = 5;
3638    optional sfixed64 field_sfixed64 = 6;
3639    optional fixed32 field_fixed32 = 7;
3640    optional sfixed32 field_sfixed32 = 8;
3641    optional double field_double = 9;
3642    optional float field_float = 10;
3643    optional sint64 field_sint64 = 11;
3644    optional sint32 field_sint32 = 12;
3645    optional string field_string = 13;
3646    optional bytes field_bytes = 14;
3647  }
3648
3649  // The number of messages the fake producer should send.
3650  optional uint32 message_count = 1;
3651
3652  // The maximum number of messages which should be sent each second.
3653  // The actual obserced speed may be lower if the producer is unable to
3654  // work fast enough.
3655  // If this is zero or unset, the producer will send as fast as possible.
3656  optional uint32 max_messages_per_second = 2;
3657
3658  // The seed value for a simple multiplicative congruential pseudo-random
3659  // number sequence.
3660  optional uint32 seed = 3;
3661
3662  // The size of each message in bytes. Should be greater than or equal 5 to
3663  // account for the number of bytes needed to encode the random number and a
3664  // null byte for the string.
3665  optional uint32 message_size = 4;
3666
3667  // Whether the producer should send a event batch when the data source is
3668  // is initially registered.
3669  optional bool send_batch_on_register = 5;
3670
3671  optional DummyFields dummy_fields = 6;
3672}
3673
3674// End of protos/perfetto/config/test_config.proto
3675
3676// Begin of protos/perfetto/config/track_event/track_event_config.proto
3677
3678message TrackEventConfig {
3679  // The following fields define the set of enabled trace categories. Each list
3680  // item is a glob.
3681  //
3682  // To determine if category is enabled, it is checked against the filters in
3683  // the following order:
3684  //
3685  //   1. Exact matches in enabled categories.
3686  //   2. Exact matches in enabled tags.
3687  //   3. Exact matches in disabled categories.
3688  //   4. Exact matches in disabled tags.
3689  //   5. Pattern matches in enabled categories.
3690  //   6. Pattern matches in enabled tags.
3691  //   7. Pattern matches in disabled categories.
3692  //   8. Pattern matches in disabled tags.
3693  //
3694  // If none of the steps produced a match:
3695  //  - In the C++ SDK (`perfetto::Category`), categories are enabled by
3696  //  default.
3697  //  - In the C SDK (`PerfettoTeCategory`), categories are disabled by default.
3698  //
3699  // Examples:
3700  //
3701  //  - To enable all non-slow/debug categories:
3702  //
3703  //       enabled_categories: "*"
3704  //
3705  //  - To enable specific categories:
3706  //
3707  //       disabled_categories: "*"
3708  //       enabled_categories: "my_category"
3709  //       enabled_categories: "my_category2"
3710  //
3711  //  - To enable only categories with a specific tag:
3712  //
3713  //       disabled_tags: "*"
3714  //       enabled_tags: "my_tag"
3715  //
3716
3717  // Default: []
3718  repeated string disabled_categories = 1;
3719
3720  // Default: []
3721  repeated string enabled_categories = 2;
3722
3723  // Default: ["slow", "debug"]
3724  repeated string disabled_tags = 3;
3725
3726  // Default: []
3727  repeated string enabled_tags = 4;
3728
3729  // Default: false (i.e. enabled by default)
3730  optional bool disable_incremental_timestamps = 5;
3731
3732  // Allows to specify a custom unit different than the default (ns).
3733  // Also affects thread timestamps if enable_thread_time_sampling = true.
3734  // A multiplier of 1000 means that a timestamp = 3 should be interpreted as
3735  // 3000 ns = 3 us.
3736  // Default: 1 (if unset, it should be read as 1).
3737  optional uint64 timestamp_unit_multiplier = 6;
3738
3739  // Default: false (i.e. debug_annotations is NOT filtered out by default)
3740  // When true, any debug annotations provided as arguments to the
3741  // TRACE_EVENT macros are not written into the trace. Typed arguments will
3742  // still be emitted even if set to true.
3743  optional bool filter_debug_annotations = 7;
3744
3745  // Default : false (i.e. disabled)
3746  // When true, the SDK samples and emits the current thread time counter value
3747  // for each event on the current thread's track. This value represents the
3748  // total CPU time consumed by that thread since its creation. Note that if a
3749  // thread is not scheduled by OS for some duration, that time won't be
3750  // included in thread_time.
3751  // Learn more : "CLOCK_THREAD_CPUTIME_ID" flag at
3752  // https://linux.die.net/man/3/clock_gettime
3753  optional bool enable_thread_time_sampling = 8;
3754
3755  // Default: false (i.e. dynamic event names are NOT filtered out by default)
3756  // When true, event_names wrapped in perfetto::DynamicString will be filtered
3757  // out.
3758  optional bool filter_dynamic_event_names = 9;
3759}
3760
3761// End of protos/perfetto/config/track_event/track_event_config.proto
3762
3763// Begin of protos/perfetto/config/data_source_config.proto
3764
3765// The configuration that is passed to each data source when starting tracing.
3766// Next id: 136
3767message DataSourceConfig {
3768  enum SessionInitiator {
3769    SESSION_INITIATOR_UNSPECIFIED = 0;
3770    // This trace was initiated from a trusted system app has DUMP and
3771    // USAGE_STATS permission. This system app is expected to not expose the
3772    // trace to the user of the device.
3773    // This is determined by checking the UID initiating the trace.
3774    SESSION_INITIATOR_TRUSTED_SYSTEM = 1;
3775  };
3776  // Data source unique name, e.g., "linux.ftrace". This must match
3777  // the name passed by the data source when it registers (see
3778  // RegisterDataSource()).
3779  optional string name = 1;
3780
3781  // The index of the logging buffer where TracePacket(s) will be stored.
3782  // This field doesn't make a major difference for the Producer(s). The final
3783  // logging buffers, in fact, are completely owned by the Service. We just ask
3784  // the Producer to copy this number into the chunk headers it emits, so that
3785  // the Service can quickly identify the buffer where to move the chunks into
3786  // without expensive lookups on its fastpath.
3787  optional uint32 target_buffer = 2;
3788
3789  // Set by the service to indicate the duration of the trace.
3790  // DO NOT SET in consumer as this will be overridden by the service.
3791  optional uint32 trace_duration_ms = 3;
3792
3793  // If true, |trace_duration_ms| should count also time in suspend. This
3794  // is propagated from TraceConfig.prefer_suspend_clock_for_duration.
3795  optional bool prefer_suspend_clock_for_duration = 122;
3796
3797  // Set by the service to indicate how long it waits after StopDataSource.
3798  // DO NOT SET in consumer as this will be overridden by the service.
3799  optional uint32 stop_timeout_ms = 7;
3800
3801  // Set by the service to indicate whether this tracing session has extra
3802  // guardrails.
3803  // DO NOT SET in consumer as this will be overridden by the service.
3804  optional bool enable_extra_guardrails = 6;
3805
3806  // Set by the service to indicate which user initiated this trace.
3807  // DO NOT SET in consumer as this will be overridden by the service.
3808  optional SessionInitiator session_initiator = 8;
3809
3810  // Set by the service to indicate which tracing session the data source
3811  // belongs to. The intended use case for this is checking if two data sources,
3812  // one of which produces metadata for the other one, belong to the same trace
3813  // session and hence should be linked together.
3814  // This field was introduced in Aug 2018 after Android P.
3815  // DO NOT SET in consumer as this will be overridden by the service.
3816  optional uint64 tracing_session_id = 4;
3817
3818  // Keeep the lower IDs (up to 99) for fields that are *not* specific to
3819  // data-sources and needs to be processed by the traced daemon.
3820
3821  // All data source config fields must be marked as [lazy=true]. This prevents
3822  // the proto-to-cpp generator from recursing into those when generating the
3823  // cpp classes and polluting tracing/core with data-source-specific classes.
3824  // Instead they are treated as opaque strings containing raw proto bytes.
3825
3826  // Data source name: linux.ftrace
3827  optional FtraceConfig ftrace_config = 100 [lazy = true];
3828  // Data source name: linux.inode_file_map
3829  optional InodeFileConfig inode_file_config = 102 [lazy = true];
3830  // Data source name: linux.process_stats
3831  optional ProcessStatsConfig process_stats_config = 103 [lazy = true];
3832  // Data source name: linux.sys_stats
3833  optional SysStatsConfig sys_stats_config = 104 [lazy = true];
3834  // Data source name: android.heapprofd
3835  // Introduced in Android 10.
3836  optional HeapprofdConfig heapprofd_config = 105 [lazy = true];
3837  // Data source name: android.java_hprof
3838  // Introduced in Android 11.
3839  optional JavaHprofConfig java_hprof_config = 110 [lazy = true];
3840  // Data source name: android.power
3841  optional AndroidPowerConfig android_power_config = 106 [lazy = true];
3842  // Data source name: android.log
3843  optional AndroidLogConfig android_log_config = 107 [lazy = true];
3844  // Data source name: gpu.counters
3845  optional GpuCounterConfig gpu_counter_config = 108 [lazy = true];
3846  // Data source name: android.game_interventions
3847  optional AndroidGameInterventionListConfig
3848      android_game_intervention_list_config = 116 [lazy = true];
3849  // Data source name: android.packages_list
3850  optional PackagesListConfig packages_list_config = 109 [lazy = true];
3851  // Data source name: linux.perf
3852  optional PerfEventConfig perf_event_config = 111 [lazy = true];
3853  // Data source name: vulkan.memory_tracker
3854  optional VulkanMemoryConfig vulkan_memory_config = 112 [lazy = true];
3855  // Data source name: track_event
3856  optional TrackEventConfig track_event_config = 113 [lazy = true];
3857  // Data source name: android.polled_state
3858  optional AndroidPolledStateConfig android_polled_state_config = 114
3859      [lazy = true];
3860  // Data source name: android.system_property
3861  optional AndroidSystemPropertyConfig android_system_property_config = 118
3862      [lazy = true];
3863  // Data source name: android.statsd
3864  optional StatsdTracingConfig statsd_tracing_config = 117 [lazy = true];
3865  // Data source name: linux.system_info
3866  optional SystemInfoConfig system_info_config = 119;
3867
3868  // Chrome is special as it doesn't use the perfetto IPC layer. We want to
3869  // avoid proto serialization and de-serialization there because that would
3870  // just add extra hops on top of the Mojo ser/des. Instead we auto-generate a
3871  // C++ class for it so it can pass around plain C++ objets.
3872  optional ChromeConfig chrome_config = 101;
3873
3874  // Data source name: code.v8.dev
3875  optional V8Config v8_config = 127 [lazy = true];
3876
3877  // If an interceptor is specified here, packets for this data source will be
3878  // rerouted to the interceptor instead of the main trace buffer. This can be
3879  // used, for example, to write trace data into ETW or for logging trace points
3880  // to the console.
3881  //
3882  // Note that interceptors are only supported by data sources registered
3883  // through the Perfetto SDK API. Data sources that don't use that API (e.g.,
3884  // traced_probes) may not support interception.
3885  optional InterceptorConfig interceptor_config = 115;
3886
3887  // Data source name: android.network_packets.
3888  // Introduced in Android 14 (U).
3889  optional NetworkPacketTraceConfig network_packet_trace_config = 120
3890      [lazy = true];
3891
3892  // Data source name: android.surfaceflinger.layers
3893  optional SurfaceFlingerLayersConfig surfaceflinger_layers_config = 121
3894      [lazy = true];
3895
3896  // Data source name: android.surfaceflinger.transactions
3897  optional SurfaceFlingerTransactionsConfig surfaceflinger_transactions_config =
3898      123 [lazy = true];
3899
3900  // Data source name: android.sdk_sysprop_guard
3901  // Introduced in Android 14 (U) QPR1.
3902  optional AndroidSdkSyspropGuardConfig android_sdk_sysprop_guard_config = 124
3903      [lazy = true];
3904
3905  // Data source name: windows.etw
3906  optional EtwConfig etw_config = 125 [lazy = true];
3907
3908  // Data source name: android.protolog
3909  optional ProtoLogConfig protolog_config = 126 [lazy = true];
3910
3911  // Data source name: android.input.inputevent
3912  optional AndroidInputEventConfig android_input_event_config = 128
3913      [lazy = true];
3914
3915  // Data source name: android.pixel.modem
3916  optional PixelModemConfig pixel_modem_config = 129 [lazy = true];
3917
3918  // Data source name: android.windowmanager
3919  optional WindowManagerConfig windowmanager_config = 130 [lazy = true];
3920
3921  // Data source name: org.chromium.system_metrics
3922  optional ChromiumSystemMetricsConfig chromium_system_metrics = 131 [lazy = true];
3923
3924  // Data source name: android.kernel_wakelocks
3925  optional KernelWakelocksConfig kernel_wakelocks_config = 132 [lazy = true];
3926
3927  // Data source name: gpu.renderstages
3928  optional GpuRenderStagesConfig gpu_renderstages_config = 133 [lazy = true];
3929
3930  // Data source name: org.chromium.histogram_samples
3931  optional ChromiumHistogramSamplesConfig chromium_histogram_samples = 134
3932      [lazy = true];
3933
3934  // Data source name: android.app_wakelocks
3935  optional AppWakelocksConfig app_wakelocks_config = 135 [lazy = true];
3936
3937  // This is a fallback mechanism to send a free-form text config to the
3938  // producer. In theory this should never be needed. All the code that
3939  // is part of the platform (i.e. traced service) is supposed to *not* truncate
3940  // the trace config proto and propagate unknown fields. However, if anything
3941  // in the pipeline (client or backend) ends up breaking this forward compat
3942  // plan, this field will become the escape hatch to allow future data sources
3943  // to get some meaningful configuration.
3944  optional string legacy_config = 1000;
3945
3946  // This field is only used for testing.
3947  optional TestConfig for_testing = 1001;
3948
3949  // Was |for_testing|. Caused more problems then found.
3950  reserved 268435455;
3951}
3952
3953// End of protos/perfetto/config/data_source_config.proto
3954
3955// Begin of protos/perfetto/config/trace_config.proto
3956
3957// The overall config that is used when starting a new tracing session through
3958// ProducerPort::StartTracing().
3959// It contains the general config for the logging buffer(s) and the configs for
3960// all the data source being enabled.
3961//
3962// Next id: 40.
3963message TraceConfig {
3964  message BufferConfig {
3965    optional uint32 size_kb = 1;
3966
3967    // |page_size|, now deprecated.
3968    reserved 2;
3969
3970    // |optimize_for|, now deprecated.
3971    reserved 3;
3972
3973    enum FillPolicy {
3974      UNSPECIFIED = 0;
3975
3976      // Default behavior. The buffer operates as a conventional ring buffer.
3977      // If the writer is faster than the reader (or if the reader reads only
3978      // after tracing is stopped) newly written packets will overwrite old
3979      // packets.
3980      RING_BUFFER = 1;
3981
3982      // Behaves like RING_BUFFER as long as there is space in the buffer or
3983      // the reader catches up with the writer. As soon as the writer hits
3984      // an unread chunk, it stops accepting new data in the buffer.
3985      DISCARD = 2;
3986    }
3987    optional FillPolicy fill_policy = 4;
3988
3989    // When true the buffer is moved (rather than copied) onto the cloned
3990    // session, and an empty buffer of the same size is allocated in the source
3991    // tracing session. This feature will likely get deprecated in the future.
3992    // It been introduced mainly to support the surfaceflinger snapshot dump
3993    // for bugreports, where SF can dumps O(400MB) into the bugreport trace. In
3994    // that case we don't want to retain another in-memory copy of the buffer.
3995    optional bool transfer_on_clone = 5;
3996
3997    // Used in conjunction with transfer_on_clone. When true the buffer is
3998    // cleared before issuing the Flush(reason=kTraceClone). This is to ensure
3999    // that if the data source took too long to write the data in a previous
4000    // clone-related flush, we don't end up with a mixture of leftovers from
4001    // the previous write and new data.
4002    optional bool clear_before_clone = 6;
4003  }
4004  repeated BufferConfig buffers = 1;
4005
4006  message DataSource {
4007    // Filters and data-source specific config. It contains also the unique name
4008    // of the data source, the one passed in the  DataSourceDescriptor when they
4009    // register on the service.
4010    optional protos.DataSourceConfig config = 1;
4011
4012    // Optional. If multiple producers (~processes) expose the same data source
4013    // and either |producer_name_filter| or |producer_name_regex_filter| is set,
4014    // the data source is enabled only for producers whose names match any of
4015    // the filters.
4016    // |producer_name_filter| has to be an exact match, while
4017    // |producer_name_regex_filter| is a regular expression.
4018    // This allows to enable a data source only for specific processes.
4019    // The "repeated" fields have OR semantics: specifying a filter ["foo",
4020    // "bar"] will enable data sources on both "foo" and "bar" (if they exist).
4021    repeated string producer_name_filter = 2;
4022    repeated string producer_name_regex_filter = 3;
4023  }
4024  repeated DataSource data_sources = 2;
4025
4026  // Config for disabling builtin data sources in the tracing service.
4027  message BuiltinDataSource {
4028    // Disable emitting clock timestamps into the trace.
4029    optional bool disable_clock_snapshotting = 1;
4030
4031    // Disable echoing the original trace config in the trace.
4032    optional bool disable_trace_config = 2;
4033
4034    // Disable emitting system info (build fingerprint, cpuinfo, etc).
4035    optional bool disable_system_info = 3;
4036
4037    // Disable emitting events for data-source state changes (e.g. the marker
4038    // for all data sources having ACKed the start of the trace).
4039    optional bool disable_service_events = 4;
4040
4041    // The authoritative clock domain for the trace. Defaults to BOOTTIME. See
4042    // also ClockSnapshot's primary_trace_clock. The configured value is written
4043    // into the trace as part of the ClockSnapshots emitted by the service.
4044    // Trace processor will attempt to translate packet/event timestamps from
4045    // various data sources (and their chosen clock domains) to this domain
4046    // during import. Added in Android R.
4047    optional BuiltinClock primary_trace_clock = 5;
4048
4049    // Time interval in between snapshotting of sync markers, clock snapshots,
4050    // stats, and other periodic service-emitted events. Note that the service
4051    // only keeps track of the first and the most recent snapshot until
4052    // ReadBuffers() is called.
4053    optional uint32 snapshot_interval_ms = 6;
4054
4055    // Hints to the service that a suspend-aware (i.e. counting time in suspend)
4056    // clock should be used for periodic snapshots of service-emitted events.
4057    // This means, if a snapshot *should* have happened during suspend, it will
4058    // happen immediately after the device resumes.
4059    //
4060    // Choosing a clock like this is done on best-effort basis; not all
4061    // platforms (e.g. Windows) expose a clock which can be used for periodic
4062    // tasks counting suspend. If such a clock is not available, the service
4063    // falls back to the best-available alternative.
4064    //
4065    // Introduced in Android S.
4066    // TODO(lalitm): deprecate this in T and make this the default if nothing
4067    // crashes in S.
4068    optional bool prefer_suspend_clock_for_snapshot = 7;
4069
4070    // Disables the reporting of per-trace-writer histograms in TraceStats.
4071    optional bool disable_chunk_usage_histograms = 8;
4072  }
4073  optional BuiltinDataSource builtin_data_sources = 20;
4074
4075  // If specified, the trace will be stopped |duration_ms| after starting.
4076  // This does *not* count the time the system is suspended, so we will run
4077  // for duration_ms of system activity, not wall time.
4078  //
4079  // However in case of traces with triggers, see
4080  // TriggerConfig.trigger_timeout_ms instead.
4081  optional uint32 duration_ms = 3;
4082
4083  // If true, tries to use CLOCK_BOOTTIME for duration_ms rather than
4084  // CLOCK_MONOTONIC (which doesn't count time in suspend). Supported only on
4085  // Linux/Android, no-op on other platforms. This is used when dealing with
4086  // long (e.g. 24h) traces, where suspend can inflate them to weeks of
4087  // wall-time, making them more likely to hit device reboots (and hence loss).
4088  // This option also changes consistently the semantic of
4089  // TriggerConfig.stop_delay_ms.
4090  optional bool prefer_suspend_clock_for_duration = 36;
4091
4092  // This is set when --dropbox is passed to the Perfetto command line client
4093  // and enables guardrails that limit resource usage for traces requested
4094  // by statsd.
4095  optional bool enable_extra_guardrails = 4;
4096
4097  enum LockdownModeOperation {
4098    LOCKDOWN_UNCHANGED = 0;
4099    LOCKDOWN_CLEAR = 1;
4100    LOCKDOWN_SET = 2;
4101  }
4102  // Reject producers that are not running under the same UID as the tracing
4103  // service.
4104  optional LockdownModeOperation lockdown_mode = 5;
4105
4106  message ProducerConfig {
4107    // Identifies the producer for which this config is for.
4108    optional string producer_name = 1;
4109
4110    // Specifies the preferred size of the shared memory buffer. If the size is
4111    // larger than the max size, the max will be used. If it is smaller than
4112    // the page size or doesn't fit pages evenly into it, it will fall back to
4113    // the size specified by the producer or finally the default shared memory
4114    // size.
4115    optional uint32 shm_size_kb = 2;
4116
4117    // Specifies the preferred size of each page in the shared memory buffer.
4118    // Must be an integer multiple of 4K.
4119    optional uint32 page_size_kb = 3;
4120  }
4121
4122  repeated ProducerConfig producers = 6;
4123
4124  // Contains statsd-specific metadata about an alert associated with the trace.
4125  message StatsdMetadata {
4126    // The identifier of the alert which triggered this trace.
4127    optional int64 triggering_alert_id = 1;
4128    // The uid which registered the triggering configuration with statsd.
4129    optional int32 triggering_config_uid = 2;
4130    // The identifier of the config which triggered the alert.
4131    optional int64 triggering_config_id = 3;
4132    // The identifier of the subscription which triggered this trace.
4133    optional int64 triggering_subscription_id = 4;
4134  }
4135
4136  // Statsd-specific metadata.
4137  optional StatsdMetadata statsd_metadata = 7;
4138
4139  // When true && |output_path| is empty, the EnableTracing() request must
4140  // provide a file descriptor. The service will then periodically read packets
4141  // out of the trace buffer and store it into the passed file.
4142  // If |output_path| is not empty no fd should be passed, the service
4143  // will create a new file and write into that (see comment below).
4144  optional bool write_into_file = 8;
4145
4146  // This must point to a non-existing file. If the file exists the service
4147  // will NOT overwrite and will fail instead as a security precaution.
4148  // On Android, when this is used with the system traced, the path must be
4149  // within /data/misc/perfetto-traces/ or the trace will fail.
4150  // This option has been introduced in Android R. Before R write_into_file
4151  // can be used only with the "pass a file descriptor over IPC" mode.
4152  optional string output_path = 29;
4153
4154  // Optional. If non-zero tunes the write period. A min value of 100ms is
4155  // enforced (i.e. smaller values are ignored).
4156  optional uint32 file_write_period_ms = 9;
4157
4158  // Optional. When non zero the periodic write stops once at most X bytes
4159  // have been written into the file. Tracing is disabled when this limit is
4160  // reached, even if |duration_ms| has not been reached yet.
4161  optional uint64 max_file_size_bytes = 10;
4162
4163  // Contains flags which override the default values of the guardrails inside
4164  // Perfetto.
4165  message GuardrailOverrides {
4166    // Override the default limit (in bytes) for uploading data to server within
4167    // a 24 hour period.
4168    // On R-, this override only affected userdebug builds. Since S, it also
4169    // affects user builds.
4170    // In 24Q3+ (V+), this override is a noop because upload guardrail logic
4171    // was removed from Perfetto.
4172    optional uint64 max_upload_per_day_bytes = 1 [deprecated = true];
4173
4174    // Overrides the guardrail for maximum trace buffer size.
4175    // Available on U+
4176    optional uint32 max_tracing_buffer_size_kb = 2;
4177  }
4178  optional GuardrailOverrides guardrail_overrides = 11;
4179
4180  // When true, data sources are not started until an explicit call to
4181  // StartTracing() on the consumer port. This is to support early
4182  // initialization and fast trace triggering. This can be used only when the
4183  // Consumer explicitly triggers the StartTracing() method.
4184  // This should not be used in a remote trace config via statsd, doing so will
4185  // result in a hung trace session.
4186  optional bool deferred_start = 12;
4187
4188  // When set, it periodically issues a Flush() to all data source, forcing them
4189  // to commit their data into the tracing service. This can be used for
4190  // quasi-real-time streaming mode and to guarantee some partial ordering of
4191  // events in the trace in windows of X ms.
4192  optional uint32 flush_period_ms = 13;
4193
4194  // Wait for this long for producers to acknowledge flush requests.
4195  // Default 5s.
4196  optional uint32 flush_timeout_ms = 14;
4197
4198  // Wait for this long for producers to acknowledge stop requests.
4199  // Default 5s.
4200  optional uint32 data_source_stop_timeout_ms = 23;
4201
4202  // |disable_clock_snapshotting| moved.
4203  reserved 15;
4204
4205  // Android-only. If set, sends an intent to the Traceur system app when the
4206  // trace ends to notify it about the trace readiness.
4207  optional bool notify_traceur = 16;
4208
4209  // This field was introduced in Android S.
4210  // Android-only. If set to a value > 0, marks the trace session as a candidate
4211  // for being attached to a bugreport. This field effectively acts as a z-index
4212  // for bugreports. When Android's dumpstate runs perfetto
4213  // --save-for-bugreport, traced will pick the tracing session with the highest
4214  // score (score <= 0 is ignored) and:
4215  // On Android S, T:  will steal its contents, save the trace into
4216  //     a known path and stop prematurely.
4217  // On Android U+: will create a read-only snapshot and save that into a known
4218  //     path, without stoppin the original tracing session.
4219  // When this field is set the tracing session becomes eligible to be cloned
4220  // by other UIDs.
4221  optional int32 bugreport_score = 30;
4222
4223  // When set, defines name of the file that will be saved under
4224  // /data/misc/perfetto-traces/bugreport/ when using --save-all-for-bugreport.
4225  // If omitted, traces will be named systrace.pftrace, systrace_1.pftrace, etc,
4226  // starting from the highest `bugreport_score`.
4227  // Introduced in v42 / Android V.
4228  optional string bugreport_filename = 38;
4229
4230  // Triggers allow producers to start or stop the tracing session when an event
4231  // occurs.
4232  //
4233  // For example if we are tracing probabilistically, most traces will be
4234  // uninteresting. Triggers allow us to keep only the interesting ones such as
4235  // those traces during which the device temperature reached a certain
4236  // threshold. In this case the producer can activate a trigger to keep
4237  // (STOP_TRACING) the trace, otherwise it can also begin a trace
4238  // (START_TRACING) because it knows something is about to happen.
4239  message TriggerConfig {
4240    enum TriggerMode {
4241      UNSPECIFIED = 0;
4242
4243      // When this mode is chosen, data sources are not started until one of the
4244      // |triggers| are received. This supports early initialization and fast
4245      // starting of the tracing system. On triggering, the session will then
4246      // record for |stop_delay_ms|. However if no trigger is seen
4247      // after |trigger_timeout_ms| the session will be stopped and no data will
4248      // be returned.
4249      START_TRACING = 1;
4250
4251      // When this mode is chosen, the session will be started via the normal
4252      // EnableTracing() & StartTracing(). If no trigger is ever seen
4253      // the session will be stopped after |trigger_timeout_ms| and no data will
4254      // be returned. However if triggered the trace will stop after
4255      // |stop_delay_ms| and any data in the buffer will be returned to the
4256      // consumer.
4257      STOP_TRACING = 2;
4258
4259      // 3 was taken by CLONE_SNAPSHOT but that has been moved to 4.
4260      // The early implementation of CLONE_SNAPSHOT had various bugs
4261      // (b/290798988, b/290799105) and made it into Android U. The number
4262      // change is to make sure nobody rolls out a config that hits the broken
4263      // behaviour.
4264      reserved 3;
4265
4266      // When this mode is chosen, this causes a snapshot of the current tracing
4267      // session to be created after |stop_delay_ms| while the current tracing
4268      // session continues undisturbed (% an extra flush). This mode can be
4269      // used only when the tracing session is handled by the "perfetto" cmdline
4270      // client (which is true in 90% of cases). Part of the business logic
4271      // necessary for this behavior, and ensuing file handling, lives in
4272      // perfetto_cmd.cc . On other consumers, this causes only a notification
4273      // of the trigger through a CloneTriggerHit ObservableEvent. The custom
4274      // consumer is supposed to call CloneSession() itself after the event.
4275      // Use use_clone_snapshot_if_available=true when targeting older versions
4276      // of perfetto.
4277      CLONE_SNAPSHOT = 4;
4278
4279      // NOTE: CLONE_SNAPSHOT should be used only when we targeting Android V+
4280      // (15+) / Perfetto v38+. A bug in older versions of the tracing service
4281      // might cause indefinitely long tracing sessions (see b/274931668).
4282    }
4283    optional TriggerMode trigger_mode = 1;
4284
4285    // This flag is really a workaround for b/274931668. This is needed only
4286    // when deploying configs to different versions of the tracing service.
4287    // When this is set to true this has the same effect of setting trigger_mode
4288    // to CLONE_SNAPSHOT on newer versions of the service. This boolean has been
4289    // introduced to allow to have configs that use CLONE_SNAPSHOT on newer
4290    // versions of Android and fall back to STOP_TRACING on older versions where
4291    // CLONE_SNAPSHOT did not exist.
4292    // When using this flag, trigger_mode must be set to STOP_TRACING.
4293    optional bool use_clone_snapshot_if_available = 5;
4294
4295    // DEPRECATED, was use_clone_snapshot_if_available in U. See the comment
4296    // around CLONE_SNAPSHOT.
4297    reserved 4;
4298
4299    message Trigger {
4300      // The producer must specify this name to activate the trigger.
4301      optional string name = 1;
4302
4303      // An std::regex that will match the producer that can activate this
4304      // trigger. This is optional. If unset any producers can activate this
4305      // trigger.
4306      optional string producer_name_regex = 2;
4307
4308      // After a trigger is received either in START_TRACING or STOP_TRACING
4309      // mode then the trace will end |stop_delay_ms| after triggering.
4310      // In CLONE_SNAPSHOT mode, this is the delay between the trigger and the
4311      // snapshot.
4312      // If |prefer_suspend_clock_for_duration| is set, the duration will be
4313      // based on wall-clock, counting also time in suspend.
4314      optional uint32 stop_delay_ms = 3;
4315
4316      // Limits the number of traces this trigger can start/stop in a rolling
4317      // 24 hour window. If this field is unset or zero, no limit is applied and
4318      // activiation of this trigger *always* starts/stops the trace.
4319      optional uint32 max_per_24_h = 4;
4320
4321      // A value between 0 and 1 which encodes the probability of skipping a
4322      // trigger with this name. This is useful for reducing the probability
4323      // of high-frequency triggers from dominating trace finaization. If this
4324      // field is unset or zero, the trigger will *never* be skipped. If this
4325      // field is greater than or equal to 1, this trigger will *always* be
4326      // skipped i.e. it will be as if this trigger was never included in the
4327      // first place.
4328      // This probability check is applied *before* any other limits. For
4329      // example, if |max_per_24_h| is also set, first we will check if the
4330      // probability bar is met and only then will we check the |max_per_24_h|
4331      // limit.
4332      optional double skip_probability = 5;
4333    }
4334    // A list of triggers which are related to this configuration. If ANY
4335    // trigger is seen then an action will be performed based on |trigger_mode|.
4336    repeated Trigger triggers = 2;
4337
4338    // Required and must be positive if a TriggerConfig is specified. This is
4339    // how long this TraceConfig should wait for a trigger to arrive. After this
4340    // period of time if no trigger is seen the TracingSession will be cleaned
4341    // up.
4342    optional uint32 trigger_timeout_ms = 3;
4343  }
4344  optional TriggerConfig trigger_config = 17;
4345
4346  // When this is non-empty the perfetto command line tool will ignore the rest
4347  // of this TraceConfig and instead connect to the perfetto service as a
4348  // producer and send these triggers, potentially stopping or starting traces
4349  // that were previous configured to use a TriggerConfig.
4350  repeated string activate_triggers = 18;
4351
4352  // Configuration for trace contents that reference earlier trace data. For
4353  // example, a data source might intern strings, and emit packets containing
4354  // {interned id : string} pairs. Future packets from that data source can then
4355  // use the interned ids instead of duplicating the raw string contents. The
4356  // trace parser will then need to use that interning table to fully interpret
4357  // the rest of the trace.
4358  message IncrementalStateConfig {
4359    // If nonzero, notify eligible data sources to clear their incremental state
4360    // periodically, with the given period. The notification is sent only to
4361    // data sources that have |handles_incremental_state_clear| set in their
4362    // DataSourceDescriptor. The notification requests that the data source
4363    // stops referring to past trace contents. This is particularly useful when
4364    // tracing in ring buffer mode, where it is not exceptional to overwrite old
4365    // trace data.
4366    //
4367    // Warning: this time-based global clearing is likely to be removed in the
4368    // future, to be replaced with a smarter way of sending the notifications
4369    // only when necessary.
4370    optional uint32 clear_period_ms = 1;
4371  }
4372  optional IncrementalStateConfig incremental_state_config = 21;
4373
4374  // No longer needed as we unconditionally allow tracing on user builds.
4375  optional bool allow_user_build_tracing = 19 [deprecated = true];
4376
4377  // If set the tracing service will ensure there is at most one tracing session
4378  // with this key.
4379  optional string unique_session_name = 22;
4380
4381  // Compress trace with the given method. Best effort.
4382  enum CompressionType {
4383    COMPRESSION_TYPE_UNSPECIFIED = 0;
4384    COMPRESSION_TYPE_DEFLATE = 1;
4385  }
4386  optional CompressionType compression_type = 24;
4387
4388  // DEPRECATED, was compress_from_cli.
4389  reserved 37;
4390
4391  // Android-only. Not for general use. If set, saves the trace into an
4392  // incident. This field is read by perfetto_cmd, rather than the tracing
4393  // service. This field must be set when passing the --upload flag to
4394  // perfetto_cmd.
4395  message IncidentReportConfig {
4396    // In this message, either:
4397    //  * all of |destination_package|, |destination_class| and |privacy_level|
4398    //    must be set.
4399    //  * |skip_incidentd| must be explicitly set to true.
4400
4401    optional string destination_package = 1;
4402    optional string destination_class = 2;
4403    // Level of filtering in the requested incident. See |Destination| in
4404    // frameworks/base/core/proto/android/privacy.proto.
4405    optional int32 privacy_level = 3;
4406
4407    // If true, then skips saving the trace to incidentd.
4408    //
4409    // This flag is useful in testing (e.g. Perfetto-statsd integration tests)
4410    // or when we explicitly don't want traces to go to incidentd even when they
4411    // usually would (e.g. configs deployed using statsd but only used for
4412    // inclusion in bugreports using |bugreport_score|).
4413    //
4414    // The motivation for having this flag, instead of just not setting
4415    // |incident_report_config|, is prevent accidents where
4416    // |incident_report_config| is omitted by mistake.
4417    optional bool skip_incidentd = 5;
4418
4419    // If true, do not write the trace into dropbox (i.e. incident only).
4420    // Otherwise, write to both dropbox and incident.
4421    // TODO(lalitm): remove this field as we no longer use Dropbox.
4422    optional bool skip_dropbox = 4 [deprecated = true];
4423  }
4424  optional IncidentReportConfig incident_report_config = 25;
4425
4426  enum StatsdLogging {
4427    STATSD_LOGGING_UNSPECIFIED = 0;
4428    STATSD_LOGGING_ENABLED = 1;
4429    STATSD_LOGGING_DISABLED = 2;
4430  }
4431
4432  // Android-only. Not for general use. If specified, sets the logging to statsd
4433  // of guardrails and checkpoints in the tracing service. perfetto_cmd sets
4434  // this to enabled (if not explicitly set in the config) when specifying
4435  // --upload.
4436  optional StatsdLogging statsd_logging = 31;
4437
4438  // DEPRECATED. Was trace_uuid, use trace_uuid_msb and trace_uuid_lsb instead.
4439  reserved 26;
4440
4441  // An identifier clients can use to tie this trace to other logging.
4442  // DEPRECATED as per v32. See TracePacket.trace_uuid for the authoritative
4443  // Trace UUID. If this field is set, the tracing service will respect the
4444  // requested UUID (i.e. TracePacket.trace_uuid == this field) but only if
4445  // gap-less snapshotting is not used.
4446  optional int64 trace_uuid_msb = 27 [deprecated = true];
4447  optional int64 trace_uuid_lsb = 28 [deprecated = true];
4448
4449  // When set applies a post-filter to the trace contents using the filter
4450  // provided. The filter is applied at ReadBuffers() time and works both in the
4451  // case of IPC readback and write_into_file. This filter can be generated
4452  // using `tools/proto_filter -s schema.proto -F filter_out.bytes` or
4453  // `-T filter_out.escaped_string` (for .pbtx). See go/trace-filtering for
4454  // design.
4455  //
4456  // Introduced in Android S, but it was broken (b/195065199). Reintroduced in
4457  // Android T with a different field number. Updated in Android U with a new
4458  // bytecode version which supports string filtering.
4459  message TraceFilter {
4460    // =========================
4461    // Filter bytecode.
4462    // =========================
4463
4464    // The bytecode as implemented in Android T.
4465    optional bytes bytecode = 1;
4466
4467    // The bytecode as implemented in Android U. Adds support for string
4468    // filtering.
4469    optional bytes bytecode_v2 = 2;
4470
4471    // =========================
4472    // String filtering
4473    // =========================
4474
4475    // The principles and terminology of string filtering is heavily inspired by
4476    // iptables. A "rule" decide how strings should be filtered. Each rule
4477    // contains a "policy" which indicates the algorithm to use for filtering.
4478    // A "chain" is a list of rules which will be sequentially checked against
4479    // each string.
4480    //
4481    // The first rule which applies to the string terminates filtering for that
4482    // string. If no rules apply, the string is left unchanged.
4483
4484    // A policy specifies which algorithm should be used for filtering the
4485    // string.
4486    enum StringFilterPolicy {
4487      SFP_UNSPECIFIED = 0;
4488
4489      // Tries to match the string field against |regex_pattern|. If it
4490      // matches, all matching groups are "redacted" (i.e. replaced with a
4491      // constant string) and filtering is terminated (i.e. no further rules are
4492      // checked). If it doesn't match, the string is left unchanged and the
4493      // next rule in chain is considered.
4494      SFP_MATCH_REDACT_GROUPS = 1;
4495
4496      // Like |SFP_MATCH_REDACT_GROUPS| but tries to do some pre-work before
4497      // checking the regex. Specifically, it tries to parse the string field as
4498      // an atrace tracepoint and checks if the post-tgid field starts with
4499      // |atrace_post_tgid_starts_with|. The regex matching is only performed if
4500      // this check succeeds.
4501      SFP_ATRACE_MATCH_REDACT_GROUPS = 2;
4502
4503      // Tries to match the string field against |regex_pattern|. If it
4504      // matches, filtering is terminated (i.e. no further rules are checked).
4505      // If it doesn't match, the string is left unchanged and the next rule in
4506      // chain is considered.
4507      SFP_MATCH_BREAK = 3;
4508
4509      // Like |SFP_MATCH_BREAK| but tries to do some pre-work before checking
4510      // the regex. Specifically, it tries to parse the string field as an
4511      // atrace tracepoint and checks if the post-tgid field starts with
4512      // |atrace_post_tgid_starts_with|. The regex matching is only performed if
4513      // this check succeeds.
4514      SFP_ATRACE_MATCH_BREAK = 4;
4515
4516      // Tries to repeatedly search (i.e. find substrings of) the string field
4517      // with |regex_pattern|. For each match, redacts any matching groups (i.e.
4518      // replaced with a constant string). Once there are no further matches,
4519      // filtering is terminated (i.e. no further rules are checked).
4520      //
4521      // Note that this is policy is a "search" policy not a "match" policy
4522      // unlike the above policies:
4523      //  * Match policies require matching the full string i.e. there is an
4524      //    implicit leading `^` and trailing `$`.
4525      //  * Search policies perform repeated partial matching of the string
4526      //    e.g.
4527      //      - String: `foo=aaa,bar=123,foo=bbb,baz=456`
4528      //      - Pattern: `foo=(\d+)`
4529      //      - Output: `foo=P6O,bar=123,foo=P6O,baz=456`
4530      //    where P6O is the redaction string
4531      //
4532      // All of this is only performed after some pre-work where we try to parse
4533      // the string field as an atrace tracepoint and check if the post-tgid
4534      // field starts with |atrace_post_tgid_starts_with|.
4535      //
4536      // If there are no partial matches, the string is left unchanged and the
4537      // next rule in chain is considered.
4538      SFP_ATRACE_REPEATED_SEARCH_REDACT_GROUPS = 5;
4539    }
4540
4541    // A rule specifies how strings should be filtered.
4542    message StringFilterRule {
4543      // The policy (i.e. algorithm) dictating how strings matching this rule
4544      // should be handled.
4545      optional StringFilterPolicy policy = 1;
4546
4547      // The regex pattern used to match against each string.
4548      optional string regex_pattern = 2;
4549
4550      // The string which should appear after the tgid in atrace tracepoint
4551      // strings.
4552      optional string atrace_payload_starts_with = 3;
4553    }
4554
4555    // A chain is a list of rules which string will be sequentially checked
4556    // against.
4557    message StringFilterChain {
4558      repeated StringFilterRule rules = 1;
4559    }
4560    optional StringFilterChain string_filter_chain = 3;
4561  }
4562  // old field number for trace_filter
4563  reserved 32;
4564  optional TraceFilter trace_filter = 33;
4565
4566  // Android-only. Not for general use. If set, reports the trace to the
4567  // Android framework. This field is read by perfetto_cmd, rather than the
4568  // tracing service. This field must be set when passing the --upload flag to
4569  // perfetto_cmd.
4570  message AndroidReportConfig {
4571    // In this message, either:
4572    //  * |reporter_service_package| and |reporter_service_class| must be set.
4573    //  * |skip_reporting| must be explicitly set to true.
4574
4575    optional string reporter_service_package = 1;
4576    optional string reporter_service_class = 2;
4577
4578    // If true, then skips reporting the trace to Android framework.
4579    //
4580    // This flag is useful in testing (e.g. Perfetto-statsd integration tests)
4581    // or when we explicitly don't want to report traces to the framework even
4582    // when they usually would (e.g. configs deployed using statsd but only
4583    // used for inclusion in bugreports using |bugreport_score|).
4584    //
4585    // The motivation for having this flag, instead of just not setting
4586    // |framework_report_config|, is prevent accidents where
4587    // |framework_report_config| is omitted by mistake.
4588    optional bool skip_report = 3;
4589
4590    // If true, will direct the Android framework to read the data in trace
4591    // file and pass it to the reporter class over a pipe instead of passing
4592    // the file descriptor directly.
4593    //
4594    // This flag is needed because the Android test framework does not
4595    // currently support priv-app helper apps (in terms of SELinux) and we
4596    // really don't want to add an allow rule for untrusted_app to receive
4597    // trace fds.
4598    //
4599    // Because of this, we instead will direct the framework to create a new
4600    // pipe and pass this to the reporter process instead. As the pipe is
4601    // created by the framework, we won't have any problems with SELinux
4602    // (system_server is already allowed to pass pipe fds, even
4603    // to untrusted apps).
4604    //
4605    // As the name suggests this option *MUST* only be used for testing.
4606    // Note that the framework will reject (and drop) files which are too
4607    // large both for simplicity and to be minimize the amount of data we
4608    // pass to a non-priv app (note that the framework will still check
4609    // manifest permissions even though SELinux permissions are worked around).
4610    optional bool use_pipe_in_framework_for_testing = 4;
4611  }
4612  optional AndroidReportConfig android_report_config = 34;
4613
4614  // If set, delays the start of tracing by a random duration. The duration is
4615  // chosen from a uniform distribution between the specified minimum and
4616  // maximum.
4617  // Note: this delay is implemented by perfetto_cmd *not* by traced so will
4618  // not work if you communicate with traced directly over the consumer API.
4619  // Introduced in Android T.
4620  message CmdTraceStartDelay {
4621    optional uint32 min_delay_ms = 1;
4622    optional uint32 max_delay_ms = 2;
4623  }
4624  optional CmdTraceStartDelay cmd_trace_start_delay = 35;
4625
4626  // When non-empty, ensures that for a each semaphore named `name at most
4627  // `max_other_session_count`` *other* sessions (whose value is taken of the
4628  // minimum of all values specified by this config or any already-running
4629  // session) can be be running.
4630  //
4631  // If a semaphore "acquisition" fails, EnableTracing will return an error
4632  // and the tracing session will not be started (or elgible to start in
4633  // the case of deferred sessions).
4634  //
4635  // This is easiest to explain with an example. Suppose the tracing service has
4636  // the following active tracing sessions:
4637  //   S1 = [{name=foo, max_other_session_count=2},
4638  //         {name=bar, max_other_session_count=0}]
4639  //   S2 = [{name=foo, max_other_session_count=1},
4640  //         {name=baz, max_other_session_count=1}]
4641  //
4642  // Then, for a new session, the following would be the expected behaviour of
4643  // EnableSession given the state of `session_semaphores`.
4644  //   Q: session_semaphores = []
4645  //   A: Allowed because it does not specify any semaphores. Will be allowed
4646  //      no matter the state of any other tracing session.
4647  //   Q: session_semaphores = [{name=baz, max_other_session_count=1}]
4648  //   A: Allowed because both S2 and this config specify
4649  //      max_other_session_count=1 for baz.
4650  //   Q: session_semaphores = [{name=foo, max_other_session_count=3}]
4651  //   A: Denied because S2 specified max_other_session_count=1 for foo and S1
4652  //      takes that slot.
4653  //   Q: session_semaphores = [{name=bar, max_other_session_count=0}]
4654  //   A: Denied because S1 takes the the slot specified by both S1 and
4655  //      this config.
4656  //
4657  // Introduced in 24Q3 (Android V).
4658  message SessionSemaphore {
4659    // The name of the semaphore. Acts as a unique identifier across all
4660    // tracing sessions (including the one being started).
4661    optional string name = 1;
4662
4663    // The maximum number of *other* sesssions which specify the same semaphore
4664    // which can be active. The minimum of this value across all tracing
4665    // sessions and the value specified by the config is used when deciding
4666    // whether the tracing session can be started.
4667    optional uint64 max_other_session_count = 2;
4668  }
4669  repeated SessionSemaphore session_semaphores = 39;
4670}
4671
4672// End of protos/perfetto/config/trace_config.proto
4673