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