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 14// Begin of protos/perfetto/common/gpu_counter_descriptor.proto 15 16// Description of GPU counters. 17// This message is sent by a GPU counter producer to specify the counters 18// available in the hardware. 19message GpuCounterDescriptor { 20 // Logical groups for a counter. This is used in the UI to present the 21 // related counters together. 22 enum GpuCounterGroup { 23 UNCLASSIFIED = 0; 24 SYSTEM = 1; 25 VERTICES = 2; 26 FRAGMENTS = 3; 27 PRIMITIVES = 4; 28 // Includes counters relating to caching and bandwidth. 29 MEMORY = 5; 30 COMPUTE = 6; 31 } 32 33 message GpuCounterSpec { 34 optional uint32 counter_id = 1; 35 optional string name = 2; 36 optional string description = 3; 37 // MeasureUnit unit (deprecated) 38 reserved 4; 39 oneof peak_value { 40 int64 int_peak_value = 5; 41 double double_peak_value = 6; 42 } 43 repeated MeasureUnit numerator_units = 7; 44 repeated MeasureUnit denominator_units = 8; 45 optional bool select_by_default = 9; 46 repeated GpuCounterGroup groups = 10; 47 } 48 repeated GpuCounterSpec specs = 1; 49 50 // Allow producer to group counters into block to represent counter islands. 51 // A capacity may be specified to indicate the number of counters that can be 52 // enable simultaneously in that block. 53 message GpuCounterBlock { 54 // required. Unique ID for the counter group. 55 optional uint32 block_id = 1; 56 // optional. Number of counters supported by the block. No limit if unset. 57 optional uint32 block_capacity = 2; 58 // optional. Name of block. 59 optional string name = 3; 60 // optional. Description for the block. 61 optional string description = 4; 62 // list of counters that are part of the block. 63 repeated uint32 counter_ids = 5; 64 } 65 repeated GpuCounterBlock blocks = 2; 66 67 // optional. Minimum sampling period supported by the producer in 68 // nanoseconds. 69 optional uint64 min_sampling_period_ns = 3; 70 71 // optional. Maximum sampling period supported by the producer in 72 // nanoseconds. 73 optional uint64 max_sampling_period_ns = 4; 74 75 // optional. The producer supports counter sampling by instrumenting the 76 // command buffer. 77 optional bool supports_instrumented_sampling = 5; 78 79 // next id: 41 80 enum MeasureUnit { 81 NONE = 0; 82 83 BIT = 1; 84 KILOBIT = 2; 85 MEGABIT = 3; 86 GIGABIT = 4; 87 TERABIT = 5; 88 PETABIT = 6; 89 90 BYTE = 7; 91 KILOBYTE = 8; 92 MEGABYTE = 9; 93 GIGABYTE = 10; 94 TERABYTE = 11; 95 PETABYTE = 12; 96 97 HERTZ = 13; 98 KILOHERTZ = 14; 99 MEGAHERTZ = 15; 100 GIGAHERTZ = 16; 101 TERAHERTZ = 17; 102 PETAHERTZ = 18; 103 104 NANOSECOND = 19; 105 MICROSECOND = 20; 106 MILLISECOND = 21; 107 SECOND = 22; 108 MINUTE = 23; 109 HOUR = 24; 110 111 VERTEX = 25; 112 PIXEL = 26; 113 TRIANGLE = 27; 114 PRIMITIVE = 38; 115 FRAGMENT = 39; 116 117 MILLIWATT = 28; 118 WATT = 29; 119 KILOWATT = 30; 120 121 JOULE = 31; 122 VOLT = 32; 123 AMPERE = 33; 124 125 CELSIUS = 34; 126 FAHRENHEIT = 35; 127 KELVIN = 36; 128 129 // Values should be out of 100. 130 PERCENT = 37; 131 132 INSTRUCTION = 40; 133 } 134} 135 136// End of protos/perfetto/common/gpu_counter_descriptor.proto 137 138// Begin of protos/perfetto/common/track_event_descriptor.proto 139 140message TrackEventCategory { 141 optional string name = 1; 142 optional string description = 2; 143 repeated string tags = 3; 144} 145 146message TrackEventDescriptor { 147 repeated TrackEventCategory available_categories = 1; 148} 149 150// End of protos/perfetto/common/track_event_descriptor.proto 151 152// Begin of protos/perfetto/common/data_source_descriptor.proto 153 154// This message is sent from Producer(s) to the tracing Service when registering 155// to advertise their capabilities. It describes the structure of tracing 156// protos that will be produced by the data source and the supported filters. 157message DataSourceDescriptor { 158 // e.g., "linux.ftrace", "chromium.tracing" 159 optional string name = 1; 160 161 // When true the data source is expected to ack the stop request through the 162 // NotifyDataSourceStopped() IPC. This field has been introduced after 163 // Android P in Jul 2018 and is not supported on older versions. 164 optional bool will_notify_on_stop = 2; 165 166 // When true the data source is expected to ack the start request through the 167 // NotifyDataSourceStarted() IPC. This field has been introduced after 168 // Android P in March 2019 and is not supported on older versions. 169 optional bool will_notify_on_start = 3; 170 171 // If true, opt into receiving the ClearIncrementalState() IPC. This should be 172 // set if the data source writes packets that refer to previous trace 173 // contents, and knows how to stop referring to the already-emitted data. 174 optional bool handles_incremental_state_clear = 4; 175 176 // Optional specification about available GPU counters. 177 optional GpuCounterDescriptor gpu_counter_descriptor = 5 [lazy = true]; 178 179 optional TrackEventDescriptor track_event_descriptor = 6 [lazy = true]; 180} 181 182// End of protos/perfetto/common/data_source_descriptor.proto 183 184// Begin of protos/perfetto/common/tracing_service_state.proto 185 186// Reports the state of the tracing service. Used to gather details about the 187// data sources connected. 188// See ConsumerPort::QueryServiceState(). 189message TracingServiceState { 190 // Describes a producer process. 191 message Producer { 192 // Unique ID of the producer (monotonic counter). 193 optional int32 id = 1; 194 195 // Typically matches the process name. 196 optional string name = 2; 197 198 // Unix uid of the remote process. 199 optional int32 uid = 3; 200 } 201 202 // Describes a data source registered by a producer. Data sources are listed 203 // regardless of the fact that they are being used or not. 204 message DataSource { 205 // Descriptor passed by the data source when calling RegisterDataSource(). 206 optional DataSourceDescriptor ds_descriptor = 1; 207 208 // ID of the producer, as per Producer.id. 209 optional int32 producer_id = 2; 210 } 211 212 // Lists all the producers connected. 213 repeated Producer producers = 1; 214 215 // Lists the data sources available. 216 repeated DataSource data_sources = 2; 217 218 // Total number of tracing sessions. 219 optional int32 num_sessions = 3; 220 221 // Number of tracing sessions in the started state. Always <= num_sessions. 222 optional int32 num_sessions_started = 4; 223} 224 225// End of protos/perfetto/common/tracing_service_state.proto 226 227// Begin of protos/perfetto/common/builtin_clock.proto 228 229enum BuiltinClock { 230 BUILTIN_CLOCK_UNKNOWN = 0; 231 BUILTIN_CLOCK_REALTIME = 1; 232 BUILTIN_CLOCK_REALTIME_COARSE = 2; 233 BUILTIN_CLOCK_MONOTONIC = 3; 234 BUILTIN_CLOCK_MONOTONIC_COARSE = 4; 235 BUILTIN_CLOCK_MONOTONIC_RAW = 5; 236 BUILTIN_CLOCK_BOOTTIME = 6; 237 BUILTIN_CLOCK_MAX_ID = 63; 238 239 reserved 7, 8; 240} 241 242// End of protos/perfetto/common/builtin_clock.proto 243 244// Begin of protos/perfetto/common/android_log_constants.proto 245 246// Values from NDK's android/log.h. 247enum AndroidLogId { 248 // MAIN. 249 LID_DEFAULT = 0; 250 251 LID_RADIO = 1; 252 LID_EVENTS = 2; 253 LID_SYSTEM = 3; 254 LID_CRASH = 4; 255 LID_STATS = 5; 256 LID_SECURITY = 6; 257 LID_KERNEL = 7; 258} 259 260enum AndroidLogPriority { 261 PRIO_UNSPECIFIED = 0; 262 263 // _DEFAULT, but should never be seen in logs. 264 PRIO_UNUSED = 1; 265 266 PRIO_VERBOSE = 2; 267 PRIO_DEBUG = 3; 268 PRIO_INFO = 4; 269 PRIO_WARN = 5; 270 PRIO_ERROR = 6; 271 PRIO_FATAL = 7; 272} 273 274// End of protos/perfetto/common/android_log_constants.proto 275 276// Begin of protos/perfetto/config/android/android_log_config.proto 277 278message AndroidLogConfig { 279 repeated AndroidLogId log_ids = 1; 280 281 // Was |poll_ms|, deprecated. 282 reserved 2; 283 284 // If set ignores all log messages whose prio is < the given value. 285 optional AndroidLogPriority min_prio = 3; 286 287 // If non-empty ignores all log messages whose tag doesn't match one of the 288 // specified values. 289 repeated string filter_tags = 4; 290} 291 292// End of protos/perfetto/config/android/android_log_config.proto 293 294// Begin of protos/perfetto/config/android/android_polled_state_config.proto 295 296// Data source that polls for display state. 297message AndroidPolledStateConfig { 298 // Frequency of polling. If absent the state will be recorded once, at the 299 // start of the trace. 300 // This is required to be > 100ms to avoid excessive CPU usage. 301 optional uint32 poll_ms = 1; 302} 303 304// End of protos/perfetto/config/android/android_polled_state_config.proto 305 306// Begin of protos/perfetto/config/android/packages_list_config.proto 307 308// Data source that lists details (such as version code) about packages on an 309// Android device. 310message PackagesListConfig { 311 // If not empty, emit info about only the following list of package names 312 // (exact match, no regex). Otherwise, emit info about all packages. 313 repeated string package_name_filter = 1; 314} 315 316// End of protos/perfetto/config/android/packages_list_config.proto 317 318// Begin of protos/perfetto/config/chrome/chrome_config.proto 319 320message ChromeConfig { 321 optional string trace_config = 1; 322 323 // When enabled, the data source should only fill in fields in the output that 324 // are not potentially privacy sensitive. 325 optional bool privacy_filtering_enabled = 2; 326 327 // Instead of emitting binary protobuf, convert the trace data to the legacy 328 // JSON format. Note that the trace data will still be returned as a series of 329 // TracePackets, but the embedded data will be JSON instead of serialized 330 // protobuf. 331 optional bool convert_to_legacy_json = 3; 332 333 // Priority of the tracing session client. A higher priority session may 334 // preempt a lower priority one in configurations where concurrent sessions 335 // aren't supported. 336 enum ClientPriority { 337 UNKNOWN = 0; 338 BACKGROUND = 1; 339 USER_INITIATED = 2; 340 } 341 optional ClientPriority client_priority = 4; 342} 343 344// End of protos/perfetto/config/chrome/chrome_config.proto 345 346// Begin of protos/perfetto/config/ftrace/ftrace_config.proto 347 348message FtraceConfig { 349 repeated string ftrace_events = 1; 350 repeated string atrace_categories = 2; 351 repeated string atrace_apps = 3; 352 // *Per-CPU* buffer size. 353 optional uint32 buffer_size_kb = 10; 354 optional uint32 drain_period_ms = 11; 355 356 // Configuration for compact encoding of scheduler events. When enabled (and 357 // recording the relevant ftrace events), specific high-volume events are 358 // encoded in a denser format than normal. 359 message CompactSchedConfig { 360 // If true, and sched_switch or sched_waking ftrace events are enabled, 361 // record those events in the compact format. 362 optional bool enabled = 1; 363 } 364 optional CompactSchedConfig compact_sched = 12; 365} 366 367// End of protos/perfetto/config/ftrace/ftrace_config.proto 368 369// Begin of protos/perfetto/config/gpu/gpu_counter_config.proto 370 371message GpuCounterConfig { 372 // Desired sampling interval for counters. 373 optional uint64 counter_period_ns = 1; 374 375 // List of counters to be sampled. Counter IDs correspond to the ones 376 // described in GpuCounterSpec in the data source descriptor. 377 repeated uint32 counter_ids = 2; 378 379 // Sample counters by instrumenting command buffers. 380 optional bool instrumented_sampling = 3; 381 382 // Fix gpu clock rate during trace session. 383 optional bool fix_gpu_clock = 4; 384} 385 386// End of protos/perfetto/config/gpu/gpu_counter_config.proto 387 388// Begin of protos/perfetto/config/gpu/vulkan_memory_config.proto 389 390message VulkanMemoryConfig { 391 // Tracking driver memory usage events 392 optional bool track_driver_memory_usage = 1; 393 394 // Tracking device memory usage events 395 optional bool track_device_memory_usage = 2; 396} 397 398// End of protos/perfetto/config/gpu/vulkan_memory_config.proto 399 400// Begin of protos/perfetto/config/inode_file/inode_file_config.proto 401 402message InodeFileConfig { 403 message MountPointMappingEntry { 404 optional string mountpoint = 1; 405 repeated string scan_roots = 2; 406 } 407 408 // How long to pause between batches. 409 optional uint32 scan_interval_ms = 1; 410 411 // How long to wait before the first scan in order to accumulate inodes. 412 optional uint32 scan_delay_ms = 2; 413 414 // How many inodes to scan in one batch. 415 optional uint32 scan_batch_size = 3; 416 417 // Do not scan for inodes not found in the static map. 418 optional bool do_not_scan = 4; 419 420 // If non-empty, only scan inodes corresponding to block devices named in 421 // this list. 422 repeated string scan_mount_points = 5; 423 424 // When encountering an inode belonging to a block device corresponding 425 // to one of the mount points in this map, scan its scan_roots instead. 426 repeated MountPointMappingEntry mount_point_mapping = 6; 427} 428 429// End of protos/perfetto/config/inode_file/inode_file_config.proto 430 431// Begin of protos/perfetto/config/power/android_power_config.proto 432 433message AndroidPowerConfig { 434 enum BatteryCounters { 435 BATTERY_COUNTER_UNSPECIFIED = 0; 436 437 // Coulomb counter. 438 BATTERY_COUNTER_CHARGE = 1; 439 440 // Charge (%). 441 BATTERY_COUNTER_CAPACITY_PERCENT = 2; 442 443 // Instantaneous current. 444 BATTERY_COUNTER_CURRENT = 3; 445 446 // Avg current. 447 BATTERY_COUNTER_CURRENT_AVG = 4; 448 } 449 optional uint32 battery_poll_ms = 1; 450 repeated BatteryCounters battery_counters = 2; 451 452 // Where available enables per-power-rail measurements. 453 optional bool collect_power_rails = 3; 454} 455 456// End of protos/perfetto/config/power/android_power_config.proto 457 458// Begin of protos/perfetto/config/process_stats/process_stats_config.proto 459 460message ProcessStatsConfig { 461 enum Quirks { 462 QUIRKS_UNSPECIFIED = 0; 463 464 // This has been deprecated and ignored as per 2018-05-01. Full scan at 465 // startup is now disabled by default and can be re-enabled using the 466 // |scan_all_processes_on_start| arg. 467 DISABLE_INITIAL_DUMP = 1 [deprecated = true]; 468 469 DISABLE_ON_DEMAND = 2; 470 } 471 472 repeated Quirks quirks = 1; 473 474 // If enabled all processes will be scanned and dumped when the trace starts. 475 optional bool scan_all_processes_on_start = 2; 476 477 // If enabled thread names are also recoded (this is redundant if sched_switch 478 // is enabled). 479 optional bool record_thread_names = 3; 480 481 // If > 0 samples counters (see process_stats.proto) from 482 // /proc/pid/status and oom_score_adj every X ms. 483 // This is required to be > 100ms to avoid excessive CPU usage. 484 // TODO(primiano): add CPU cost for change this value. 485 optional uint32 proc_stats_poll_ms = 4; 486 487 // If empty samples stats for all processes. If non empty samples stats only 488 // for processes matching the given string in their argv0 (i.e. the first 489 // entry of /proc/pid/cmdline). 490 // TODO(primiano): implement this feature. 491 // repeated string proc_stats_filter = 5; 492 493 // This is required to be either = 0 or a multiple of |proc_stats_poll_ms| 494 // (default: |proc_stats_poll_ms|). If = 0, will be set to 495 // |proc_stats_poll_ms|. Non-multiples will be rounded down to the nearest 496 // multiple. 497 optional uint32 proc_stats_cache_ttl_ms = 6; 498 499 // Whether to record /proc/tid/time_in_state. 500 optional bool record_thread_time_in_state = 7; 501 502 // Size of the cache for thread time_in_state cpu freq values. 503 // If not specificed, the default is used. 504 optional uint32 thread_time_in_state_cache_size = 8; 505} 506 507// End of protos/perfetto/config/process_stats/process_stats_config.proto 508 509// Begin of protos/perfetto/config/profiling/heapprofd_config.proto 510 511// Configuration for go/heapprofd. 512// Next id: 23 513message HeapprofdConfig { 514 message ContinuousDumpConfig { 515 // ms to wait before first dump. 516 optional uint32 dump_phase_ms = 5; 517 // ms to wait between following dumps. 518 optional uint32 dump_interval_ms = 6; 519 } 520 521 // Sampling rate for all heaps not specified via heap_sampling_intervals. 522 // 523 // These are: 524 // * All heaps if heap_sampling_intervals is empty. 525 // * Those profiled due to all_heaps and not named in heaps if 526 // heap_sampling_intervals is not empty. 527 // * The implicit libc.malloc heap if heaps is empty. 528 // 529 // Set to 1 for perfect accuracy. 530 // Otherwise, sample every sample_interval_bytes on average. 531 // 532 // See 533 // https://perfetto.dev/docs/data-sources/native-heap-profiler#sampling-interval 534 // for more details. 535 // 536 // BUGS 537 // Before Android 12, setting this to 0 would crash the target process. 538 optional uint64 sampling_interval_bytes = 1; 539 540 // E.g. surfaceflinger, com.android.phone 541 // This input is normalized in the following way: if it contains slashes, 542 // everything up to the last slash is discarded. If it contains "@", 543 // everything after the first @ is discared. 544 // E.g. /system/bin/surfaceflinger@1.0 normalizes to surfaceflinger. 545 // This transformation is also applied to the processes' command lines when 546 // matching. 547 repeated string process_cmdline = 2; 548 549 // For watermark based triggering or local debugging. 550 repeated uint64 pid = 4; 551 552 // Which heaps to sample, e.g. "libc.malloc". If left empty, only samples 553 // "malloc". 554 // 555 // Introduced in Android 12. 556 repeated string heaps = 20; 557 558 // If given, needs to be the same length as heaps and gives the sampling 559 // interval for the respective entry in heaps. 560 // 561 // Otherwise, sampling_interval_bytes is used. 562 // 563 // It is recommended to set sampling_interval_bytes to a reasonable default 564 // value when using this, as a value of 0 for sampling_interval_bytes will 565 // crash the target process before Android 12. 566 // 567 // Introduced in Android 12. 568 repeated uint64 heap_sampling_intervals = 22; 569 570 // Sample all heaps registered by target process. Introduced in Android 12. 571 optional bool all_heaps = 21; 572 573 // Profile all processes eligible for profiling on the system. 574 // See 575 // https://perfetto.dev/docs/data-sources/native-heap-profiler#heapprofd-targets 576 // for which processes are eligible. 577 // 578 // On unmodified userdebug builds, this will lead to system crashes. Zygote 579 // will crash when trying to launch a new process as it will have an 580 // unexpected open socket to heapprofd. 581 // 582 // heapprofd will likely be overloaded by the amount of data for low 583 // sampling intervals. 584 optional bool all = 5; 585 586 // Do not profile processes whose anon RSS + swap < given value. 587 // Introduced in Android 11. 588 optional uint32 min_anonymous_memory_kb = 15; 589 590 // Stop profile if heapprofd memory usage goes beyond the given value. 591 // Introduced in Android 11. 592 optional uint32 max_heapprofd_memory_kb = 16; 593 594 // Stop profile if heapprofd CPU time since start of this data-source 595 // goes beyond given value. 596 // Introduced in Android 11. 597 optional uint64 max_heapprofd_cpu_secs = 17; 598 599 // Do not emit function names for mappings starting with this prefix. 600 // E.g. /system to not emit symbols for any system libraries. 601 repeated string skip_symbol_prefix = 7; 602 603 // Dump at a predefined interval. 604 optional ContinuousDumpConfig continuous_dump_config = 6; 605 606 // Size of the shared memory buffer between the profiled processes and 607 // heapprofd. Defaults to 8 MiB. If larger than 500 MiB, truncated to 500 608 // MiB. 609 // 610 // Needs to be: 611 // * at least 8192, 612 // * a power of two, 613 // * a multiple of 4096. 614 optional uint64 shmem_size_bytes = 8; 615 616 // When the shmem buffer is full, block the client instead of ending the 617 // trace. Use with caution as this will significantly slow down the target 618 // process. 619 optional bool block_client = 9; 620 621 // If set, stop the trace session after blocking the client for this 622 // timeout. Needs to be larger than 100 us, otherwise no retries are done. 623 // Introduced in Android 11. 624 optional uint32 block_client_timeout_us = 14; 625 626 // Do not profile processes from startup, only match already running 627 // processes. 628 // 629 // Can not be set at the same time as no_running. 630 // Introduced in Android 11. 631 optional bool no_startup = 10; 632 633 // Do not profile running processes. Only match processes on startup. 634 // 635 // Can not be set at the same time as no_startup. 636 // Introduced in Android 11. 637 optional bool no_running = 11; 638 639 // Gather information on how many bytes of allocations are on non-referenced 640 // pages. The way to use this generally is: 641 // 1. Start profile of app. 642 // 2. Start app. 643 // 3. Trigger a dump by sending SIGUSR1 to heapprofd. 644 // 4. Do operations. 645 // 5. End profile. 646 // 647 // You can then find the allocations that were not used for the operations you 648 // did in step 4. 649 optional bool idle_allocations = 12; 650 651 // Cause heapprofd to emit a single dump at the end, showing the memory usage 652 // at the point in time when the sampled heap usage of the process was at its 653 // maximum. This causes ProfilePacket.HeapSample.self_max to be set, and 654 // self_allocated and self_freed to not be set. 655 // Introduced in Android 11. 656 optional bool dump_at_max = 13; 657 658 // FEATURE FLAGS. THERE BE DRAGONS. 659 660 // Escape hatch if the session is being torn down because of a forked child 661 // that shares memory space, but is not correctly identified as a vforked 662 // child. 663 // Introduced in Android 11. 664 optional bool disable_fork_teardown = 18; 665 666 // We try to automatically detect when a target applicatation vforks but then 667 // does a memory allocation (or free). This auto-detection can be disabled 668 // with this. 669 // Introduced in Android 11. 670 optional bool disable_vfork_detection = 19; 671} 672 673// End of protos/perfetto/config/profiling/heapprofd_config.proto 674 675// Begin of protos/perfetto/config/profiling/java_hprof_config.proto 676 677// Configuration for go/heapprofd. 678message JavaHprofConfig { 679 // If dump_interval_ms != 0, the following configuration is used. 680 message ContinuousDumpConfig { 681 // ms to wait before first continuous dump. 682 // A dump is always created at the beginning of the trace. 683 optional uint32 dump_phase_ms = 1; 684 // ms to wait between following dumps. 685 optional uint32 dump_interval_ms = 2; 686 } 687 688 // This input is normalized in the following way: if it contains slashes, 689 // everything up to the last slash is discarded. If it contains "@", 690 // everything after the first @ is discared. 691 // E.g. /system/bin/surfaceflinger@1.0 normalizes to surfaceflinger. 692 // This transformation is also applied to the processes' command lines when 693 // matching. 694 repeated string process_cmdline = 1; 695 696 // For watermark based triggering or local debugging. 697 repeated uint64 pid = 2; 698 699 // Dump at a predefined interval. 700 optional ContinuousDumpConfig continuous_dump_config = 3; 701 702 // Do not profile processes whose anon RSS + swap < given value. 703 optional uint32 min_anonymous_memory_kb = 4; 704 705 // Include the process' /proc/self/smaps. 706 // This only shows maps that: 707 // * start with /system 708 // * start with /vendor 709 // * start with /data/app 710 // * contain "extracted in memory from Y", where Y matches any of the above 711 optional bool dump_smaps = 5; 712 713 // Exclude objects of the following types from the profile. This can be 714 // useful if lots of uninteresting objects, e.g. "sun.misc.Cleaner". 715 repeated string ignored_types = 6; 716} 717 718// End of protos/perfetto/config/profiling/java_hprof_config.proto 719 720// Begin of protos/perfetto/config/profiling/perf_event_config.proto 721 722// Configuration for the traced_perf profiler. 723// 724// At the time of writing, the config options are restricted to the periodic 725// system-wide stack sampling use-case (|all_cpus| must be true). 726message PerfEventConfig { 727 // If true, sample events on all CPUs. 728 optional bool all_cpus = 1; 729 730 // Per-cpu sampling frequency (requested from the kernel). Not guaranteed to 731 // be honored as the kernel can throttle the sampling rate if it's too high. 732 // If unset, an implementation-defined default is used. 733 optional uint32 sampling_frequency = 2; 734 735 // How often the per-cpu ring buffers are read by the producer. 736 // If unset, an implementation-defined default is used. 737 optional uint32 ring_buffer_read_period_ms = 8; 738 739 // Size (in 4k pages) of each per-cpu ring buffer that is filled by the 740 // kernel. If set, must be a power of two. 741 // If unset, an implementation-defined default is used. 742 optional uint32 ring_buffer_pages = 3; 743 744 // Process ID (TGID) allowlist. If this list is not empty, only matching 745 // samples will be retained. If multiple allow/deny-lists are 746 // specified by the config, then all of them are evaluated for each sampled 747 // process. 748 repeated int32 target_pid = 4; 749 750 // Command line allowlist, matched against the 751 // /proc/<pid>/cmdline (not the comm string), with both sides being 752 // "normalized". Normalization is as follows: (1) trim everything beyond the 753 // first null or "@" byte; (2) if the string contains forward slashes, trim 754 // everything up to and including the last one. 755 repeated string target_cmdline = 5; 756 757 // List of excluded pids. 758 repeated int32 exclude_pid = 6; 759 760 // List of excluded cmdlines. Normalized in the same way as |target_cmdline|. 761 repeated string exclude_cmdline = 7; 762 763 // Number of additional command lines to sample. Only those which are neither 764 // explicitly included nor excluded will be considered. Processes are accepted 765 // on a first come, first served basis. 766 optional uint32 additional_cmdline_count = 11; 767 768 //////////////////// 769 // Uncommon options: 770 771 // Timeout for the remote /proc/<pid>/{maps,mem} file descriptors for a 772 // sampled process. This is primarily for Android, where this lookup is 773 // asynchronous. As long as the producer is waiting, the associated samples 774 // will be kept enqueued (putting pressure on the capacity of the shared 775 // unwinding queue). Once a lookup for a process expires, all associated 776 // samples are discarded. However, if the lookup still succeeds after the 777 // timeout, future samples will be handled normally. 778 // If unset, an implementation-defined default is used. 779 optional uint32 remote_descriptor_timeout_ms = 9; 780 781 // Optional period for clearing state cached by the unwinder. This is a heavy 782 // operation that is only necessary for traces that target a wide set of 783 // processes, and require the memory footprint to be reset periodically. 784 // If unset, the cached state will not be cleared. 785 optional uint32 unwind_state_clear_period_ms = 10; 786} 787 788// End of protos/perfetto/config/profiling/perf_event_config.proto 789 790// Begin of protos/perfetto/common/sys_stats_counters.proto 791 792// When editing entries here remember also to update "sys_stats_counters.h" with 793// the corresponding string definitions for the actual /proc files parser. 794 795// Counter definitions for Linux's /proc/meminfo. 796enum MeminfoCounters { 797 MEMINFO_UNSPECIFIED = 0; 798 MEMINFO_MEM_TOTAL = 1; 799 MEMINFO_MEM_FREE = 2; 800 MEMINFO_MEM_AVAILABLE = 3; 801 MEMINFO_BUFFERS = 4; 802 MEMINFO_CACHED = 5; 803 MEMINFO_SWAP_CACHED = 6; 804 MEMINFO_ACTIVE = 7; 805 MEMINFO_INACTIVE = 8; 806 MEMINFO_ACTIVE_ANON = 9; 807 MEMINFO_INACTIVE_ANON = 10; 808 MEMINFO_ACTIVE_FILE = 11; 809 MEMINFO_INACTIVE_FILE = 12; 810 MEMINFO_UNEVICTABLE = 13; 811 MEMINFO_MLOCKED = 14; 812 MEMINFO_SWAP_TOTAL = 15; 813 MEMINFO_SWAP_FREE = 16; 814 MEMINFO_DIRTY = 17; 815 MEMINFO_WRITEBACK = 18; 816 MEMINFO_ANON_PAGES = 19; 817 MEMINFO_MAPPED = 20; 818 MEMINFO_SHMEM = 21; 819 MEMINFO_SLAB = 22; 820 MEMINFO_SLAB_RECLAIMABLE = 23; 821 MEMINFO_SLAB_UNRECLAIMABLE = 24; 822 MEMINFO_KERNEL_STACK = 25; 823 MEMINFO_PAGE_TABLES = 26; 824 MEMINFO_COMMIT_LIMIT = 27; 825 MEMINFO_COMMITED_AS = 28; 826 MEMINFO_VMALLOC_TOTAL = 29; 827 MEMINFO_VMALLOC_USED = 30; 828 MEMINFO_VMALLOC_CHUNK = 31; 829 MEMINFO_CMA_TOTAL = 32; 830 MEMINFO_CMA_FREE = 33; 831} 832 833// Counter definitions for Linux's /proc/vmstat. 834enum VmstatCounters { 835 VMSTAT_UNSPECIFIED = 0; 836 VMSTAT_NR_FREE_PAGES = 1; 837 VMSTAT_NR_ALLOC_BATCH = 2; 838 VMSTAT_NR_INACTIVE_ANON = 3; 839 VMSTAT_NR_ACTIVE_ANON = 4; 840 VMSTAT_NR_INACTIVE_FILE = 5; 841 VMSTAT_NR_ACTIVE_FILE = 6; 842 VMSTAT_NR_UNEVICTABLE = 7; 843 VMSTAT_NR_MLOCK = 8; 844 VMSTAT_NR_ANON_PAGES = 9; 845 VMSTAT_NR_MAPPED = 10; 846 VMSTAT_NR_FILE_PAGES = 11; 847 VMSTAT_NR_DIRTY = 12; 848 VMSTAT_NR_WRITEBACK = 13; 849 VMSTAT_NR_SLAB_RECLAIMABLE = 14; 850 VMSTAT_NR_SLAB_UNRECLAIMABLE = 15; 851 VMSTAT_NR_PAGE_TABLE_PAGES = 16; 852 VMSTAT_NR_KERNEL_STACK = 17; 853 VMSTAT_NR_OVERHEAD = 18; 854 VMSTAT_NR_UNSTABLE = 19; 855 VMSTAT_NR_BOUNCE = 20; 856 VMSTAT_NR_VMSCAN_WRITE = 21; 857 VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM = 22; 858 VMSTAT_NR_WRITEBACK_TEMP = 23; 859 VMSTAT_NR_ISOLATED_ANON = 24; 860 VMSTAT_NR_ISOLATED_FILE = 25; 861 VMSTAT_NR_SHMEM = 26; 862 VMSTAT_NR_DIRTIED = 27; 863 VMSTAT_NR_WRITTEN = 28; 864 VMSTAT_NR_PAGES_SCANNED = 29; 865 VMSTAT_WORKINGSET_REFAULT = 30; 866 VMSTAT_WORKINGSET_ACTIVATE = 31; 867 VMSTAT_WORKINGSET_NODERECLAIM = 32; 868 VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES = 33; 869 VMSTAT_NR_FREE_CMA = 34; 870 VMSTAT_NR_SWAPCACHE = 35; 871 VMSTAT_NR_DIRTY_THRESHOLD = 36; 872 VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD = 37; 873 VMSTAT_PGPGIN = 38; 874 VMSTAT_PGPGOUT = 39; 875 VMSTAT_PGPGOUTCLEAN = 40; 876 VMSTAT_PSWPIN = 41; 877 VMSTAT_PSWPOUT = 42; 878 VMSTAT_PGALLOC_DMA = 43; 879 VMSTAT_PGALLOC_NORMAL = 44; 880 VMSTAT_PGALLOC_MOVABLE = 45; 881 VMSTAT_PGFREE = 46; 882 VMSTAT_PGACTIVATE = 47; 883 VMSTAT_PGDEACTIVATE = 48; 884 VMSTAT_PGFAULT = 49; 885 VMSTAT_PGMAJFAULT = 50; 886 VMSTAT_PGREFILL_DMA = 51; 887 VMSTAT_PGREFILL_NORMAL = 52; 888 VMSTAT_PGREFILL_MOVABLE = 53; 889 VMSTAT_PGSTEAL_KSWAPD_DMA = 54; 890 VMSTAT_PGSTEAL_KSWAPD_NORMAL = 55; 891 VMSTAT_PGSTEAL_KSWAPD_MOVABLE = 56; 892 VMSTAT_PGSTEAL_DIRECT_DMA = 57; 893 VMSTAT_PGSTEAL_DIRECT_NORMAL = 58; 894 VMSTAT_PGSTEAL_DIRECT_MOVABLE = 59; 895 VMSTAT_PGSCAN_KSWAPD_DMA = 60; 896 VMSTAT_PGSCAN_KSWAPD_NORMAL = 61; 897 VMSTAT_PGSCAN_KSWAPD_MOVABLE = 62; 898 VMSTAT_PGSCAN_DIRECT_DMA = 63; 899 VMSTAT_PGSCAN_DIRECT_NORMAL = 64; 900 VMSTAT_PGSCAN_DIRECT_MOVABLE = 65; 901 VMSTAT_PGSCAN_DIRECT_THROTTLE = 66; 902 VMSTAT_PGINODESTEAL = 67; 903 VMSTAT_SLABS_SCANNED = 68; 904 VMSTAT_KSWAPD_INODESTEAL = 69; 905 VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY = 70; 906 VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY = 71; 907 VMSTAT_PAGEOUTRUN = 72; 908 VMSTAT_ALLOCSTALL = 73; 909 VMSTAT_PGROTATED = 74; 910 VMSTAT_DROP_PAGECACHE = 75; 911 VMSTAT_DROP_SLAB = 76; 912 VMSTAT_PGMIGRATE_SUCCESS = 77; 913 VMSTAT_PGMIGRATE_FAIL = 78; 914 VMSTAT_COMPACT_MIGRATE_SCANNED = 79; 915 VMSTAT_COMPACT_FREE_SCANNED = 80; 916 VMSTAT_COMPACT_ISOLATED = 81; 917 VMSTAT_COMPACT_STALL = 82; 918 VMSTAT_COMPACT_FAIL = 83; 919 VMSTAT_COMPACT_SUCCESS = 84; 920 VMSTAT_COMPACT_DAEMON_WAKE = 85; 921 VMSTAT_UNEVICTABLE_PGS_CULLED = 86; 922 VMSTAT_UNEVICTABLE_PGS_SCANNED = 87; 923 VMSTAT_UNEVICTABLE_PGS_RESCUED = 88; 924 VMSTAT_UNEVICTABLE_PGS_MLOCKED = 89; 925 VMSTAT_UNEVICTABLE_PGS_MUNLOCKED = 90; 926 VMSTAT_UNEVICTABLE_PGS_CLEARED = 91; 927 VMSTAT_UNEVICTABLE_PGS_STRANDED = 92; 928 VMSTAT_NR_ZSPAGES = 93; 929 VMSTAT_NR_ION_HEAP = 94; 930 VMSTAT_NR_GPU_HEAP = 95; 931 VMSTAT_ALLOCSTALL_DMA = 96; 932 VMSTAT_ALLOCSTALL_MOVABLE = 97; 933 VMSTAT_ALLOCSTALL_NORMAL = 98; 934 VMSTAT_COMPACT_DAEMON_FREE_SCANNED = 99; 935 VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED = 100; 936 VMSTAT_NR_FASTRPC = 101; 937 VMSTAT_NR_INDIRECTLY_RECLAIMABLE = 102; 938 VMSTAT_NR_ION_HEAP_POOL = 103; 939 VMSTAT_NR_KERNEL_MISC_RECLAIMABLE = 104; 940 VMSTAT_NR_SHADOW_CALL_STACK_BYTES = 105; 941 VMSTAT_NR_SHMEM_HUGEPAGES = 106; 942 VMSTAT_NR_SHMEM_PMDMAPPED = 107; 943 VMSTAT_NR_UNRECLAIMABLE_PAGES = 108; 944 VMSTAT_NR_ZONE_ACTIVE_ANON = 109; 945 VMSTAT_NR_ZONE_ACTIVE_FILE = 110; 946 VMSTAT_NR_ZONE_INACTIVE_ANON = 111; 947 VMSTAT_NR_ZONE_INACTIVE_FILE = 112; 948 VMSTAT_NR_ZONE_UNEVICTABLE = 113; 949 VMSTAT_NR_ZONE_WRITE_PENDING = 114; 950 VMSTAT_OOM_KILL = 115; 951 VMSTAT_PGLAZYFREE = 116; 952 VMSTAT_PGLAZYFREED = 117; 953 VMSTAT_PGREFILL = 118; 954 VMSTAT_PGSCAN_DIRECT = 119; 955 VMSTAT_PGSCAN_KSWAPD = 120; 956 VMSTAT_PGSKIP_DMA = 121; 957 VMSTAT_PGSKIP_MOVABLE = 122; 958 VMSTAT_PGSKIP_NORMAL = 123; 959 VMSTAT_PGSTEAL_DIRECT = 124; 960 VMSTAT_PGSTEAL_KSWAPD = 125; 961 VMSTAT_SWAP_RA = 126; 962 VMSTAT_SWAP_RA_HIT = 127; 963 VMSTAT_WORKINGSET_RESTORE = 128; 964} 965// End of protos/perfetto/common/sys_stats_counters.proto 966 967// Begin of protos/perfetto/config/sys_stats/sys_stats_config.proto 968 969// This file defines the configuration for the Linux /proc poller data source, 970// which injects counters in the trace. 971// Counters that are needed in the trace must be explicitly listed in the 972// *_counters fields. This is to avoid spamming the trace with all counters 973// at all times. 974// The sampling rate is configurable. All polling rates (*_period_ms) need 975// to be integer multiples of each other. 976// OK: [10ms, 10ms, 10ms], [10ms, 20ms, 10ms], [10ms, 20ms, 60ms] 977// Not OK: [10ms, 10ms, 11ms], [10ms, 15ms, 20ms] 978message SysStatsConfig { 979 // Polls /proc/meminfo every X ms, if non-zero. 980 // This is required to be > 10ms to avoid excessive CPU usage. 981 // Cost: 0.3 ms [read] + 0.07 ms [parse + trace injection] 982 optional uint32 meminfo_period_ms = 1; 983 984 // If empty all known counters are reported. Otherwise, only the counters 985 // specified below are reported. 986 repeated MeminfoCounters meminfo_counters = 2; 987 988 // Polls /proc/vmstat every X ms, if non-zero. 989 // This is required to be > 10ms to avoid excessive CPU usage. 990 // Cost: 0.2 ms [read] + 0.3 ms [parse + trace injection] 991 optional uint32 vmstat_period_ms = 3; 992 repeated VmstatCounters vmstat_counters = 4; 993 994 // Pols /proc/stat every X ms, if non-zero. 995 // This is required to be > 10ms to avoid excessive CPU usage. 996 // Cost: 4.1 ms [read] + 1.9 ms [parse + trace injection] 997 optional uint32 stat_period_ms = 5; 998 enum StatCounters { 999 STAT_UNSPECIFIED = 0; 1000 STAT_CPU_TIMES = 1; 1001 STAT_IRQ_COUNTS = 2; 1002 STAT_SOFTIRQ_COUNTS = 3; 1003 STAT_FORK_COUNT = 4; 1004 } 1005 repeated StatCounters stat_counters = 6; 1006} 1007 1008// End of protos/perfetto/config/sys_stats/sys_stats_config.proto 1009 1010// Begin of protos/perfetto/config/test_config.proto 1011 1012// The configuration for a fake producer used in tests. 1013message TestConfig { 1014 message DummyFields { 1015 optional uint32 field_uint32 = 1; 1016 optional int32 field_int32 = 2; 1017 optional uint64 field_uint64 = 3; 1018 optional int64 field_int64 = 4; 1019 optional fixed64 field_fixed64 = 5; 1020 optional sfixed64 field_sfixed64 = 6; 1021 optional fixed32 field_fixed32 = 7; 1022 optional sfixed32 field_sfixed32 = 8; 1023 optional double field_double = 9; 1024 optional float field_float = 10; 1025 optional sint64 field_sint64 = 11; 1026 optional sint32 field_sint32 = 12; 1027 optional string field_string = 13; 1028 optional bytes field_bytes = 14; 1029 } 1030 1031 // The number of messages the fake producer should send. 1032 optional uint32 message_count = 1; 1033 1034 // The maximum number of messages which should be sent each second. 1035 // The actual obserced speed may be lower if the producer is unable to 1036 // work fast enough. 1037 // If this is zero or unset, the producer will send as fast as possible. 1038 optional uint32 max_messages_per_second = 2; 1039 1040 // The seed value for a simple multiplicative congruential pseudo-random 1041 // number sequence. 1042 optional uint32 seed = 3; 1043 1044 // The size of each message in bytes. Should be greater than or equal 5 to 1045 // account for the number of bytes needed to encode the random number and a 1046 // null byte for the string. 1047 optional uint32 message_size = 4; 1048 1049 // Whether the producer should send a event batch when the data source is 1050 // is initially registered. 1051 optional bool send_batch_on_register = 5; 1052 1053 optional DummyFields dummy_fields = 6; 1054} 1055 1056// End of protos/perfetto/config/test_config.proto 1057 1058// Begin of protos/perfetto/config/track_event/track_event_config.proto 1059 1060message TrackEventConfig { 1061 // The following fields define the set of enabled trace categories. Each list 1062 // item is a glob. 1063 // 1064 // To determine if category is enabled, it is checked against the filters in 1065 // the following order: 1066 // 1067 // 1. Exact matches in enabled categories. 1068 // 2. Exact matches in enabled tags. 1069 // 3. Exact matches in disabled categories. 1070 // 4. Exact matches in disabled tags. 1071 // 5. Pattern matches in enabled categories. 1072 // 6. Pattern matches in enabled tags. 1073 // 7. Pattern matches in disabled categories. 1074 // 8. Pattern matches in disabled tags. 1075 // 1076 // If none of the steps produced a match, the category is enabled by default. 1077 // 1078 // Examples: 1079 // 1080 // - To enable all non-slow/debug categories: 1081 // 1082 // No configuration needed, happens by default. 1083 // 1084 // - To enable a specific category: 1085 // 1086 // disabled_categories = ["*"] 1087 // enabled_categories = ["my_category"] 1088 // 1089 // - To enable only categories with a specific tag: 1090 // 1091 // disabled_tags = ["*"] 1092 // enabled_tags = ["my_tag"] 1093 // 1094 1095 // Default: [] 1096 repeated string disabled_categories = 1; 1097 1098 // Default: [] 1099 repeated string enabled_categories = 2; 1100 1101 // Default: [“slow”, “debug”] 1102 repeated string disabled_tags = 3; 1103 1104 // Default: [] 1105 repeated string enabled_tags = 4; 1106} 1107 1108// End of protos/perfetto/config/track_event/track_event_config.proto 1109 1110// Begin of protos/perfetto/config/data_source_config.proto 1111 1112// The configuration that is passed to each data source when starting tracing. 1113message DataSourceConfig { 1114 // Data source unique name, e.g., "linux.ftrace". This must match 1115 // the name passed by the data source when it registers (see 1116 // RegisterDataSource()). 1117 optional string name = 1; 1118 1119 // The index of the logging buffer where TracePacket(s) will be stored. 1120 // This field doesn't make a major difference for the Producer(s). The final 1121 // logging buffers, in fact, are completely owned by the Service. We just ask 1122 // the Producer to copy this number into the chunk headers it emits, so that 1123 // the Service can quickly identify the buffer where to move the chunks into 1124 // without expensive lookups on its fastpath. 1125 optional uint32 target_buffer = 2; 1126 1127 // Set by the service to indicate the duration of the trace. 1128 // DO NOT SET in consumer as this will be overridden by the service. 1129 optional uint32 trace_duration_ms = 3; 1130 1131 // Set by the service to indicate how long it waits after StopDataSource. 1132 // DO NOT SET in consumer as this will be overridden by the service. 1133 optional uint32 stop_timeout_ms = 7; 1134 1135 // Set by the service to indicate whether this tracing session has extra 1136 // guardrails. 1137 // DO NOT SET in consumer as this will be overridden by the service. 1138 optional bool enable_extra_guardrails = 6; 1139 1140 // Set by the service to indicate which tracing session the data source 1141 // belongs to. The intended use case for this is checking if two data sources, 1142 // one of which produces metadata for the other one, belong to the same trace 1143 // session and hence should be linked together. 1144 // This field was introduced in Aug 2018 after Android P. 1145 optional uint64 tracing_session_id = 4; 1146 1147 // Keeep the lower IDs (up to 99) for fields that are *not* specific to 1148 // data-sources and needs to be processed by the traced daemon. 1149 1150 // All data source config fields must be marked as [lazy=true]. This prevents 1151 // the proto-to-cpp generator from recursing into those when generating the 1152 // cpp classes and polluting tracing/core with data-source-specific classes. 1153 // Instead they are treated as opaque strings containing raw proto bytes. 1154 1155 // Data source name: linux.ftrace 1156 optional FtraceConfig ftrace_config = 100 [lazy = true]; 1157 // Data source name: linux.inode_file_map 1158 optional InodeFileConfig inode_file_config = 102 [lazy = true]; 1159 // Data source name: linux.process_stats 1160 optional ProcessStatsConfig process_stats_config = 103 [lazy = true]; 1161 // Data source name: linux.sys_stats 1162 optional SysStatsConfig sys_stats_config = 104 [lazy = true]; 1163 // Data source name: android.heapprofd 1164 // Introduced in Android 10. 1165 optional HeapprofdConfig heapprofd_config = 105 [lazy = true]; 1166 // Data source name: android.java_hprof 1167 // Introduced in Android 11. 1168 optional JavaHprofConfig java_hprof_config = 110 [lazy = true]; 1169 // Data source name: android.power 1170 optional AndroidPowerConfig android_power_config = 106 [lazy = true]; 1171 // Data source name: android.log 1172 optional AndroidLogConfig android_log_config = 107 [lazy = true]; 1173 // TODO(fmayer): Add data source name for this. 1174 optional GpuCounterConfig gpu_counter_config = 108 [lazy = true]; 1175 // Data source name: android.packages_list 1176 optional PackagesListConfig packages_list_config = 109 [lazy = true]; 1177 // Data source name: linux.perf 1178 optional PerfEventConfig perf_event_config = 111 [lazy = true]; 1179 // Data source name: vulkan.memory_tracker 1180 optional VulkanMemoryConfig vulkan_memory_config = 112 [lazy = true]; 1181 // Data source name: track_event 1182 optional TrackEventConfig track_event_config = 113 [lazy = true]; 1183 // Data source name: android.polled_state 1184 optional AndroidPolledStateConfig android_polled_state_config = 114 1185 [lazy = true]; 1186 1187 // Chrome is special as it doesn't use the perfetto IPC layer. We want to 1188 // avoid proto serialization and de-serialization there because that would 1189 // just add extra hops on top of the Mojo ser/des. Instead we auto-generate a 1190 // C++ class for it so it can pass around plain C++ objets. 1191 optional ChromeConfig chrome_config = 101; 1192 1193 // This is a fallback mechanism to send a free-form text config to the 1194 // producer. In theory this should never be needed. All the code that 1195 // is part of the platform (i.e. traced service) is supposed to *not* truncate 1196 // the trace config proto and propagate unknown fields. However, if anything 1197 // in the pipeline (client or backend) ends up breaking this forward compat 1198 // plan, this field will become the escape hatch to allow future data sources 1199 // to get some meaningful configuration. 1200 optional string legacy_config = 1000; 1201 1202 // This field is only used for testing. 1203 optional TestConfig for_testing = 1001; 1204 1205 // Was |for_testing|. Caused more problems then found. 1206 reserved 268435455; 1207} 1208 1209// End of protos/perfetto/config/data_source_config.proto 1210 1211// Begin of protos/perfetto/config/trace_config.proto 1212 1213// The overall config that is used when starting a new tracing session through 1214// ProducerPort::StartTracing(). 1215// It contains the general config for the logging buffer(s) and the configs for 1216// all the data source being enabled. 1217// 1218// Next id: 30. 1219message TraceConfig { 1220 message BufferConfig { 1221 optional uint32 size_kb = 1; 1222 1223 // |page_size|, now deprecated. 1224 reserved 2; 1225 1226 // |optimize_for|, now deprecated. 1227 reserved 3; 1228 1229 enum FillPolicy { 1230 UNSPECIFIED = 0; 1231 1232 // Default behavior. The buffer operates as a conventional ring buffer. 1233 // If the writer is faster than the reader (or if the reader reads only 1234 // after tracing is stopped) newly written packets will overwrite old 1235 // packets. 1236 RING_BUFFER = 1; 1237 1238 // Behaves like RING_BUFFER as long as there is space in the buffer or 1239 // the reader catches up with the writer. As soon as the writer hits 1240 // an unread chunk, it stops accepting new data in the buffer. 1241 DISCARD = 2; 1242 } 1243 optional FillPolicy fill_policy = 4; 1244 } 1245 repeated BufferConfig buffers = 1; 1246 1247 message DataSource { 1248 // Filters and data-source specific config. It contains also the unique name 1249 // of the data source, the one passed in the DataSourceDescriptor when they 1250 // register on the service. 1251 optional protos.DataSourceConfig config = 1; 1252 1253 // Optional. If multiple producers (~processes) expose the same data source 1254 // and either |producer_name_filter| or |producer_name_regex_filter| is set, 1255 // the data source is enabled only for producers whose names match any of 1256 // the filters. 1257 // |producer_name_filter| has to be an exact match, while 1258 // |producer_name_regex_filter| is a regular expression. 1259 // This allows to enable a data source only for specific processes. 1260 // The "repeated" fields have OR semantics: specifying a filter ["foo", 1261 // "bar"] will enable data sources on both "foo" and "bar" (if they exist). 1262 repeated string producer_name_filter = 2; 1263 repeated string producer_name_regex_filter = 3; 1264 } 1265 repeated DataSource data_sources = 2; 1266 1267 // Config for disabling builtin data sources in the tracing service. 1268 message BuiltinDataSource { 1269 // Disable emitting clock timestamps into the trace. 1270 optional bool disable_clock_snapshotting = 1; 1271 1272 // Disable echoing the original trace config in the trace. 1273 optional bool disable_trace_config = 2; 1274 1275 // Disable emitting system info (build fingerprint, cpuinfo, etc). 1276 optional bool disable_system_info = 3; 1277 1278 // Disable emitting events for data-source state changes (e.g. the marker 1279 // for all data sources having ACKed the start of the trace). 1280 optional bool disable_service_events = 4; 1281 1282 // The authoritative clock domain for the trace. Defaults to BOOTTIME. See 1283 // also ClockSnapshot's primary_trace_clock. The configured value is written 1284 // into the trace as part of the ClockSnapshots emitted by the service. 1285 // Trace processor will attempt to translate packet/event timestamps from 1286 // various data sources (and their chosen clock domains) to this domain 1287 // during import. Added in Android R. 1288 optional BuiltinClock primary_trace_clock = 5; 1289 1290 // Time interval in between snapshotting of sync markers, clock snapshots, 1291 // stats, and other periodic service-emitted events. Note that the service 1292 // only keeps track of the first and the most recent snapshot until 1293 // ReadBuffers() is called. 1294 optional uint32 snapshot_interval_ms = 6; 1295 } 1296 optional BuiltinDataSource builtin_data_sources = 20; 1297 1298 // If specified, the trace will be stopped |duration_ms| after starting. 1299 // This does *not* count the time the system is suspended, so we will run 1300 // for duration_ms of system activity, not wall time. 1301 // 1302 // However in case of traces with triggers, see 1303 // TriggerConfig.trigger_timeout_ms instead. 1304 optional uint32 duration_ms = 3; 1305 1306 // This is set when --dropbox is passed to the Perfetto command line client 1307 // and enables guardrails that limit resource usage for traces requested 1308 // by statsd. 1309 optional bool enable_extra_guardrails = 4; 1310 1311 enum LockdownModeOperation { 1312 LOCKDOWN_UNCHANGED = 0; 1313 LOCKDOWN_CLEAR = 1; 1314 LOCKDOWN_SET = 2; 1315 } 1316 // Reject producers that are not running under the same UID as the tracing 1317 // service. 1318 optional LockdownModeOperation lockdown_mode = 5; 1319 1320 message ProducerConfig { 1321 // Identifies the producer for which this config is for. 1322 optional string producer_name = 1; 1323 1324 // Specifies the preferred size of the shared memory buffer. If the size is 1325 // larger than the max size, the max will be used. If it is smaller than 1326 // the page size or doesn't fit pages evenly into it, it will fall back to 1327 // the size specified by the producer or finally the default shared memory 1328 // size. 1329 optional uint32 shm_size_kb = 2; 1330 1331 // Specifies the preferred size of each page in the shared memory buffer. 1332 // Must be an integer multiple of 4K. 1333 optional uint32 page_size_kb = 3; 1334 } 1335 1336 repeated ProducerConfig producers = 6; 1337 1338 // Contains statsd-specific metadata about an alert associated with the trace. 1339 message StatsdMetadata { 1340 // The identifier of the alert which triggered this trace. 1341 optional int64 triggering_alert_id = 1; 1342 // The uid which registered the triggering configuration with statsd. 1343 optional int32 triggering_config_uid = 2; 1344 // The identifier of the config which triggered the alert. 1345 optional int64 triggering_config_id = 3; 1346 // The identifier of the subscription which triggered this trace. 1347 optional int64 triggering_subscription_id = 4; 1348 } 1349 1350 // Statsd-specific metadata. 1351 optional StatsdMetadata statsd_metadata = 7; 1352 1353 // When true && |output_path| is empty, the EnableTracing() request must 1354 // provide a file descriptor. The service will then periodically read packets 1355 // out of the trace buffer and store it into the passed file. 1356 // If |output_path| is not empty no fd should be passed, the service 1357 // will create a new file and write into that (see comment below). 1358 optional bool write_into_file = 8; 1359 1360 // This must point to a non-existing file. If the file exists the service 1361 // will NOT overwrite and will fail instead as a security precaution. 1362 // On Android, when this is used with the system traced, the path must be 1363 // within /data/misc/perfetto-traces/ or the trace will fail. 1364 // This option has been introduced in Android R. Before R write_into_file 1365 // can be used only with the "pass a file descriptor over IPC" mode. 1366 optional string output_path = 29; 1367 1368 // Optional. If non-zero tunes the write period. A min value of 100ms is 1369 // enforced (i.e. smaller values are ignored). 1370 optional uint32 file_write_period_ms = 9; 1371 1372 // Optional. When non zero the periodic write stops once at most X bytes 1373 // have been written into the file. Tracing is disabled when this limit is 1374 // reached, even if |duration_ms| has not been reached yet. 1375 optional uint64 max_file_size_bytes = 10; 1376 1377 // Contains flags which override the default values of the guardrails inside 1378 // Perfetto. These values are only affect userdebug builds. 1379 message GuardrailOverrides { 1380 // Override the default limit (in bytes) for uploading data to server within 1381 // a 24 hour period. 1382 optional uint64 max_upload_per_day_bytes = 1; 1383 } 1384 1385 optional GuardrailOverrides guardrail_overrides = 11; 1386 1387 // When true, data sources are not started until an explicit call to 1388 // StartTracing() on the consumer port. This is to support early 1389 // initialization and fast trace triggering. This can be used only when the 1390 // Consumer explicitly triggers the StartTracing() method. 1391 // This should not be used in a remote trace config via statsd, doing so will 1392 // result in a hung trace session. 1393 optional bool deferred_start = 12; 1394 1395 // When set, it periodically issues a Flush() to all data source, forcing them 1396 // to commit their data into the tracing service. This can be used for 1397 // quasi-real-time streaming mode and to guarantee some partial ordering of 1398 // events in the trace in windows of X ms. 1399 optional uint32 flush_period_ms = 13; 1400 1401 // Wait for this long for producers to acknowledge flush requests. 1402 // Default 5s. 1403 optional uint32 flush_timeout_ms = 14; 1404 1405 // Wait for this long for producers to acknowledge stop requests. 1406 // Default 5s. 1407 optional uint32 data_source_stop_timeout_ms = 23; 1408 1409 // |disable_clock_snapshotting| moved. 1410 reserved 15; 1411 1412 // Android-only. If set, sends an intent to the Traceur system app when the 1413 // trace ends to notify it about the trace readiness. 1414 optional bool notify_traceur = 16; 1415 1416 // Triggers allow producers to start or stop the tracing session when an event 1417 // occurs. 1418 // 1419 // For example if we are tracing probabilistically, most traces will be 1420 // uninteresting. Triggers allow us to keep only the interesting ones such as 1421 // those traces during which the device temperature reached a certain 1422 // threshold. In this case the producer can activate a trigger to keep 1423 // (STOP_TRACING) the trace, otherwise it can also begin a trace 1424 // (START_TRACING) because it knows something is about to happen. 1425 message TriggerConfig { 1426 enum TriggerMode { 1427 UNSPECIFIED = 0; 1428 1429 // When this mode is chosen, data sources are not started until one of the 1430 // |triggers| are received. This supports early initialization and fast 1431 // starting of the tracing system. On triggering, the session will then 1432 // record for |stop_delay_ms|. However if no trigger is seen 1433 // after |trigger_timeout_ms| the session will be stopped and no data will 1434 // be returned. 1435 START_TRACING = 1; 1436 1437 // When this mode is chosen, the session will be started via the normal 1438 // EnableTracing() & StartTracing(). If no trigger is ever seen 1439 // the session will be stopped after |trigger_timeout_ms| and no data will 1440 // be returned. However if triggered the trace will stop after 1441 // |stop_delay_ms| and any data in the buffer will be returned to the 1442 // consumer. 1443 STOP_TRACING = 2; 1444 } 1445 optional TriggerMode trigger_mode = 1; 1446 1447 message Trigger { 1448 // The producer must specify this name to activate the trigger. 1449 optional string name = 1; 1450 1451 // The a std::regex that will match the producer that can activate this 1452 // trigger. This is optional. If unset any producers can activate this 1453 // trigger. 1454 optional string producer_name_regex = 2; 1455 1456 // After a trigger is received either in START_TRACING or STOP_TRACING 1457 // mode then the trace will end |stop_delay_ms| after triggering. 1458 optional uint32 stop_delay_ms = 3; 1459 } 1460 // A list of triggers which are related to this configuration. If ANY 1461 // trigger is seen then an action will be performed based on |trigger_mode|. 1462 repeated Trigger triggers = 2; 1463 1464 // Required and must be positive if a TriggerConfig is specified. This is 1465 // how long this TraceConfig should wait for a trigger to arrive. After this 1466 // period of time if no trigger is seen the TracingSession will be cleaned 1467 // up. 1468 optional uint32 trigger_timeout_ms = 3; 1469 } 1470 optional TriggerConfig trigger_config = 17; 1471 1472 // When this is non-empty the perfetto command line tool will ignore the rest 1473 // of this TraceConfig and instead connect to the perfetto service as a 1474 // producer and send these triggers, potentially stopping or starting traces 1475 // that were previous configured to use a TriggerConfig. 1476 repeated string activate_triggers = 18; 1477 1478 // Configuration for trace contents that reference earlier trace data. For 1479 // example, a data source might intern strings, and emit packets containing 1480 // {interned id : string} pairs. Future packets from that data source can then 1481 // use the interned ids instead of duplicating the raw string contents. The 1482 // trace parser will then need to use that interning table to fully interpret 1483 // the rest of the trace. 1484 message IncrementalStateConfig { 1485 // If nonzero, notify eligible data sources to clear their incremental state 1486 // periodically, with the given period. The notification is sent only to 1487 // data sources that have |handles_incremental_state_clear| set in their 1488 // DataSourceDescriptor. The notification requests that the data source 1489 // stops referring to past trace contents. This is particularly useful when 1490 // tracing in ring buffer mode, where it is not exceptional to overwrite old 1491 // trace data. 1492 // 1493 // Warning: this time-based global clearing is likely to be removed in the 1494 // future, to be replaced with a smarter way of sending the notifications 1495 // only when necessary. 1496 optional uint32 clear_period_ms = 1; 1497 } 1498 optional IncrementalStateConfig incremental_state_config = 21; 1499 1500 // Additional guardrail used by the Perfetto command line client. 1501 // On user builds when --dropbox is set perfetto will refuse to trace unless 1502 // this is also set. 1503 // Added in Q. 1504 optional bool allow_user_build_tracing = 19; 1505 1506 // If set the tracing service will ensure there is at most one tracing session 1507 // with this key. 1508 optional string unique_session_name = 22; 1509 1510 // Compress trace with the given method. Best effort. 1511 enum CompressionType { 1512 COMPRESSION_TYPE_UNSPECIFIED = 0; 1513 COMPRESSION_TYPE_DEFLATE = 1; 1514 } 1515 optional CompressionType compression_type = 24; 1516 1517 // Android-only. Debug builds only. Not for general use. If set, saves a 1518 // Dropbox trace into an incident. This field is read by perfetto_cmd, rather 1519 // than the tracing service. All fields are mandatory. 1520 message IncidentReportConfig { 1521 optional string destination_package = 1; 1522 optional string destination_class = 2; 1523 // Level of filtering in the requested incident. See |Destination| in 1524 // frameworks/base/core/proto/android/privacy.proto. 1525 optional int32 privacy_level = 3; 1526 // If true, do not write the trace into dropbox (i.e. incident only). 1527 // Otherwise, write to both dropbox and incident. 1528 optional bool skip_dropbox = 4; 1529 } 1530 optional IncidentReportConfig incident_report_config = 25; 1531 1532 // DEPRECATED. Was trace_uuid, use trace_uuid_msb and trace_uuid_lsb instead. 1533 reserved 26; 1534 // An identifier clients can use to tie this trace to other logging. 1535 // Alternative encoding of trace_uuid as two int64s. 1536 optional int64 trace_uuid_msb = 27; 1537 optional int64 trace_uuid_lsb = 28; 1538} 1539 1540// End of protos/perfetto/config/trace_config.proto 1541 1542// Begin of protos/perfetto/common/trace_stats.proto 1543 1544// Statistics for the internals of the tracing service. 1545// 1546// Next id: 11. 1547message TraceStats { 1548 // From TraceBuffer::Stats. 1549 // 1550 // Next id: 20. 1551 message BufferStats { 1552 // Size of the circular buffer in bytes. 1553 optional uint64 buffer_size = 12; 1554 1555 // Num. bytes written into the circular buffer, including chunk headers. 1556 optional uint64 bytes_written = 1; 1557 1558 // Num. bytes overwritten before they have been read (i.e. loss of data). 1559 optional uint64 bytes_overwritten = 13; 1560 1561 // Total size of chunks that were fully read from the circular buffer by the 1562 // consumer. This may not be equal to |bytes_written| either in the middle 1563 // of tracing, or if |chunks_overwritten| is non-zero. Note that this is the 1564 // size of the chunks read from the buffer, including chunk headers, which 1565 // will be different from the total size of packets returned to the 1566 // consumer. 1567 // 1568 // The current utilization of the trace buffer (mid-tracing) can be obtained 1569 // by subtracting |bytes_read| and |bytes_overwritten| from |bytes_written|, 1570 // adding the difference of |padding_bytes_written| and 1571 // |padding_bytes_cleared|, and comparing this sum to the |buffer_size|. 1572 // Note that this represents the total size of buffered data in the buffer, 1573 // yet this data may be spread non-contiguously through the buffer and may 1574 // be overridden before the utilization reaches 100%. 1575 optional uint64 bytes_read = 14; 1576 1577 // Num. bytes that were allocated as padding between chunks in the circular 1578 // buffer. 1579 optional uint64 padding_bytes_written = 15; 1580 1581 // Num. of padding bytes that were removed from the circular buffer when 1582 // they were overwritten. 1583 // 1584 // The difference between |padding_bytes_written| and 1585 // |padding_bytes_cleared| denotes the total size of padding currently 1586 // present in the buffer. 1587 optional uint64 padding_bytes_cleared = 16; 1588 1589 // Num. chunks (!= packets) written into the buffer. 1590 optional uint64 chunks_written = 2; 1591 1592 // Num. chunks (!= packets) rewritten into the buffer. This means we rewrote 1593 // the same chunk with additional packets appended to the end. 1594 optional uint64 chunks_rewritten = 10; 1595 1596 // Num. chunks overwritten before they have been read (i.e. loss of data). 1597 optional uint64 chunks_overwritten = 3; 1598 1599 // Num. chunks discarded (i.e. loss of data). Can be > 0 only when a buffer 1600 // is configured with FillPolicy == DISCARD. 1601 optional uint64 chunks_discarded = 18; 1602 1603 // Num. chunks (!= packets) that were fully read from the circular buffer by 1604 // the consumer. This may not be equal to |chunks_written| either in the 1605 // middle of tracing, or if |chunks_overwritten| is non-zero. 1606 optional uint64 chunks_read = 17; 1607 1608 // Num. chunks that were committed out of order. 1609 optional uint64 chunks_committed_out_of_order = 11; 1610 1611 // Num. times the ring buffer wrapped around. 1612 optional uint64 write_wrap_count = 4; 1613 1614 // Num. out-of-band (OOB) patches that succeeded. 1615 optional uint64 patches_succeeded = 5; 1616 1617 // Num. OOB patches that failed (e.g., the chunk to patch was gone). 1618 optional uint64 patches_failed = 6; 1619 1620 // Num. readaheads (for large multi-chunk packet reads) that ended up in a 1621 // successful packet read. 1622 optional uint64 readaheads_succeeded = 7; 1623 1624 // Num. readaheads aborted because of missing chunks in the sequence stream. 1625 // Note that a small number > 0 is totally expected: occasionally, when 1626 // issuing a read, the very last packet in a sequence might be incomplete 1627 // (because the producer is still writing it while we read). The read will 1628 // stop at that point, for that sequence, increasing this counter. 1629 optional uint64 readaheads_failed = 8; 1630 1631 // Num. of violations of the SharedMemoryABI found while writing or reading 1632 // the buffer. This is an indication of either a bug in the producer(s) or 1633 // malicious producer(s). 1634 optional uint64 abi_violations = 9; 1635 1636 // The fields below have been introduced in Android R. 1637 1638 // Num. of times the service detected packet loss on a trace writer 1639 // sequence. This is usually caused by exhaustion of available chunks in the 1640 // writer process's SMB. Note that this relies on the client's TraceWriter 1641 // indicating this loss to the service -- packets lost for other reasons are 1642 // not reflected in this stat. 1643 optional uint64 trace_writer_packet_loss = 19; 1644 } 1645 1646 // Stats for the TraceBuffer(s) of the current trace session. 1647 repeated BufferStats buffer_stats = 1; 1648 1649 // Num. producers connected (whether they are involved in the current tracing 1650 // session or not). 1651 optional uint32 producers_connected = 2; 1652 1653 // Num. producers ever seen for all trace sessions since startup (it's a good 1654 // proxy for inferring num. producers crashed / killed). 1655 optional uint64 producers_seen = 3; 1656 1657 // Num. data sources registered for all trace sessions. 1658 optional uint32 data_sources_registered = 4; 1659 1660 // Num. data sources ever seen for all trace sessions since startup. 1661 optional uint64 data_sources_seen = 5; 1662 1663 // Num. concurrently active tracing sessions. 1664 optional uint32 tracing_sessions = 6; 1665 1666 // Num. buffers for all tracing session (not just the current one). This will 1667 // be >= buffer_stats.size(), because the latter is only about the current 1668 // session. 1669 optional uint32 total_buffers = 7; 1670 1671 // The fields below have been introduced in Android Q. 1672 1673 // Num. chunks that were discarded by the service before attempting to commit 1674 // them to a buffer, e.g. because the producer specified an invalid buffer ID. 1675 optional uint64 chunks_discarded = 8; 1676 1677 // Num. patches that were discarded by the service before attempting to apply 1678 // them to a buffer, e.g. because the producer specified an invalid buffer ID. 1679 optional uint64 patches_discarded = 9; 1680 1681 // Packets that failed validation of the TrustedPacket. If this is > 0, there 1682 // is a bug in the producer. 1683 optional uint64 invalid_packets = 10; 1684} 1685 1686// End of protos/perfetto/common/trace_stats.proto 1687 1688// Begin of protos/perfetto/trace/android/android_log.proto 1689 1690message AndroidLogPacket { 1691 message LogEvent { 1692 // The log buffer (e.g. MAIN, SYSTEM, RADIO) the event comes from. 1693 optional AndroidLogId log_id = 1; 1694 1695 // PID (TGID), TID and UID of the task that emitted the event. 1696 optional int32 pid = 2; 1697 optional int32 tid = 3; 1698 optional int32 uid = 4; 1699 1700 // Timestamp [ns]. The clock source is CLOCK_REALTIME, unlike many other 1701 // Perfetto trace events that instead use CLOCK_BOOTTIME. The trace 1702 // processor will take care of realigning clocks using the ClockSnapshot(s). 1703 optional uint64 timestamp = 5; 1704 1705 // When log_id == LID_EVENTS, |tag| corresponds to the event name defined in 1706 // the second column of /system/etc/event-log-tags. For all other events, 1707 // |tag| is the app-specified argument passed to __android_log_write(). 1708 optional string tag = 6; 1709 1710 // Empty when log_id == LID_EVENTS. 1711 optional AndroidLogPriority prio = 7; 1712 1713 // Empty when log_id == LID_EVENTS. 1714 optional string message = 8; 1715 1716 message Arg { 1717 optional string name = 1; 1718 oneof value { 1719 int64 int_value = 2; 1720 float float_value = 3; 1721 string string_value = 4; 1722 } 1723 } 1724 // Only populated when log_id == LID_EVENTS. 1725 repeated Arg args = 9; 1726 } 1727 1728 repeated LogEvent events = 1; 1729 1730 // Stats are emitted only upon Flush() and are monotonic (i.e. they are 1731 // absolute counters since the beginning of the lifetime of the tracing 1732 // session and NOT relative to the previous Stats snapshot). 1733 message Stats { 1734 // Total number of log events seen, including errors and skipped entries 1735 // (num of events stored in the trace = total - failed - skipped). 1736 optional uint64 num_total = 1; 1737 1738 // Parser failures. 1739 optional uint64 num_failed = 2; 1740 1741 // Messages skipped due to filters. 1742 optional uint64 num_skipped = 3; 1743 } 1744 optional Stats stats = 2; 1745} 1746 1747// End of protos/perfetto/trace/android/android_log.proto 1748 1749// Begin of protos/perfetto/trace/android/gpu_mem_event.proto 1750 1751// Generated by Android's GpuService. 1752message GpuMemTotalEvent { 1753 optional uint32 gpu_id = 1; 1754 optional uint32 pid = 2; 1755 optional uint64 size = 3; 1756} 1757 1758// End of protos/perfetto/trace/android/gpu_mem_event.proto 1759 1760// Begin of protos/perfetto/trace/android/graphics_frame_event.proto 1761 1762// Generated by Android's SurfaceFlinger. 1763message GraphicsFrameEvent { 1764 enum BufferEventType { 1765 UNSPECIFIED = 0; 1766 DEQUEUE = 1; 1767 QUEUE = 2; 1768 POST = 3; 1769 ACQUIRE_FENCE = 4; 1770 LATCH = 5; 1771 // HWC will compose this buffer 1772 HWC_COMPOSITION_QUEUED = 6; 1773 // renderEngine composition 1774 FALLBACK_COMPOSITION = 7; 1775 PRESENT_FENCE = 8; 1776 RELEASE_FENCE = 9; 1777 MODIFY = 10; 1778 DETACH = 11; 1779 ATTACH = 12; 1780 CANCEL = 13; 1781 } 1782 1783 message BufferEvent { 1784 optional uint32 frame_number = 1; 1785 optional BufferEventType type = 2; 1786 optional string layer_name = 3; 1787 // If no duration is set, the event is an instant event. 1788 optional uint64 duration_ns = 4; 1789 // Unique buffer identifier. 1790 optional uint32 buffer_id = 5; 1791 } 1792 1793 optional BufferEvent buffer_event = 1; 1794} 1795 1796// End of protos/perfetto/trace/android/graphics_frame_event.proto 1797 1798// Begin of protos/perfetto/trace/android/initial_display_state.proto 1799 1800message InitialDisplayState { 1801 // Same values as android.view.Display.STATE_* 1802 optional int32 display_state = 1; 1803 optional double brightness = 2; 1804} 1805 1806// End of protos/perfetto/trace/android/initial_display_state.proto 1807 1808// Begin of protos/perfetto/trace/android/packages_list.proto 1809 1810message PackagesList { 1811 message PackageInfo { 1812 optional string name = 1; 1813 optional uint64 uid = 2; 1814 optional bool debuggable = 3; 1815 optional bool profileable_from_shell = 4; 1816 optional int64 version_code = 5; 1817 } 1818 1819 repeated PackageInfo packages = 1; 1820 1821 // At least one error occurred parsing the packages.list. 1822 optional bool parse_error = 2; 1823 1824 // Failed to open / read packages.list. 1825 optional bool read_error = 3; 1826} 1827 1828// End of protos/perfetto/trace/android/packages_list.proto 1829 1830// Begin of protos/perfetto/trace/chrome/chrome_benchmark_metadata.proto 1831 1832// This message is not intended to be written by the chrome on the device. 1833// It's emitted on the host by the telemetry benchmark infrastructure (it's a 1834// part of the trace that's written by the telemetry tracing agent). 1835message ChromeBenchmarkMetadata { 1836 // Time when the benchmark execution started (host unixtime in microseconds). 1837 optional int64 benchmark_start_time_us = 1; 1838 1839 // Time when this particular story was run (host unixtime in microseconds). 1840 optional int64 story_run_time_us = 2; 1841 1842 // Name of benchmark. 1843 optional string benchmark_name = 3; 1844 1845 // Description of benchmark. 1846 optional string benchmark_description = 4; 1847 1848 // Optional label. 1849 optional string label = 5; 1850 1851 // Name of story. 1852 optional string story_name = 6; 1853 1854 // List of story tags. 1855 repeated string story_tags = 7; 1856 1857 // Index of the story run (>0 if the same story was run several times). 1858 optional int32 story_run_index = 8; 1859 1860 // Whether this run failed. 1861 optional bool had_failures = 9; 1862} 1863 1864// End of protos/perfetto/trace/chrome/chrome_benchmark_metadata.proto 1865 1866// Begin of protos/perfetto/trace/chrome/chrome_metadata.proto 1867 1868// Metadata for chrome traces. 1869message ChromeMetadataPacket { 1870 optional BackgroundTracingMetadata background_tracing_metadata = 1; 1871 1872 // Version code of Chrome used by Android's Play Store. This field is only set 1873 // on Android. 1874 optional int32 chrome_version_code = 2; 1875} 1876 1877// Metadata related to background tracing scenarios, states and triggers. 1878message BackgroundTracingMetadata { 1879 // Information about a trigger rule defined in the experiment config. 1880 message TriggerRule { 1881 enum TriggerType { 1882 TRIGGER_UNSPECIFIED = 0; 1883 1884 // Traces are triggered by specific range of values of an UMA histogram. 1885 MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE = 1; 1886 1887 // Traces are triggered by specific named events in chromium codebase, 1888 // like "second-update-failure". 1889 MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED = 2; 1890 } 1891 optional TriggerType trigger_type = 1; 1892 1893 // Configuration of histogram trigger. 1894 message HistogramRule { 1895 // UMA histogram name hash, same as HistogramEventProto.name_hash. 1896 optional fixed64 histogram_name_hash = 1; 1897 1898 // Range of values of the histogram that activates trigger. 1899 optional int64 histogram_min_trigger = 2; 1900 optional int64 histogram_max_trigger = 3; 1901 } 1902 optional HistogramRule histogram_rule = 2; 1903 1904 // Configuration of named trigger. 1905 message NamedRule { 1906 enum EventType { 1907 UNSPECIFIED = 0; 1908 SESSION_RESTORE = 1; 1909 NAVIGATION = 2; 1910 STARTUP = 3; 1911 REACHED_CODE = 4; 1912 1913 TEST_RULE = 1000; 1914 } 1915 optional EventType event_type = 1; 1916 } 1917 optional NamedRule named_rule = 3; 1918 } 1919 1920 // Specifies the rule that caused the trace to be uploaded. 1921 optional TriggerRule triggered_rule = 1; 1922 1923 // List of all active triggers in current session, when trace was triggered. 1924 repeated TriggerRule active_rules = 2; 1925} 1926 1927// End of protos/perfetto/trace/chrome/chrome_metadata.proto 1928 1929// Begin of protos/perfetto/trace/chrome/chrome_trace_event.proto 1930 1931message ChromeTracedValue { 1932 enum NestedType { 1933 DICT = 0; 1934 ARRAY = 1; 1935 } 1936 optional NestedType nested_type = 1; 1937 1938 repeated string dict_keys = 2; 1939 repeated ChromeTracedValue dict_values = 3; 1940 repeated ChromeTracedValue array_values = 4; 1941 optional int32 int_value = 5; 1942 optional double double_value = 6; 1943 optional bool bool_value = 7; 1944 optional string string_value = 8; 1945} 1946 1947message ChromeStringTableEntry { 1948 optional string value = 1; 1949 optional int32 index = 2; 1950} 1951 1952// Deprecated, use TrackEvent protos instead. 1953message ChromeTraceEvent { 1954 message Arg { 1955 optional string name = 1; 1956 1957 oneof value { 1958 bool bool_value = 2; 1959 uint64 uint_value = 3; 1960 int64 int_value = 4; 1961 double double_value = 5; 1962 string string_value = 6; 1963 // Pointers are stored in a separate type as the JSON output treats them 1964 // differently from other uint64 values. 1965 uint64 pointer_value = 7; 1966 string json_value = 8; 1967 ChromeTracedValue traced_value = 10; 1968 } 1969 1970 // Takes precedence over |name| if set, 1971 // and is an index into |string_table|. 1972 optional uint32 name_index = 9; 1973 } 1974 1975 optional string name = 1; 1976 optional int64 timestamp = 2; 1977 optional int32 phase = 3; 1978 optional int32 thread_id = 4; 1979 optional int64 duration = 5; 1980 optional int64 thread_duration = 6; 1981 optional string scope = 7; 1982 optional uint64 id = 8; 1983 optional uint32 flags = 9; 1984 optional string category_group_name = 10; 1985 optional int32 process_id = 11; 1986 optional int64 thread_timestamp = 12; 1987 optional uint64 bind_id = 13; 1988 1989 repeated Arg args = 14; 1990 1991 // Takes precedence over respectively |name| and 1992 // |category_group_name_index| if set, 1993 // and are indices into |string_table|. 1994 optional uint32 name_index = 15; 1995 optional uint32 category_group_name_index = 16; 1996} 1997 1998message ChromeMetadata { 1999 optional string name = 1; 2000 2001 oneof value { 2002 string string_value = 2; 2003 bool bool_value = 3; 2004 int64 int_value = 4; 2005 string json_value = 5; 2006 } 2007} 2008 2009// Subtraces produced in legacy json format by Chrome tracing agents not yet 2010// updated to support the new binary format, e.g. ETW and CrOS ARC. 2011// TODO(eseckler): Update these agents to become perfetto producers. 2012message ChromeLegacyJsonTrace { 2013 enum TraceType { 2014 USER_TRACE = 0; 2015 2016 // Deprecated. 2017 SYSTEM_TRACE = 1; 2018 } 2019 optional TraceType type = 1; 2020 optional string data = 2; 2021} 2022 2023message ChromeEventBundle { 2024 // Deprecated, use TrackEvent protos instead. 2025 repeated ChromeTraceEvent trace_events = 1 [deprecated = true]; 2026 repeated ChromeMetadata metadata = 2; 2027 // ftrace output from CrOS and Cast system tracing agents. 2028 // TODO(eseckler): Replace system traces with native perfetto service. 2029 repeated string legacy_ftrace_output = 4; 2030 repeated ChromeLegacyJsonTrace legacy_json_trace = 5; 2031 2032 // Contents of a string table that's valid for 2033 // the whole ChromeEventBundle entry. 2034 repeated ChromeStringTableEntry string_table = 3 [deprecated = true]; 2035} 2036 2037// End of protos/perfetto/trace/chrome/chrome_trace_event.proto 2038 2039// Begin of protos/perfetto/trace/clock_snapshot.proto 2040 2041// A snapshot of clock readings to allow for trace alignment. 2042message ClockSnapshot { 2043 message Clock { 2044 // DEPRECATED. This enum has moved to ../common/builtin_clock.proto. 2045 enum BuiltinClocks { 2046 UNKNOWN = 0; 2047 REALTIME = 1; 2048 REALTIME_COARSE = 2; 2049 MONOTONIC = 3; 2050 MONOTONIC_COARSE = 4; 2051 MONOTONIC_RAW = 5; 2052 BOOTTIME = 6; 2053 BUILTIN_CLOCK_MAX_ID = 63; 2054 2055 reserved 7, 8; 2056 } 2057 2058 // Clock IDs have the following semantic: 2059 // [1, 63]: Builtin types, see BuiltinClock from 2060 // ../common/builtin_clock.proto. 2061 // [64, 127]: User-defined clocks. These clocks are sequence-scoped. They 2062 // are only valid within the same |trusted_packet_sequence_id| 2063 // (i.e. only for TracePacket(s) emitted by the same TraceWriter 2064 // that emitted the clock snapshot). 2065 // [128, MAX]: Reserved for future use. The idea is to allow global clock 2066 // IDs and setting this ID to hash(full_clock_name) & ~127. 2067 optional uint32 clock_id = 1; 2068 2069 // Absolute timestamp. Unit is ns unless specified otherwise by the 2070 // unit_multiplier_ns field below. 2071 optional uint64 timestamp = 2; 2072 2073 // When true each TracePacket's timestamp should be interpreted as a delta 2074 // from the last TracePacket's timestamp (referencing this clock) emitted by 2075 // the same packet_sequence_id. Should only be used for user-defined 2076 // sequence-local clocks. The first packet timestamp after each 2077 // ClockSnapshot that contains this clock is relative to the |timestamp| in 2078 // the ClockSnapshot. 2079 optional bool is_incremental = 3; 2080 2081 // Allows to specify a custom unit different than the default (ns) for this 2082 // clock domain. A multiplier of 1000 means that a timestamp = 3 should be 2083 // interpreted as 3000 ns = 3 us. All snapshots for the same clock within a 2084 // trace need to use the same unit. 2085 optional uint64 unit_multiplier_ns = 4; 2086 } 2087 repeated Clock clocks = 1; 2088 2089 // The authoritative clock domain for the trace. Defaults to BOOTTIME, but can 2090 // be overridden in TraceConfig's builtin_data_sources. Trace processor will 2091 // attempt to translate packet/event timestamps from various data sources (and 2092 // their chosen clock domains) to this domain during import. 2093 optional BuiltinClock primary_trace_clock = 2; 2094} 2095 2096// End of protos/perfetto/trace/clock_snapshot.proto 2097 2098// Begin of protos/perfetto/common/descriptor.proto 2099 2100// The protocol compiler can output a FileDescriptorSet containing the .proto 2101// files it parses. 2102message FileDescriptorSet { 2103 repeated FileDescriptorProto file = 1; 2104} 2105 2106// Describes a complete .proto file. 2107message FileDescriptorProto { 2108 // file name, relative to root of source tree 2109 optional string name = 1; 2110 // e.g. "foo", "foo.bar", etc. 2111 optional string package = 2; 2112 2113 // Names of files imported by this file. 2114 repeated string dependency = 3; 2115 // Indexes of the public imported files in the dependency list above. 2116 repeated int32 public_dependency = 10; 2117 // Indexes of the weak imported files in the dependency list. 2118 // For Google-internal migration only. Do not use. 2119 repeated int32 weak_dependency = 11; 2120 2121 // All top-level definitions in this file. 2122 repeated DescriptorProto message_type = 4; 2123 repeated EnumDescriptorProto enum_type = 5; 2124 repeated FieldDescriptorProto extension = 7; 2125 2126 reserved 6; 2127 reserved 8; 2128 reserved 9; 2129 reserved 12; 2130} 2131 2132// Describes a message type. 2133message DescriptorProto { 2134 optional string name = 1; 2135 2136 repeated FieldDescriptorProto field = 2; 2137 repeated FieldDescriptorProto extension = 6; 2138 2139 repeated DescriptorProto nested_type = 3; 2140 repeated EnumDescriptorProto enum_type = 4; 2141 2142 reserved 5; 2143 2144 repeated OneofDescriptorProto oneof_decl = 8; 2145 2146 reserved 7; 2147 2148 // Range of reserved tag numbers. Reserved tag numbers may not be used by 2149 // fields or extension ranges in the same message. Reserved ranges may 2150 // not overlap. 2151 message ReservedRange { 2152 // Inclusive. 2153 optional int32 start = 1; 2154 // Exclusive. 2155 optional int32 end = 2; 2156 } 2157 repeated ReservedRange reserved_range = 9; 2158 // Reserved field names, which may not be used by fields in the same message. 2159 // A given name may only be reserved once. 2160 repeated string reserved_name = 10; 2161} 2162 2163// Describes a field within a message. 2164message FieldDescriptorProto { 2165 enum Type { 2166 // 0 is reserved for errors. 2167 // Order is weird for historical reasons. 2168 TYPE_DOUBLE = 1; 2169 TYPE_FLOAT = 2; 2170 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if 2171 // negative values are likely. 2172 TYPE_INT64 = 3; 2173 TYPE_UINT64 = 4; 2174 // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if 2175 // negative values are likely. 2176 TYPE_INT32 = 5; 2177 TYPE_FIXED64 = 6; 2178 TYPE_FIXED32 = 7; 2179 TYPE_BOOL = 8; 2180 TYPE_STRING = 9; 2181 // Tag-delimited aggregate. 2182 // Group type is deprecated and not supported in proto3. However, Proto3 2183 // implementations should still be able to parse the group wire format and 2184 // treat group fields as unknown fields. 2185 TYPE_GROUP = 10; 2186 // Length-delimited aggregate. 2187 TYPE_MESSAGE = 11; 2188 2189 // New in version 2. 2190 TYPE_BYTES = 12; 2191 TYPE_UINT32 = 13; 2192 TYPE_ENUM = 14; 2193 TYPE_SFIXED32 = 15; 2194 TYPE_SFIXED64 = 16; 2195 // Uses ZigZag encoding. 2196 TYPE_SINT32 = 17; 2197 // Uses ZigZag encoding. 2198 TYPE_SINT64 = 18; 2199 }; 2200 2201 enum Label { 2202 // 0 is reserved for errors 2203 LABEL_OPTIONAL = 1; 2204 LABEL_REQUIRED = 2; 2205 LABEL_REPEATED = 3; 2206 }; 2207 2208 optional string name = 1; 2209 optional int32 number = 3; 2210 optional Label label = 4; 2211 2212 // If type_name is set, this need not be set. If both this and type_name 2213 // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. 2214 optional Type type = 5; 2215 2216 // For message and enum types, this is the name of the type. If the name 2217 // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping 2218 // rules are used to find the type (i.e. first the nested types within this 2219 // message are searched, then within the parent, on up to the root 2220 // namespace). 2221 optional string type_name = 6; 2222 2223 // For extensions, this is the name of the type being extended. It is 2224 // resolved in the same manner as type_name. 2225 optional string extendee = 2; 2226 2227 // For numeric types, contains the original text representation of the value. 2228 // For booleans, "true" or "false". 2229 // For strings, contains the default text contents (not escaped in any way). 2230 // For bytes, contains the C escaped value. All bytes >= 128 are escaped. 2231 // TODO(kenton): Base-64 encode? 2232 optional string default_value = 7; 2233 2234 // If set, gives the index of a oneof in the containing type's oneof_decl 2235 // list. This field is a member of that oneof. 2236 optional int32 oneof_index = 9; 2237 2238 reserved 10; 2239 2240 reserved 8; 2241} 2242 2243// Describes a oneof. 2244message OneofDescriptorProto { 2245 optional string name = 1; 2246 optional OneofOptions options = 2; 2247} 2248 2249// Describes an enum type. 2250message EnumDescriptorProto { 2251 optional string name = 1; 2252 2253 repeated EnumValueDescriptorProto value = 2; 2254 2255 reserved 3; 2256 reserved 4; 2257 2258 // Reserved enum value names, which may not be reused. A given name may only 2259 // be reserved once. 2260 repeated string reserved_name = 5; 2261} 2262 2263// Describes a value within an enum. 2264message EnumValueDescriptorProto { 2265 optional string name = 1; 2266 optional int32 number = 2; 2267 2268 reserved 3; 2269} 2270 2271message OneofOptions { 2272 reserved 999; 2273 2274 // Clients can define custom options in extensions of this message. See above. 2275 extensions 1000 to max; 2276} 2277 2278// End of protos/perfetto/common/descriptor.proto 2279 2280// Begin of protos/perfetto/trace/extension_descriptor.proto 2281 2282// This message contains descriptors used to parse extension fields of 2283// TrackEvent. 2284// 2285// See docs/design-docs/extensions.md for more details. 2286message ExtensionDescriptor { 2287 optional FileDescriptorSet extension_set = 1; 2288} 2289 2290// End of protos/perfetto/trace/extension_descriptor.proto 2291 2292// Begin of protos/perfetto/trace/filesystem/inode_file_map.proto 2293 2294// Represents the mapping between inode numbers in a block device and their path 2295// on the filesystem 2296message InodeFileMap { 2297 // Representation of Entry 2298 message Entry { 2299 optional uint64 inode_number = 1; 2300 2301 // The path to the file, e.g. "etc/file.xml" 2302 // List of strings for multiple hardlinks 2303 repeated string paths = 2; 2304 2305 // The file type 2306 enum Type { 2307 UNKNOWN = 0; 2308 FILE = 1; 2309 DIRECTORY = 2; 2310 } 2311 optional Type type = 3; 2312 } 2313 2314 optional uint64 block_device_id = 1; 2315 2316 // The mount points of the block device, e.g. ["system"]. 2317 repeated string mount_points = 2; 2318 2319 // The list of all the entries from the block device 2320 repeated Entry entries = 3; 2321} 2322 2323// End of protos/perfetto/trace/filesystem/inode_file_map.proto 2324 2325// Begin of protos/perfetto/trace/ftrace/binder.proto 2326 2327message BinderTransactionFtraceEvent { 2328 optional int32 debug_id = 1; 2329 optional int32 target_node = 2; 2330 optional int32 to_proc = 3; 2331 optional int32 to_thread = 4; 2332 optional int32 reply = 5; 2333 optional uint32 code = 6; 2334 optional uint32 flags = 7; 2335} 2336message BinderTransactionReceivedFtraceEvent { 2337 optional int32 debug_id = 1; 2338} 2339message BinderSetPriorityFtraceEvent { 2340 optional int32 proc = 1; 2341 optional int32 thread = 2; 2342 optional uint32 old_prio = 3; 2343 optional uint32 new_prio = 4; 2344 optional uint32 desired_prio = 5; 2345} 2346message BinderLockFtraceEvent { 2347 optional string tag = 1; 2348} 2349message BinderLockedFtraceEvent { 2350 optional string tag = 1; 2351} 2352message BinderUnlockFtraceEvent { 2353 optional string tag = 1; 2354} 2355message BinderTransactionAllocBufFtraceEvent { 2356 optional uint64 data_size = 1; 2357 optional int32 debug_id = 2; 2358 optional uint64 offsets_size = 3; 2359} 2360 2361// End of protos/perfetto/trace/ftrace/binder.proto 2362 2363// Begin of protos/perfetto/trace/ftrace/block.proto 2364 2365message BlockRqIssueFtraceEvent { 2366 optional uint64 dev = 1; 2367 optional uint64 sector = 2; 2368 optional uint32 nr_sector = 3; 2369 optional uint32 bytes = 4; 2370 optional string rwbs = 5; 2371 optional string comm = 6; 2372 optional string cmd = 7; 2373} 2374message BlockBioBackmergeFtraceEvent { 2375 optional uint64 dev = 1; 2376 optional uint64 sector = 2; 2377 optional uint32 nr_sector = 3; 2378 optional string rwbs = 4; 2379 optional string comm = 5; 2380} 2381message BlockBioBounceFtraceEvent { 2382 optional uint64 dev = 1; 2383 optional uint64 sector = 2; 2384 optional uint32 nr_sector = 3; 2385 optional string rwbs = 4; 2386 optional string comm = 5; 2387} 2388message BlockBioCompleteFtraceEvent { 2389 optional uint64 dev = 1; 2390 optional uint64 sector = 2; 2391 optional uint32 nr_sector = 3; 2392 optional int32 error = 4; 2393 optional string rwbs = 5; 2394} 2395message BlockBioFrontmergeFtraceEvent { 2396 optional uint64 dev = 1; 2397 optional uint64 sector = 2; 2398 optional uint32 nr_sector = 3; 2399 optional string rwbs = 4; 2400 optional string comm = 5; 2401} 2402message BlockBioQueueFtraceEvent { 2403 optional uint64 dev = 1; 2404 optional uint64 sector = 2; 2405 optional uint32 nr_sector = 3; 2406 optional string rwbs = 4; 2407 optional string comm = 5; 2408} 2409message BlockBioRemapFtraceEvent { 2410 optional uint64 dev = 1; 2411 optional uint64 sector = 2; 2412 optional uint32 nr_sector = 3; 2413 optional uint64 old_dev = 4; 2414 optional uint64 old_sector = 5; 2415 optional string rwbs = 6; 2416} 2417message BlockDirtyBufferFtraceEvent { 2418 optional uint64 dev = 1; 2419 optional uint64 sector = 2; 2420 optional uint64 size = 3; 2421} 2422message BlockGetrqFtraceEvent { 2423 optional uint64 dev = 1; 2424 optional uint64 sector = 2; 2425 optional uint32 nr_sector = 3; 2426 optional string rwbs = 4; 2427 optional string comm = 5; 2428} 2429message BlockPlugFtraceEvent { 2430 optional string comm = 1; 2431} 2432message BlockRqAbortFtraceEvent { 2433 optional uint64 dev = 1; 2434 optional uint64 sector = 2; 2435 optional uint32 nr_sector = 3; 2436 optional int32 errors = 4; 2437 optional string rwbs = 5; 2438 optional string cmd = 6; 2439} 2440message BlockRqCompleteFtraceEvent { 2441 optional uint64 dev = 1; 2442 optional uint64 sector = 2; 2443 optional uint32 nr_sector = 3; 2444 optional int32 errors = 4; 2445 optional string rwbs = 5; 2446 optional string cmd = 6; 2447} 2448message BlockRqInsertFtraceEvent { 2449 optional uint64 dev = 1; 2450 optional uint64 sector = 2; 2451 optional uint32 nr_sector = 3; 2452 optional uint32 bytes = 4; 2453 optional string rwbs = 5; 2454 optional string comm = 6; 2455 optional string cmd = 7; 2456} 2457message BlockRqRemapFtraceEvent { 2458 optional uint64 dev = 1; 2459 optional uint64 sector = 2; 2460 optional uint32 nr_sector = 3; 2461 optional uint64 old_dev = 4; 2462 optional uint64 old_sector = 5; 2463 optional uint32 nr_bios = 6; 2464 optional string rwbs = 7; 2465} 2466message BlockRqRequeueFtraceEvent { 2467 optional uint64 dev = 1; 2468 optional uint64 sector = 2; 2469 optional uint32 nr_sector = 3; 2470 optional int32 errors = 4; 2471 optional string rwbs = 5; 2472 optional string cmd = 6; 2473} 2474message BlockSleeprqFtraceEvent { 2475 optional uint64 dev = 1; 2476 optional uint64 sector = 2; 2477 optional uint32 nr_sector = 3; 2478 optional string rwbs = 4; 2479 optional string comm = 5; 2480} 2481message BlockSplitFtraceEvent { 2482 optional uint64 dev = 1; 2483 optional uint64 sector = 2; 2484 optional uint64 new_sector = 3; 2485 optional string rwbs = 4; 2486 optional string comm = 5; 2487} 2488message BlockTouchBufferFtraceEvent { 2489 optional uint64 dev = 1; 2490 optional uint64 sector = 2; 2491 optional uint64 size = 3; 2492} 2493message BlockUnplugFtraceEvent { 2494 optional int32 nr_rq = 1; 2495 optional string comm = 2; 2496} 2497 2498// End of protos/perfetto/trace/ftrace/block.proto 2499 2500// Begin of protos/perfetto/trace/ftrace/cgroup.proto 2501 2502message CgroupAttachTaskFtraceEvent { 2503 optional int32 dst_root = 1; 2504 optional int32 dst_id = 2; 2505 optional int32 pid = 3; 2506 optional string comm = 4; 2507 optional string cname = 5; 2508} 2509message CgroupMkdirFtraceEvent { 2510 optional int32 root = 1; 2511 optional int32 id = 2; 2512 optional string cname = 3; 2513} 2514message CgroupRemountFtraceEvent { 2515 optional int32 root = 1; 2516 optional uint32 ss_mask = 2; 2517 optional string name = 3; 2518} 2519message CgroupRmdirFtraceEvent { 2520 optional int32 root = 1; 2521 optional int32 id = 2; 2522 optional string cname = 3; 2523} 2524message CgroupTransferTasksFtraceEvent { 2525 optional int32 dst_root = 1; 2526 optional int32 dst_id = 2; 2527 optional int32 pid = 3; 2528 optional string comm = 4; 2529 optional string cname = 5; 2530} 2531message CgroupDestroyRootFtraceEvent { 2532 optional int32 root = 1; 2533 optional uint32 ss_mask = 2; 2534 optional string name = 3; 2535} 2536message CgroupReleaseFtraceEvent { 2537 optional int32 root = 1; 2538 optional int32 id = 2; 2539 optional string cname = 3; 2540} 2541message CgroupRenameFtraceEvent { 2542 optional int32 root = 1; 2543 optional int32 id = 2; 2544 optional string cname = 3; 2545} 2546message CgroupSetupRootFtraceEvent { 2547 optional int32 root = 1; 2548 optional uint32 ss_mask = 2; 2549 optional string name = 3; 2550} 2551 2552// End of protos/perfetto/trace/ftrace/cgroup.proto 2553 2554// Begin of protos/perfetto/trace/ftrace/clk.proto 2555 2556message ClkEnableFtraceEvent { 2557 optional string name = 1; 2558} 2559message ClkDisableFtraceEvent { 2560 optional string name = 1; 2561} 2562message ClkSetRateFtraceEvent { 2563 optional string name = 1; 2564 optional uint64 rate = 2; 2565} 2566 2567// End of protos/perfetto/trace/ftrace/clk.proto 2568 2569// Begin of protos/perfetto/trace/ftrace/compaction.proto 2570 2571message MmCompactionBeginFtraceEvent { 2572 optional uint64 zone_start = 1; 2573 optional uint64 migrate_pfn = 2; 2574 optional uint64 free_pfn = 3; 2575 optional uint64 zone_end = 4; 2576 optional uint32 sync = 5; 2577} 2578message MmCompactionDeferCompactionFtraceEvent { 2579 optional int32 nid = 1; 2580 optional uint32 idx = 2; 2581 optional int32 order = 3; 2582 optional uint32 considered = 4; 2583 optional uint32 defer_shift = 5; 2584 optional int32 order_failed = 6; 2585} 2586message MmCompactionDeferredFtraceEvent { 2587 optional int32 nid = 1; 2588 optional uint32 idx = 2; 2589 optional int32 order = 3; 2590 optional uint32 considered = 4; 2591 optional uint32 defer_shift = 5; 2592 optional int32 order_failed = 6; 2593} 2594message MmCompactionDeferResetFtraceEvent { 2595 optional int32 nid = 1; 2596 optional uint32 idx = 2; 2597 optional int32 order = 3; 2598 optional uint32 considered = 4; 2599 optional uint32 defer_shift = 5; 2600 optional int32 order_failed = 6; 2601} 2602message MmCompactionEndFtraceEvent { 2603 optional uint64 zone_start = 1; 2604 optional uint64 migrate_pfn = 2; 2605 optional uint64 free_pfn = 3; 2606 optional uint64 zone_end = 4; 2607 optional uint32 sync = 5; 2608 optional int32 status = 6; 2609} 2610message MmCompactionFinishedFtraceEvent { 2611 optional int32 nid = 1; 2612 optional uint32 idx = 2; 2613 optional int32 order = 3; 2614 optional int32 ret = 4; 2615} 2616message MmCompactionIsolateFreepagesFtraceEvent { 2617 optional uint64 start_pfn = 1; 2618 optional uint64 end_pfn = 2; 2619 optional uint64 nr_scanned = 3; 2620 optional uint64 nr_taken = 4; 2621} 2622message MmCompactionIsolateMigratepagesFtraceEvent { 2623 optional uint64 start_pfn = 1; 2624 optional uint64 end_pfn = 2; 2625 optional uint64 nr_scanned = 3; 2626 optional uint64 nr_taken = 4; 2627} 2628message MmCompactionKcompactdSleepFtraceEvent { 2629 optional int32 nid = 1; 2630} 2631message MmCompactionKcompactdWakeFtraceEvent { 2632 optional int32 nid = 1; 2633 optional int32 order = 2; 2634 optional uint32 classzone_idx = 3; 2635} 2636message MmCompactionMigratepagesFtraceEvent { 2637 optional uint64 nr_migrated = 1; 2638 optional uint64 nr_failed = 2; 2639} 2640message MmCompactionSuitableFtraceEvent { 2641 optional int32 nid = 1; 2642 optional uint32 idx = 2; 2643 optional int32 order = 3; 2644 optional int32 ret = 4; 2645} 2646message MmCompactionTryToCompactPagesFtraceEvent { 2647 optional int32 order = 1; 2648 optional uint32 gfp_mask = 2; 2649 optional uint32 mode = 3; 2650} 2651message MmCompactionWakeupKcompactdFtraceEvent { 2652 optional int32 nid = 1; 2653 optional int32 order = 2; 2654 optional uint32 classzone_idx = 3; 2655} 2656 2657// End of protos/perfetto/trace/ftrace/compaction.proto 2658 2659// Begin of protos/perfetto/trace/ftrace/cpuhp.proto 2660 2661message CpuhpExitFtraceEvent { 2662 optional uint32 cpu = 1; 2663 optional int32 idx = 2; 2664 optional int32 ret = 3; 2665 optional int32 state = 4; 2666} 2667message CpuhpMultiEnterFtraceEvent { 2668 optional uint32 cpu = 1; 2669 optional uint64 fun = 2; 2670 optional int32 idx = 3; 2671 optional int32 target = 4; 2672} 2673message CpuhpEnterFtraceEvent { 2674 optional uint32 cpu = 1; 2675 optional uint64 fun = 2; 2676 optional int32 idx = 3; 2677 optional int32 target = 4; 2678} 2679message CpuhpLatencyFtraceEvent { 2680 optional uint32 cpu = 1; 2681 optional int32 ret = 2; 2682 optional uint32 state = 3; 2683 optional uint64 time = 4; 2684} 2685 2686// End of protos/perfetto/trace/ftrace/cpuhp.proto 2687 2688// Begin of protos/perfetto/trace/ftrace/ext4.proto 2689 2690message Ext4DaWriteBeginFtraceEvent { 2691 optional uint64 dev = 1; 2692 optional uint64 ino = 2; 2693 optional int64 pos = 3; 2694 optional uint32 len = 4; 2695 optional uint32 flags = 5; 2696} 2697message Ext4DaWriteEndFtraceEvent { 2698 optional uint64 dev = 1; 2699 optional uint64 ino = 2; 2700 optional int64 pos = 3; 2701 optional uint32 len = 4; 2702 optional uint32 copied = 5; 2703} 2704message Ext4SyncFileEnterFtraceEvent { 2705 optional uint64 dev = 1; 2706 optional uint64 ino = 2; 2707 optional uint64 parent = 3; 2708 optional int32 datasync = 4; 2709} 2710message Ext4SyncFileExitFtraceEvent { 2711 optional uint64 dev = 1; 2712 optional uint64 ino = 2; 2713 optional int32 ret = 3; 2714} 2715message Ext4AllocDaBlocksFtraceEvent { 2716 optional uint64 dev = 1; 2717 optional uint64 ino = 2; 2718 optional uint32 data_blocks = 3; 2719 optional uint32 meta_blocks = 4; 2720} 2721message Ext4AllocateBlocksFtraceEvent { 2722 optional uint64 dev = 1; 2723 optional uint64 ino = 2; 2724 optional uint64 block = 3; 2725 optional uint32 len = 4; 2726 optional uint32 logical = 5; 2727 optional uint32 lleft = 6; 2728 optional uint32 lright = 7; 2729 optional uint64 goal = 8; 2730 optional uint64 pleft = 9; 2731 optional uint64 pright = 10; 2732 optional uint32 flags = 11; 2733} 2734message Ext4AllocateInodeFtraceEvent { 2735 optional uint64 dev = 1; 2736 optional uint64 ino = 2; 2737 optional uint64 dir = 3; 2738 optional uint32 mode = 4; 2739} 2740message Ext4BeginOrderedTruncateFtraceEvent { 2741 optional uint64 dev = 1; 2742 optional uint64 ino = 2; 2743 optional int64 new_size = 3; 2744} 2745message Ext4CollapseRangeFtraceEvent { 2746 optional uint64 dev = 1; 2747 optional uint64 ino = 2; 2748 optional int64 offset = 3; 2749 optional int64 len = 4; 2750} 2751message Ext4DaReleaseSpaceFtraceEvent { 2752 optional uint64 dev = 1; 2753 optional uint64 ino = 2; 2754 optional uint64 i_blocks = 3; 2755 optional int32 freed_blocks = 4; 2756 optional int32 reserved_data_blocks = 5; 2757 optional int32 reserved_meta_blocks = 6; 2758 optional int32 allocated_meta_blocks = 7; 2759 optional uint32 mode = 8; 2760} 2761message Ext4DaReserveSpaceFtraceEvent { 2762 optional uint64 dev = 1; 2763 optional uint64 ino = 2; 2764 optional uint64 i_blocks = 3; 2765 optional int32 reserved_data_blocks = 4; 2766 optional int32 reserved_meta_blocks = 5; 2767 optional uint32 mode = 6; 2768 optional int32 md_needed = 7; 2769} 2770message Ext4DaUpdateReserveSpaceFtraceEvent { 2771 optional uint64 dev = 1; 2772 optional uint64 ino = 2; 2773 optional uint64 i_blocks = 3; 2774 optional int32 used_blocks = 4; 2775 optional int32 reserved_data_blocks = 5; 2776 optional int32 reserved_meta_blocks = 6; 2777 optional int32 allocated_meta_blocks = 7; 2778 optional int32 quota_claim = 8; 2779 optional uint32 mode = 9; 2780} 2781message Ext4DaWritePagesFtraceEvent { 2782 optional uint64 dev = 1; 2783 optional uint64 ino = 2; 2784 optional uint64 first_page = 3; 2785 optional int64 nr_to_write = 4; 2786 optional int32 sync_mode = 5; 2787 optional uint64 b_blocknr = 6; 2788 optional uint32 b_size = 7; 2789 optional uint32 b_state = 8; 2790 optional int32 io_done = 9; 2791 optional int32 pages_written = 10; 2792} 2793message Ext4DaWritePagesExtentFtraceEvent { 2794 optional uint64 dev = 1; 2795 optional uint64 ino = 2; 2796 optional uint64 lblk = 3; 2797 optional uint32 len = 4; 2798 optional uint32 flags = 5; 2799} 2800message Ext4DirectIOEnterFtraceEvent { 2801 optional uint64 dev = 1; 2802 optional uint64 ino = 2; 2803 optional int64 pos = 3; 2804 optional uint64 len = 4; 2805 optional int32 rw = 5; 2806} 2807message Ext4DirectIOExitFtraceEvent { 2808 optional uint64 dev = 1; 2809 optional uint64 ino = 2; 2810 optional int64 pos = 3; 2811 optional uint64 len = 4; 2812 optional int32 rw = 5; 2813 optional int32 ret = 6; 2814} 2815message Ext4DiscardBlocksFtraceEvent { 2816 optional uint64 dev = 1; 2817 optional uint64 blk = 2; 2818 optional uint64 count = 3; 2819} 2820message Ext4DiscardPreallocationsFtraceEvent { 2821 optional uint64 dev = 1; 2822 optional uint64 ino = 2; 2823} 2824message Ext4DropInodeFtraceEvent { 2825 optional uint64 dev = 1; 2826 optional uint64 ino = 2; 2827 optional int32 drop = 3; 2828} 2829message Ext4EsCacheExtentFtraceEvent { 2830 optional uint64 dev = 1; 2831 optional uint64 ino = 2; 2832 optional uint32 lblk = 3; 2833 optional uint32 len = 4; 2834 optional uint64 pblk = 5; 2835 optional uint32 status = 6; 2836} 2837message Ext4EsFindDelayedExtentRangeEnterFtraceEvent { 2838 optional uint64 dev = 1; 2839 optional uint64 ino = 2; 2840 optional uint32 lblk = 3; 2841} 2842message Ext4EsFindDelayedExtentRangeExitFtraceEvent { 2843 optional uint64 dev = 1; 2844 optional uint64 ino = 2; 2845 optional uint32 lblk = 3; 2846 optional uint32 len = 4; 2847 optional uint64 pblk = 5; 2848 optional uint64 status = 6; 2849} 2850message Ext4EsInsertExtentFtraceEvent { 2851 optional uint64 dev = 1; 2852 optional uint64 ino = 2; 2853 optional uint32 lblk = 3; 2854 optional uint32 len = 4; 2855 optional uint64 pblk = 5; 2856 optional uint64 status = 6; 2857} 2858message Ext4EsLookupExtentEnterFtraceEvent { 2859 optional uint64 dev = 1; 2860 optional uint64 ino = 2; 2861 optional uint32 lblk = 3; 2862} 2863message Ext4EsLookupExtentExitFtraceEvent { 2864 optional uint64 dev = 1; 2865 optional uint64 ino = 2; 2866 optional uint32 lblk = 3; 2867 optional uint32 len = 4; 2868 optional uint64 pblk = 5; 2869 optional uint64 status = 6; 2870 optional int32 found = 7; 2871} 2872message Ext4EsRemoveExtentFtraceEvent { 2873 optional uint64 dev = 1; 2874 optional uint64 ino = 2; 2875 optional int64 lblk = 3; 2876 optional int64 len = 4; 2877} 2878message Ext4EsShrinkFtraceEvent { 2879 optional uint64 dev = 1; 2880 optional int32 nr_shrunk = 2; 2881 optional uint64 scan_time = 3; 2882 optional int32 nr_skipped = 4; 2883 optional int32 retried = 5; 2884} 2885message Ext4EsShrinkCountFtraceEvent { 2886 optional uint64 dev = 1; 2887 optional int32 nr_to_scan = 2; 2888 optional int32 cache_cnt = 3; 2889} 2890message Ext4EsShrinkScanEnterFtraceEvent { 2891 optional uint64 dev = 1; 2892 optional int32 nr_to_scan = 2; 2893 optional int32 cache_cnt = 3; 2894} 2895message Ext4EsShrinkScanExitFtraceEvent { 2896 optional uint64 dev = 1; 2897 optional int32 nr_shrunk = 2; 2898 optional int32 cache_cnt = 3; 2899} 2900message Ext4EvictInodeFtraceEvent { 2901 optional uint64 dev = 1; 2902 optional uint64 ino = 2; 2903 optional int32 nlink = 3; 2904} 2905message Ext4ExtConvertToInitializedEnterFtraceEvent { 2906 optional uint64 dev = 1; 2907 optional uint64 ino = 2; 2908 optional uint32 m_lblk = 3; 2909 optional uint32 m_len = 4; 2910 optional uint32 u_lblk = 5; 2911 optional uint32 u_len = 6; 2912 optional uint64 u_pblk = 7; 2913} 2914message Ext4ExtConvertToInitializedFastpathFtraceEvent { 2915 optional uint64 dev = 1; 2916 optional uint64 ino = 2; 2917 optional uint32 m_lblk = 3; 2918 optional uint32 m_len = 4; 2919 optional uint32 u_lblk = 5; 2920 optional uint32 u_len = 6; 2921 optional uint64 u_pblk = 7; 2922 optional uint32 i_lblk = 8; 2923 optional uint32 i_len = 9; 2924 optional uint64 i_pblk = 10; 2925} 2926message Ext4ExtHandleUnwrittenExtentsFtraceEvent { 2927 optional uint64 dev = 1; 2928 optional uint64 ino = 2; 2929 optional int32 flags = 3; 2930 optional uint32 lblk = 4; 2931 optional uint64 pblk = 5; 2932 optional uint32 len = 6; 2933 optional uint32 allocated = 7; 2934 optional uint64 newblk = 8; 2935} 2936message Ext4ExtInCacheFtraceEvent { 2937 optional uint64 dev = 1; 2938 optional uint64 ino = 2; 2939 optional uint32 lblk = 3; 2940 optional int32 ret = 4; 2941} 2942message Ext4ExtLoadExtentFtraceEvent { 2943 optional uint64 dev = 1; 2944 optional uint64 ino = 2; 2945 optional uint64 pblk = 3; 2946 optional uint32 lblk = 4; 2947} 2948message Ext4ExtMapBlocksEnterFtraceEvent { 2949 optional uint64 dev = 1; 2950 optional uint64 ino = 2; 2951 optional uint32 lblk = 3; 2952 optional uint32 len = 4; 2953 optional uint32 flags = 5; 2954} 2955message Ext4ExtMapBlocksExitFtraceEvent { 2956 optional uint64 dev = 1; 2957 optional uint64 ino = 2; 2958 optional uint32 flags = 3; 2959 optional uint64 pblk = 4; 2960 optional uint32 lblk = 5; 2961 optional uint32 len = 6; 2962 optional uint32 mflags = 7; 2963 optional int32 ret = 8; 2964} 2965message Ext4ExtPutInCacheFtraceEvent { 2966 optional uint64 dev = 1; 2967 optional uint64 ino = 2; 2968 optional uint32 lblk = 3; 2969 optional uint32 len = 4; 2970 optional uint64 start = 5; 2971} 2972message Ext4ExtRemoveSpaceFtraceEvent { 2973 optional uint64 dev = 1; 2974 optional uint64 ino = 2; 2975 optional uint32 start = 3; 2976 optional uint32 end = 4; 2977 optional int32 depth = 5; 2978} 2979message Ext4ExtRemoveSpaceDoneFtraceEvent { 2980 optional uint64 dev = 1; 2981 optional uint64 ino = 2; 2982 optional uint32 start = 3; 2983 optional uint32 end = 4; 2984 optional int32 depth = 5; 2985 optional int64 partial = 6; 2986 optional uint32 eh_entries = 7; 2987} 2988message Ext4ExtRmIdxFtraceEvent { 2989 optional uint64 dev = 1; 2990 optional uint64 ino = 2; 2991 optional uint64 pblk = 3; 2992} 2993message Ext4ExtRmLeafFtraceEvent { 2994 optional uint64 dev = 1; 2995 optional uint64 ino = 2; 2996 optional int64 partial = 3; 2997 optional uint32 start = 4; 2998 optional uint32 ee_lblk = 5; 2999 optional uint64 ee_pblk = 6; 3000 optional int32 ee_len = 7; 3001} 3002message Ext4ExtShowExtentFtraceEvent { 3003 optional uint64 dev = 1; 3004 optional uint64 ino = 2; 3005 optional uint64 pblk = 3; 3006 optional uint32 lblk = 4; 3007 optional uint32 len = 5; 3008} 3009message Ext4FallocateEnterFtraceEvent { 3010 optional uint64 dev = 1; 3011 optional uint64 ino = 2; 3012 optional int64 offset = 3; 3013 optional int64 len = 4; 3014 optional int32 mode = 5; 3015 optional int64 pos = 6; 3016} 3017message Ext4FallocateExitFtraceEvent { 3018 optional uint64 dev = 1; 3019 optional uint64 ino = 2; 3020 optional int64 pos = 3; 3021 optional uint32 blocks = 4; 3022 optional int32 ret = 5; 3023} 3024message Ext4FindDelallocRangeFtraceEvent { 3025 optional uint64 dev = 1; 3026 optional uint64 ino = 2; 3027 optional uint32 from = 3; 3028 optional uint32 to = 4; 3029 optional int32 reverse = 5; 3030 optional int32 found = 6; 3031 optional uint32 found_blk = 7; 3032} 3033message Ext4ForgetFtraceEvent { 3034 optional uint64 dev = 1; 3035 optional uint64 ino = 2; 3036 optional uint64 block = 3; 3037 optional int32 is_metadata = 4; 3038 optional uint32 mode = 5; 3039} 3040message Ext4FreeBlocksFtraceEvent { 3041 optional uint64 dev = 1; 3042 optional uint64 ino = 2; 3043 optional uint64 block = 3; 3044 optional uint64 count = 4; 3045 optional int32 flags = 5; 3046 optional uint32 mode = 6; 3047} 3048message Ext4FreeInodeFtraceEvent { 3049 optional uint64 dev = 1; 3050 optional uint64 ino = 2; 3051 optional uint32 uid = 3; 3052 optional uint32 gid = 4; 3053 optional uint64 blocks = 5; 3054 optional uint32 mode = 6; 3055} 3056message Ext4GetImpliedClusterAllocExitFtraceEvent { 3057 optional uint64 dev = 1; 3058 optional uint32 flags = 2; 3059 optional uint32 lblk = 3; 3060 optional uint64 pblk = 4; 3061 optional uint32 len = 5; 3062 optional int32 ret = 6; 3063} 3064message Ext4GetReservedClusterAllocFtraceEvent { 3065 optional uint64 dev = 1; 3066 optional uint64 ino = 2; 3067 optional uint32 lblk = 3; 3068 optional uint32 len = 4; 3069} 3070message Ext4IndMapBlocksEnterFtraceEvent { 3071 optional uint64 dev = 1; 3072 optional uint64 ino = 2; 3073 optional uint32 lblk = 3; 3074 optional uint32 len = 4; 3075 optional uint32 flags = 5; 3076} 3077message Ext4IndMapBlocksExitFtraceEvent { 3078 optional uint64 dev = 1; 3079 optional uint64 ino = 2; 3080 optional uint32 flags = 3; 3081 optional uint64 pblk = 4; 3082 optional uint32 lblk = 5; 3083 optional uint32 len = 6; 3084 optional uint32 mflags = 7; 3085 optional int32 ret = 8; 3086} 3087message Ext4InsertRangeFtraceEvent { 3088 optional uint64 dev = 1; 3089 optional uint64 ino = 2; 3090 optional int64 offset = 3; 3091 optional int64 len = 4; 3092} 3093message Ext4InvalidatepageFtraceEvent { 3094 optional uint64 dev = 1; 3095 optional uint64 ino = 2; 3096 optional uint64 index = 3; 3097 optional uint64 offset = 4; 3098 optional uint32 length = 5; 3099} 3100message Ext4JournalStartFtraceEvent { 3101 optional uint64 dev = 1; 3102 optional uint64 ip = 2; 3103 optional int32 blocks = 3; 3104 optional int32 rsv_blocks = 4; 3105 optional int32 nblocks = 5; 3106} 3107message Ext4JournalStartReservedFtraceEvent { 3108 optional uint64 dev = 1; 3109 optional uint64 ip = 2; 3110 optional int32 blocks = 3; 3111} 3112message Ext4JournalledInvalidatepageFtraceEvent { 3113 optional uint64 dev = 1; 3114 optional uint64 ino = 2; 3115 optional uint64 index = 3; 3116 optional uint64 offset = 4; 3117 optional uint32 length = 5; 3118} 3119message Ext4JournalledWriteEndFtraceEvent { 3120 optional uint64 dev = 1; 3121 optional uint64 ino = 2; 3122 optional int64 pos = 3; 3123 optional uint32 len = 4; 3124 optional uint32 copied = 5; 3125} 3126message Ext4LoadInodeFtraceEvent { 3127 optional uint64 dev = 1; 3128 optional uint64 ino = 2; 3129} 3130message Ext4LoadInodeBitmapFtraceEvent { 3131 optional uint64 dev = 1; 3132 optional uint32 group = 2; 3133} 3134message Ext4MarkInodeDirtyFtraceEvent { 3135 optional uint64 dev = 1; 3136 optional uint64 ino = 2; 3137 optional uint64 ip = 3; 3138} 3139message Ext4MbBitmapLoadFtraceEvent { 3140 optional uint64 dev = 1; 3141 optional uint32 group = 2; 3142} 3143message Ext4MbBuddyBitmapLoadFtraceEvent { 3144 optional uint64 dev = 1; 3145 optional uint32 group = 2; 3146} 3147message Ext4MbDiscardPreallocationsFtraceEvent { 3148 optional uint64 dev = 1; 3149 optional int32 needed = 2; 3150} 3151message Ext4MbNewGroupPaFtraceEvent { 3152 optional uint64 dev = 1; 3153 optional uint64 ino = 2; 3154 optional uint64 pa_pstart = 3; 3155 optional uint64 pa_lstart = 4; 3156 optional uint32 pa_len = 5; 3157} 3158message Ext4MbNewInodePaFtraceEvent { 3159 optional uint64 dev = 1; 3160 optional uint64 ino = 2; 3161 optional uint64 pa_pstart = 3; 3162 optional uint64 pa_lstart = 4; 3163 optional uint32 pa_len = 5; 3164} 3165message Ext4MbReleaseGroupPaFtraceEvent { 3166 optional uint64 dev = 1; 3167 optional uint64 pa_pstart = 2; 3168 optional uint32 pa_len = 3; 3169} 3170message Ext4MbReleaseInodePaFtraceEvent { 3171 optional uint64 dev = 1; 3172 optional uint64 ino = 2; 3173 optional uint64 block = 3; 3174 optional uint32 count = 4; 3175} 3176message Ext4MballocAllocFtraceEvent { 3177 optional uint64 dev = 1; 3178 optional uint64 ino = 2; 3179 optional uint32 orig_logical = 3; 3180 optional int32 orig_start = 4; 3181 optional uint32 orig_group = 5; 3182 optional int32 orig_len = 6; 3183 optional uint32 goal_logical = 7; 3184 optional int32 goal_start = 8; 3185 optional uint32 goal_group = 9; 3186 optional int32 goal_len = 10; 3187 optional uint32 result_logical = 11; 3188 optional int32 result_start = 12; 3189 optional uint32 result_group = 13; 3190 optional int32 result_len = 14; 3191 optional uint32 found = 15; 3192 optional uint32 groups = 16; 3193 optional uint32 buddy = 17; 3194 optional uint32 flags = 18; 3195 optional uint32 tail = 19; 3196 optional uint32 cr = 20; 3197} 3198message Ext4MballocDiscardFtraceEvent { 3199 optional uint64 dev = 1; 3200 optional uint64 ino = 2; 3201 optional int32 result_start = 3; 3202 optional uint32 result_group = 4; 3203 optional int32 result_len = 5; 3204} 3205message Ext4MballocFreeFtraceEvent { 3206 optional uint64 dev = 1; 3207 optional uint64 ino = 2; 3208 optional int32 result_start = 3; 3209 optional uint32 result_group = 4; 3210 optional int32 result_len = 5; 3211} 3212message Ext4MballocPreallocFtraceEvent { 3213 optional uint64 dev = 1; 3214 optional uint64 ino = 2; 3215 optional uint32 orig_logical = 3; 3216 optional int32 orig_start = 4; 3217 optional uint32 orig_group = 5; 3218 optional int32 orig_len = 6; 3219 optional uint32 result_logical = 7; 3220 optional int32 result_start = 8; 3221 optional uint32 result_group = 9; 3222 optional int32 result_len = 10; 3223} 3224message Ext4OtherInodeUpdateTimeFtraceEvent { 3225 optional uint64 dev = 1; 3226 optional uint64 ino = 2; 3227 optional uint64 orig_ino = 3; 3228 optional uint32 uid = 4; 3229 optional uint32 gid = 5; 3230 optional uint32 mode = 6; 3231} 3232message Ext4PunchHoleFtraceEvent { 3233 optional uint64 dev = 1; 3234 optional uint64 ino = 2; 3235 optional int64 offset = 3; 3236 optional int64 len = 4; 3237 optional int32 mode = 5; 3238} 3239message Ext4ReadBlockBitmapLoadFtraceEvent { 3240 optional uint64 dev = 1; 3241 optional uint32 group = 2; 3242} 3243message Ext4ReadpageFtraceEvent { 3244 optional uint64 dev = 1; 3245 optional uint64 ino = 2; 3246 optional uint64 index = 3; 3247} 3248message Ext4ReleasepageFtraceEvent { 3249 optional uint64 dev = 1; 3250 optional uint64 ino = 2; 3251 optional uint64 index = 3; 3252} 3253message Ext4RemoveBlocksFtraceEvent { 3254 optional uint64 dev = 1; 3255 optional uint64 ino = 2; 3256 optional uint32 from = 3; 3257 optional uint32 to = 4; 3258 optional int64 partial = 5; 3259 optional uint64 ee_pblk = 6; 3260 optional uint32 ee_lblk = 7; 3261 optional uint32 ee_len = 8; 3262} 3263message Ext4RequestBlocksFtraceEvent { 3264 optional uint64 dev = 1; 3265 optional uint64 ino = 2; 3266 optional uint32 len = 3; 3267 optional uint32 logical = 4; 3268 optional uint32 lleft = 5; 3269 optional uint32 lright = 6; 3270 optional uint64 goal = 7; 3271 optional uint64 pleft = 8; 3272 optional uint64 pright = 9; 3273 optional uint32 flags = 10; 3274} 3275message Ext4RequestInodeFtraceEvent { 3276 optional uint64 dev = 1; 3277 optional uint64 dir = 2; 3278 optional uint32 mode = 3; 3279} 3280message Ext4SyncFsFtraceEvent { 3281 optional uint64 dev = 1; 3282 optional int32 wait = 2; 3283} 3284message Ext4TrimAllFreeFtraceEvent { 3285 optional int32 dev_major = 1; 3286 optional int32 dev_minor = 2; 3287 optional uint32 group = 3; 3288 optional int32 start = 4; 3289 optional int32 len = 5; 3290} 3291message Ext4TrimExtentFtraceEvent { 3292 optional int32 dev_major = 1; 3293 optional int32 dev_minor = 2; 3294 optional uint32 group = 3; 3295 optional int32 start = 4; 3296 optional int32 len = 5; 3297} 3298message Ext4TruncateEnterFtraceEvent { 3299 optional uint64 dev = 1; 3300 optional uint64 ino = 2; 3301 optional uint64 blocks = 3; 3302} 3303message Ext4TruncateExitFtraceEvent { 3304 optional uint64 dev = 1; 3305 optional uint64 ino = 2; 3306 optional uint64 blocks = 3; 3307} 3308message Ext4UnlinkEnterFtraceEvent { 3309 optional uint64 dev = 1; 3310 optional uint64 ino = 2; 3311 optional uint64 parent = 3; 3312 optional int64 size = 4; 3313} 3314message Ext4UnlinkExitFtraceEvent { 3315 optional uint64 dev = 1; 3316 optional uint64 ino = 2; 3317 optional int32 ret = 3; 3318} 3319message Ext4WriteBeginFtraceEvent { 3320 optional uint64 dev = 1; 3321 optional uint64 ino = 2; 3322 optional int64 pos = 3; 3323 optional uint32 len = 4; 3324 optional uint32 flags = 5; 3325} 3326message Ext4WriteEndFtraceEvent { 3327 optional uint64 dev = 1; 3328 optional uint64 ino = 2; 3329 optional int64 pos = 3; 3330 optional uint32 len = 4; 3331 optional uint32 copied = 5; 3332} 3333message Ext4WritepageFtraceEvent { 3334 optional uint64 dev = 1; 3335 optional uint64 ino = 2; 3336 optional uint64 index = 3; 3337} 3338message Ext4WritepagesFtraceEvent { 3339 optional uint64 dev = 1; 3340 optional uint64 ino = 2; 3341 optional int64 nr_to_write = 3; 3342 optional int64 pages_skipped = 4; 3343 optional int64 range_start = 5; 3344 optional int64 range_end = 6; 3345 optional uint64 writeback_index = 7; 3346 optional int32 sync_mode = 8; 3347 optional uint32 for_kupdate = 9; 3348 optional uint32 range_cyclic = 10; 3349} 3350message Ext4WritepagesResultFtraceEvent { 3351 optional uint64 dev = 1; 3352 optional uint64 ino = 2; 3353 optional int32 ret = 3; 3354 optional int32 pages_written = 4; 3355 optional int64 pages_skipped = 5; 3356 optional uint64 writeback_index = 6; 3357 optional int32 sync_mode = 7; 3358} 3359message Ext4ZeroRangeFtraceEvent { 3360 optional uint64 dev = 1; 3361 optional uint64 ino = 2; 3362 optional int64 offset = 3; 3363 optional int64 len = 4; 3364 optional int32 mode = 5; 3365} 3366 3367// End of protos/perfetto/trace/ftrace/ext4.proto 3368 3369// Begin of protos/perfetto/trace/ftrace/f2fs.proto 3370 3371message F2fsDoSubmitBioFtraceEvent { 3372 optional uint64 dev = 1; 3373 optional int32 btype = 2; 3374 optional uint32 sync = 3; 3375 optional uint64 sector = 4; 3376 optional uint32 size = 5; 3377} 3378message F2fsEvictInodeFtraceEvent { 3379 optional uint64 dev = 1; 3380 optional uint64 ino = 2; 3381 optional uint64 pino = 3; 3382 optional uint32 mode = 4; 3383 optional int64 size = 5; 3384 optional uint32 nlink = 6; 3385 optional uint64 blocks = 7; 3386 optional uint32 advise = 8; 3387} 3388message F2fsFallocateFtraceEvent { 3389 optional uint64 dev = 1; 3390 optional uint64 ino = 2; 3391 optional int32 mode = 3; 3392 optional int64 offset = 4; 3393 optional int64 len = 5; 3394 optional int64 size = 6; 3395 optional uint64 blocks = 7; 3396 optional int32 ret = 8; 3397} 3398message F2fsGetDataBlockFtraceEvent { 3399 optional uint64 dev = 1; 3400 optional uint64 ino = 2; 3401 optional uint64 iblock = 3; 3402 optional uint64 bh_start = 4; 3403 optional uint64 bh_size = 5; 3404 optional int32 ret = 6; 3405} 3406message F2fsGetVictimFtraceEvent { 3407 optional uint64 dev = 1; 3408 optional int32 type = 2; 3409 optional int32 gc_type = 3; 3410 optional int32 alloc_mode = 4; 3411 optional int32 gc_mode = 5; 3412 optional uint32 victim = 6; 3413 optional uint32 ofs_unit = 7; 3414 optional uint32 pre_victim = 8; 3415 optional uint32 prefree = 9; 3416 optional uint32 free = 10; 3417} 3418message F2fsIgetFtraceEvent { 3419 optional uint64 dev = 1; 3420 optional uint64 ino = 2; 3421 optional uint64 pino = 3; 3422 optional uint32 mode = 4; 3423 optional int64 size = 5; 3424 optional uint32 nlink = 6; 3425 optional uint64 blocks = 7; 3426 optional uint32 advise = 8; 3427} 3428message F2fsIgetExitFtraceEvent { 3429 optional uint64 dev = 1; 3430 optional uint64 ino = 2; 3431 optional int32 ret = 3; 3432} 3433message F2fsNewInodeFtraceEvent { 3434 optional uint64 dev = 1; 3435 optional uint64 ino = 2; 3436 optional int32 ret = 3; 3437} 3438message F2fsReadpageFtraceEvent { 3439 optional uint64 dev = 1; 3440 optional uint64 ino = 2; 3441 optional uint64 index = 3; 3442 optional uint64 blkaddr = 4; 3443 optional int32 type = 5; 3444} 3445message F2fsReserveNewBlockFtraceEvent { 3446 optional uint64 dev = 1; 3447 optional uint32 nid = 2; 3448 optional uint32 ofs_in_node = 3; 3449} 3450message F2fsSetPageDirtyFtraceEvent { 3451 optional uint64 dev = 1; 3452 optional uint64 ino = 2; 3453 optional int32 type = 3; 3454 optional int32 dir = 4; 3455 optional uint64 index = 5; 3456 optional int32 dirty = 6; 3457} 3458message F2fsSubmitWritePageFtraceEvent { 3459 optional uint64 dev = 1; 3460 optional uint64 ino = 2; 3461 optional int32 type = 3; 3462 optional uint64 index = 4; 3463 optional uint32 block = 5; 3464} 3465message F2fsSyncFileEnterFtraceEvent { 3466 optional uint64 dev = 1; 3467 optional uint64 ino = 2; 3468 optional uint64 pino = 3; 3469 optional uint32 mode = 4; 3470 optional int64 size = 5; 3471 optional uint32 nlink = 6; 3472 optional uint64 blocks = 7; 3473 optional uint32 advise = 8; 3474} 3475message F2fsSyncFileExitFtraceEvent { 3476 optional uint64 dev = 1; 3477 optional uint64 ino = 2; 3478 optional uint32 need_cp = 3; 3479 optional int32 datasync = 4; 3480 optional int32 ret = 5; 3481} 3482message F2fsSyncFsFtraceEvent { 3483 optional uint64 dev = 1; 3484 optional int32 dirty = 2; 3485 optional int32 wait = 3; 3486} 3487message F2fsTruncateFtraceEvent { 3488 optional uint64 dev = 1; 3489 optional uint64 ino = 2; 3490 optional uint64 pino = 3; 3491 optional uint32 mode = 4; 3492 optional int64 size = 5; 3493 optional uint32 nlink = 6; 3494 optional uint64 blocks = 7; 3495 optional uint32 advise = 8; 3496} 3497message F2fsTruncateBlocksEnterFtraceEvent { 3498 optional uint64 dev = 1; 3499 optional uint64 ino = 2; 3500 optional int64 size = 3; 3501 optional uint64 blocks = 4; 3502 optional uint64 from = 5; 3503} 3504message F2fsTruncateBlocksExitFtraceEvent { 3505 optional uint64 dev = 1; 3506 optional uint64 ino = 2; 3507 optional int32 ret = 3; 3508} 3509message F2fsTruncateDataBlocksRangeFtraceEvent { 3510 optional uint64 dev = 1; 3511 optional uint64 ino = 2; 3512 optional uint32 nid = 3; 3513 optional uint32 ofs = 4; 3514 optional int32 free = 5; 3515} 3516message F2fsTruncateInodeBlocksEnterFtraceEvent { 3517 optional uint64 dev = 1; 3518 optional uint64 ino = 2; 3519 optional int64 size = 3; 3520 optional uint64 blocks = 4; 3521 optional uint64 from = 5; 3522} 3523message F2fsTruncateInodeBlocksExitFtraceEvent { 3524 optional uint64 dev = 1; 3525 optional uint64 ino = 2; 3526 optional int32 ret = 3; 3527} 3528message F2fsTruncateNodeFtraceEvent { 3529 optional uint64 dev = 1; 3530 optional uint64 ino = 2; 3531 optional uint32 nid = 3; 3532 optional uint32 blk_addr = 4; 3533} 3534message F2fsTruncateNodesEnterFtraceEvent { 3535 optional uint64 dev = 1; 3536 optional uint64 ino = 2; 3537 optional uint32 nid = 3; 3538 optional uint32 blk_addr = 4; 3539} 3540message F2fsTruncateNodesExitFtraceEvent { 3541 optional uint64 dev = 1; 3542 optional uint64 ino = 2; 3543 optional int32 ret = 3; 3544} 3545message F2fsTruncatePartialNodesFtraceEvent { 3546 optional uint64 dev = 1; 3547 optional uint64 ino = 2; 3548 optional uint32 nid = 3; 3549 optional int32 depth = 4; 3550 optional int32 err = 5; 3551} 3552message F2fsUnlinkEnterFtraceEvent { 3553 optional uint64 dev = 1; 3554 optional uint64 ino = 2; 3555 optional int64 size = 3; 3556 optional uint64 blocks = 4; 3557 optional string name = 5; 3558} 3559message F2fsUnlinkExitFtraceEvent { 3560 optional uint64 dev = 1; 3561 optional uint64 ino = 2; 3562 optional int32 ret = 3; 3563} 3564message F2fsVmPageMkwriteFtraceEvent { 3565 optional uint64 dev = 1; 3566 optional uint64 ino = 2; 3567 optional int32 type = 3; 3568 optional int32 dir = 4; 3569 optional uint64 index = 5; 3570 optional int32 dirty = 6; 3571} 3572message F2fsWriteBeginFtraceEvent { 3573 optional uint64 dev = 1; 3574 optional uint64 ino = 2; 3575 optional int64 pos = 3; 3576 optional uint32 len = 4; 3577 optional uint32 flags = 5; 3578} 3579message F2fsWriteCheckpointFtraceEvent { 3580 optional uint64 dev = 1; 3581 optional uint32 is_umount = 2; 3582 optional string msg = 3; 3583} 3584message F2fsWriteEndFtraceEvent { 3585 optional uint64 dev = 1; 3586 optional uint64 ino = 2; 3587 optional int64 pos = 3; 3588 optional uint32 len = 4; 3589 optional uint32 copied = 5; 3590} 3591 3592// End of protos/perfetto/trace/ftrace/f2fs.proto 3593 3594// Begin of protos/perfetto/trace/ftrace/fence.proto 3595 3596message FenceInitFtraceEvent { 3597 optional uint32 context = 1; 3598 optional string driver = 2; 3599 optional uint32 seqno = 3; 3600 optional string timeline = 4; 3601} 3602message FenceDestroyFtraceEvent { 3603 optional uint32 context = 1; 3604 optional string driver = 2; 3605 optional uint32 seqno = 3; 3606 optional string timeline = 4; 3607} 3608message FenceEnableSignalFtraceEvent { 3609 optional uint32 context = 1; 3610 optional string driver = 2; 3611 optional uint32 seqno = 3; 3612 optional string timeline = 4; 3613} 3614message FenceSignaledFtraceEvent { 3615 optional uint32 context = 1; 3616 optional string driver = 2; 3617 optional uint32 seqno = 3; 3618 optional string timeline = 4; 3619} 3620 3621// End of protos/perfetto/trace/ftrace/fence.proto 3622 3623// Begin of protos/perfetto/trace/ftrace/filemap.proto 3624 3625message MmFilemapAddToPageCacheFtraceEvent { 3626 optional uint64 pfn = 1; 3627 optional uint64 i_ino = 2; 3628 optional uint64 index = 3; 3629 optional uint64 s_dev = 4; 3630 optional uint64 page = 5; 3631} 3632message MmFilemapDeleteFromPageCacheFtraceEvent { 3633 optional uint64 pfn = 1; 3634 optional uint64 i_ino = 2; 3635 optional uint64 index = 3; 3636 optional uint64 s_dev = 4; 3637 optional uint64 page = 5; 3638} 3639 3640// End of protos/perfetto/trace/ftrace/filemap.proto 3641 3642// Begin of protos/perfetto/trace/ftrace/ftrace.proto 3643 3644message PrintFtraceEvent { 3645 optional uint64 ip = 1; 3646 optional string buf = 2; 3647} 3648 3649// End of protos/perfetto/trace/ftrace/ftrace.proto 3650 3651// Begin of protos/perfetto/trace/ftrace/generic.proto 3652 3653// This generic proto is used to output events in the trace 3654// when a specific proto for that event does not exist. 3655message GenericFtraceEvent { 3656 message Field { 3657 optional string name = 1; 3658 oneof value { 3659 string str_value = 3; 3660 int64 int_value = 4; 3661 uint64 uint_value = 5; 3662 } 3663 } 3664 3665 optional string event_name = 1; 3666 repeated Field field = 2; 3667} 3668 3669// End of protos/perfetto/trace/ftrace/generic.proto 3670 3671// Begin of protos/perfetto/trace/ftrace/gpu_mem.proto 3672 3673message GpuMemTotalFtraceEvent { 3674 optional uint32 gpu_id = 1; 3675 optional uint32 pid = 2; 3676 optional uint64 size = 3; 3677} 3678 3679// End of protos/perfetto/trace/ftrace/gpu_mem.proto 3680 3681// Begin of protos/perfetto/trace/ftrace/i2c.proto 3682 3683message I2cReadFtraceEvent { 3684 optional int32 adapter_nr = 1; 3685 optional uint32 msg_nr = 2; 3686 optional uint32 addr = 3; 3687 optional uint32 flags = 4; 3688 optional uint32 len = 5; 3689} 3690message I2cWriteFtraceEvent { 3691 optional int32 adapter_nr = 1; 3692 optional uint32 msg_nr = 2; 3693 optional uint32 addr = 3; 3694 optional uint32 flags = 4; 3695 optional uint32 len = 5; 3696 optional uint32 buf = 6; 3697} 3698message I2cResultFtraceEvent { 3699 optional int32 adapter_nr = 1; 3700 optional uint32 nr_msgs = 2; 3701 optional int32 ret = 3; 3702} 3703message I2cReplyFtraceEvent { 3704 optional int32 adapter_nr = 1; 3705 optional uint32 msg_nr = 2; 3706 optional uint32 addr = 3; 3707 optional uint32 flags = 4; 3708 optional uint32 len = 5; 3709 optional uint32 buf = 6; 3710} 3711message SmbusReadFtraceEvent { 3712 optional int32 adapter_nr = 1; 3713 optional uint32 flags = 2; 3714 optional uint32 addr = 3; 3715 optional uint32 command = 4; 3716 optional uint32 protocol = 5; 3717} 3718message SmbusWriteFtraceEvent { 3719 optional int32 adapter_nr = 1; 3720 optional uint32 addr = 2; 3721 optional uint32 flags = 3; 3722 optional uint32 command = 4; 3723 optional uint32 len = 5; 3724 optional uint32 protocol = 6; 3725} 3726message SmbusResultFtraceEvent { 3727 optional int32 adapter_nr = 1; 3728 optional uint32 addr = 2; 3729 optional uint32 flags = 3; 3730 optional uint32 read_write = 4; 3731 optional uint32 command = 5; 3732 optional int32 res = 6; 3733 optional uint32 protocol = 7; 3734} 3735message SmbusReplyFtraceEvent { 3736 optional int32 adapter_nr = 1; 3737 optional uint32 addr = 2; 3738 optional uint32 flags = 3; 3739 optional uint32 command = 4; 3740 optional uint32 len = 5; 3741 optional uint32 protocol = 6; 3742} 3743 3744// End of protos/perfetto/trace/ftrace/i2c.proto 3745 3746// Begin of protos/perfetto/trace/ftrace/ion.proto 3747 3748message IonStatFtraceEvent { 3749 optional uint32 buffer_id = 1; 3750 optional int64 len = 2; 3751 optional uint64 total_allocated = 3; 3752} 3753 3754// End of protos/perfetto/trace/ftrace/ion.proto 3755 3756// Begin of protos/perfetto/trace/ftrace/ipi.proto 3757 3758message IpiEntryFtraceEvent { 3759 optional string reason = 1; 3760} 3761message IpiExitFtraceEvent { 3762 optional string reason = 1; 3763} 3764message IpiRaiseFtraceEvent { 3765 optional uint32 target_cpus = 1; 3766 optional string reason = 2; 3767} 3768 3769// End of protos/perfetto/trace/ftrace/ipi.proto 3770 3771// Begin of protos/perfetto/trace/ftrace/irq.proto 3772 3773message SoftirqEntryFtraceEvent { 3774 optional uint32 vec = 1; 3775} 3776message SoftirqExitFtraceEvent { 3777 optional uint32 vec = 1; 3778} 3779message SoftirqRaiseFtraceEvent { 3780 optional uint32 vec = 1; 3781} 3782message IrqHandlerEntryFtraceEvent { 3783 optional int32 irq = 1; 3784 optional string name = 2; 3785 optional uint32 handler = 3; 3786} 3787message IrqHandlerExitFtraceEvent { 3788 optional int32 irq = 1; 3789 optional int32 ret = 2; 3790} 3791 3792// End of protos/perfetto/trace/ftrace/irq.proto 3793 3794// Begin of protos/perfetto/trace/ftrace/kmem.proto 3795 3796message AllocPagesIommuEndFtraceEvent { 3797 optional uint32 gfp_flags = 1; 3798 optional uint32 order = 2; 3799} 3800message AllocPagesIommuFailFtraceEvent { 3801 optional uint32 gfp_flags = 1; 3802 optional uint32 order = 2; 3803} 3804message AllocPagesIommuStartFtraceEvent { 3805 optional uint32 gfp_flags = 1; 3806 optional uint32 order = 2; 3807} 3808message AllocPagesSysEndFtraceEvent { 3809 optional uint32 gfp_flags = 1; 3810 optional uint32 order = 2; 3811} 3812message AllocPagesSysFailFtraceEvent { 3813 optional uint32 gfp_flags = 1; 3814 optional uint32 order = 2; 3815} 3816message AllocPagesSysStartFtraceEvent { 3817 optional uint32 gfp_flags = 1; 3818 optional uint32 order = 2; 3819} 3820message DmaAllocContiguousRetryFtraceEvent { 3821 optional int32 tries = 1; 3822} 3823message IommuMapRangeFtraceEvent { 3824 optional uint64 chunk_size = 1; 3825 optional uint64 len = 2; 3826 optional uint64 pa = 3; 3827 optional uint64 va = 4; 3828} 3829message IommuSecPtblMapRangeEndFtraceEvent { 3830 optional uint64 len = 1; 3831 optional int32 num = 2; 3832 optional uint32 pa = 3; 3833 optional int32 sec_id = 4; 3834 optional uint64 va = 5; 3835} 3836message IommuSecPtblMapRangeStartFtraceEvent { 3837 optional uint64 len = 1; 3838 optional int32 num = 2; 3839 optional uint32 pa = 3; 3840 optional int32 sec_id = 4; 3841 optional uint64 va = 5; 3842} 3843message IonAllocBufferEndFtraceEvent { 3844 optional string client_name = 1; 3845 optional uint32 flags = 2; 3846 optional string heap_name = 3; 3847 optional uint64 len = 4; 3848 optional uint32 mask = 5; 3849} 3850message IonAllocBufferFailFtraceEvent { 3851 optional string client_name = 1; 3852 optional int64 error = 2; 3853 optional uint32 flags = 3; 3854 optional string heap_name = 4; 3855 optional uint64 len = 5; 3856 optional uint32 mask = 6; 3857} 3858message IonAllocBufferFallbackFtraceEvent { 3859 optional string client_name = 1; 3860 optional int64 error = 2; 3861 optional uint32 flags = 3; 3862 optional string heap_name = 4; 3863 optional uint64 len = 5; 3864 optional uint32 mask = 6; 3865} 3866message IonAllocBufferStartFtraceEvent { 3867 optional string client_name = 1; 3868 optional uint32 flags = 2; 3869 optional string heap_name = 3; 3870 optional uint64 len = 4; 3871 optional uint32 mask = 5; 3872} 3873message IonCpAllocRetryFtraceEvent { 3874 optional int32 tries = 1; 3875} 3876message IonCpSecureBufferEndFtraceEvent { 3877 optional uint64 align = 1; 3878 optional uint64 flags = 2; 3879 optional string heap_name = 3; 3880 optional uint64 len = 4; 3881} 3882message IonCpSecureBufferStartFtraceEvent { 3883 optional uint64 align = 1; 3884 optional uint64 flags = 2; 3885 optional string heap_name = 3; 3886 optional uint64 len = 4; 3887} 3888message IonPrefetchingFtraceEvent { 3889 optional uint64 len = 1; 3890} 3891message IonSecureCmaAddToPoolEndFtraceEvent { 3892 optional uint32 is_prefetch = 1; 3893 optional uint64 len = 2; 3894 optional int32 pool_total = 3; 3895} 3896message IonSecureCmaAddToPoolStartFtraceEvent { 3897 optional uint32 is_prefetch = 1; 3898 optional uint64 len = 2; 3899 optional int32 pool_total = 3; 3900} 3901message IonSecureCmaAllocateEndFtraceEvent { 3902 optional uint64 align = 1; 3903 optional uint64 flags = 2; 3904 optional string heap_name = 3; 3905 optional uint64 len = 4; 3906} 3907message IonSecureCmaAllocateStartFtraceEvent { 3908 optional uint64 align = 1; 3909 optional uint64 flags = 2; 3910 optional string heap_name = 3; 3911 optional uint64 len = 4; 3912} 3913message IonSecureCmaShrinkPoolEndFtraceEvent { 3914 optional uint64 drained_size = 1; 3915 optional uint64 skipped_size = 2; 3916} 3917message IonSecureCmaShrinkPoolStartFtraceEvent { 3918 optional uint64 drained_size = 1; 3919 optional uint64 skipped_size = 2; 3920} 3921message KfreeFtraceEvent { 3922 optional uint64 call_site = 1; 3923 optional uint64 ptr = 2; 3924} 3925message KmallocFtraceEvent { 3926 optional uint64 bytes_alloc = 1; 3927 optional uint64 bytes_req = 2; 3928 optional uint64 call_site = 3; 3929 optional uint32 gfp_flags = 4; 3930 optional uint64 ptr = 5; 3931} 3932message KmallocNodeFtraceEvent { 3933 optional uint64 bytes_alloc = 1; 3934 optional uint64 bytes_req = 2; 3935 optional uint64 call_site = 3; 3936 optional uint32 gfp_flags = 4; 3937 optional int32 node = 5; 3938 optional uint64 ptr = 6; 3939} 3940message KmemCacheAllocFtraceEvent { 3941 optional uint64 bytes_alloc = 1; 3942 optional uint64 bytes_req = 2; 3943 optional uint64 call_site = 3; 3944 optional uint32 gfp_flags = 4; 3945 optional uint64 ptr = 5; 3946} 3947message KmemCacheAllocNodeFtraceEvent { 3948 optional uint64 bytes_alloc = 1; 3949 optional uint64 bytes_req = 2; 3950 optional uint64 call_site = 3; 3951 optional uint32 gfp_flags = 4; 3952 optional int32 node = 5; 3953 optional uint64 ptr = 6; 3954} 3955message KmemCacheFreeFtraceEvent { 3956 optional uint64 call_site = 1; 3957 optional uint64 ptr = 2; 3958} 3959message MigratePagesEndFtraceEvent { 3960 optional int32 mode = 1; 3961} 3962message MigratePagesStartFtraceEvent { 3963 optional int32 mode = 1; 3964} 3965message MigrateRetryFtraceEvent { 3966 optional int32 tries = 1; 3967} 3968message MmPageAllocFtraceEvent { 3969 optional uint32 gfp_flags = 1; 3970 optional int32 migratetype = 2; 3971 optional uint32 order = 3; 3972 optional uint64 page = 4; 3973 optional uint64 pfn = 5; 3974} 3975message MmPageAllocExtfragFtraceEvent { 3976 optional int32 alloc_migratetype = 1; 3977 optional int32 alloc_order = 2; 3978 optional int32 fallback_migratetype = 3; 3979 optional int32 fallback_order = 4; 3980 optional uint64 page = 5; 3981 optional int32 change_ownership = 6; 3982 optional uint64 pfn = 7; 3983} 3984message MmPageAllocZoneLockedFtraceEvent { 3985 optional int32 migratetype = 1; 3986 optional uint32 order = 2; 3987 optional uint64 page = 3; 3988 optional uint64 pfn = 4; 3989} 3990message MmPageFreeFtraceEvent { 3991 optional uint32 order = 1; 3992 optional uint64 page = 2; 3993 optional uint64 pfn = 3; 3994} 3995message MmPageFreeBatchedFtraceEvent { 3996 optional int32 cold = 1; 3997 optional uint64 page = 2; 3998 optional uint64 pfn = 3; 3999} 4000message MmPagePcpuDrainFtraceEvent { 4001 optional int32 migratetype = 1; 4002 optional uint32 order = 2; 4003 optional uint64 page = 3; 4004 optional uint64 pfn = 4; 4005} 4006message RssStatFtraceEvent { 4007 optional int32 member = 1; 4008 optional int64 size = 2; 4009 optional uint32 curr = 3; 4010 optional uint32 mm_id = 4; 4011} 4012message IonHeapShrinkFtraceEvent { 4013 optional string heap_name = 1; 4014 optional uint64 len = 2; 4015 optional int64 total_allocated = 3; 4016} 4017message IonHeapGrowFtraceEvent { 4018 optional string heap_name = 1; 4019 optional uint64 len = 2; 4020 optional int64 total_allocated = 3; 4021} 4022message IonBufferCreateFtraceEvent { 4023 optional uint64 addr = 1; 4024 optional uint64 len = 2; 4025} 4026message IonBufferDestroyFtraceEvent { 4027 optional uint64 addr = 1; 4028 optional uint64 len = 2; 4029} 4030 4031// End of protos/perfetto/trace/ftrace/kmem.proto 4032 4033// Begin of protos/perfetto/trace/ftrace/lowmemorykiller.proto 4034 4035message LowmemoryKillFtraceEvent { 4036 optional string comm = 1; 4037 optional int32 pid = 2; 4038 optional int64 pagecache_size = 3; 4039 optional int64 pagecache_limit = 4; 4040 optional int64 free = 5; 4041} 4042 4043// End of protos/perfetto/trace/ftrace/lowmemorykiller.proto 4044 4045// Begin of protos/perfetto/trace/ftrace/mdss.proto 4046 4047message MdpCmdKickoffFtraceEvent { 4048 optional uint32 ctl_num = 1; 4049 optional int32 kickoff_cnt = 2; 4050} 4051message MdpCommitFtraceEvent { 4052 optional uint32 num = 1; 4053 optional uint32 play_cnt = 2; 4054 optional uint32 clk_rate = 3; 4055 optional uint64 bandwidth = 4; 4056} 4057message MdpPerfSetOtFtraceEvent { 4058 optional uint32 pnum = 1; 4059 optional uint32 xin_id = 2; 4060 optional uint32 rd_lim = 3; 4061 optional uint32 is_vbif_rt = 4; 4062} 4063message MdpSsppChangeFtraceEvent { 4064 optional uint32 num = 1; 4065 optional uint32 play_cnt = 2; 4066 optional uint32 mixer = 3; 4067 optional uint32 stage = 4; 4068 optional uint32 flags = 5; 4069 optional uint32 format = 6; 4070 optional uint32 img_w = 7; 4071 optional uint32 img_h = 8; 4072 optional uint32 src_x = 9; 4073 optional uint32 src_y = 10; 4074 optional uint32 src_w = 11; 4075 optional uint32 src_h = 12; 4076 optional uint32 dst_x = 13; 4077 optional uint32 dst_y = 14; 4078 optional uint32 dst_w = 15; 4079 optional uint32 dst_h = 16; 4080} 4081message TracingMarkWriteFtraceEvent { 4082 optional int32 pid = 1; 4083 optional string trace_name = 2; 4084 optional uint32 trace_begin = 3; 4085} 4086message MdpCmdPingpongDoneFtraceEvent { 4087 optional uint32 ctl_num = 1; 4088 optional uint32 intf_num = 2; 4089 optional uint32 pp_num = 3; 4090 optional int32 koff_cnt = 4; 4091} 4092message MdpCompareBwFtraceEvent { 4093 optional uint64 new_ab = 1; 4094 optional uint64 new_ib = 2; 4095 optional uint64 new_wb = 3; 4096 optional uint64 old_ab = 4; 4097 optional uint64 old_ib = 5; 4098 optional uint64 old_wb = 6; 4099 optional uint32 params_changed = 7; 4100 optional uint32 update_bw = 8; 4101} 4102message MdpPerfSetPanicLutsFtraceEvent { 4103 optional uint32 pnum = 1; 4104 optional uint32 fmt = 2; 4105 optional uint32 mode = 3; 4106 optional uint32 panic_lut = 4; 4107 optional uint32 robust_lut = 5; 4108} 4109message MdpSsppSetFtraceEvent { 4110 optional uint32 num = 1; 4111 optional uint32 play_cnt = 2; 4112 optional uint32 mixer = 3; 4113 optional uint32 stage = 4; 4114 optional uint32 flags = 5; 4115 optional uint32 format = 6; 4116 optional uint32 img_w = 7; 4117 optional uint32 img_h = 8; 4118 optional uint32 src_x = 9; 4119 optional uint32 src_y = 10; 4120 optional uint32 src_w = 11; 4121 optional uint32 src_h = 12; 4122 optional uint32 dst_x = 13; 4123 optional uint32 dst_y = 14; 4124 optional uint32 dst_w = 15; 4125 optional uint32 dst_h = 16; 4126} 4127message MdpCmdReadptrDoneFtraceEvent { 4128 optional uint32 ctl_num = 1; 4129 optional int32 koff_cnt = 2; 4130} 4131message MdpMisrCrcFtraceEvent { 4132 optional uint32 block_id = 1; 4133 optional uint32 vsync_cnt = 2; 4134 optional uint32 crc = 3; 4135} 4136message MdpPerfSetQosLutsFtraceEvent { 4137 optional uint32 pnum = 1; 4138 optional uint32 fmt = 2; 4139 optional uint32 intf = 3; 4140 optional uint32 rot = 4; 4141 optional uint32 fl = 5; 4142 optional uint32 lut = 6; 4143 optional uint32 linear = 7; 4144} 4145message MdpTraceCounterFtraceEvent { 4146 optional int32 pid = 1; 4147 optional string counter_name = 2; 4148 optional int32 value = 3; 4149} 4150message MdpCmdReleaseBwFtraceEvent { 4151 optional uint32 ctl_num = 1; 4152} 4153message MdpMixerUpdateFtraceEvent { 4154 optional uint32 mixer_num = 1; 4155} 4156message MdpPerfSetWmLevelsFtraceEvent { 4157 optional uint32 pnum = 1; 4158 optional uint32 use_space = 2; 4159 optional uint32 priority_bytes = 3; 4160 optional uint32 wm0 = 4; 4161 optional uint32 wm1 = 5; 4162 optional uint32 wm2 = 6; 4163 optional uint32 mb_cnt = 7; 4164 optional uint32 mb_size = 8; 4165} 4166message MdpVideoUnderrunDoneFtraceEvent { 4167 optional uint32 ctl_num = 1; 4168 optional uint32 underrun_cnt = 2; 4169} 4170message MdpCmdWaitPingpongFtraceEvent { 4171 optional uint32 ctl_num = 1; 4172 optional int32 kickoff_cnt = 2; 4173} 4174message MdpPerfPrefillCalcFtraceEvent { 4175 optional uint32 pnum = 1; 4176 optional uint32 latency_buf = 2; 4177 optional uint32 ot = 3; 4178 optional uint32 y_buf = 4; 4179 optional uint32 y_scaler = 5; 4180 optional uint32 pp_lines = 6; 4181 optional uint32 pp_bytes = 7; 4182 optional uint32 post_sc = 8; 4183 optional uint32 fbc_bytes = 9; 4184 optional uint32 prefill_bytes = 10; 4185} 4186message MdpPerfUpdateBusFtraceEvent { 4187 optional int32 client = 1; 4188 optional uint64 ab_quota = 2; 4189 optional uint64 ib_quota = 3; 4190} 4191message RotatorBwAoAsContextFtraceEvent { 4192 optional uint32 state = 1; 4193} 4194 4195// End of protos/perfetto/trace/ftrace/mdss.proto 4196 4197// Begin of protos/perfetto/trace/ftrace/mm_event.proto 4198 4199message MmEventRecordFtraceEvent { 4200 optional uint32 avg_lat = 1; 4201 optional uint32 count = 2; 4202 optional uint32 max_lat = 3; 4203 optional uint32 type = 4; 4204} 4205 4206// End of protos/perfetto/trace/ftrace/mm_event.proto 4207 4208// Begin of protos/perfetto/trace/ftrace/oom.proto 4209 4210message OomScoreAdjUpdateFtraceEvent { 4211 optional string comm = 1; 4212 optional int32 oom_score_adj = 2; 4213 optional int32 pid = 3; 4214} 4215message MarkVictimFtraceEvent { 4216 optional int32 pid = 1; 4217} 4218 4219// End of protos/perfetto/trace/ftrace/oom.proto 4220 4221// Begin of protos/perfetto/trace/ftrace/power.proto 4222 4223message CpuFrequencyFtraceEvent { 4224 optional uint32 state = 1; 4225 optional uint32 cpu_id = 2; 4226} 4227message CpuFrequencyLimitsFtraceEvent { 4228 optional uint32 min_freq = 1; 4229 optional uint32 max_freq = 2; 4230 optional uint32 cpu_id = 3; 4231} 4232message CpuIdleFtraceEvent { 4233 optional uint32 state = 1; 4234 optional uint32 cpu_id = 2; 4235} 4236message ClockEnableFtraceEvent { 4237 optional string name = 1; 4238 optional uint64 state = 2; 4239 optional uint64 cpu_id = 3; 4240} 4241message ClockDisableFtraceEvent { 4242 optional string name = 1; 4243 optional uint64 state = 2; 4244 optional uint64 cpu_id = 3; 4245} 4246message ClockSetRateFtraceEvent { 4247 optional string name = 1; 4248 optional uint64 state = 2; 4249 optional uint64 cpu_id = 3; 4250} 4251message SuspendResumeFtraceEvent { 4252 optional string action = 1; 4253 optional int32 val = 2; 4254 optional uint32 start = 3; 4255} 4256message GpuFrequencyFtraceEvent { 4257 optional uint32 gpu_id = 1; 4258 optional uint32 state = 2; 4259} 4260 4261// End of protos/perfetto/trace/ftrace/power.proto 4262 4263// Begin of protos/perfetto/trace/ftrace/raw_syscalls.proto 4264 4265message SysEnterFtraceEvent { 4266 optional int64 id = 1; 4267} 4268message SysExitFtraceEvent { 4269 optional int64 id = 1; 4270 optional int64 ret = 2; 4271} 4272 4273// End of protos/perfetto/trace/ftrace/raw_syscalls.proto 4274 4275// Begin of protos/perfetto/trace/ftrace/regulator.proto 4276 4277message RegulatorDisableFtraceEvent { 4278 optional string name = 1; 4279} 4280message RegulatorDisableCompleteFtraceEvent { 4281 optional string name = 1; 4282} 4283message RegulatorEnableFtraceEvent { 4284 optional string name = 1; 4285} 4286message RegulatorEnableCompleteFtraceEvent { 4287 optional string name = 1; 4288} 4289message RegulatorEnableDelayFtraceEvent { 4290 optional string name = 1; 4291} 4292message RegulatorSetVoltageFtraceEvent { 4293 optional string name = 1; 4294 optional int32 min = 2; 4295 optional int32 max = 3; 4296} 4297message RegulatorSetVoltageCompleteFtraceEvent { 4298 optional string name = 1; 4299 optional uint32 val = 2; 4300} 4301 4302// End of protos/perfetto/trace/ftrace/regulator.proto 4303 4304// Begin of protos/perfetto/trace/ftrace/sched.proto 4305 4306message SchedSwitchFtraceEvent { 4307 optional string prev_comm = 1; 4308 optional int32 prev_pid = 2; 4309 optional int32 prev_prio = 3; 4310 optional int64 prev_state = 4; 4311 optional string next_comm = 5; 4312 optional int32 next_pid = 6; 4313 optional int32 next_prio = 7; 4314} 4315message SchedWakeupFtraceEvent { 4316 optional string comm = 1; 4317 optional int32 pid = 2; 4318 optional int32 prio = 3; 4319 optional int32 success = 4; 4320 optional int32 target_cpu = 5; 4321} 4322message SchedBlockedReasonFtraceEvent { 4323 optional int32 pid = 1; 4324 optional uint64 caller = 2; 4325 optional uint32 io_wait = 3; 4326} 4327message SchedCpuHotplugFtraceEvent { 4328 optional int32 affected_cpu = 1; 4329 optional int32 error = 2; 4330 optional int32 status = 3; 4331} 4332message SchedWakingFtraceEvent { 4333 optional string comm = 1; 4334 optional int32 pid = 2; 4335 optional int32 prio = 3; 4336 optional int32 success = 4; 4337 optional int32 target_cpu = 5; 4338} 4339message SchedWakeupNewFtraceEvent { 4340 optional string comm = 1; 4341 optional int32 pid = 2; 4342 optional int32 prio = 3; 4343 optional int32 success = 4; 4344 optional int32 target_cpu = 5; 4345} 4346message SchedProcessExecFtraceEvent { 4347 optional string filename = 1; 4348 optional int32 pid = 2; 4349 optional int32 old_pid = 3; 4350} 4351message SchedProcessExitFtraceEvent { 4352 optional string comm = 1; 4353 optional int32 pid = 2; 4354 optional int32 tgid = 3; 4355 optional int32 prio = 4; 4356} 4357message SchedProcessForkFtraceEvent { 4358 optional string parent_comm = 1; 4359 optional int32 parent_pid = 2; 4360 optional string child_comm = 3; 4361 optional int32 child_pid = 4; 4362} 4363message SchedProcessFreeFtraceEvent { 4364 optional string comm = 1; 4365 optional int32 pid = 2; 4366 optional int32 prio = 3; 4367} 4368message SchedProcessHangFtraceEvent { 4369 optional string comm = 1; 4370 optional int32 pid = 2; 4371} 4372message SchedProcessWaitFtraceEvent { 4373 optional string comm = 1; 4374 optional int32 pid = 2; 4375 optional int32 prio = 3; 4376} 4377 4378// End of protos/perfetto/trace/ftrace/sched.proto 4379 4380// Begin of protos/perfetto/trace/ftrace/scm.proto 4381 4382message ScmCallStartFtraceEvent { 4383 optional uint32 arginfo = 1; 4384 optional uint64 x0 = 2; 4385 optional uint64 x5 = 3; 4386} 4387message ScmCallEndFtraceEvent {} 4388 4389// End of protos/perfetto/trace/ftrace/scm.proto 4390 4391// Begin of protos/perfetto/trace/ftrace/sde.proto 4392 4393message SdeTracingMarkWriteFtraceEvent { 4394 optional int32 pid = 1; 4395 optional string trace_name = 2; 4396 optional uint32 trace_type = 3; 4397 optional int32 value = 4; 4398 optional uint32 trace_begin = 5; 4399} 4400 4401// End of protos/perfetto/trace/ftrace/sde.proto 4402 4403// Begin of protos/perfetto/trace/ftrace/signal.proto 4404 4405message SignalDeliverFtraceEvent { 4406 optional int32 code = 1; 4407 optional uint64 sa_flags = 2; 4408 optional int32 sig = 3; 4409} 4410message SignalGenerateFtraceEvent { 4411 optional int32 code = 1; 4412 optional string comm = 2; 4413 optional int32 group = 3; 4414 optional int32 pid = 4; 4415 optional int32 result = 5; 4416 optional int32 sig = 6; 4417} 4418 4419// End of protos/perfetto/trace/ftrace/signal.proto 4420 4421// Begin of protos/perfetto/trace/ftrace/sync.proto 4422 4423message SyncPtFtraceEvent { 4424 optional string timeline = 1; 4425 optional string value = 2; 4426} 4427message SyncTimelineFtraceEvent { 4428 optional string name = 1; 4429 optional string value = 2; 4430} 4431message SyncWaitFtraceEvent { 4432 optional string name = 1; 4433 optional int32 status = 2; 4434 optional uint32 begin = 3; 4435} 4436 4437// End of protos/perfetto/trace/ftrace/sync.proto 4438 4439// Begin of protos/perfetto/trace/ftrace/systrace.proto 4440 4441message ZeroFtraceEvent { 4442 optional int32 flag = 1; 4443 optional string name = 2; 4444 optional int32 pid = 3; 4445 optional int64 value = 4; 4446} 4447 4448// End of protos/perfetto/trace/ftrace/systrace.proto 4449 4450// Begin of protos/perfetto/trace/ftrace/task.proto 4451 4452message TaskNewtaskFtraceEvent { 4453 optional int32 pid = 1; 4454 optional string comm = 2; 4455 optional uint64 clone_flags = 3; 4456 optional int32 oom_score_adj = 4; 4457} 4458message TaskRenameFtraceEvent { 4459 optional int32 pid = 1; 4460 optional string oldcomm = 2; 4461 optional string newcomm = 3; 4462 optional int32 oom_score_adj = 4; 4463} 4464 4465// End of protos/perfetto/trace/ftrace/task.proto 4466 4467// Begin of protos/perfetto/trace/ftrace/thermal.proto 4468 4469message ThermalTemperatureFtraceEvent { 4470 optional int32 id = 1; 4471 optional int32 temp = 2; 4472 optional int32 temp_prev = 3; 4473 optional string thermal_zone = 4; 4474} 4475message CdevUpdateFtraceEvent { 4476 optional uint64 target = 1; 4477 optional string type = 2; 4478} 4479 4480// End of protos/perfetto/trace/ftrace/thermal.proto 4481 4482// Begin of protos/perfetto/trace/ftrace/vmscan.proto 4483 4484message MmVmscanDirectReclaimBeginFtraceEvent { 4485 optional int32 order = 1; 4486 optional int32 may_writepage = 2; 4487 optional uint32 gfp_flags = 3; 4488} 4489message MmVmscanDirectReclaimEndFtraceEvent { 4490 optional uint64 nr_reclaimed = 1; 4491} 4492message MmVmscanKswapdWakeFtraceEvent { 4493 optional int32 nid = 1; 4494 optional int32 order = 2; 4495} 4496message MmVmscanKswapdSleepFtraceEvent { 4497 optional int32 nid = 1; 4498} 4499 4500// End of protos/perfetto/trace/ftrace/vmscan.proto 4501 4502// Begin of protos/perfetto/trace/ftrace/workqueue.proto 4503 4504message WorkqueueActivateWorkFtraceEvent { 4505 optional uint64 work = 1; 4506} 4507message WorkqueueExecuteEndFtraceEvent { 4508 optional uint64 work = 1; 4509} 4510message WorkqueueExecuteStartFtraceEvent { 4511 optional uint64 work = 1; 4512 optional uint64 function = 2; 4513} 4514message WorkqueueQueueWorkFtraceEvent { 4515 optional uint64 work = 1; 4516 optional uint64 function = 2; 4517 optional uint64 workqueue = 3; 4518 optional uint32 req_cpu = 4; 4519 optional uint32 cpu = 5; 4520} 4521 4522// End of protos/perfetto/trace/ftrace/workqueue.proto 4523 4524// Begin of protos/perfetto/trace/ftrace/ftrace_event.proto 4525 4526message FtraceEvent { 4527 // Nanoseconds since an epoch. 4528 // Epoch is configurable by writing into trace_clock. 4529 // By default this timestamp is CPU local. 4530 // TODO: Figure out a story for reconciling the various clocks. 4531 optional uint64 timestamp = 1; 4532 4533 // Kernel pid (do not confuse with userspace pid aka tgid) 4534 optional uint32 pid = 2; 4535 4536 oneof event { 4537 PrintFtraceEvent print = 3; 4538 SchedSwitchFtraceEvent sched_switch = 4; 4539 // removed field with id 5; 4540 // removed field with id 6; 4541 // removed field with id 7; 4542 // removed field with id 8; 4543 // removed field with id 9; 4544 // removed field with id 10; 4545 CpuFrequencyFtraceEvent cpu_frequency = 11; 4546 CpuFrequencyLimitsFtraceEvent cpu_frequency_limits = 12; 4547 CpuIdleFtraceEvent cpu_idle = 13; 4548 ClockEnableFtraceEvent clock_enable = 14; 4549 ClockDisableFtraceEvent clock_disable = 15; 4550 ClockSetRateFtraceEvent clock_set_rate = 16; 4551 SchedWakeupFtraceEvent sched_wakeup = 17; 4552 SchedBlockedReasonFtraceEvent sched_blocked_reason = 18; 4553 SchedCpuHotplugFtraceEvent sched_cpu_hotplug = 19; 4554 SchedWakingFtraceEvent sched_waking = 20; 4555 IpiEntryFtraceEvent ipi_entry = 21; 4556 IpiExitFtraceEvent ipi_exit = 22; 4557 IpiRaiseFtraceEvent ipi_raise = 23; 4558 SoftirqEntryFtraceEvent softirq_entry = 24; 4559 SoftirqExitFtraceEvent softirq_exit = 25; 4560 SoftirqRaiseFtraceEvent softirq_raise = 26; 4561 I2cReadFtraceEvent i2c_read = 27; 4562 I2cWriteFtraceEvent i2c_write = 28; 4563 I2cResultFtraceEvent i2c_result = 29; 4564 I2cReplyFtraceEvent i2c_reply = 30; 4565 SmbusReadFtraceEvent smbus_read = 31; 4566 SmbusWriteFtraceEvent smbus_write = 32; 4567 SmbusResultFtraceEvent smbus_result = 33; 4568 SmbusReplyFtraceEvent smbus_reply = 34; 4569 LowmemoryKillFtraceEvent lowmemory_kill = 35; 4570 IrqHandlerEntryFtraceEvent irq_handler_entry = 36; 4571 IrqHandlerExitFtraceEvent irq_handler_exit = 37; 4572 SyncPtFtraceEvent sync_pt = 38; 4573 SyncTimelineFtraceEvent sync_timeline = 39; 4574 SyncWaitFtraceEvent sync_wait = 40; 4575 Ext4DaWriteBeginFtraceEvent ext4_da_write_begin = 41; 4576 Ext4DaWriteEndFtraceEvent ext4_da_write_end = 42; 4577 Ext4SyncFileEnterFtraceEvent ext4_sync_file_enter = 43; 4578 Ext4SyncFileExitFtraceEvent ext4_sync_file_exit = 44; 4579 BlockRqIssueFtraceEvent block_rq_issue = 45; 4580 MmVmscanDirectReclaimBeginFtraceEvent mm_vmscan_direct_reclaim_begin = 46; 4581 MmVmscanDirectReclaimEndFtraceEvent mm_vmscan_direct_reclaim_end = 47; 4582 MmVmscanKswapdWakeFtraceEvent mm_vmscan_kswapd_wake = 48; 4583 MmVmscanKswapdSleepFtraceEvent mm_vmscan_kswapd_sleep = 49; 4584 BinderTransactionFtraceEvent binder_transaction = 50; 4585 BinderTransactionReceivedFtraceEvent binder_transaction_received = 51; 4586 BinderSetPriorityFtraceEvent binder_set_priority = 52; 4587 BinderLockFtraceEvent binder_lock = 53; 4588 BinderLockedFtraceEvent binder_locked = 54; 4589 BinderUnlockFtraceEvent binder_unlock = 55; 4590 WorkqueueActivateWorkFtraceEvent workqueue_activate_work = 56; 4591 WorkqueueExecuteEndFtraceEvent workqueue_execute_end = 57; 4592 WorkqueueExecuteStartFtraceEvent workqueue_execute_start = 58; 4593 WorkqueueQueueWorkFtraceEvent workqueue_queue_work = 59; 4594 RegulatorDisableFtraceEvent regulator_disable = 60; 4595 RegulatorDisableCompleteFtraceEvent regulator_disable_complete = 61; 4596 RegulatorEnableFtraceEvent regulator_enable = 62; 4597 RegulatorEnableCompleteFtraceEvent regulator_enable_complete = 63; 4598 RegulatorEnableDelayFtraceEvent regulator_enable_delay = 64; 4599 RegulatorSetVoltageFtraceEvent regulator_set_voltage = 65; 4600 RegulatorSetVoltageCompleteFtraceEvent regulator_set_voltage_complete = 66; 4601 CgroupAttachTaskFtraceEvent cgroup_attach_task = 67; 4602 CgroupMkdirFtraceEvent cgroup_mkdir = 68; 4603 CgroupRemountFtraceEvent cgroup_remount = 69; 4604 CgroupRmdirFtraceEvent cgroup_rmdir = 70; 4605 CgroupTransferTasksFtraceEvent cgroup_transfer_tasks = 71; 4606 CgroupDestroyRootFtraceEvent cgroup_destroy_root = 72; 4607 CgroupReleaseFtraceEvent cgroup_release = 73; 4608 CgroupRenameFtraceEvent cgroup_rename = 74; 4609 CgroupSetupRootFtraceEvent cgroup_setup_root = 75; 4610 MdpCmdKickoffFtraceEvent mdp_cmd_kickoff = 76; 4611 MdpCommitFtraceEvent mdp_commit = 77; 4612 MdpPerfSetOtFtraceEvent mdp_perf_set_ot = 78; 4613 MdpSsppChangeFtraceEvent mdp_sspp_change = 79; 4614 TracingMarkWriteFtraceEvent tracing_mark_write = 80; 4615 MdpCmdPingpongDoneFtraceEvent mdp_cmd_pingpong_done = 81; 4616 MdpCompareBwFtraceEvent mdp_compare_bw = 82; 4617 MdpPerfSetPanicLutsFtraceEvent mdp_perf_set_panic_luts = 83; 4618 MdpSsppSetFtraceEvent mdp_sspp_set = 84; 4619 MdpCmdReadptrDoneFtraceEvent mdp_cmd_readptr_done = 85; 4620 MdpMisrCrcFtraceEvent mdp_misr_crc = 86; 4621 MdpPerfSetQosLutsFtraceEvent mdp_perf_set_qos_luts = 87; 4622 MdpTraceCounterFtraceEvent mdp_trace_counter = 88; 4623 MdpCmdReleaseBwFtraceEvent mdp_cmd_release_bw = 89; 4624 MdpMixerUpdateFtraceEvent mdp_mixer_update = 90; 4625 MdpPerfSetWmLevelsFtraceEvent mdp_perf_set_wm_levels = 91; 4626 MdpVideoUnderrunDoneFtraceEvent mdp_video_underrun_done = 92; 4627 MdpCmdWaitPingpongFtraceEvent mdp_cmd_wait_pingpong = 93; 4628 MdpPerfPrefillCalcFtraceEvent mdp_perf_prefill_calc = 94; 4629 MdpPerfUpdateBusFtraceEvent mdp_perf_update_bus = 95; 4630 RotatorBwAoAsContextFtraceEvent rotator_bw_ao_as_context = 96; 4631 MmFilemapAddToPageCacheFtraceEvent mm_filemap_add_to_page_cache = 97; 4632 MmFilemapDeleteFromPageCacheFtraceEvent mm_filemap_delete_from_page_cache = 4633 98; 4634 MmCompactionBeginFtraceEvent mm_compaction_begin = 99; 4635 MmCompactionDeferCompactionFtraceEvent mm_compaction_defer_compaction = 100; 4636 MmCompactionDeferredFtraceEvent mm_compaction_deferred = 101; 4637 MmCompactionDeferResetFtraceEvent mm_compaction_defer_reset = 102; 4638 MmCompactionEndFtraceEvent mm_compaction_end = 103; 4639 MmCompactionFinishedFtraceEvent mm_compaction_finished = 104; 4640 MmCompactionIsolateFreepagesFtraceEvent mm_compaction_isolate_freepages = 4641 105; 4642 MmCompactionIsolateMigratepagesFtraceEvent 4643 mm_compaction_isolate_migratepages = 106; 4644 MmCompactionKcompactdSleepFtraceEvent mm_compaction_kcompactd_sleep = 107; 4645 MmCompactionKcompactdWakeFtraceEvent mm_compaction_kcompactd_wake = 108; 4646 MmCompactionMigratepagesFtraceEvent mm_compaction_migratepages = 109; 4647 MmCompactionSuitableFtraceEvent mm_compaction_suitable = 110; 4648 MmCompactionTryToCompactPagesFtraceEvent 4649 mm_compaction_try_to_compact_pages = 111; 4650 MmCompactionWakeupKcompactdFtraceEvent mm_compaction_wakeup_kcompactd = 112; 4651 SuspendResumeFtraceEvent suspend_resume = 113; 4652 SchedWakeupNewFtraceEvent sched_wakeup_new = 114; 4653 BlockBioBackmergeFtraceEvent block_bio_backmerge = 115; 4654 BlockBioBounceFtraceEvent block_bio_bounce = 116; 4655 BlockBioCompleteFtraceEvent block_bio_complete = 117; 4656 BlockBioFrontmergeFtraceEvent block_bio_frontmerge = 118; 4657 BlockBioQueueFtraceEvent block_bio_queue = 119; 4658 BlockBioRemapFtraceEvent block_bio_remap = 120; 4659 BlockDirtyBufferFtraceEvent block_dirty_buffer = 121; 4660 BlockGetrqFtraceEvent block_getrq = 122; 4661 BlockPlugFtraceEvent block_plug = 123; 4662 BlockRqAbortFtraceEvent block_rq_abort = 124; 4663 BlockRqCompleteFtraceEvent block_rq_complete = 125; 4664 BlockRqInsertFtraceEvent block_rq_insert = 126; 4665 // removed field with id 127; 4666 BlockRqRemapFtraceEvent block_rq_remap = 128; 4667 BlockRqRequeueFtraceEvent block_rq_requeue = 129; 4668 BlockSleeprqFtraceEvent block_sleeprq = 130; 4669 BlockSplitFtraceEvent block_split = 131; 4670 BlockTouchBufferFtraceEvent block_touch_buffer = 132; 4671 BlockUnplugFtraceEvent block_unplug = 133; 4672 Ext4AllocDaBlocksFtraceEvent ext4_alloc_da_blocks = 134; 4673 Ext4AllocateBlocksFtraceEvent ext4_allocate_blocks = 135; 4674 Ext4AllocateInodeFtraceEvent ext4_allocate_inode = 136; 4675 Ext4BeginOrderedTruncateFtraceEvent ext4_begin_ordered_truncate = 137; 4676 Ext4CollapseRangeFtraceEvent ext4_collapse_range = 138; 4677 Ext4DaReleaseSpaceFtraceEvent ext4_da_release_space = 139; 4678 Ext4DaReserveSpaceFtraceEvent ext4_da_reserve_space = 140; 4679 Ext4DaUpdateReserveSpaceFtraceEvent ext4_da_update_reserve_space = 141; 4680 Ext4DaWritePagesFtraceEvent ext4_da_write_pages = 142; 4681 Ext4DaWritePagesExtentFtraceEvent ext4_da_write_pages_extent = 143; 4682 Ext4DirectIOEnterFtraceEvent ext4_direct_IO_enter = 144; 4683 Ext4DirectIOExitFtraceEvent ext4_direct_IO_exit = 145; 4684 Ext4DiscardBlocksFtraceEvent ext4_discard_blocks = 146; 4685 Ext4DiscardPreallocationsFtraceEvent ext4_discard_preallocations = 147; 4686 Ext4DropInodeFtraceEvent ext4_drop_inode = 148; 4687 Ext4EsCacheExtentFtraceEvent ext4_es_cache_extent = 149; 4688 Ext4EsFindDelayedExtentRangeEnterFtraceEvent 4689 ext4_es_find_delayed_extent_range_enter = 150; 4690 Ext4EsFindDelayedExtentRangeExitFtraceEvent 4691 ext4_es_find_delayed_extent_range_exit = 151; 4692 Ext4EsInsertExtentFtraceEvent ext4_es_insert_extent = 152; 4693 Ext4EsLookupExtentEnterFtraceEvent ext4_es_lookup_extent_enter = 153; 4694 Ext4EsLookupExtentExitFtraceEvent ext4_es_lookup_extent_exit = 154; 4695 Ext4EsRemoveExtentFtraceEvent ext4_es_remove_extent = 155; 4696 Ext4EsShrinkFtraceEvent ext4_es_shrink = 156; 4697 Ext4EsShrinkCountFtraceEvent ext4_es_shrink_count = 157; 4698 Ext4EsShrinkScanEnterFtraceEvent ext4_es_shrink_scan_enter = 158; 4699 Ext4EsShrinkScanExitFtraceEvent ext4_es_shrink_scan_exit = 159; 4700 Ext4EvictInodeFtraceEvent ext4_evict_inode = 160; 4701 Ext4ExtConvertToInitializedEnterFtraceEvent 4702 ext4_ext_convert_to_initialized_enter = 161; 4703 Ext4ExtConvertToInitializedFastpathFtraceEvent 4704 ext4_ext_convert_to_initialized_fastpath = 162; 4705 Ext4ExtHandleUnwrittenExtentsFtraceEvent ext4_ext_handle_unwritten_extents = 4706 163; 4707 Ext4ExtInCacheFtraceEvent ext4_ext_in_cache = 164; 4708 Ext4ExtLoadExtentFtraceEvent ext4_ext_load_extent = 165; 4709 Ext4ExtMapBlocksEnterFtraceEvent ext4_ext_map_blocks_enter = 166; 4710 Ext4ExtMapBlocksExitFtraceEvent ext4_ext_map_blocks_exit = 167; 4711 Ext4ExtPutInCacheFtraceEvent ext4_ext_put_in_cache = 168; 4712 Ext4ExtRemoveSpaceFtraceEvent ext4_ext_remove_space = 169; 4713 Ext4ExtRemoveSpaceDoneFtraceEvent ext4_ext_remove_space_done = 170; 4714 Ext4ExtRmIdxFtraceEvent ext4_ext_rm_idx = 171; 4715 Ext4ExtRmLeafFtraceEvent ext4_ext_rm_leaf = 172; 4716 Ext4ExtShowExtentFtraceEvent ext4_ext_show_extent = 173; 4717 Ext4FallocateEnterFtraceEvent ext4_fallocate_enter = 174; 4718 Ext4FallocateExitFtraceEvent ext4_fallocate_exit = 175; 4719 Ext4FindDelallocRangeFtraceEvent ext4_find_delalloc_range = 176; 4720 Ext4ForgetFtraceEvent ext4_forget = 177; 4721 Ext4FreeBlocksFtraceEvent ext4_free_blocks = 178; 4722 Ext4FreeInodeFtraceEvent ext4_free_inode = 179; 4723 Ext4GetImpliedClusterAllocExitFtraceEvent 4724 ext4_get_implied_cluster_alloc_exit = 180; 4725 Ext4GetReservedClusterAllocFtraceEvent ext4_get_reserved_cluster_alloc = 4726 181; 4727 Ext4IndMapBlocksEnterFtraceEvent ext4_ind_map_blocks_enter = 182; 4728 Ext4IndMapBlocksExitFtraceEvent ext4_ind_map_blocks_exit = 183; 4729 Ext4InsertRangeFtraceEvent ext4_insert_range = 184; 4730 Ext4InvalidatepageFtraceEvent ext4_invalidatepage = 185; 4731 Ext4JournalStartFtraceEvent ext4_journal_start = 186; 4732 Ext4JournalStartReservedFtraceEvent ext4_journal_start_reserved = 187; 4733 Ext4JournalledInvalidatepageFtraceEvent ext4_journalled_invalidatepage = 4734 188; 4735 Ext4JournalledWriteEndFtraceEvent ext4_journalled_write_end = 189; 4736 Ext4LoadInodeFtraceEvent ext4_load_inode = 190; 4737 Ext4LoadInodeBitmapFtraceEvent ext4_load_inode_bitmap = 191; 4738 Ext4MarkInodeDirtyFtraceEvent ext4_mark_inode_dirty = 192; 4739 Ext4MbBitmapLoadFtraceEvent ext4_mb_bitmap_load = 193; 4740 Ext4MbBuddyBitmapLoadFtraceEvent ext4_mb_buddy_bitmap_load = 194; 4741 Ext4MbDiscardPreallocationsFtraceEvent ext4_mb_discard_preallocations = 195; 4742 Ext4MbNewGroupPaFtraceEvent ext4_mb_new_group_pa = 196; 4743 Ext4MbNewInodePaFtraceEvent ext4_mb_new_inode_pa = 197; 4744 Ext4MbReleaseGroupPaFtraceEvent ext4_mb_release_group_pa = 198; 4745 Ext4MbReleaseInodePaFtraceEvent ext4_mb_release_inode_pa = 199; 4746 Ext4MballocAllocFtraceEvent ext4_mballoc_alloc = 200; 4747 Ext4MballocDiscardFtraceEvent ext4_mballoc_discard = 201; 4748 Ext4MballocFreeFtraceEvent ext4_mballoc_free = 202; 4749 Ext4MballocPreallocFtraceEvent ext4_mballoc_prealloc = 203; 4750 Ext4OtherInodeUpdateTimeFtraceEvent ext4_other_inode_update_time = 204; 4751 Ext4PunchHoleFtraceEvent ext4_punch_hole = 205; 4752 Ext4ReadBlockBitmapLoadFtraceEvent ext4_read_block_bitmap_load = 206; 4753 Ext4ReadpageFtraceEvent ext4_readpage = 207; 4754 Ext4ReleasepageFtraceEvent ext4_releasepage = 208; 4755 Ext4RemoveBlocksFtraceEvent ext4_remove_blocks = 209; 4756 Ext4RequestBlocksFtraceEvent ext4_request_blocks = 210; 4757 Ext4RequestInodeFtraceEvent ext4_request_inode = 211; 4758 Ext4SyncFsFtraceEvent ext4_sync_fs = 212; 4759 Ext4TrimAllFreeFtraceEvent ext4_trim_all_free = 213; 4760 Ext4TrimExtentFtraceEvent ext4_trim_extent = 214; 4761 Ext4TruncateEnterFtraceEvent ext4_truncate_enter = 215; 4762 Ext4TruncateExitFtraceEvent ext4_truncate_exit = 216; 4763 Ext4UnlinkEnterFtraceEvent ext4_unlink_enter = 217; 4764 Ext4UnlinkExitFtraceEvent ext4_unlink_exit = 218; 4765 Ext4WriteBeginFtraceEvent ext4_write_begin = 219; 4766 // removed field with id 220; 4767 // removed field with id 221; 4768 // removed field with id 222; 4769 // removed field with id 223; 4770 // removed field with id 224; 4771 // removed field with id 225; 4772 // removed field with id 226; 4773 // removed field with id 227; 4774 // removed field with id 228; 4775 // removed field with id 229; 4776 Ext4WriteEndFtraceEvent ext4_write_end = 230; 4777 Ext4WritepageFtraceEvent ext4_writepage = 231; 4778 Ext4WritepagesFtraceEvent ext4_writepages = 232; 4779 Ext4WritepagesResultFtraceEvent ext4_writepages_result = 233; 4780 Ext4ZeroRangeFtraceEvent ext4_zero_range = 234; 4781 TaskNewtaskFtraceEvent task_newtask = 235; 4782 TaskRenameFtraceEvent task_rename = 236; 4783 SchedProcessExecFtraceEvent sched_process_exec = 237; 4784 SchedProcessExitFtraceEvent sched_process_exit = 238; 4785 SchedProcessForkFtraceEvent sched_process_fork = 239; 4786 SchedProcessFreeFtraceEvent sched_process_free = 240; 4787 SchedProcessHangFtraceEvent sched_process_hang = 241; 4788 SchedProcessWaitFtraceEvent sched_process_wait = 242; 4789 F2fsDoSubmitBioFtraceEvent f2fs_do_submit_bio = 243; 4790 F2fsEvictInodeFtraceEvent f2fs_evict_inode = 244; 4791 F2fsFallocateFtraceEvent f2fs_fallocate = 245; 4792 F2fsGetDataBlockFtraceEvent f2fs_get_data_block = 246; 4793 F2fsGetVictimFtraceEvent f2fs_get_victim = 247; 4794 F2fsIgetFtraceEvent f2fs_iget = 248; 4795 F2fsIgetExitFtraceEvent f2fs_iget_exit = 249; 4796 F2fsNewInodeFtraceEvent f2fs_new_inode = 250; 4797 F2fsReadpageFtraceEvent f2fs_readpage = 251; 4798 F2fsReserveNewBlockFtraceEvent f2fs_reserve_new_block = 252; 4799 F2fsSetPageDirtyFtraceEvent f2fs_set_page_dirty = 253; 4800 F2fsSubmitWritePageFtraceEvent f2fs_submit_write_page = 254; 4801 F2fsSyncFileEnterFtraceEvent f2fs_sync_file_enter = 255; 4802 F2fsSyncFileExitFtraceEvent f2fs_sync_file_exit = 256; 4803 F2fsSyncFsFtraceEvent f2fs_sync_fs = 257; 4804 F2fsTruncateFtraceEvent f2fs_truncate = 258; 4805 F2fsTruncateBlocksEnterFtraceEvent f2fs_truncate_blocks_enter = 259; 4806 F2fsTruncateBlocksExitFtraceEvent f2fs_truncate_blocks_exit = 260; 4807 F2fsTruncateDataBlocksRangeFtraceEvent f2fs_truncate_data_blocks_range = 4808 261; 4809 F2fsTruncateInodeBlocksEnterFtraceEvent f2fs_truncate_inode_blocks_enter = 4810 262; 4811 F2fsTruncateInodeBlocksExitFtraceEvent f2fs_truncate_inode_blocks_exit = 4812 263; 4813 F2fsTruncateNodeFtraceEvent f2fs_truncate_node = 264; 4814 F2fsTruncateNodesEnterFtraceEvent f2fs_truncate_nodes_enter = 265; 4815 F2fsTruncateNodesExitFtraceEvent f2fs_truncate_nodes_exit = 266; 4816 F2fsTruncatePartialNodesFtraceEvent f2fs_truncate_partial_nodes = 267; 4817 F2fsUnlinkEnterFtraceEvent f2fs_unlink_enter = 268; 4818 F2fsUnlinkExitFtraceEvent f2fs_unlink_exit = 269; 4819 F2fsVmPageMkwriteFtraceEvent f2fs_vm_page_mkwrite = 270; 4820 F2fsWriteBeginFtraceEvent f2fs_write_begin = 271; 4821 F2fsWriteCheckpointFtraceEvent f2fs_write_checkpoint = 272; 4822 F2fsWriteEndFtraceEvent f2fs_write_end = 273; 4823 AllocPagesIommuEndFtraceEvent alloc_pages_iommu_end = 274; 4824 AllocPagesIommuFailFtraceEvent alloc_pages_iommu_fail = 275; 4825 AllocPagesIommuStartFtraceEvent alloc_pages_iommu_start = 276; 4826 AllocPagesSysEndFtraceEvent alloc_pages_sys_end = 277; 4827 AllocPagesSysFailFtraceEvent alloc_pages_sys_fail = 278; 4828 AllocPagesSysStartFtraceEvent alloc_pages_sys_start = 279; 4829 DmaAllocContiguousRetryFtraceEvent dma_alloc_contiguous_retry = 280; 4830 IommuMapRangeFtraceEvent iommu_map_range = 281; 4831 IommuSecPtblMapRangeEndFtraceEvent iommu_sec_ptbl_map_range_end = 282; 4832 IommuSecPtblMapRangeStartFtraceEvent iommu_sec_ptbl_map_range_start = 283; 4833 IonAllocBufferEndFtraceEvent ion_alloc_buffer_end = 284; 4834 IonAllocBufferFailFtraceEvent ion_alloc_buffer_fail = 285; 4835 IonAllocBufferFallbackFtraceEvent ion_alloc_buffer_fallback = 286; 4836 IonAllocBufferStartFtraceEvent ion_alloc_buffer_start = 287; 4837 IonCpAllocRetryFtraceEvent ion_cp_alloc_retry = 288; 4838 IonCpSecureBufferEndFtraceEvent ion_cp_secure_buffer_end = 289; 4839 IonCpSecureBufferStartFtraceEvent ion_cp_secure_buffer_start = 290; 4840 IonPrefetchingFtraceEvent ion_prefetching = 291; 4841 IonSecureCmaAddToPoolEndFtraceEvent ion_secure_cma_add_to_pool_end = 292; 4842 IonSecureCmaAddToPoolStartFtraceEvent ion_secure_cma_add_to_pool_start = 4843 293; 4844 IonSecureCmaAllocateEndFtraceEvent ion_secure_cma_allocate_end = 294; 4845 IonSecureCmaAllocateStartFtraceEvent ion_secure_cma_allocate_start = 295; 4846 IonSecureCmaShrinkPoolEndFtraceEvent ion_secure_cma_shrink_pool_end = 296; 4847 IonSecureCmaShrinkPoolStartFtraceEvent ion_secure_cma_shrink_pool_start = 4848 297; 4849 KfreeFtraceEvent kfree = 298; 4850 KmallocFtraceEvent kmalloc = 299; 4851 KmallocNodeFtraceEvent kmalloc_node = 300; 4852 KmemCacheAllocFtraceEvent kmem_cache_alloc = 301; 4853 KmemCacheAllocNodeFtraceEvent kmem_cache_alloc_node = 302; 4854 KmemCacheFreeFtraceEvent kmem_cache_free = 303; 4855 MigratePagesEndFtraceEvent migrate_pages_end = 304; 4856 MigratePagesStartFtraceEvent migrate_pages_start = 305; 4857 MigrateRetryFtraceEvent migrate_retry = 306; 4858 MmPageAllocFtraceEvent mm_page_alloc = 307; 4859 MmPageAllocExtfragFtraceEvent mm_page_alloc_extfrag = 308; 4860 MmPageAllocZoneLockedFtraceEvent mm_page_alloc_zone_locked = 309; 4861 MmPageFreeFtraceEvent mm_page_free = 310; 4862 MmPageFreeBatchedFtraceEvent mm_page_free_batched = 311; 4863 MmPagePcpuDrainFtraceEvent mm_page_pcpu_drain = 312; 4864 RssStatFtraceEvent rss_stat = 313; 4865 IonHeapShrinkFtraceEvent ion_heap_shrink = 314; 4866 IonHeapGrowFtraceEvent ion_heap_grow = 315; 4867 FenceInitFtraceEvent fence_init = 316; 4868 FenceDestroyFtraceEvent fence_destroy = 317; 4869 FenceEnableSignalFtraceEvent fence_enable_signal = 318; 4870 FenceSignaledFtraceEvent fence_signaled = 319; 4871 ClkEnableFtraceEvent clk_enable = 320; 4872 ClkDisableFtraceEvent clk_disable = 321; 4873 ClkSetRateFtraceEvent clk_set_rate = 322; 4874 BinderTransactionAllocBufFtraceEvent binder_transaction_alloc_buf = 323; 4875 SignalDeliverFtraceEvent signal_deliver = 324; 4876 SignalGenerateFtraceEvent signal_generate = 325; 4877 OomScoreAdjUpdateFtraceEvent oom_score_adj_update = 326; 4878 GenericFtraceEvent generic = 327; 4879 MmEventRecordFtraceEvent mm_event_record = 328; 4880 SysEnterFtraceEvent sys_enter = 329; 4881 SysExitFtraceEvent sys_exit = 330; 4882 ZeroFtraceEvent zero = 331; 4883 GpuFrequencyFtraceEvent gpu_frequency = 332; 4884 SdeTracingMarkWriteFtraceEvent sde_tracing_mark_write = 333; 4885 MarkVictimFtraceEvent mark_victim = 334; 4886 IonStatFtraceEvent ion_stat = 335; 4887 IonBufferCreateFtraceEvent ion_buffer_create = 336; 4888 IonBufferDestroyFtraceEvent ion_buffer_destroy = 337; 4889 ScmCallStartFtraceEvent scm_call_start = 338; 4890 ScmCallEndFtraceEvent scm_call_end = 339; 4891 GpuMemTotalFtraceEvent gpu_mem_total = 340; 4892 ThermalTemperatureFtraceEvent thermal_temperature = 341; 4893 CdevUpdateFtraceEvent cdev_update = 342; 4894 CpuhpExitFtraceEvent cpuhp_exit = 343; 4895 CpuhpMultiEnterFtraceEvent cpuhp_multi_enter = 344; 4896 CpuhpEnterFtraceEvent cpuhp_enter = 345; 4897 CpuhpLatencyFtraceEvent cpuhp_latency = 346; 4898 } 4899} 4900 4901// End of protos/perfetto/trace/ftrace/ftrace_event.proto 4902 4903// Begin of protos/perfetto/trace/ftrace/ftrace_event_bundle.proto 4904 4905// The result of tracing one or more ftrace data pages from a single per-cpu 4906// kernel ring buffer. If collating multiple pages' worth of events, all of 4907// them come from contiguous pages, with no kernel data loss in between. 4908message FtraceEventBundle { 4909 optional uint32 cpu = 1; 4910 repeated FtraceEvent event = 2; 4911 // Set to true if there was data loss between the last time we've read from 4912 // the corresponding per-cpu kernel buffer, and the earliest event recorded 4913 // in this bundle. 4914 optional bool lost_events = 3; 4915 4916 // Optionally-enabled compact encoding of a batch of scheduling events. Only 4917 // a subset of events & their fields is recorded. 4918 // All fields (except comms) are stored in a structure-of-arrays form, one 4919 // entry in each repeated field per event. 4920 message CompactSched { 4921 // Interned table of unique strings for this bundle. 4922 repeated string intern_table = 5; 4923 4924 // Delta-encoded timestamps across all sched_switch events within this 4925 // bundle. The first is absolute, each next one is relative to its 4926 // predecessor. 4927 repeated uint64 switch_timestamp = 1 [packed = true]; 4928 repeated int64 switch_prev_state = 2 [packed = true]; 4929 repeated int32 switch_next_pid = 3 [packed = true]; 4930 repeated int32 switch_next_prio = 4 [packed = true]; 4931 // One per event, index into |intern_table| corresponding to the 4932 // next_comm field of the event. 4933 repeated uint32 switch_next_comm_index = 6 [packed = true]; 4934 4935 // Delta-encoded timestamps across all sched_waking events within this 4936 // bundle. The first is absolute, each next one is relative to its 4937 // predecessor. 4938 repeated uint64 waking_timestamp = 7 [packed = true]; 4939 repeated int32 waking_pid = 8 [packed = true]; 4940 repeated int32 waking_target_cpu = 9 [packed = true]; 4941 repeated int32 waking_prio = 10 [packed = true]; 4942 // One per event, index into |intern_table| corresponding to the 4943 // comm field of the event. 4944 repeated uint32 waking_comm_index = 11 [packed = true]; 4945 } 4946 optional CompactSched compact_sched = 4; 4947} 4948 4949// End of protos/perfetto/trace/ftrace/ftrace_event_bundle.proto 4950 4951// Begin of protos/perfetto/trace/ftrace/ftrace_stats.proto 4952 4953// Per-CPU stats for the ftrace data source gathered from the kernel from 4954// /sys/kernel/debug/tracing/per_cpu/cpuX/stats. 4955message FtraceCpuStats { 4956 // CPU index. 4957 optional uint64 cpu = 1; 4958 4959 // Number of entries still in the kernel buffer. Ideally this should be close 4960 // to zero, as events are consumed regularly and moved into the userspace 4961 // buffers (or file). 4962 optional uint64 entries = 2; 4963 4964 // Number of events lost in kernel buffers due to overwriting of old events 4965 // before userspace had a chance to drain them. 4966 optional uint64 overrun = 3; 4967 4968 // This should always be zero. If not the buffer size is way too small or 4969 // something went wrong with the tracer. 4970 optional uint64 commit_overrun = 4; 4971 4972 // Bytes actually read (not overwritten). 4973 optional uint64 bytes_read = 5; 4974 4975 // The timestamp for the oldest event still in the ring buffer. 4976 optional double oldest_event_ts = 6; 4977 4978 // The current timestamp. 4979 optional double now_ts = 7; 4980 4981 // If the kernel buffer has overwrite mode disabled, this will show the number 4982 // of new events that were lost because the buffer was full. This is similar 4983 // to |overrun| but only for the overwrite=false case. 4984 optional uint64 dropped_events = 8; 4985 4986 // The number of events read. 4987 optional uint64 read_events = 9; 4988} 4989 4990// Ftrace stats for all CPUs. 4991message FtraceStats { 4992 enum Phase { 4993 UNSPECIFIED = 0; 4994 START_OF_TRACE = 1; 4995 END_OF_TRACE = 2; 4996 } 4997 4998 // Tells when stats were sampled. There should be one sample at the beginning 4999 // of the trace and one sample at the end. 5000 optional Phase phase = 1; 5001 5002 // Per-CPU stats (one entry for each CPU). 5003 repeated FtraceCpuStats cpu_stats = 2; 5004} 5005 5006// End of protos/perfetto/trace/ftrace/ftrace_stats.proto 5007 5008// Begin of protos/perfetto/trace/gpu/gpu_counter_event.proto 5009 5010message GpuCounterEvent { 5011 // The first trace packet of each session should include counter_spec. 5012 optional GpuCounterDescriptor counter_descriptor = 1; 5013 5014 message GpuCounter { 5015 // required. Identifier for counter. 5016 optional uint32 counter_id = 1; 5017 // required. Value of the counter. 5018 oneof value { 5019 int64 int_value = 2; 5020 double double_value = 3; 5021 } 5022 } 5023 repeated GpuCounter counters = 2; 5024 5025 // optional. Identifier for GPU in a multi-gpu device. 5026 optional int32 gpu_id = 3; 5027} 5028 5029// End of protos/perfetto/trace/gpu/gpu_counter_event.proto 5030 5031// Begin of protos/perfetto/trace/gpu/gpu_log.proto 5032 5033// Message for logging events GPU data producer. 5034message GpuLog { 5035 enum Severity { 5036 LOG_SEVERITY_UNSPECIFIED = 0; 5037 LOG_SEVERITY_VERBOSE = 1; 5038 LOG_SEVERITY_DEBUG = 2; 5039 LOG_SEVERITY_INFO = 3; 5040 LOG_SEVERITY_WARNING = 4; 5041 LOG_SEVERITY_ERROR = 5; 5042 }; 5043 optional Severity severity = 1; 5044 5045 optional string tag = 2; 5046 5047 optional string log_message = 3; 5048} 5049 5050// End of protos/perfetto/trace/gpu/gpu_log.proto 5051 5052// Begin of protos/perfetto/trace/gpu/gpu_render_stage_event.proto 5053 5054// next id: 15 5055message GpuRenderStageEvent { 5056 // required. Unique ID for the event. 5057 optional uint64 event_id = 1; 5058 5059 // optional. Duration of the event in nanoseconds. If unset, this is a 5060 // single time point event. 5061 optional uint64 duration = 2; 5062 5063 // required. ID to a hardware queue description in the specifications. 5064 // InternedGpuRenderStageSpecification 5065 optional uint64 hw_queue_iid = 13; 5066 5067 // required. ID to a render stage description in the specifications. 5068 // InternedGpuRenderStageSpecification 5069 optional uint64 stage_iid = 14; 5070 5071 // optional. Identifier for GPU in a multi-gpu device. 5072 optional int32 gpu_id = 11; 5073 5074 // required. Graphics context for the event. 5075 // For OpenGL, this is the GL context. 5076 // For Vulkan, this is the VkDevice. 5077 optional uint64 context = 5; 5078 5079 // optional. The render target for this event. 5080 // For OpenGL, this is the GL frame buffer handle. 5081 // For Vulkan, this is the VkFrameBuffer handle. 5082 optional uint64 render_target_handle = 8; 5083 5084 // optional. Submission ID generated by the UMD. 5085 // For OpenGL, the ID should map to an API submission (e.g., glFlush, 5086 // glFinish, eglSwapBufffers) event. The set of submissions to the HW due 5087 // to a single API submission should share the same ID. 5088 // For Vulkan, it should map 1:1 with a vkQueueSubmit. 5089 optional uint32 submission_id = 10; 5090 5091 // optional. Additional data for the user. This may include attributes for 5092 // the event like resource ids, shaders, etc. 5093 message ExtraData { 5094 optional string name = 1; 5095 optional string value = 2; 5096 } 5097 repeated ExtraData extra_data = 6; 5098 5099 // VULKAN SPECIFICS 5100 5101 // optional. The Vulkan render pass handle. 5102 optional uint64 render_pass_handle = 9; 5103 5104 // optional. A bit mask representing which render subpasses contributed to 5105 // this render stage event. Subpass index 0 is represented by setting the 5106 // LSB of the mask. Additional mask can be added for subpass index greater 5107 // than 63. 5108 repeated uint64 render_subpass_index_mask = 15; 5109 5110 // optional. The Vulkan command buffer handle. 5111 optional uint64 command_buffer_handle = 12; 5112 5113 // DEPRECATED 5114 5115 // Deprecated. Use InternedGpuRenderStageSpecification instead. 5116 // The first trace packet of each session should include a Specifications 5117 // to enumerate *all* IDs that will be used. The timestamp of this packet 5118 // must be earlier than all other packets. Only one packet with Specifications 5119 // is expected. 5120 message Specifications { 5121 message ContextSpec { 5122 optional uint64 context = 1; 5123 optional int32 pid = 2; 5124 } 5125 optional ContextSpec context_spec = 1; 5126 5127 message Description { 5128 optional string name = 1; 5129 optional string description = 2; 5130 } 5131 5132 // Labels to categorize the hw Queue this event goes on. 5133 repeated Description hw_queue = 2; 5134 5135 // Labels to categorize render stage(binning, render, compute etc). 5136 repeated Description stage = 3; 5137 } 5138 // Deprecated. Use hw_queue_iid and stage_iid to refer to 5139 // InternedGpuRenderStageSpecification instead. 5140 optional Specifications specifications = 7 [deprecated = true]; 5141 5142 // Deprecated. Use hw_queue_iid instead; 5143 optional int32 hw_queue_id = 3 [deprecated = true]; 5144 5145 // Deprecated. Use stage_iid instead; 5146 optional int32 stage_id = 4 [deprecated = true]; 5147 5148 // Extension for vendor's custom proto. 5149 extensions 100; 5150} 5151 5152// Interned data. 5153 5154// The iid is the numeric value of either the GL Context or the VkDevice 5155// handle. 5156message InternedGraphicsContext { 5157 optional uint64 iid = 1; 5158 optional int32 pid = 2; 5159 enum Api { 5160 UNDEFINED = 0; 5161 OPEN_GL = 1; 5162 VULKAN = 2; 5163 OPEN_CL = 3; 5164 } 5165 optional Api api = 3; 5166} 5167 5168message InternedGpuRenderStageSpecification { 5169 optional uint64 iid = 1; 5170 optional string name = 2; 5171 optional string description = 3; 5172 5173 enum RenderStageCategory { 5174 OTHER = 0; 5175 GRAPHICS = 1; 5176 COMPUTE = 2; 5177 } 5178 optional RenderStageCategory category = 4; 5179} 5180 5181// End of protos/perfetto/trace/gpu/gpu_render_stage_event.proto 5182 5183// Begin of protos/perfetto/trace/gpu/vulkan_api_event.proto 5184 5185// Message for recording the Vulkan call. 5186message VulkanApiEvent { 5187 oneof event { 5188 VkDebugUtilsObjectName vk_debug_utils_object_name = 1; 5189 VkQueueSubmit vk_queue_submit = 2; 5190 } 5191 5192 // For recording vkSetDebugUtilsObjectNameEXT and 5193 // vkDebugMarkerSetObjectNameEXT 5194 message VkDebugUtilsObjectName { 5195 optional uint32 pid = 1; 5196 optional uint64 vk_device = 2; 5197 // VkObjectType. Value must match 5198 // https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkObjectType.html. 5199 optional int32 object_type = 3; 5200 optional uint64 object = 4; 5201 optional string object_name = 5; 5202 } 5203 5204 // For recording vkQueueSubmit call. 5205 message VkQueueSubmit { 5206 optional uint64 duration_ns = 1; 5207 optional uint32 pid = 2; 5208 optional uint32 tid = 3; 5209 optional uint64 vk_queue = 4; 5210 repeated uint64 vk_command_buffers = 5; 5211 // Submission ID. An identifier unique to each vkQueueSubmit call. This 5212 // submission_id must match GpuRenderStageEvent.submission_id if the 5213 // GpuRenderStageEvent is created due to this vkQueueSubmit. 5214 optional uint32 submission_id = 6; 5215 } 5216} 5217 5218// End of protos/perfetto/trace/gpu/vulkan_api_event.proto 5219 5220// Begin of protos/perfetto/trace/gpu/vulkan_memory_event.proto 5221 5222// All the information that cannot be sent within a VulkanMemoryEvent message, 5223// are sent as annotations to the main memory event. One example is the 5224// properties of the object that consumes the allocated memory, for example, a 5225// buffer or an image. 5226// key_iid and string_iid are both interned strings. Original string value is 5227// stored in vulkan_memory_keys from 5228// protos/perfetto/trace/interned_data/interned_data.proto. 5229message VulkanMemoryEventAnnotation { 5230 optional uint64 key_iid = 1; 5231 oneof value { 5232 int64 int_value = 2; 5233 double double_value = 3; 5234 uint64 string_iid = 4; 5235 } 5236} 5237 5238// Each VulkanMemoryEvent encompasses information regarding one single function 5239// call that results in reserving, binding or freeing host or GPU memory. There 5240// is a special message type, ANNOTATIONS, which is used to communicate 5241// information that are not directly related to a memory event, nonetheless are 5242// essential to understand the memory usage. An example is the size and memory 5243// types of the memory heaps. 5244// 5245// Next reserved id: 10 (up to 15). 5246// Next id: 21. 5247message VulkanMemoryEvent { 5248 enum Source { 5249 SOURCE_UNSPECIFIED = 0; 5250 SOURCE_DRIVER = 1; 5251 SOURCE_DEVICE = 2; 5252 SOURCE_DEVICE_MEMORY = 3; 5253 SOURCE_BUFFER = 4; 5254 SOURCE_IMAGE = 5; 5255 } 5256 5257 enum Operation { 5258 OP_UNSPECIFIED = 0; 5259 5260 // alloc, create 5261 OP_CREATE = 1; 5262 5263 // free, destroy(non-bound) 5264 OP_DESTROY = 2; 5265 5266 // bind buffer and image 5267 OP_BIND = 3; 5268 5269 // destroy (bound) 5270 OP_DESTROY_BOUND = 4; 5271 5272 // only annotations 5273 OP_ANNOTATIONS = 5; 5274 } 5275 5276 enum AllocationScope { 5277 SCOPE_UNSPECIFIED = 0; 5278 SCOPE_COMMAND = 1; 5279 SCOPE_OBJECT = 2; 5280 SCOPE_CACHE = 3; 5281 SCOPE_DEVICE = 4; 5282 SCOPE_INSTANCE = 5; 5283 } 5284 5285 optional Source source = 1; 5286 optional Operation operation = 2; 5287 optional int64 timestamp = 3; 5288 optional uint32 pid = 4; 5289 optional fixed64 memory_address = 5; 5290 optional uint64 memory_size = 6; 5291 // Interned string. Original string value is stored in function_names from 5292 // protos/perfetto/trace/interned_data/interned_data.proto. 5293 optional uint64 caller_iid = 7; 5294 optional AllocationScope allocation_scope = 8; 5295 // Extra related information, e.g., create configs, etc. 5296 repeated VulkanMemoryEventAnnotation annotations = 9; 5297 5298 // Field IDs used for device memory (low sampling rate) 5299 optional fixed64 device = 16; 5300 optional fixed64 device_memory = 17; 5301 optional uint32 memory_type = 18; 5302 optional uint32 heap = 19; 5303 optional fixed64 object_handle = 20; 5304} 5305 5306// End of protos/perfetto/trace/gpu/vulkan_memory_event.proto 5307 5308// Begin of protos/perfetto/trace/profiling/profile_common.proto 5309 5310// TODO(fmayer): Figure out naming thoroughout this file to get a 5311// nomenclature that works between Windows and Linux. 5312 5313// The interning fields in this file can refer to 2 different intern tables, 5314// depending on the message they are used in. If the interned fields are present 5315// in ProfilePacket proto, then the intern tables included in the ProfilePacket 5316// should be used. If the intered fields are present in the 5317// StreamingProfilePacket proto, then the intern tables included in all of the 5318// previous InternedData message with same sequence ID should be used. 5319// TODO(fmayer): Move to the intern tables to a common location. 5320message InternedString { 5321 optional uint64 iid = 1; 5322 optional bytes str = 2; 5323} 5324 5325// A symbol field that is emitted after the trace is written. These tables would 5326// be appended as the last packets in the trace that the profiler will use, so 5327// that the actual trace need not be rewritten to symbolize the profiles. 5328message ProfiledFrameSymbols { 5329 // Use the frame id as the interning key for the symbols. 5330 optional uint64 frame_iid = 1; 5331 5332 // These are repeated because when inlining happens, multiple functions' 5333 // frames can be at a single address. Imagine function Foo calling the 5334 // std::vector<int> constructor, which gets inlined at 0xf00. We then get 5335 // both Foo and the std::vector<int> constructor when we symbolize the 5336 // address. 5337 5338 // key to InternedString 5339 repeated uint64 function_name_id = 2; 5340 5341 // key to InternedString 5342 repeated uint64 file_name_id = 3; 5343 5344 repeated uint32 line_number = 4; 5345} 5346 5347message Line { 5348 optional string function_name = 1; 5349 optional string source_file_name = 2; 5350 optional uint32 line_number = 3; 5351} 5352 5353// Symbols for a given address in a module. 5354message AddressSymbols { 5355 optional uint64 address = 1; 5356 5357 // Source lines that correspond to this address. 5358 // 5359 // These are repeated because when inlining happens, multiple functions' 5360 // frames can be at a single address. Imagine function Foo calling the 5361 // std::vector<int> constructor, which gets inlined at 0xf00. We then get 5362 // both Foo and the std::vector<int> constructor when we symbolize the 5363 // address. 5364 repeated Line lines = 2; 5365} 5366 5367// Symbols for addresses seen in a module. 5368message ModuleSymbols { 5369 // Fully qualified path to the mapping. 5370 // E.g. /system/lib64/libc.so. 5371 optional string path = 1; 5372 5373 // .note.gnu.build-id on Linux (not hex encoded). 5374 // uuid on MacOS. 5375 // Module GUID on Windows. 5376 optional string build_id = 2; 5377 repeated AddressSymbols address_symbols = 3; 5378} 5379 5380message Mapping { 5381 // Interning key. 5382 optional uint64 iid = 1; 5383 5384 // Interning key. 5385 optional uint64 build_id = 2; 5386 5387 // The linker may create multiple memory mappings for the same shared 5388 // library. 5389 // This is so that the ELF header is mapped as read only, while the 5390 // executable memory is mapped as executable only. 5391 // The details of this depend on the linker, a possible mapping of an ELF 5392 // file is this: 5393 // +----------------------+ 5394 // ELF |xxxxxxxxxyyyyyyyyyyyyy| 5395 // +---------+------------+ 5396 // | | 5397 // | read | executable 5398 // v mapping v mapping 5399 // +----------------------+ 5400 // Memory |xxxxxxxxx|yyyyyyyyyyyy| 5401 // +------------------+---+ 5402 // ^ ^ ^ 5403 // + + + 5404 // start exact relpc 5405 // offset offset 0x1800 5406 // 0x0000 0x1000 5407 // 5408 // exact_offset is the offset into the library file of this mapping. 5409 // start_offset is the offset into the library file of the first mapping 5410 // for that library. For native libraries (.so files) this should be 0. 5411 5412 // This is not set on Android 10. 5413 optional uint64 exact_offset = 8; 5414 5415 optional uint64 start_offset = 3; 5416 optional uint64 start = 4; 5417 optional uint64 end = 5; 5418 optional uint64 load_bias = 6; 5419 5420 // E.g. ["system", "lib64", "libc.so"] 5421 // id of string. 5422 repeated uint64 path_string_ids = 7; 5423} 5424 5425message Frame { 5426 // Interning key 5427 optional uint64 iid = 1; 5428 5429 // E.g. "fopen" 5430 // id of string. 5431 optional uint64 function_name_id = 2; 5432 5433 optional uint64 mapping_id = 3; 5434 optional uint64 rel_pc = 4; 5435} 5436 5437message Callstack { 5438 optional uint64 iid = 1; 5439 // Frames of this callstack. Bottom frame first. 5440 repeated uint64 frame_ids = 2; 5441} 5442 5443// End of protos/perfetto/trace/profiling/profile_common.proto 5444 5445// Begin of protos/perfetto/trace/track_event/debug_annotation.proto 5446 5447// Key/value annotations provided in untyped TRACE_EVENT macros. These 5448// annotations are intended for debug use and are not considered a stable API 5449// surface. As such, they should not be relied upon to implement (new) metrics. 5450// 5451// Next ID: 10. 5452message DebugAnnotation { 5453 message NestedValue { 5454 enum NestedType { 5455 // leaf value. 5456 UNSPECIFIED = 0; 5457 DICT = 1; 5458 ARRAY = 2; 5459 } 5460 optional NestedType nested_type = 1; 5461 5462 repeated string dict_keys = 2; 5463 repeated NestedValue dict_values = 3; 5464 repeated NestedValue array_values = 4; 5465 optional int64 int_value = 5; 5466 optional double double_value = 6; 5467 optional bool bool_value = 7; 5468 optional string string_value = 8; 5469 } 5470 5471 oneof name_field { 5472 // interned DebugAnnotationName. 5473 uint64 name_iid = 1; 5474 // non-interned variant. 5475 string name = 10; 5476 } 5477 5478 oneof value { 5479 bool bool_value = 2; 5480 uint64 uint_value = 3; 5481 int64 int_value = 4; 5482 double double_value = 5; 5483 string string_value = 6; 5484 // Pointers are stored in a separate type as the JSON output treats them 5485 // differently from other uint64 values. 5486 uint64 pointer_value = 7; 5487 NestedValue nested_value = 8; 5488 5489 // Legacy instrumentation may not support conversion of nested data to 5490 // NestedValue yet. 5491 string legacy_json_value = 9; 5492 } 5493} 5494 5495// -------------------- 5496// Interned data types: 5497// -------------------- 5498 5499message DebugAnnotationName { 5500 optional uint64 iid = 1; 5501 optional string name = 2; 5502} 5503 5504// End of protos/perfetto/trace/track_event/debug_annotation.proto 5505 5506// Begin of protos/perfetto/trace/track_event/log_message.proto 5507 5508message LogMessage { 5509 // interned SourceLocation. 5510 optional uint64 source_location_iid = 1; 5511 // interned LogMessageBody. 5512 optional uint64 body_iid = 2; 5513} 5514 5515// -------------------- 5516// Interned data types: 5517// -------------------- 5518 5519message LogMessageBody { 5520 optional uint64 iid = 1; 5521 optional string body = 2; 5522} 5523// End of protos/perfetto/trace/track_event/log_message.proto 5524 5525// Begin of protos/perfetto/trace/track_event/source_location.proto 5526 5527// -------------------- 5528// Interned data types: 5529// -------------------- 5530 5531message SourceLocation { 5532 optional uint64 iid = 1; 5533 5534 // We intend to add a binary symbol version of this in the future. 5535 optional string file_name = 2; 5536 optional string function_name = 3; 5537 optional uint32 line_number = 4; 5538} 5539 5540// End of protos/perfetto/trace/track_event/source_location.proto 5541 5542// Begin of protos/perfetto/trace/track_event/chrome_compositor_scheduler_state.proto 5543 5544// Describes Chrome's Compositor scheduler's current state and associated 5545// variables. 5546// 5547// These protos and enums were adapted from the corresponding original JSON 5548// trace event for the scheduler state. In contrast to the JSON, we use strongly 5549// typed enum values instead of strings for many fields, and 5550// microsecond-granularity timestamps. 5551// 5552// The original format was generated in JSON by the code at 5553// https://cs.chromium.org/chromium/src/cc/scheduler/scheduler.cc?l=870&rcl=5e15eabc9c0eec8daf94fdf78e93f13b6e3b63dd 5554// 5555// TODO(nuskos): Update link once we've switched to writing this proto. 5556// 5557// All non-delta-timestamps are absolute CLOCK_MONOTONIC timestamps. 5558 5559enum ChromeCompositorSchedulerAction { 5560 CC_SCHEDULER_ACTION_UNSPECIFIED = 0; 5561 CC_SCHEDULER_ACTION_NONE = 1; 5562 CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME = 2; 5563 CC_SCHEDULER_ACTION_COMMIT = 3; 5564 CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE = 4; 5565 CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE = 5; 5566 CC_SCHEDULER_ACTION_DRAW_FORCED = 6; 5567 CC_SCHEDULER_ACTION_DRAW_ABORT = 7; 5568 CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION = 8; 5569 CC_SCHEDULER_ACTION_PREPARE_TILES = 9; 5570 CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK = 10; 5571 CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION = 11; 5572 CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL = 12; 5573 CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON = 13; 5574} 5575 5576// Next id: 18 5577message ChromeCompositorSchedulerState { 5578 enum BeginImplFrameDeadlineMode { 5579 DEADLINE_MODE_UNSPECIFIED = 0; 5580 DEADLINE_MODE_NONE = 1; 5581 DEADLINE_MODE_IMMEDIATE = 2; 5582 DEADLINE_MODE_REGULAR = 3; 5583 DEADLINE_MODE_LATE = 4; 5584 DEADLINE_MODE_BLOCKED = 5; 5585 } 5586 optional ChromeCompositorStateMachine state_machine = 1; 5587 optional bool observing_begin_frame_source = 2; 5588 optional bool begin_impl_frame_deadline_task = 3; 5589 optional bool pending_begin_frame_task = 4; 5590 optional bool skipped_last_frame_missed_exceeded_deadline = 5; 5591 optional bool skipped_last_frame_to_reduce_latency = 6; 5592 optional ChromeCompositorSchedulerAction inside_action = 7; 5593 optional BeginImplFrameDeadlineMode deadline_mode = 8; 5594 optional int64 deadline_us = 9; 5595 optional int64 deadline_scheduled_at_us = 10; 5596 optional int64 now_us = 11; 5597 optional int64 now_to_deadline_delta_us = 12; 5598 optional int64 now_to_deadline_scheduled_at_delta_us = 13; 5599 optional BeginImplFrameArgs begin_impl_frame_args = 14; 5600 optional BeginFrameObserverState begin_frame_observer_state = 15; 5601 optional BeginFrameSourceState begin_frame_source_state = 16; 5602 optional CompositorTimingHistory compositor_timing_history = 17; 5603} 5604 5605// Describes the current values stored in the Chrome Compositor state machine. 5606// Next id: 3 5607message ChromeCompositorStateMachine { 5608 // Next id: 6 5609 message MajorState { 5610 enum BeginImplFrameState { 5611 BEGIN_IMPL_FRAME_UNSPECIFIED = 0; 5612 BEGIN_IMPL_FRAME_IDLE = 1; 5613 BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME = 2; 5614 BEGIN_IMPL_FRAME_INSIDE_DEADLINE = 3; 5615 } 5616 enum BeginMainFrameState { 5617 BEGIN_MAIN_FRAME_UNSPECIFIED = 0; 5618 BEGIN_MAIN_FRAME_IDLE = 1; 5619 BEGIN_MAIN_FRAME_SENT = 2; 5620 BEGIN_MAIN_FRAME_READY_TO_COMMIT = 3; 5621 } 5622 enum LayerTreeFrameSinkState { 5623 LAYER_TREE_FRAME_UNSPECIFIED = 0; 5624 LAYER_TREE_FRAME_NONE = 1; 5625 LAYER_TREE_FRAME_ACTIVE = 2; 5626 LAYER_TREE_FRAME_CREATING = 3; 5627 LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT = 4; 5628 LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION = 5; 5629 } 5630 enum ForcedRedrawOnTimeoutState { 5631 FORCED_REDRAW_UNSPECIFIED = 0; 5632 FORCED_REDRAW_IDLE = 1; 5633 FORCED_REDRAW_WAITING_FOR_COMMIT = 2; 5634 FORCED_REDRAW_WAITING_FOR_ACTIVATION = 3; 5635 FORCED_REDRAW_WAITING_FOR_DRAW = 4; 5636 } 5637 optional ChromeCompositorSchedulerAction next_action = 1; 5638 optional BeginImplFrameState begin_impl_frame_state = 2; 5639 optional BeginMainFrameState begin_main_frame_state = 3; 5640 optional LayerTreeFrameSinkState layer_tree_frame_sink_state = 4; 5641 optional ForcedRedrawOnTimeoutState forced_redraw_state = 5; 5642 } 5643 optional MajorState major_state = 1; 5644 5645 // Next id: 47 5646 message MinorState { 5647 enum TreePriority { 5648 TREE_PRIORITY_UNSPECIFIED = 0; 5649 TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES = 1; 5650 TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY = 2; 5651 TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY = 3; 5652 } 5653 enum ScrollHandlerState { 5654 SCROLL_HANDLER_UNSPECIFIED = 0; 5655 SCROLL_AFFECTS_SCROLL_HANDLER = 1; 5656 SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER = 2; 5657 } 5658 optional int32 commit_count = 1; 5659 optional int32 current_frame_number = 2; 5660 optional int32 last_frame_number_submit_performed = 3; 5661 optional int32 last_frame_number_draw_performed = 4; 5662 optional int32 last_frame_number_begin_main_frame_sent = 5; 5663 optional bool did_draw = 6; 5664 optional bool did_send_begin_main_frame_for_current_frame = 7; 5665 optional bool did_notify_begin_main_frame_not_expected_until = 8; 5666 optional bool did_notify_begin_main_frame_not_expected_soon = 9; 5667 optional bool wants_begin_main_frame_not_expected = 10; 5668 optional bool did_commit_during_frame = 11; 5669 optional bool did_invalidate_layer_tree_frame_sink = 12; 5670 optional bool did_perform_impl_side_invalidaion = 13; 5671 optional bool did_prepare_tiles = 14; 5672 optional int32 consecutive_checkerboard_animations = 15; 5673 optional int32 pending_submit_frames = 16; 5674 optional int32 submit_frames_with_current_layer_tree_frame_sink = 17; 5675 optional bool needs_redraw = 18; 5676 optional bool needs_prepare_tiles = 19; 5677 optional bool needs_begin_main_frame = 20; 5678 optional bool needs_one_begin_impl_frame = 21; 5679 optional bool visible = 22; 5680 optional bool begin_frame_source_paused = 23; 5681 optional bool can_draw = 24; 5682 optional bool resourceless_draw = 25; 5683 optional bool has_pending_tree = 26; 5684 optional bool pending_tree_is_ready_for_activation = 27; 5685 optional bool active_tree_needs_first_draw = 28; 5686 optional bool active_tree_is_ready_to_draw = 29; 5687 optional bool did_create_and_initialize_first_layer_tree_frame_sink = 30; 5688 optional TreePriority tree_priority = 31; 5689 optional ScrollHandlerState scroll_handler_state = 32; 5690 optional bool critical_begin_main_frame_to_activate_is_fast = 33; 5691 optional bool main_thread_missed_last_deadline = 34; 5692 optional bool skip_next_begin_main_frame_to_reduce_latency = 35; 5693 optional bool video_needs_begin_frames = 36; 5694 optional bool defer_begin_main_frame = 37; 5695 optional bool last_commit_had_no_updates = 38; 5696 optional bool did_draw_in_last_frame = 39; 5697 optional bool did_submit_in_last_frame = 40; 5698 optional bool needs_impl_side_invalidation = 41; 5699 optional bool current_pending_tree_is_impl_side = 42; 5700 optional bool previous_pending_tree_was_impl_side = 43; 5701 optional bool processing_animation_worklets_for_active_tree = 44; 5702 optional bool processing_animation_worklets_for_pending_tree = 45; 5703 optional bool processing_paint_worklets_for_pending_tree = 46; 5704 } 5705 optional MinorState minor_state = 2; 5706} 5707 5708// Next id: 12 5709message BeginFrameArgs { 5710 // JSON format has a "type" field that was always just "BeginFrameArgs" we 5711 // drop this in the proto representation, and instead make the JSON format 5712 // "subtype" field become the type field. 5713 enum BeginFrameArgsType { 5714 BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED = 0; 5715 BEGIN_FRAME_ARGS_TYPE_INVALID = 1; 5716 BEGIN_FRAME_ARGS_TYPE_NORMAL = 2; 5717 BEGIN_FRAME_ARGS_TYPE_MISSED = 3; 5718 } 5719 optional BeginFrameArgsType type = 1; 5720 optional uint64 source_id = 2; 5721 optional uint64 sequence_number = 3; 5722 optional int64 frame_time_us = 4; 5723 optional int64 deadline_us = 5; 5724 optional int64 interval_delta_us = 6; 5725 optional bool on_critical_path = 7; 5726 optional bool animate_only = 8; 5727 oneof created_from { 5728 // The interned SourceLocation. 5729 uint64 source_location_iid = 9; 5730 // The SourceLocation that this args was created from. 5731 // TODO(nuskos): Eventually we will support interning inside of 5732 // TypedArgument TraceEvents and then we shouldn't need this SourceLocation 5733 // since we can emit it as part of the InternedData message. When we can 5734 // remove this |source_location|. 5735 SourceLocation source_location = 10; 5736 } 5737} 5738 5739// Next id: 7 5740message BeginImplFrameArgs { 5741 optional int64 updated_at_us = 1; 5742 optional int64 finished_at_us = 2; 5743 enum State { 5744 BEGIN_FRAME_FINISHED = 0; 5745 BEGIN_FRAME_USING = 1; 5746 } 5747 optional State state = 3; 5748 oneof args { 5749 // Only set if |state| is BEGIN_FRAME_FINISHED. 5750 BeginFrameArgs current_args = 4; 5751 // Only set if |state| is BEGIN_FRAME_USING. 5752 BeginFrameArgs last_args = 5; 5753 } 5754 message TimestampsInUs { 5755 optional int64 interval_delta = 1; 5756 optional int64 now_to_deadline_delta = 2; 5757 optional int64 frame_time_to_now_delta = 3; 5758 optional int64 frame_time_to_deadline_delta = 4; 5759 optional int64 now = 5; 5760 optional int64 frame_time = 6; 5761 optional int64 deadline = 7; 5762 } 5763 optional TimestampsInUs timestamps_in_us = 6; 5764} 5765 5766message BeginFrameObserverState { 5767 optional int64 dropped_begin_frame_args = 1; 5768 optional BeginFrameArgs last_begin_frame_args = 2; 5769} 5770 5771message BeginFrameSourceState { 5772 optional uint32 source_id = 1; 5773 optional bool paused = 2; 5774 optional uint32 num_observers = 3; 5775 optional BeginFrameArgs last_begin_frame_args = 4; 5776} 5777 5778message CompositorTimingHistory { 5779 optional int64 begin_main_frame_queue_critical_estimate_delta_us = 1; 5780 optional int64 begin_main_frame_queue_not_critical_estimate_delta_us = 2; 5781 optional int64 begin_main_frame_start_to_ready_to_commit_estimate_delta_us = 5782 3; 5783 optional int64 commit_to_ready_to_activate_estimate_delta_us = 4; 5784 optional int64 prepare_tiles_estimate_delta_us = 5; 5785 optional int64 activate_estimate_delta_us = 6; 5786 optional int64 draw_estimate_delta_us = 7; 5787} 5788 5789// End of protos/perfetto/trace/track_event/chrome_compositor_scheduler_state.proto 5790 5791// Begin of protos/perfetto/trace/track_event/chrome_frame_reporter.proto 5792 5793message ChromeFrameReporter { 5794 enum State { 5795 // The frame did not have any updates to present. 5796 STATE_NO_UPDATE_DESIRED = 0; 5797 5798 // The frame presented all the desired updates (i.e. any updates requested 5799 // from both the compositor thread and main-threads were handled). 5800 STATE_PRESENTED_ALL = 1; 5801 5802 // The frame was presented with some updates, but also missed some updates 5803 // (e.g. missed updates from the main-thread, but included updates from the 5804 // compositor thread). 5805 STATE_PRESENTED_PARTIAL = 2; 5806 5807 // The frame was dropped, i.e. some updates were desired for the frame, but 5808 // was not presented. 5809 STATE_DROPPED = 3; 5810 }; 5811 5812 optional State state = 1; 5813 5814 enum FrameDropReason { 5815 REASON_UNSPECIFIED = 0; 5816 5817 // Frame was dropped by the display-compositor. 5818 // The display-compositor may drop a frame some times (e.g. the frame missed 5819 // the deadline, or was blocked on surface-sync, etc.) 5820 REASON_DISPLAY_COMPOSITOR = 1; 5821 5822 // Frame was dropped because of the main-thread. 5823 // The main-thread may cause a frame to be dropped, e.g. if the main-thread 5824 // is running expensive javascript, or doing a lot of layout updates, etc. 5825 REASON_MAIN_THREAD = 2; 5826 5827 // Frame was dropped by the client compositor. 5828 // The client compositor can drop some frames too (e.g. attempting to 5829 // recover latency, missing the deadline, etc.). 5830 REASON_CLIENT_COMPOSITOR = 3; 5831 }; 5832 5833 // The reason is set only if |state| is not |STATE_UPDATED_ALL|. 5834 optional FrameDropReason reason = 2; 5835 5836 optional uint64 frame_source = 3; 5837 optional uint64 frame_sequence = 4; 5838 5839 // If this is a droped frame (i.e. if |state| is set to |STATE_DROPPED| or 5840 // |STATE_PRESENTED_PARTIAL|), then indicates whether this frame impacts 5841 // smoothness. 5842 optional bool affects_smoothness = 5; 5843} 5844 5845// End of protos/perfetto/trace/track_event/chrome_frame_reporter.proto 5846 5847// Begin of protos/perfetto/trace/track_event/chrome_histogram_sample.proto 5848 5849// An individual histogram sample logged via Chrome's UMA metrics system. 5850message ChromeHistogramSample { 5851 // MD5 hash of the metric name. Either |name_hash| or |name| or both 5852 // must be present. 5853 optional uint64 name_hash = 1; 5854 optional string name = 2; 5855 optional int64 sample = 3; 5856} 5857 5858// End of protos/perfetto/trace/track_event/chrome_histogram_sample.proto 5859 5860// Begin of protos/perfetto/trace/track_event/chrome_keyed_service.proto 5861 5862// Details about one of Chrome's keyed services associated with the event. 5863message ChromeKeyedService { 5864 // Name of the service, e.g. "MediaRouter", "PreviewsService", etc. (in 5865 // Chrome, these are static strings known at compile time). 5866 optional string name = 1; 5867} 5868 5869// End of protos/perfetto/trace/track_event/chrome_keyed_service.proto 5870 5871// Begin of protos/perfetto/trace/track_event/chrome_latency_info.proto 5872 5873message ChromeLatencyInfo { 5874 optional int64 trace_id = 1; 5875 5876 // NEXT ID: 11 5877 // All step are optional but the enum is ordered (not by number) below in the 5878 // order we expect them to appear if they are emitted in trace in a blocking 5879 // fashion. 5880 enum Step { 5881 STEP_UNSPECIFIED = 0; 5882 // Emitted on the browser main thread. 5883 STEP_SEND_INPUT_EVENT_UI = 3; 5884 // Happens on the renderer's compositor. 5885 STEP_HANDLE_INPUT_EVENT_IMPL = 5; 5886 STEP_DID_HANDLE_INPUT_AND_OVERSCROLL = 8; 5887 // Occurs on the Renderer's main thread. 5888 STEP_HANDLE_INPUT_EVENT_MAIN = 4; 5889 STEP_MAIN_THREAD_SCROLL_UPDATE = 2; 5890 STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT = 1; 5891 // Could be emitted on both the renderer's main OR compositor. 5892 STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL = 9; 5893 // Optionally sometimes HANDLED_INPUT_EVENT_MAIN_OR_IMPL will proxy to the 5894 // renderer's compositor and this will be emitted. 5895 STEP_HANDLED_INPUT_EVENT_IMPL = 10; 5896 // Renderer's compositor. 5897 STEP_SWAP_BUFFERS = 6; 5898 // Happens on the VizCompositor in the GPU process. 5899 STEP_DRAW_AND_SWAP = 7; 5900 }; 5901 5902 optional Step step = 2; 5903 optional int32 frame_tree_node_id = 3; 5904 5905 // This enum is a copy of LatencyComponentType enum in Chrome, located in 5906 // ui/latency/latency_info.h, modulo added UNKNOWN value per protobuf 5907 // practices. 5908 enum LatencyComponentType { 5909 COMPONENT_UNSPECIFIED = 0; 5910 COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH = 1; 5911 COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL = 2; 5912 COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL = 3; 5913 COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL = 4; 5914 COMPONENT_INPUT_EVENT_LATENCY_UI = 5; 5915 COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN = 6; 5916 COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN = 7; 5917 COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL = 8; 5918 COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT = 9; 5919 COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH = 10; 5920 COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP = 11; 5921 COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME = 12; 5922 COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER = 13; 5923 COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP = 14; 5924 } 5925 5926 message ComponentInfo { 5927 optional LatencyComponentType component_type = 1; 5928 5929 // Microsecond timestamp in CLOCK_MONOTONIC domain 5930 optional uint64 time_us = 2; 5931 }; 5932 5933 repeated ComponentInfo component_info = 4; 5934 optional bool is_coalesced = 5; 5935 optional int64 gesture_scroll_id = 6; 5936} 5937 5938// End of protos/perfetto/trace/track_event/chrome_latency_info.proto 5939 5940// Begin of protos/perfetto/trace/track_event/chrome_legacy_ipc.proto 5941 5942// Details about a legacy Chrome IPC message that is either sent by the event. 5943// TODO(eseckler): Also use this message on the receiving side? 5944message ChromeLegacyIpc { 5945 enum MessageClass { 5946 CLASS_UNSPECIFIED = 0; 5947 CLASS_AUTOMATION = 1; 5948 CLASS_FRAME = 2; 5949 CLASS_PAGE = 3; 5950 CLASS_VIEW = 4; 5951 CLASS_WIDGET = 5; 5952 CLASS_INPUT = 6; 5953 CLASS_TEST = 7; 5954 CLASS_WORKER = 8; 5955 CLASS_NACL = 9; 5956 CLASS_GPU_CHANNEL = 10; 5957 CLASS_MEDIA = 11; 5958 CLASS_PPAPI = 12; 5959 CLASS_CHROME = 13; 5960 CLASS_DRAG = 14; 5961 CLASS_PRINT = 15; 5962 CLASS_EXTENSION = 16; 5963 CLASS_TEXT_INPUT_CLIENT = 17; 5964 CLASS_BLINK_TEST = 18; 5965 CLASS_ACCESSIBILITY = 19; 5966 CLASS_PRERENDER = 20; 5967 CLASS_CHROMOTING = 21; 5968 CLASS_BROWSER_PLUGIN = 22; 5969 CLASS_ANDROID_WEB_VIEW = 23; 5970 CLASS_NACL_HOST = 24; 5971 CLASS_ENCRYPTED_MEDIA = 25; 5972 CLASS_CAST = 26; 5973 CLASS_GIN_JAVA_BRIDGE = 27; 5974 CLASS_CHROME_UTILITY_PRINTING = 28; 5975 CLASS_OZONE_GPU = 29; 5976 CLASS_WEB_TEST = 30; 5977 CLASS_NETWORK_HINTS = 31; 5978 CLASS_EXTENSIONS_GUEST_VIEW = 32; 5979 CLASS_GUEST_VIEW = 33; 5980 CLASS_MEDIA_PLAYER_DELEGATE = 34; 5981 CLASS_EXTENSION_WORKER = 35; 5982 CLASS_SUBRESOURCE_FILTER = 36; 5983 CLASS_UNFREEZABLE_FRAME = 37; 5984 } 5985 5986 // Corresponds to the message class type defined in Chrome's IPCMessageStart 5987 // enum, e.g. FrameMsgStart, 5988 optional MessageClass message_class = 1; 5989 5990 // Line number of the message definition. See Chrome's IPC_MESSAGE_ID and 5991 // IPC_MESSAGE_START macros. 5992 optional uint32 message_line = 2; 5993} 5994 5995// End of protos/perfetto/trace/track_event/chrome_legacy_ipc.proto 5996 5997// Begin of protos/perfetto/trace/track_event/chrome_message_pump.proto 5998 5999// Details about Chrome message pump events 6000message ChromeMessagePump { 6001 // True if there are sent messages in the queue. 6002 optional bool sent_messages_in_queue = 1; 6003} 6004 6005// End of protos/perfetto/trace/track_event/chrome_message_pump.proto 6006 6007// Begin of protos/perfetto/trace/track_event/chrome_user_event.proto 6008 6009// Details about a UI interaction initiated by the user, such as opening or 6010// closing a tab or a context menu. 6011message ChromeUserEvent { 6012 // Name of the action, e.g. "NewTab", "ShowBookmarkManager", etc. (in 6013 // Chrome, these are usually static strings known at compile time, or 6014 // concatenations of multiple such static strings). 6015 optional string action = 1; 6016 6017 // MD5 hash of the action string. 6018 optional uint64 action_hash = 2; 6019} 6020 6021// End of protos/perfetto/trace/track_event/chrome_user_event.proto 6022 6023// Begin of protos/perfetto/trace/track_event/task_execution.proto 6024 6025// TrackEvent arguments describing the execution of a task. 6026message TaskExecution { 6027 // Source location that the task was posted from. 6028 // interned SourceLocation. 6029 optional uint64 posted_from_iid = 1; 6030} 6031// End of protos/perfetto/trace/track_event/task_execution.proto 6032 6033// Begin of protos/perfetto/trace/track_event/track_event.proto 6034 6035// NOTE: Full TrackEvent support in the client lib and chrome is WIP, thus these 6036// protos are still subject to change. Don't depend on them staying as they are. 6037 6038// Trace events emitted by client instrumentation library (TRACE_EVENT macros), 6039// which describe activity on a track, such as a thread or asynchronous event 6040// track. The track is specified using separate TrackDescriptor messages and 6041// referred to via the track's UUID. 6042// 6043// A simple TrackEvent packet specifies a timestamp, category, name and type: 6044// trace_packet { 6045// timestamp: 1000 6046// track_event { 6047// categories: ["my_cat"] 6048// name: "my_event" 6049// type: TYPE_INSTANT 6050// } 6051// } 6052// 6053// To associate an event with a custom track (e.g. a thread), the track is 6054// defined in a separate packet and referred to from the TrackEvent by its UUID: 6055// trace_packet { 6056// track_descriptor { 6057// track_uuid: 1234 6058// name: "my_track" 6059// 6060// // Optionally, associate the track with a thread. 6061// thread_descriptor { 6062// pid: 10 6063// tid: 10 6064// .. 6065// } 6066// } 6067// } 6068// 6069// A pair of TYPE_SLICE_BEGIN and _END events form a slice on the track: 6070// trace_packet { 6071// timestamp: 1200 6072// track_event { 6073// track_uuid: 1234 6074// categories: ["my_cat"] 6075// name: "my_slice" 6076// type: TYPE_SLICE_BEGIN 6077// } 6078// } 6079// trace_packet { 6080// timestamp: 1400 6081// track_event { 6082// track_uuid: 1234 6083// type: TYPE_SLICE_END 6084// } 6085// } 6086// 6087// TrackEvents also support optimizations to reduce data repetition and encoded 6088// data size, e.g. through data interning (names, categories, ...) and delta 6089// encoding of timestamps/counters. For details, see the InternedData message. 6090// Further, default values for attributes of events on the same sequence (e.g. 6091// their default track association) can be emitted as part of a 6092// TrackEventDefaults message. 6093// 6094// Next reserved id: 13 (up to 15). Next id: 35. 6095message TrackEvent { 6096 // Names of categories of the event. In the client library, categories are a 6097 // way to turn groups of individual events on or off. 6098 // interned EventCategoryName. 6099 repeated uint64 category_iids = 3; 6100 // non-interned variant. 6101 repeated string categories = 22; 6102 6103 // Optional name of the event for its display in trace viewer. May be left 6104 // unspecified for events with typed arguments. 6105 // 6106 // Note that metrics should not rely on event names, as they are prone to 6107 // changing. Instead, they should use typed arguments to identify the events 6108 // they are interested in. 6109 oneof name_field { 6110 // interned EventName. 6111 uint64 name_iid = 10; 6112 // non-interned variant. 6113 string name = 23; 6114 } 6115 6116 // TODO(eseckler): Support using binary symbols for category/event names. 6117 6118 // Type of the TrackEvent (required if |phase| in LegacyEvent is not set). 6119 enum Type { 6120 TYPE_UNSPECIFIED = 0; 6121 6122 // Slice events are events that have a begin and end timestamp, i.e. a 6123 // duration. They can be nested similar to a callstack: If, on the same 6124 // track, event B begins after event A, but before A ends, B is a child 6125 // event of A and will be drawn as a nested event underneath A in the UI. 6126 // Note that child events should always end before their parents (e.g. B 6127 // before A). 6128 // 6129 // Each slice event is formed by a pair of BEGIN + END events. The END event 6130 // does not need to repeat any TrackEvent fields it has in common with its 6131 // corresponding BEGIN event. Arguments and debug annotations of the BEGIN + 6132 // END pair will be merged during trace import. 6133 // 6134 // Note that we deliberately chose not to support COMPLETE events (which 6135 // would specify a duration directly) since clients would need to delay 6136 // writing them until the slice is completed, which can result in reordered 6137 // events in the trace and loss of unfinished events at the end of a trace. 6138 TYPE_SLICE_BEGIN = 1; 6139 TYPE_SLICE_END = 2; 6140 6141 // Instant events are nestable events without duration. They can be children 6142 // of slice events on the same track. 6143 TYPE_INSTANT = 3; 6144 6145 // Event that provides a value for a counter track. |track_uuid| should 6146 // refer to a counter track and |counter_value| set to the new value. Note 6147 // that most other TrackEvent fields (e.g. categories, name, ..) are not 6148 // supported for TYPE_COUNTER events. See also CounterDescriptor. 6149 TYPE_COUNTER = 4; 6150 } 6151 optional Type type = 9; 6152 6153 // Identifies the track of the event. The default value may be overridden 6154 // using TrackEventDefaults, e.g., to specify the track of the TraceWriter's 6155 // sequence (in most cases sequence = one thread). If no value is specified 6156 // here or in TrackEventDefaults, the TrackEvent will be associated with an 6157 // implicit trace-global track (uuid 0). See TrackDescriptor::uuid. 6158 optional uint64 track_uuid = 11; 6159 6160 // A new value for a counter track. |track_uuid| should refer to a track with 6161 // a CounterDescriptor, and |type| should be TYPE_COUNTER. For a more 6162 // efficient encoding of counter values that are sampled at the beginning/end 6163 // of a slice, see |extra_counter_values| and |extra_counter_track_uuids|. 6164 // Counter values can optionally be encoded in as delta values (positive or 6165 // negative) on each packet sequence (see CounterIncrementalBase). 6166 optional int64 counter_value = 30; 6167 6168 // To encode counter values more efficiently, we support attaching additional 6169 // counter values to a TrackEvent of any type. All values will share the same 6170 // timestamp specified in the TracePacket. The value at 6171 // extra_counter_values[N] is for the counter track referenced by 6172 // extra_counter_track_uuids[N]. 6173 // 6174 // |extra_counter_track_uuids| may also be set via TrackEventDefaults. There 6175 // should always be equal or more uuids than values. It is valid to set more 6176 // uuids (e.g. via defaults) than values. If uuids are specified in 6177 // TrackEventDefaults and a TrackEvent, the TrackEvent uuids override the 6178 // default uuid list. 6179 // 6180 // For example, this allows snapshotting the thread time clock at each 6181 // thread-track BEGIN and END event to capture the cpu time delta of a slice. 6182 repeated uint64 extra_counter_track_uuids = 31; 6183 repeated int64 extra_counter_values = 12; 6184 6185 // TODO(eseckler): Add flow event support. 6186 6187 // --------------------------------------------------------------------------- 6188 // TrackEvent arguments: 6189 // --------------------------------------------------------------------------- 6190 6191 // Unstable key/value annotations shown in the trace viewer but not intended 6192 // for metrics use. 6193 repeated DebugAnnotation debug_annotations = 4; 6194 6195 // Typed event arguments: 6196 optional TaskExecution task_execution = 5; 6197 optional LogMessage log_message = 21; 6198 optional ChromeCompositorSchedulerState cc_scheduler_state = 24; 6199 optional ChromeUserEvent chrome_user_event = 25; 6200 optional ChromeKeyedService chrome_keyed_service = 26; 6201 optional ChromeLegacyIpc chrome_legacy_ipc = 27; 6202 optional ChromeHistogramSample chrome_histogram_sample = 28; 6203 optional ChromeLatencyInfo chrome_latency_info = 29; 6204 optional ChromeFrameReporter chrome_frame_reporter = 32; 6205 6206 // This field is used only if the source location represents the function that 6207 // executes during this event. 6208 oneof source_location_field { 6209 // Non-interned field. 6210 SourceLocation source_location = 33; 6211 // TODO(ssid): The interned source locations are not parsed by trace 6212 // processor. 6213 // Interned field. 6214 uint64 source_location_iid = 34; 6215 } 6216 6217 optional ChromeMessagePump chrome_message_pump = 35; 6218 6219 // New argument types go here :) 6220 6221 // Extension range for typed events defined externally. 6222 // See docs/design-docs/extensions.md for more details. 6223 // 6224 // Extension support is work-in-progress, in the future the way to reserve a 6225 // subrange for a particular project will be described here and in the design 6226 // document linked above. 6227 // 6228 // Contact perfetto-dev@googlegroups.com if you are interested in a subrange 6229 // for your project. 6230 6231 // Extension range for future use. 6232 extensions 1000 to 9899; 6233 // Reserved for Perfetto unit and integration tests. 6234 extensions 9900 to 10000; 6235 6236 // --------------------------------------------------------------------------- 6237 // Deprecated / legacy event fields, which will be removed in the future: 6238 // --------------------------------------------------------------------------- 6239 6240 // Deprecated. Use the |timestamp| and |timestamp_clock_id| fields in 6241 // TracePacket instead. 6242 // 6243 // Timestamp in microseconds (usually CLOCK_MONOTONIC). 6244 oneof timestamp { 6245 // Delta timestamp value since the last TrackEvent or ThreadDescriptor. To 6246 // calculate the absolute timestamp value, sum up all delta values of the 6247 // preceding TrackEvents since the last ThreadDescriptor and add the sum to 6248 // the |reference_timestamp| in ThreadDescriptor. This value should always 6249 // be positive. 6250 int64 timestamp_delta_us = 1; 6251 // Absolute value (e.g. a manually specified timestamp in the macro). 6252 // This is a one-off value that does not affect delta timestamp computation 6253 // in subsequent TrackEvents. 6254 int64 timestamp_absolute_us = 16; 6255 } 6256 6257 // Deprecated. Use |extra_counter_values| and |extra_counter_track_uuids| to 6258 // encode thread time instead. 6259 // 6260 // CPU time for the current thread (e.g., CLOCK_THREAD_CPUTIME_ID) in 6261 // microseconds. 6262 oneof thread_time { 6263 // Delta timestamp value since the last TrackEvent or ThreadDescriptor. To 6264 // calculate the absolute timestamp value, sum up all delta values of the 6265 // preceding TrackEvents since the last ThreadDescriptor and add the sum to 6266 // the |reference_timestamp| in ThreadDescriptor. This value should always 6267 // be positive. 6268 int64 thread_time_delta_us = 2; 6269 // This is a one-off absolute value that does not affect delta timestamp 6270 // computation in subsequent TrackEvents. 6271 int64 thread_time_absolute_us = 17; 6272 } 6273 6274 // Deprecated. Use |extra_counter_values| and |extra_counter_track_uuids| to 6275 // encode thread instruction count instead. 6276 // 6277 // Value of the instruction counter for the current thread. 6278 oneof thread_instruction_count { 6279 // Same encoding as |thread_time| field above. 6280 int64 thread_instruction_count_delta = 8; 6281 int64 thread_instruction_count_absolute = 20; 6282 } 6283 6284 // Apart from {category, time, thread time, tid, pid}, other legacy trace 6285 // event attributes are initially simply proxied for conversion to a JSON 6286 // trace. We intend to gradually transition these attributes to similar native 6287 // features in TrackEvent (e.g. async + flow events), or deprecate them 6288 // without replacement where transition is unsuitable. 6289 // 6290 // Next reserved id: 16 (up to 16). 6291 // Next id: 20. 6292 message LegacyEvent { 6293 // Deprecated, use TrackEvent::name(_iid) instead. 6294 // interned EventName. 6295 optional uint64 name_iid = 1; 6296 optional int32 phase = 2; 6297 optional int64 duration_us = 3; 6298 optional int64 thread_duration_us = 4; 6299 6300 // Elapsed retired instruction count during the event. 6301 optional int64 thread_instruction_delta = 15; 6302 6303 // used to be |flags|. 6304 reserved 5; 6305 6306 oneof id { 6307 uint64 unscoped_id = 6; 6308 uint64 local_id = 10; 6309 uint64 global_id = 11; 6310 } 6311 // Additional optional scope for |id|. 6312 optional string id_scope = 7; 6313 6314 // Consider the thread timestamps for async BEGIN/END event pairs as valid. 6315 optional bool use_async_tts = 9; 6316 6317 // Idenfifies a flow. Flow events with the same bind_id are connected. 6318 optional uint64 bind_id = 8; 6319 // Use the enclosing slice as binding point for a flow end event instead of 6320 // the next slice. Flow start/step events always bind to the enclosing 6321 // slice. 6322 optional bool bind_to_enclosing = 12; 6323 6324 enum FlowDirection { 6325 FLOW_UNSPECIFIED = 0; 6326 FLOW_IN = 1; 6327 FLOW_OUT = 2; 6328 FLOW_INOUT = 3; 6329 } 6330 optional FlowDirection flow_direction = 13; 6331 6332 enum InstantEventScope { 6333 SCOPE_UNSPECIFIED = 0; 6334 SCOPE_GLOBAL = 1; 6335 SCOPE_PROCESS = 2; 6336 SCOPE_THREAD = 3; 6337 } 6338 optional InstantEventScope instant_event_scope = 14; 6339 6340 // Override the pid/tid if the writer needs to emit events on behalf of 6341 // another process/thread. This should be the exception. Normally, the 6342 // pid+tid from ThreadDescriptor is used. 6343 optional int32 pid_override = 18; 6344 optional int32 tid_override = 19; 6345 } 6346 6347 optional LegacyEvent legacy_event = 6; 6348} 6349 6350// Default values for fields of all TrackEvents on the same packet sequence. 6351// Should be emitted as part of TracePacketDefaults whenever incremental state 6352// is cleared. It's defined here because field IDs should match those of the 6353// corresponding fields in TrackEvent. 6354message TrackEventDefaults { 6355 optional uint64 track_uuid = 11; 6356 repeated uint64 extra_counter_track_uuids = 31; 6357 6358 // TODO(eseckler): Support default values for more TrackEvent fields. 6359} 6360 6361// -------------------- 6362// Interned data types: 6363// -------------------- 6364 6365message EventCategory { 6366 optional uint64 iid = 1; 6367 optional string name = 2; 6368} 6369 6370message EventName { 6371 optional uint64 iid = 1; 6372 optional string name = 2; 6373} 6374 6375// End of protos/perfetto/trace/track_event/track_event.proto 6376 6377// Begin of protos/perfetto/trace/interned_data/interned_data.proto 6378 6379// ------------------------------ DATA INTERNING: ------------------------------ 6380// Interning indexes are built up gradually by adding the entries contained in 6381// each TracePacket of the same packet sequence (packets emitted by the same 6382// producer and TraceWriter, see |trusted_packet_sequence_id|). Thus, packets 6383// can only refer to interned data from other packets in the same sequence. 6384// 6385// The writer will emit new entries when it encounters new internable values 6386// that aren't yet in the index. Data in current and subsequent TracePackets can 6387// then refer to the entry by its position (interning ID, abbreviated "iid") in 6388// its index. An interning ID with value 0 is considered invalid (not set). 6389// 6390// Because of the incremental build-up, the interning index will miss data when 6391// TracePackets are lost, e.g. because a chunk was overridden in the central 6392// ring buffer. To avoid invalidation of the whole trace in such a case, the 6393// index is periodically reset (see SEQ_INCREMENTAL_STATE_CLEARED). 6394// When packet loss occurs, the reader will only lose interning data up to the 6395// next reset. 6396// ----------------------------------------------------------------------------- 6397 6398// Message that contains new entries for the interning indices of a packet 6399// sequence. 6400// 6401// The writer will usually emit new entries in the same TracePacket that first 6402// refers to them (since the last reset of interning state). They may also be 6403// emitted proactively in advance of referring to them in later packets. 6404// 6405// Next reserved id: 8 (up to 15). 6406// Next id: 25. 6407message InternedData { 6408 // TODO(eseckler): Replace iid fields inside interned messages with 6409 // map<iid, message> type fields in InternedData. 6410 6411 // Each field's message type needs to specify an |iid| field, which is the ID 6412 // of the entry in the field's interning index. Each field constructs its own 6413 // index, thus interning IDs are scoped to the tracing session and field 6414 // (usually as a counter for efficient var-int encoding). It is illegal to 6415 // override entries in an index (using the same iid for two different values) 6416 // within the same tracing session, even after a reset of the emitted 6417 // interning state. 6418 repeated EventCategory event_categories = 1; 6419 repeated EventName event_names = 2; 6420 repeated DebugAnnotationName debug_annotation_names = 3; 6421 repeated SourceLocation source_locations = 4; 6422 repeated LogMessageBody log_message_body = 20; 6423 6424 // Note: field IDs up to 15 should be used for frequent data only. 6425 6426 // Build IDs of exectuable files. 6427 repeated InternedString build_ids = 16; 6428 // Paths to executable files. 6429 repeated InternedString mapping_paths = 17; 6430 // Paths to source files. 6431 repeated InternedString source_paths = 18; 6432 // Names of functions used in frames below. 6433 repeated InternedString function_names = 5; 6434 // Symbols that were added to this trace after the fact. 6435 repeated ProfiledFrameSymbols profiled_frame_symbols = 21; 6436 6437 // Executable files mapped into processes. 6438 repeated Mapping mappings = 19; 6439 // Frames of callstacks of a program. 6440 repeated Frame frames = 6; 6441 // A callstack of a program. 6442 repeated Callstack callstacks = 7; 6443 6444 // Additional Vulkan information sent in a VulkanMemoryEvent message 6445 repeated InternedString vulkan_memory_keys = 22; 6446 6447 // Graphics context of a render stage event. This represent the GL 6448 // context for an OpenGl app or the VkDevice for a Vulkan app. 6449 repeated InternedGraphicsContext graphics_contexts = 23; 6450 6451 // Description of a GPU hardware queue or render stage. 6452 repeated InternedGpuRenderStageSpecification gpu_specifications = 24; 6453} 6454 6455// End of protos/perfetto/trace/interned_data/interned_data.proto 6456 6457// Begin of protos/perfetto/trace/memory_graph.proto 6458 6459// Message definitions for app-reported memory breakdowns. At the moment, this 6460// is a Chrome-only tracing feature, historically known as 'memory-infra'. See 6461// https://chromium.googlesource.com/chromium/src/+/master/docs/memory-infra/ . 6462// This is unrelated to the native or java heap profilers (those protos live 6463// in //protos/perfetto/trace/profiling/). 6464 6465message MemoryTrackerSnapshot { 6466 // Memory snapshot of a process. The snapshot contains memory data that is 6467 // from 2 different sources, namely system stats and instrumentation stats. 6468 // The system memory usage stats come from the OS based on standard API 6469 // available in the platform to query memory usage. The instrumentation stats 6470 // are added by instrumenting specific piece of code which tracks memory 6471 // allocations and deallocations made by a small sub-system within the 6472 // application. 6473 // The system stats of the global memory snapshot are recorded as part of 6474 // ProcessStats and SmapsPacket fields in trace packet with the same 6475 // timestamp. 6476 message ProcessSnapshot { 6477 // Process ID of the process 6478 optional uint64 pid = 1; 6479 6480 // Memory dumps are represented as a graph of memory nodes which contain 6481 // statistics. To avoid double counting the same memory across different 6482 // nodes, edges are used to mark nodes that account for the same memory. See 6483 // this doc for examples of the usage: 6484 // https://docs.google.com/document/d/1WGQRJ1sjJrfVkNcgPVY6frm64UqPc94tsxUOXImZUZI 6485 6486 // A single node in the memory graph. 6487 message MemoryNode { 6488 // Unique ID of the node across all processes involved in the global 6489 // memory dump. The ID is only unique within this particular global dump 6490 // identified by GlobalMemoryDumpPacket.global_dump_id. 6491 optional uint64 id = 1; 6492 6493 // Absolute name is a unique name for the memory node within the process 6494 // with ProcessMemoryDump.pid. The name can contain multiple parts 6495 // separated by '/', which traces the edges of the node from the root 6496 // node. 6497 // Eg: "partition_allocator/array_buffers/buffer1" refers to the child 6498 // node "buffer1" in a graph structure of: 6499 // root -> partition_allocator -> array_buffers -> buffer1. 6500 optional string absolute_name = 2; 6501 6502 // A weak node means that the instrumentation that added the current node 6503 // is unsure about the existence of the actual memory. Unless a "strong" 6504 // (non-weak is default) node that has an edge to the current node exists 6505 // in the current global dump, the current node will be discarded. 6506 optional bool weak = 3; 6507 6508 // Size of the node in bytes, used to compute the effective size of the 6509 // nodes without double counting. 6510 optional uint64 size_bytes = 4; 6511 6512 // Entries in the memory node that contain statistics and additional 6513 // debuggable information about the memory. The size of the node is 6514 // tracked separately in the |size_bytes| field. 6515 message MemoryNodeEntry { 6516 optional string name = 1; 6517 6518 enum Units { 6519 UNSPECIFIED = 0; 6520 BYTES = 1; 6521 COUNT = 2; 6522 } 6523 optional Units units = 2; 6524 6525 // Contains either one of uint64 or string value. 6526 optional uint64 value_uint64 = 3; 6527 optional string value_string = 4; 6528 } 6529 repeated MemoryNodeEntry entries = 5; 6530 } 6531 repeated MemoryNode allocator_dumps = 2; 6532 6533 // A directed edge that connects any 2 nodes in the graph above. These are 6534 // in addition to the inherent edges added due to the tree structure of the 6535 // node's absolute names. 6536 // Node with id |source_id| owns the node with id |target_id|, and has the 6537 // effect of attributing the memory usage of target to source. |importance| 6538 // is optional and relevant only for the cases of co-ownership, where it 6539 // acts as a z-index: the owner with the highest importance will be 6540 // attributed target's memory. 6541 message MemoryEdge { 6542 optional uint64 source_id = 1; 6543 optional uint64 target_id = 2; 6544 optional uint32 importance = 3; 6545 optional bool overridable = 4; 6546 } 6547 repeated MemoryEdge memory_edges = 3; 6548 } 6549 6550 // Unique ID that represents the global memory dump. 6551 optional uint64 global_dump_id = 1; 6552 6553 enum LevelOfDetail { 6554 DETAIL_FULL = 0; 6555 DETAIL_LIGHT = 1; 6556 DETAIL_BACKGROUND = 2; 6557 } 6558 optional LevelOfDetail level_of_detail = 2; 6559 6560 repeated ProcessSnapshot process_memory_dumps = 3; 6561} 6562 6563// End of protos/perfetto/trace/memory_graph.proto 6564 6565// Begin of protos/perfetto/trace/perfetto/perfetto_metatrace.proto 6566 6567// Used to trace the execution of perfetto itself. 6568message PerfettoMetatrace { 6569 // See base/metatrace_events.h for definitions. 6570 oneof record_type { 6571 uint32 event_id = 1; 6572 uint32 counter_id = 2; 6573 6574 // For trace processor metatracing. 6575 string event_name = 8; 6576 string counter_name = 9; 6577 } 6578 message Arg { 6579 optional string key = 1; 6580 optional string value = 2; 6581 } 6582 6583 // Only when using |event_id|. 6584 optional uint32 event_duration_ns = 3; 6585 6586 // Only when using |counter_id|. 6587 optional int32 counter_value = 4; 6588 6589 // ID of the thread that emitted the event. 6590 optional uint32 thread_id = 5; 6591 6592 // If true the meta-tracing ring buffer had overruns and hence some data is 6593 // missing from this point. 6594 optional bool has_overruns = 6; 6595 6596 // Args for the event. 6597 repeated Arg args = 7; 6598} 6599 6600// End of protos/perfetto/trace/perfetto/perfetto_metatrace.proto 6601 6602// Begin of protos/perfetto/trace/perfetto/tracing_service_event.proto 6603 6604// Events emitted by the tracing service. 6605message TracingServiceEvent { 6606 oneof event_type { 6607 // When each of the following booleans are set to true, they report the 6608 // point in time (through TracePacket's timestamp) where the condition 6609 // they describe happened. 6610 // The order of the booleans below matches the timestamp ordering 6611 // they would generally be expected to have. 6612 6613 // Emitted when we start tracing and specifically, this will be before any 6614 // producer is notified about the existence of this trace. This is always 6615 // emitted before the all_data_sources_started event. This event is also 6616 // guaranteed to be seen (byte-offset wise) before any data packets from 6617 // producers. 6618 bool tracing_started = 2; 6619 6620 // Emitted after all data sources saw the start event and ACKed it. 6621 // This identifies the point in time when it's safe to assume that all data 6622 // sources have been recording events. 6623 bool all_data_sources_started = 1; 6624 6625 // Emitted when all data sources have been flushed successfully or with an 6626 // error (including timeouts). This can generally happen many times over the 6627 // course of the trace. 6628 bool all_data_sources_flushed = 3; 6629 6630 // Emitted when reading back the central tracing buffers has been completed. 6631 // If |write_into_file| is specified, this can happen many times over the 6632 // course of the trace. 6633 bool read_tracing_buffers_completed = 4; 6634 6635 // Emitted after tracing has been disabled and specifically, this will be 6636 // after all packets from producers have been included in the central 6637 // tracing buffer. 6638 bool tracing_disabled = 5; 6639 } 6640} 6641 6642// End of protos/perfetto/trace/perfetto/tracing_service_event.proto 6643 6644// Begin of protos/perfetto/trace/power/battery_counters.proto 6645 6646message BatteryCounters { 6647 // Battery capacity in microampere-hours(µAh). Also known as Coulomb counter. 6648 optional int64 charge_counter_uah = 1; 6649 6650 // Remaining battery capacity percentage of total capacity 6651 optional float capacity_percent = 2; 6652 6653 // Instantaneous battery current in microamperes(µA). 6654 // Positive values indicate net current entering the battery from a charge 6655 // source, negative values indicate net current discharging from the battery. 6656 optional int64 current_ua = 3; 6657 6658 // Instantaneous battery current in microamperes(µA). 6659 optional int64 current_avg_ua = 4; 6660} 6661 6662// End of protos/perfetto/trace/power/battery_counters.proto 6663 6664// Begin of protos/perfetto/trace/power/power_rails.proto 6665 6666message PowerRails { 6667 6668 message RailDescriptor { 6669 // Index corresponding to the rail 6670 optional uint32 index = 1; 6671 6672 // Name of the rail 6673 optional string rail_name = 2; 6674 6675 // Name of the subsystem to which this rail belongs 6676 optional string subsys_name = 3; 6677 6678 // Hardware sampling rate (Hz). 6679 optional uint32 sampling_rate = 4; 6680 } 6681 6682 // This is only emitted at the beginning of the trace. 6683 repeated RailDescriptor rail_descriptor = 1; 6684 6685 message EnergyData { 6686 // Index corresponding to RailDescriptor.index 6687 optional uint32 index = 1; 6688 6689 // Time since device boot(CLOCK_BOOTTIME) in milli-seconds. 6690 optional uint64 timestamp_ms = 2; 6691 6692 // Accumulated energy since device boot in microwatt-seconds (uWs). 6693 optional uint64 energy = 3; 6694 } 6695 6696 repeated EnergyData energy_data = 2; 6697} 6698 6699// End of protos/perfetto/trace/power/power_rails.proto 6700 6701// Begin of protos/perfetto/trace/profiling/deobfuscation.proto 6702 6703message ObfuscatedMember { 6704 // This is the obfuscated field name relative to the class containing the 6705 // ObfuscatedMember. 6706 optional string obfuscated_name = 1; 6707 // If this is fully qualified (i.e. contains a '.') this is the deobfuscated 6708 // field name including its class. Otherwise, this is this the unqualified 6709 // deobfuscated field name relative to the class containing this 6710 // ObfuscatedMember. 6711 optional string deobfuscated_name = 2; 6712} 6713 6714message ObfuscatedClass { 6715 optional string obfuscated_name = 1; 6716 optional string deobfuscated_name = 2; 6717 // fields. 6718 repeated ObfuscatedMember obfuscated_members = 3; 6719 repeated ObfuscatedMember obfuscated_methods = 4; 6720} 6721 6722message DeobfuscationMapping { 6723 optional string package_name = 1; 6724 optional int64 version_code = 2; 6725 repeated ObfuscatedClass obfuscated_classes = 3; 6726} 6727// End of protos/perfetto/trace/profiling/deobfuscation.proto 6728 6729// Begin of protos/perfetto/trace/profiling/heap_graph.proto 6730 6731message HeapGraphRoot { 6732 enum Type { 6733 ROOT_UNKNOWN = 0; 6734 ROOT_JNI_GLOBAL = 1; 6735 ROOT_JNI_LOCAL = 2; 6736 ROOT_JAVA_FRAME = 3; 6737 ROOT_NATIVE_STACK = 4; 6738 ROOT_STICKY_CLASS = 5; 6739 ROOT_THREAD_BLOCK = 6; 6740 ROOT_MONITOR_USED = 7; 6741 ROOT_THREAD_OBJECT = 8; 6742 ROOT_INTERNED_STRING = 9; 6743 ROOT_FINALIZING = 10; 6744 ROOT_DEBUGGER = 11; 6745 ROOT_REFERENCE_CLEANUP = 12; 6746 ROOT_VM_INTERNAL = 13; 6747 ROOT_JNI_MONITOR = 14; 6748 }; 6749 // Objects retained by this root. 6750 repeated uint64 object_ids = 1 [packed = true]; 6751 6752 optional Type root_type = 2; 6753} 6754 6755message HeapGraphType { 6756 enum Kind { 6757 KIND_UNKNOWN = 0; 6758 KIND_NORMAL = 1; 6759 KIND_NOREFERENCES = 2; 6760 KIND_STRING = 3; 6761 KIND_ARRAY = 4; 6762 KIND_CLASS = 5; 6763 KIND_CLASSLOADER = 6; 6764 KIND_DEXCACHE = 7; 6765 KIND_SOFT_REFERENCE = 8; 6766 KIND_WEAK_REFERENCE = 9; 6767 KIND_FINALIZER_REFERENCE = 10; 6768 KIND_PHANTOM_REFERENCE = 11; 6769 }; 6770 // TODO(fmayer): Consider removing this and using the index in the repeaed 6771 // field to save space. 6772 optional uint64 id = 1; 6773 optional uint64 location_id = 2; 6774 optional string class_name = 3; 6775 // Size of objects of this type. 6776 optional uint64 object_size = 4; 6777 optional uint64 superclass_id = 5; 6778 // Indices for InternedData.field_names for the names of the fields of 6779 // instances of this class. This does NOT include the fields from 6780 // superclasses. The consumer of this data needs to walk all super 6781 // classes to get a full lists of fields. Objects always write the 6782 // fields in order of most specific class to the furthest up superclass. 6783 repeated uint64 reference_field_id = 6 [packed = true]; 6784 optional Kind kind = 7; 6785} 6786 6787message HeapGraphObject { 6788 optional uint64 id = 1; 6789 6790 // Index for InternedData.types for the name of the type of this object. 6791 optional uint64 type_id = 2; 6792 6793 // Bytes occupied by this objects. 6794 optional uint64 self_size = 3; 6795 6796 // Indices for InternedData.field_names for the name of the field referring 6797 // to the object. For Android S+ and for instances of normal classes (e.g. 6798 // not instances of java.lang.Class or arrays), this is instead set in the 6799 // corresponding HeapGraphType, and this is left empty. 6800 repeated uint64 reference_field_id = 4 [packed = true]; 6801 6802 // Ids of the Object that is referred to. 6803 repeated uint64 reference_object_id = 5 [packed = true]; 6804} 6805 6806message HeapGraph { 6807 optional int32 pid = 1; 6808 6809 // This contains all objects at the time this dump was taken. Some of these 6810 // will be live, some of those unreachable (garbage). To find the live 6811 // objects, the client needs to build the transitive closure of objects 6812 // reachable from |roots|. 6813 // All objects not contained within that transitive closure are garbage that 6814 // has not yet been collected. 6815 repeated HeapGraphObject objects = 2; 6816 6817 // Roots at the time this dump was taken. 6818 // All live objects are reachable from the roots. All other objects are 6819 // garbage. 6820 repeated HeapGraphRoot roots = 7; 6821 6822 // Types used in HeapGraphObjects. 6823 repeated HeapGraphType types = 9; 6824 6825 reserved 3; 6826 6827 // Field names for references in managed heap graph. 6828 repeated InternedString field_names = 4; 6829 6830 // Paths of files used in managed heap graph. 6831 repeated InternedString location_names = 8; 6832 6833 optional bool continued = 5; 6834 optional uint64 index = 6; 6835} 6836 6837// End of protos/perfetto/trace/profiling/heap_graph.proto 6838 6839// Begin of protos/perfetto/trace/profiling/profile_packet.proto 6840 6841message ProfilePacket { 6842 // The following interning tables are only used in Android version Q. 6843 // In newer versions, these tables are in InternedData 6844 // (see protos/perfetto/trace/interned_data) and are shared across 6845 // multiple ProfilePackets. 6846 // For backwards compatibility, consumers need to first look up interned 6847 // data in the tables within the ProfilePacket, and then, if they are empty, 6848 // look up in the InternedData instead. 6849 repeated InternedString strings = 1; 6850 repeated Mapping mappings = 4; 6851 repeated Frame frames = 2; 6852 repeated Callstack callstacks = 3; 6853 6854 // Next ID: 9 6855 message HeapSample { 6856 optional uint64 callstack_id = 1; 6857 // bytes allocated at this callstack. 6858 optional uint64 self_allocated = 2; 6859 // bytes allocated at this callstack that have been freed. 6860 optional uint64 self_freed = 3; 6861 // bytes allocated at this callstack but not used since the last 6862 // dump. 6863 // See documentation of idle_allocations in HeapprofdConfig for more 6864 // details. 6865 optional uint64 self_idle = 7; 6866 // Bytes allocated by this callstack but not freed at the time the malloc 6867 // heap usage of this process was maximal. This is only set if dump_at_max 6868 // is true in HeapprofdConfig. In that case, self_allocated, self_freed and 6869 // self_idle will not be set. 6870 optional uint64 self_max = 8; 6871 // Number of allocations that were sampled at this callstack but not freed 6872 // at the time the malloc heap usage of this process was maximal. This is 6873 // only set if dump_at_max is true in HeapprofdConfig. In that case, 6874 // self_allocated, self_freed and self_idle will not be set. 6875 optional uint64 self_max_count = 9; 6876 // timestamp [opt] 6877 optional uint64 timestamp = 4; 6878 // Number of allocations that were sampled at this callstack. 6879 optional uint64 alloc_count = 5; 6880 // Number of allocations that were sampled at this callstack that have been 6881 // freed. 6882 optional uint64 free_count = 6; 6883 } 6884 6885 message Histogram { 6886 message Bucket { 6887 // This bucket counts values from the previous bucket's (or -infinity if 6888 // this is the first bucket) upper_limit (inclusive) to this upper_limit 6889 // (exclusive). 6890 optional uint64 upper_limit = 1; 6891 // This is the highest bucket. This is set instead of the upper_limit. Any 6892 // values larger or equal to the previous bucket's upper_limit are counted 6893 // in this bucket. 6894 optional bool max_bucket = 2; 6895 // Number of values that fall into this range. 6896 optional uint64 count = 3; 6897 } 6898 repeated Bucket buckets = 1; 6899 } 6900 6901 message ProcessStats { 6902 optional uint64 unwinding_errors = 1; 6903 optional uint64 heap_samples = 2; 6904 optional uint64 map_reparses = 3; 6905 optional Histogram unwinding_time_us = 4; 6906 optional uint64 total_unwinding_time_us = 5; 6907 optional uint64 client_spinlock_blocked_us = 6; 6908 } 6909 6910 repeated ProcessHeapSamples process_dumps = 5; 6911 message ProcessHeapSamples { 6912 optional uint64 pid = 1; 6913 6914 // This process was profiled from startup. 6915 // If false, this process was already running when profiling started. 6916 optional bool from_startup = 3; 6917 6918 // This process was not profiled because a concurrent session was active. 6919 // If this is true, samples will be empty. 6920 optional bool rejected_concurrent = 4; 6921 6922 // This process disconnected while it was profiled. 6923 // If false, the process outlived the profiling session. 6924 optional bool disconnected = 6; 6925 6926 // If disconnected, this disconnect was caused by the client overrunning 6927 // the buffer. 6928 optional bool buffer_overran = 7; 6929 6930 // If disconnected, this disconnected was caused by the shared memory 6931 // buffer being corrupted. THIS IS ALWAYS A BUG IN HEAPPROFD OR CLIENT 6932 // MEMORY CORRUPTION. 6933 optional bool buffer_corrupted = 8; 6934 6935 // If disconnected, this disconnect was caused by heapprofd exceeding 6936 // guardrails during this profiling session. 6937 optional bool hit_guardrail = 10; 6938 6939 optional string heap_name = 11; 6940 6941 // Timestamp of the state of the target process that this dump represents. 6942 // This can be different to the timestamp of the TracePackets for various 6943 // reasons: 6944 // * If disconnected is set above, this is the timestamp of last state 6945 // heapprofd had of the process before it disconnected. 6946 // * Otherwise, if the rate of events produced by the process is high, 6947 // heapprofd might be behind. 6948 // 6949 // TODO(fmayer): This is MONOTONIC_COARSE. Refactor ClockSnapshot::Clock 6950 // to have a type enum that we can reuse here. 6951 optional uint64 timestamp = 9; 6952 6953 // Metadata about heapprofd. 6954 optional ProcessStats stats = 5; 6955 6956 repeated HeapSample samples = 2; 6957 } 6958 6959 // If this is true, the next ProfilePacket in this package_sequence_id is a 6960 // continuation of this one. 6961 // To get all samples for a process, accummulate its 6962 // ProcessHeapSamples.samples until you see continued=false. 6963 optional bool continued = 6; 6964 6965 // Index of this ProfilePacket on its package_sequence_id. Can be used 6966 // to detect dropped data. 6967 // Verify these are consecutive. 6968 optional uint64 index = 7; 6969} 6970 6971// Message used to represent individual stack samples sampled at discrete 6972// points in time, rather than aggregated over an interval. 6973message StreamingProfilePacket { 6974 // Index into InternedData.callstacks 6975 repeated uint64 callstack_iid = 1; 6976 // TODO(eseckler): ThreadDescriptor-based timestamps are deprecated. Replace 6977 // this with ClockSnapshot-based delta encoding instead. 6978 repeated int64 timestamp_delta_us = 2; 6979 optional int32 process_priority = 3; 6980} 6981 6982// Namespace for the contained enums. 6983message Profiling { 6984 enum CpuMode { 6985 MODE_UNKNOWN = 0; 6986 MODE_KERNEL = 1; 6987 MODE_USER = 2; 6988 // The following values aren't expected, but included for completeness: 6989 MODE_HYPERVISOR = 3; 6990 MODE_GUEST_KERNEL = 4; 6991 MODE_GUEST_USER = 5; 6992 } 6993 6994 // Enumeration of libunwindstack's error codes. 6995 // NB: the integral representations of the two enums are different. 6996 enum StackUnwindError { 6997 UNWIND_ERROR_UNKNOWN = 0; 6998 UNWIND_ERROR_NONE = 1; 6999 UNWIND_ERROR_MEMORY_INVALID = 2; 7000 UNWIND_ERROR_UNWIND_INFO = 3; 7001 UNWIND_ERROR_UNSUPPORTED = 4; 7002 UNWIND_ERROR_INVALID_MAP = 5; 7003 UNWIND_ERROR_MAX_FRAMES_EXCEEDED = 6; 7004 UNWIND_ERROR_REPEATED_FRAME = 7; 7005 UNWIND_ERROR_INVALID_ELF = 8; 7006 } 7007} 7008 7009// Individual performance sampling packet payload. Typically corresponds to a 7010// stack sample on a configration-dependent counter overflow. 7011// Timestamps are within the root packet (in the CLOCK_BOOTTIME domain). 7012// There are three distinct views of this message: 7013// * completely processed sample (callstack_iid set) 7014// * indication of kernel buffer data loss (kernel_records_lost set) 7015// * indication of skipped samples (sample_skipped_reason set) 7016message PerfSample { 7017 optional uint32 cpu = 1; 7018 optional uint32 pid = 2; 7019 optional uint32 tid = 3; 7020 7021 // Execution state that the process was sampled at. 7022 optional Profiling.CpuMode cpu_mode = 5; 7023 7024 // Unwound callstack. Might be partial, in which case a synthetic "error" 7025 // frame is appended, and |unwind_error| is set appropriately. 7026 optional uint64 callstack_iid = 4; 7027 7028 // If set, stack unwinding was incomplete due to an error. 7029 // Unset values should be treated as UNWIND_ERROR_NONE. 7030 oneof optional_unwind_error { Profiling.StackUnwindError unwind_error = 16; }; 7031 7032 // If set, indicates that this message is not a sample, but rather an 7033 // indication of data loss in the ring buffer allocated for |cpu|. Such data 7034 // loss occurs when the kernel has insufficient ring buffer capacity to write 7035 // a record (which gets discarded). A record in this context is an individual 7036 // ring buffer entry, and counts more than just sample records. 7037 // 7038 // The |timestamp| of the packet corresponds to the time that the producer 7039 // wrote the packet for trace-sorting purposes alone, and should not be 7040 // interpreted relative to the sample timestamps. This field is sufficient to 7041 // detect that *some* kernel data loss happened within the trace, but not the 7042 // specific time bounds of that loss (which would require tracking precedessor 7043 // & successor timestamps, which is not deemed necessary at the moment). 7044 optional uint64 kernel_records_lost = 17; 7045 7046 // If set, indicates that the profiler encountered a sample that was relevant, 7047 // but was skipped. 7048 enum SampleSkipReason { 7049 PROFILER_SKIP_UNKNOWN = 0; 7050 PROFILER_SKIP_READ_STAGE = 1; 7051 PROFILER_SKIP_UNWIND_STAGE = 2; 7052 PROFILER_SKIP_UNWIND_ENQUEUE = 3; 7053 } 7054 oneof optional_sample_skipped_reason { 7055 SampleSkipReason sample_skipped_reason = 18; 7056 }; 7057} 7058 7059// End of protos/perfetto/trace/profiling/profile_packet.proto 7060 7061// Begin of protos/perfetto/trace/profiling/smaps.proto 7062 7063message SmapsEntry { 7064 optional string path = 1; 7065 optional uint64 size_kb = 2; 7066 optional uint64 private_dirty_kb = 3; 7067 optional uint64 swap_kb = 4; 7068 7069 // for field upload (instead of path). 7070 optional string file_name = 5; 7071 7072 // TODO(crbug.com/1098746): Consider encoding this as incremental values. 7073 optional uint64 start_address = 6; 7074 optional uint64 module_timestamp = 7; 7075 optional string module_debugid = 8; 7076 optional string module_debug_path = 9; 7077 optional uint32 protection_flags = 10; 7078 7079 optional uint64 private_clean_resident_kb = 11; 7080 optional uint64 shared_dirty_resident_kb = 12; 7081 optional uint64 shared_clean_resident_kb = 13; 7082 optional uint64 locked_kb = 14; 7083 optional uint64 proportional_resident_kb = 15; 7084}; 7085 7086message SmapsPacket { 7087 optional uint32 pid = 1; 7088 repeated SmapsEntry entries = 2; 7089}; 7090 7091// End of protos/perfetto/trace/profiling/smaps.proto 7092 7093// Begin of protos/perfetto/trace/ps/process_stats.proto 7094 7095// Per-process periodically sampled stats. These samples are wrapped in a 7096// dedicated message (as opposite to be fields in process_tree.proto) because 7097// they are dumped at a different rate than cmdline and thread list. 7098// Note: not all of these stats will be present in every ProcessStats message 7099// and sometimes processes may be missing . This is because counters are 7100// cached to reduce emission of counters which do not change. 7101message ProcessStats { 7102 // Per-thread periodically sampled stats. 7103 // Note: not all of these stats will be present in every message. See the note 7104 // for ProcessStats. 7105 message Thread { 7106 optional int32 tid = 1; 7107 7108 // Pairs of frequency (represented as a (1-based) index to CpuInfo 7109 // frequencies) and time at that frequency (represented as a number of 7110 // ticks, see SystemInfo for the HZ (ticks / second) value to convert this 7111 // to time). Frequencies with zero ticks are never uploaded. Read from 7112 // /proc/tid/time_in_state. 7113 repeated uint32 cpu_freq_indices = 2; 7114 repeated uint64 cpu_freq_ticks = 3; 7115 // Whether all frequencies with non-zero ticks are present in 7116 // `cpu_freq_indices`. This marker is used to detect packets that describe 7117 // time_in_state exhaustively. 7118 optional bool cpu_freq_full = 4; 7119 } 7120 7121 message Process { 7122 optional int32 pid = 1; 7123 7124 // See /proc/[pid]/status in `man 5 proc` for a description of these fields. 7125 optional uint64 vm_size_kb = 2; 7126 optional uint64 vm_rss_kb = 3; 7127 optional uint64 rss_anon_kb = 4; 7128 optional uint64 rss_file_kb = 5; 7129 optional uint64 rss_shmem_kb = 6; 7130 optional uint64 vm_swap_kb = 7; 7131 optional uint64 vm_locked_kb = 8; 7132 optional uint64 vm_hwm_kb = 9; 7133 // When adding a new field remember to update kProcMemCounterSize in 7134 // the trace processor. 7135 7136 optional int64 oom_score_adj = 10; 7137 7138 repeated Thread threads = 11; 7139 7140 // The peak resident set size is resettable in newer Posix kernels. 7141 // This field specifies if reset is supported and if the writer had reset 7142 // the peaks after each process stats recording. 7143 optional bool is_peak_rss_resettable = 12; 7144 7145 // Private, shared and swap footprint of the process as measured by 7146 // Chrome. To know more about these metrics refer to: 7147 // https://docs.google.com/document/d/1_WmgE1F5WUrhwkPqJis3dWyOiUmQKvpXp5cd4w86TvA 7148 optional uint32 chrome_private_footprint_kb = 13; 7149 optional uint32 chrome_peak_resident_set_kb = 14; 7150 } 7151 repeated Process processes = 1; 7152 7153 // The time at which we finish collecting this batch of samples; 7154 // the top-level packet timestamp is the time at which 7155 // we begin collection. 7156 // TODO(dancol): analysis might be improved by 7157 // time-bracketing each sample as well as the whole 7158 // ProcessStats, but doing that is probably gated on 7159 // a vdso for CLOCK_BOOTTIME. 7160 optional uint64 collection_end_timestamp = 2; 7161} 7162 7163// End of protos/perfetto/trace/ps/process_stats.proto 7164 7165// Begin of protos/perfetto/trace/ps/process_tree.proto 7166 7167// Metadata about the processes and threads in the trace. 7168// Note: this proto was designed to be filled in by traced_probes and should 7169// only be populated with accurate information coming from the system. Other 7170// trace writers should prefer to fill ThreadDescriptor and ProcessDescriptor 7171// in TrackDescriptor. 7172message ProcessTree { 7173 // Representation of a thread. 7174 message Thread { 7175 // The thread id (as per gettid()) 7176 optional int32 tid = 1; 7177 7178 // Thread group id (i.e. the PID of the process, == TID of the main thread) 7179 optional int32 tgid = 3; 7180 7181 // The name of the thread. 7182 optional string name = 2; 7183 } 7184 7185 // Representation of a process. 7186 message Process { 7187 // The UNIX process ID, aka thread group ID (as per getpid()). 7188 optional int32 pid = 1; 7189 7190 // The parent process ID, as per getppid(). 7191 optional int32 ppid = 2; 7192 7193 // The command line for the process, as per /proc/pid/cmdline. 7194 // If it is a kernel thread there will only be one cmdline field 7195 // and it will contain /proc/pid/comm. 7196 repeated string cmdline = 3; 7197 7198 // No longer used as of Apr 2018, when the dedicated |threads| field was 7199 // introduced in ProcessTree. 7200 repeated Thread threads_deprecated = 4 [deprecated = true]; 7201 7202 // The uid for the process, as per /proc/pid/status. 7203 optional int32 uid = 5; 7204 } 7205 7206 // List of processes and threads in the client. These lists are incremental 7207 // and not exhaustive. A process and its threads might show up separately in 7208 // different ProcessTree messages. A thread might event not show up at all, if 7209 // no sched_switch activity was detected, for instance: 7210 // #0 { processes: [{pid: 10, ...}], threads: [{pid: 11, tgid: 10}] } 7211 // #1 { threads: [{pid: 12, tgid: 10}] } 7212 // #2 { processes: [{pid: 20, ...}], threads: [{pid: 13, tgid: 10}] } 7213 repeated Process processes = 1; 7214 repeated Thread threads = 2; 7215 7216 // The time at which we finish collecting this process tree; 7217 // the top-level packet timestamp is the time at which 7218 // we begin collection. 7219 optional uint64 collection_end_timestamp = 3; 7220} 7221 7222// End of protos/perfetto/trace/ps/process_tree.proto 7223 7224// Begin of protos/perfetto/trace/sys_stats/sys_stats.proto 7225 7226// Various Linux system stat counters from /proc. 7227// The fields in this message can be reported at different rates and with 7228// different granularity. See sys_stats_config.proto. 7229message SysStats { 7230 // Counters from /proc/meminfo. Values are in KB. 7231 message MeminfoValue { 7232 optional MeminfoCounters key = 1; 7233 optional uint64 value = 2; 7234 }; 7235 repeated MeminfoValue meminfo = 1; 7236 7237 // Counter from /proc/vmstat. Units are often pages, not KB. 7238 message VmstatValue { 7239 optional VmstatCounters key = 1; 7240 optional uint64 value = 2; 7241 }; 7242 repeated VmstatValue vmstat = 2; 7243 7244 // Times in each mode, since boot. Unit: nanoseconds. 7245 message CpuTimes { 7246 optional uint32 cpu_id = 1; 7247 7248 // Time spent in user mode. 7249 optional uint64 user_ns = 2; 7250 7251 // Time spent in user mode (low prio). 7252 optional uint64 user_ice_ns = 3; 7253 7254 // Time spent in system mode. 7255 optional uint64 system_mode_ns = 4; 7256 7257 // Time spent in the idle task. 7258 optional uint64 idle_ns = 5; 7259 7260 // Time spent waiting for I/O. 7261 optional uint64 io_wait_ns = 6; 7262 7263 // Time spent servicing interrupts. 7264 optional uint64 irq_ns = 7; 7265 7266 // Time spent servicing softirqs. 7267 optional uint64 softirq_ns = 8; 7268 } 7269 // One entry per cpu. 7270 repeated CpuTimes cpu_stat = 3; 7271 7272 // Num processes forked since boot. 7273 // Populated only if FORK_COUNT in config.stat_counters. 7274 optional uint64 num_forks = 4; 7275 7276 message InterruptCount { 7277 optional int32 irq = 1; 7278 optional uint64 count = 2; 7279 } 7280 7281 // Number of interrupts, broken by IRQ number. 7282 // Populated only if IRQ_COUNTS in config.stat_counters. 7283 7284 // Total num of irqs serviced since boot. 7285 optional uint64 num_irq_total = 5; 7286 repeated InterruptCount num_irq = 6; 7287 7288 // Number of softirqs, broken by softirq number. 7289 // Populated only if SOFTIRQ_COUNTS in config.stat_counters. 7290 7291 // Total num of softirqs since boot. 7292 optional uint64 num_softirq_total = 7; 7293 7294 // Per-softirq count. 7295 repeated InterruptCount num_softirq = 8; 7296 7297 // The time at which we finish collecting this set of samples; 7298 // the top-level packet timestamp is the time at which 7299 // we begin collection. 7300 optional uint64 collection_end_timestamp = 9; 7301} 7302 7303// End of protos/perfetto/trace/sys_stats/sys_stats.proto 7304 7305// Begin of protos/perfetto/trace/system_info.proto 7306 7307message Utsname { 7308 optional string sysname = 1; 7309 optional string version = 2; 7310 optional string release = 3; 7311 optional string machine = 4; 7312} 7313 7314message SystemInfo { 7315 optional Utsname utsname = 1; 7316 optional string android_build_fingerprint = 2; 7317 7318 // Ticks per second - sysconf(_SC_CLK_TCK). 7319 optional int64 hz = 3; 7320} 7321 7322// End of protos/perfetto/trace/system_info.proto 7323 7324// Begin of protos/perfetto/trace/system_info/cpu_info.proto 7325 7326// Information about CPUs from procfs and sysfs. 7327message CpuInfo { 7328 // Information about a single CPU. 7329 message Cpu { 7330 // Value of "Processor" field from /proc/cpuinfo for this CPU. 7331 // Example: "AArch64 Processor rev 12 (aarch64)" 7332 optional string processor = 1; 7333 7334 // Frequencies from 7335 // /sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies 7336 // where X is the index of this CPU. 7337 repeated uint32 frequencies = 2; 7338 } 7339 7340 // Describes available CPUs, one entry per CPU. 7341 repeated Cpu cpus = 1; 7342} 7343 7344// End of protos/perfetto/trace/system_info/cpu_info.proto 7345 7346// Begin of protos/perfetto/trace/test_event.proto 7347 7348// Event used by testing code. 7349message TestEvent { 7350 // Arbitrary string used in tests. 7351 optional string str = 1; 7352 7353 // The current value of the random number sequence used in tests. 7354 optional uint32 seq_value = 2; 7355 7356 // Monotonically increased on each packet. 7357 optional uint64 counter = 3; 7358 7359 // No more packets should follow (from the current sequence). 7360 optional bool is_last = 4; 7361 7362 message TestPayload { 7363 repeated string str = 1; 7364 repeated TestPayload nested = 2; 7365 7366 // When 0 this is the bottom-most nested message. 7367 optional uint32 remaining_nesting_depth = 3; 7368 } 7369 optional TestPayload payload = 5; 7370} 7371 7372// End of protos/perfetto/trace/test_event.proto 7373 7374// Begin of protos/perfetto/trace/trace_packet_defaults.proto 7375 7376// Default values for TracePacket fields that hold for a particular TraceWriter 7377// packet sequence. This message contains a subset of the TracePacket fields 7378// with matching IDs. When provided, these fields define the default values 7379// that should be applied, at import time, to all TracePacket(s) with the same 7380// |trusted_packet_sequence_id|, unless otherwise specified in each packet. 7381// 7382// Should be reemitted whenever incremental state is cleared on the sequence. 7383message TracePacketDefaults { 7384 optional uint32 timestamp_clock_id = 58; 7385 7386 // Default values for TrackEvents (e.g. default track). 7387 optional TrackEventDefaults track_event_defaults = 11; 7388} 7389// End of protos/perfetto/trace/trace_packet_defaults.proto 7390 7391// Begin of protos/perfetto/trace/track_event/process_descriptor.proto 7392 7393// Describes a process's attributes. Emitted as part of a TrackDescriptor, 7394// usually by the process's main thread. 7395// 7396// Next id: 7. 7397message ProcessDescriptor { 7398 optional int32 pid = 1; 7399 repeated string cmdline = 2; 7400 optional string process_name = 6; 7401 7402 optional int32 process_priority = 5; 7403 7404 // --------------------------------------------------------------------------- 7405 // Deprecated / legacy fields, which will be removed in the future: 7406 // --------------------------------------------------------------------------- 7407 7408 // See chromium's content::ProcessType. 7409 enum ChromeProcessType { 7410 PROCESS_UNSPECIFIED = 0; 7411 PROCESS_BROWSER = 1; 7412 PROCESS_RENDERER = 2; 7413 PROCESS_UTILITY = 3; 7414 PROCESS_ZYGOTE = 4; 7415 PROCESS_SANDBOX_HELPER = 5; 7416 PROCESS_GPU = 6; 7417 PROCESS_PPAPI_PLUGIN = 7; 7418 PROCESS_PPAPI_BROKER = 8; 7419 } 7420 optional ChromeProcessType chrome_process_type = 4; 7421 7422 // To support old UI. New UI should determine default sorting by process_type. 7423 optional int32 legacy_sort_index = 3; 7424} 7425 7426// End of protos/perfetto/trace/track_event/process_descriptor.proto 7427 7428// Begin of protos/perfetto/trace/track_event/thread_descriptor.proto 7429 7430// Describes a thread's attributes. Emitted as part of a TrackDescriptor, 7431// usually by the thread's trace writer. 7432// 7433// Next id: 9. 7434message ThreadDescriptor { 7435 optional int32 pid = 1; 7436 optional int32 tid = 2; 7437 7438 optional string thread_name = 5; 7439 7440 // --------------------------------------------------------------------------- 7441 // Deprecated / legacy fields, which will be removed in the future: 7442 // --------------------------------------------------------------------------- 7443 7444 enum ChromeThreadType { 7445 CHROME_THREAD_UNSPECIFIED = 0; 7446 7447 CHROME_THREAD_MAIN = 1; 7448 CHROME_THREAD_IO = 2; 7449 7450 // Scheduler: 7451 CHROME_THREAD_POOL_BG_WORKER = 3; 7452 CHROME_THREAD_POOL_FG_WORKER = 4; 7453 CHROME_THREAD_POOL_FB_BLOCKING = 5; 7454 CHROME_THREAD_POOL_BG_BLOCKING = 6; 7455 CHROME_THREAD_POOL_SERVICE = 7; 7456 7457 // Compositor: 7458 CHROME_THREAD_COMPOSITOR = 8; 7459 CHROME_THREAD_VIZ_COMPOSITOR = 9; 7460 CHROME_THREAD_COMPOSITOR_WORKER = 10; 7461 7462 // Renderer: 7463 CHROME_THREAD_SERVICE_WORKER = 11; 7464 7465 // Tracing related threads: 7466 CHROME_THREAD_MEMORY_INFRA = 50; 7467 CHROME_THREAD_SAMPLING_PROFILER = 51; 7468 }; 7469 optional ChromeThreadType chrome_thread_type = 4; 7470 7471 // Deprecated. Use ClockSnapshot in combination with TracePacket's timestamp 7472 // and timestamp_clock_id fields instead. 7473 optional int64 reference_timestamp_us = 6; 7474 7475 // Absolute reference values. Clock values in subsequent TrackEvents can be 7476 // encoded accumulatively and relative to these. This reduces their var-int 7477 // encoding size. 7478 // TODO(eseckler): Deprecated. Replace these with ClockSnapshot encoding. 7479 optional int64 reference_thread_time_us = 7; 7480 optional int64 reference_thread_instruction_count = 8; 7481 7482 // To support old UI. New UI should determine default sorting by thread_type. 7483 optional int32 legacy_sort_index = 3; 7484} 7485 7486// End of protos/perfetto/trace/track_event/thread_descriptor.proto 7487 7488// Begin of protos/perfetto/trace/track_event/chrome_process_descriptor.proto 7489 7490// Describes the attributes for a Chrome process. Must be paired with a 7491// ProcessDescriptor in the same TrackDescriptor. 7492// 7493// Next id: 4. 7494message ChromeProcessDescriptor { 7495 // See chromium's content::ProcessType. 7496 enum ProcessType { 7497 PROCESS_UNSPECIFIED = 0; 7498 PROCESS_BROWSER = 1; 7499 PROCESS_RENDERER = 2; 7500 PROCESS_UTILITY = 3; 7501 PROCESS_ZYGOTE = 4; 7502 PROCESS_SANDBOX_HELPER = 5; 7503 PROCESS_GPU = 6; 7504 PROCESS_PPAPI_PLUGIN = 7; 7505 PROCESS_PPAPI_BROKER = 8; 7506 } 7507 optional ProcessType process_type = 1; 7508 optional int32 process_priority = 2; 7509 7510 // To support old UI. New UI should determine default sorting by process_type. 7511 optional int32 legacy_sort_index = 3; 7512 7513 // Name of the hosting app for WebView. Used to match renderer processes to 7514 // their hosting apps. 7515 optional string host_app_package_name = 4; 7516} 7517 7518// End of protos/perfetto/trace/track_event/chrome_process_descriptor.proto 7519 7520// Begin of protos/perfetto/trace/track_event/chrome_thread_descriptor.proto 7521 7522// Describes a Chrome thread's attributes. Emitted as part of a TrackDescriptor, 7523// usually by the thread's trace writer. Must be paired with a ThreadDescriptor 7524// in the same TrackDescriptor. 7525// 7526// Next id: 3. 7527message ChromeThreadDescriptor { 7528 enum ThreadType { 7529 THREAD_UNSPECIFIED = 0; 7530 7531 THREAD_MAIN = 1; 7532 THREAD_IO = 2; 7533 7534 // Scheduler: 7535 THREAD_POOL_BG_WORKER = 3; 7536 THREAD_POOL_FG_WORKER = 4; 7537 THREAD_POOL_BG_BLOCKING = 6; 7538 THREAD_POOL_FG_BLOCKING = 5; 7539 THREAD_POOL_SERVICE = 7; 7540 7541 // Compositor: 7542 THREAD_COMPOSITOR = 8; 7543 THREAD_VIZ_COMPOSITOR = 9; 7544 THREAD_COMPOSITOR_WORKER = 10; 7545 7546 // Renderer: 7547 THREAD_SERVICE_WORKER = 11; 7548 7549 // Tracing related threads: 7550 THREAD_MEMORY_INFRA = 50; 7551 THREAD_SAMPLING_PROFILER = 51; 7552 }; 7553 optional ThreadType thread_type = 1; 7554 7555 // To support old UI. New UI should determine default sorting by thread_type. 7556 optional int32 legacy_sort_index = 2; 7557} 7558 7559// End of protos/perfetto/trace/track_event/chrome_thread_descriptor.proto 7560 7561// Begin of protos/perfetto/trace/track_event/counter_descriptor.proto 7562 7563// Defines properties of a counter track, e.g. for built-in counters (thread 7564// time, instruction count, ..) or user-specified counters (e.g. memory usage of 7565// a specific app component). 7566// 7567// Counter tracks only support TYPE_COUNTER track events, which specify new 7568// values for the counter. For counters that require per-slice values, counter 7569// values can instead be provided in a more efficient encoding via TrackEvent's 7570// |extra_counter_track_uuids| and |extra_counter_values| fields. However, 7571// slice-type events cannot be emitted onto a counter track. 7572// 7573// Values for counters that are only emitted on a single packet sequence can 7574// optionally be delta-encoded, see |is_incremental|. 7575// 7576// Next id: 6. 7577message CounterDescriptor { 7578 // Built-in counters, usually with special meaning in the client library, 7579 // trace processor, legacy JSON format, or UI. Trace processor will infer a 7580 // track name from the enum value if none is provided in TrackDescriptor. 7581 enum BuiltinCounterType { 7582 COUNTER_UNSPECIFIED = 0; 7583 7584 // Thread-scoped counters. The thread's track should be specified via 7585 // |parent_uuid| in the TrackDescriptor for such a counter. 7586 7587 // implies UNIT_TIME_NS. 7588 COUNTER_THREAD_TIME_NS = 1; 7589 7590 // implies UNIT_COUNT. 7591 COUNTER_THREAD_INSTRUCTION_COUNT = 2; 7592 } 7593 7594 // Type of the values for the counters - to supply lower granularity units, 7595 // see also |unit_multiplier|. 7596 enum Unit { 7597 UNIT_UNSPECIFIED = 0; 7598 UNIT_TIME_NS = 1; 7599 UNIT_COUNT = 2; 7600 UNIT_SIZE_BYTES = 3; 7601 // TODO(eseckler): Support more units as necessary. 7602 } 7603 7604 // For built-in counters (e.g. thread time). Custom user-specified counters 7605 // (e.g. those emitted by TRACE_COUNTER macros of the client library) 7606 // shouldn't set this, and instead provide a counter name via TrackDescriptor. 7607 optional BuiltinCounterType type = 1; 7608 7609 // Names of categories of the counter (usually for user-specified counters). 7610 // In the client library, categories are a way to turn groups of individual 7611 // counters (or events) on or off. 7612 repeated string categories = 2; 7613 7614 // Type of the counter's values. Built-in counters imply a value for this 7615 // field. 7616 optional Unit unit = 3; 7617 7618 // Multiplication factor of this counter's values, e.g. to supply 7619 // COUNTER_THREAD_TIME_NS timestamps in microseconds instead. 7620 optional int64 unit_multiplier = 4; 7621 7622 // Whether values for this counter are provided as delta values. Only 7623 // supported for counters that are emitted on a single packet-sequence (e.g. 7624 // thread time). Counter values in subsequent packets on the current packet 7625 // sequence will be interpreted as delta values from the sequence's most 7626 // recent value for the counter. When incremental state is cleared, the 7627 // counter value is considered to be reset to 0. Thus, the first value after 7628 // incremental state is cleared is effectively an absolute value. 7629 optional bool is_incremental = 5; 7630 7631 // TODO(eseckler): Support arguments describing the counter (?). 7632 // repeated DebugAnnotation debug_annotations; 7633} 7634 7635// End of protos/perfetto/trace/track_event/counter_descriptor.proto 7636 7637// Begin of protos/perfetto/trace/track_event/track_descriptor.proto 7638 7639// Defines a track for TrackEvents. Slices and instant events on the same track 7640// will be nested based on their timestamps, see TrackEvent::Type. 7641// 7642// A TrackDescriptor only needs to be emitted by one trace writer / producer and 7643// is valid for the entirety of the trace. To ensure the descriptor isn't lost 7644// when the ring buffer wraps, it should be reemitted whenever incremental state 7645// is cleared. 7646// 7647// As a fallback, TrackEvents emitted without an explicit track association will 7648// be associated with an implicit trace-global track (uuid = 0), see also 7649// |TrackEvent::track_uuid|. It is possible but not necessary to emit a 7650// TrackDescriptor for this implicit track. 7651// 7652// Next id: 9. 7653message TrackDescriptor { 7654 // Unique ID that identifies this track. This ID is global to the whole trace. 7655 // Producers should ensure that it is unlikely to clash with IDs emitted by 7656 // other producers. A value of 0 denotes the implicit trace-global track. 7657 // 7658 // For example, legacy TRACE_EVENT macros may use a hash involving the async 7659 // event id + id_scope, pid, and/or tid to compute this ID. 7660 optional uint64 uuid = 1; 7661 7662 // A parent track reference can be used to describe relationships between 7663 // tracks. For example, to define an asynchronous track which is scoped to a 7664 // specific process, specify the uuid for that process's process track here. 7665 // Similarly, to associate a COUNTER_THREAD_TIME_NS counter track with a 7666 // thread, specify the uuid for that thread's thread track here. 7667 optional uint64 parent_uuid = 5; 7668 7669 // Name of the track. Optional - if unspecified, it may be derived from the 7670 // process/thread name (process/thread tracks), the first event's name (async 7671 // tracks), or counter name (counter tracks). 7672 optional string name = 2; 7673 7674 // Associate the track with a process, making it the process-global track. 7675 // There should only be one such track per process (usually for instant 7676 // events; trace processor uses this fact to detect pid reuse). If you need 7677 // more (e.g. for asynchronous events), create child tracks using parent_uuid. 7678 // 7679 // Trace processor will merge events on a process track with slice-type events 7680 // from other sources (e.g. ftrace) for the same process into a single 7681 // timeline view. 7682 optional ProcessDescriptor process = 3; 7683 optional ChromeProcessDescriptor chrome_process = 6; 7684 7685 // Associate the track with a thread, indicating that the track's events 7686 // describe synchronous code execution on the thread. There should only be one 7687 // such track per thread (trace processor uses this fact to detect tid reuse). 7688 // 7689 // Trace processor will merge events on a thread track with slice-type events 7690 // from other sources (e.g. ftrace) for the same thread into a single timeline 7691 // view. 7692 optional ThreadDescriptor thread = 4; 7693 optional ChromeThreadDescriptor chrome_thread = 7; 7694 7695 // Descriptor for a counter track. If set, the track will only support 7696 // TYPE_COUNTER TrackEvents (and values provided via TrackEvent's 7697 // |extra_counter_values|). 7698 optional CounterDescriptor counter = 8; 7699} 7700 7701// End of protos/perfetto/trace/track_event/track_descriptor.proto 7702 7703// Begin of protos/perfetto/trace/trigger.proto 7704 7705// When a TracingSession receives a trigger it records the boot time nanoseconds 7706// in the TracePacket's timestamp field as well as the name of the producer that 7707// triggered it. We emit this data so filtering can be done on triggers received 7708// in the trace. 7709message Trigger { 7710 // Name of the trigger which was received. 7711 optional string trigger_name = 1; 7712 // The actual producer that activated |trigger|. 7713 optional string producer_name = 2; 7714 // The verified UID of the producer. 7715 optional int32 trusted_producer_uid = 3; 7716} 7717 7718// End of protos/perfetto/trace/trigger.proto 7719 7720// Begin of protos/perfetto/trace/trace_packet.proto 7721 7722// TracePacket is the root object of a Perfeto trace. 7723// A Perfetto trace is a linear sequence of TracePacket(s). 7724// 7725// The tracing service guarantees that all TracePacket(s) written by a given 7726// TraceWriter are seen in-order, without gaps or duplicates. If, for any 7727// reason, a TraceWriter sequence becomes invalid, no more packets are returned 7728// to the Consumer (or written into the trace file). 7729// TracePacket(s) written by different TraceWriter(s), hence even different 7730// data sources, can be seen in arbitrary order. 7731// The consumer can re-establish a total order, if interested, using the packet 7732// timestamps, after having synchronized the different clocks onto a global 7733// clock. 7734// 7735// The tracing service is agnostic of the content of TracePacket, with the 7736// exception of few fields (e.g.. trusted_*, trace_config) that are written by 7737// the service itself. 7738// 7739// See the [Buffers and Dataflow](/docs/concepts/buffers.md) doc for details. 7740// 7741// Next reserved id: 13 (up to 15). 7742// Next id: 74. 7743message TracePacket { 7744 // The timestamp of the TracePacket. 7745 // By default this timestamps refers to the trace clock (CLOCK_BOOTTIME on 7746 // Android). It can be overridden using a different timestamp_clock_id. 7747 // The clock domain definition in ClockSnapshot can also override: 7748 // - The unit (default: 1ns). 7749 // - The absolute vs delta encoding (default: absolute timestamp). 7750 optional uint64 timestamp = 8; 7751 7752 // Specifies the ID of the clock used for the TracePacket |timestamp|. Can be 7753 // one of the built-in types from ClockSnapshot::BuiltinClocks, or a 7754 // producer-defined clock id. 7755 // If unspecified and if no default per-sequence value has been provided via 7756 // TracePacketDefaults, it defaults to BuiltinClocks::BOOTTIME. 7757 optional uint32 timestamp_clock_id = 58; 7758 7759 oneof data { 7760 ProcessTree process_tree = 2; 7761 ProcessStats process_stats = 9; 7762 InodeFileMap inode_file_map = 4; 7763 ChromeEventBundle chrome_events = 5; 7764 ClockSnapshot clock_snapshot = 6; 7765 SysStats sys_stats = 7; 7766 TrackEvent track_event = 11; 7767 7768 // IDs up to 15 are reserved. They take only one byte to encode their 7769 // preamble so should be used for frequent events. 7770 7771 TraceConfig trace_config = 33; 7772 FtraceStats ftrace_stats = 34; 7773 TraceStats trace_stats = 35; 7774 ProfilePacket profile_packet = 37; 7775 BatteryCounters battery = 38; 7776 PowerRails power_rails = 40; 7777 AndroidLogPacket android_log = 39; 7778 SystemInfo system_info = 45; 7779 Trigger trigger = 46; 7780 PackagesList packages_list = 47; 7781 ChromeBenchmarkMetadata chrome_benchmark_metadata = 48; 7782 PerfettoMetatrace perfetto_metatrace = 49; 7783 ChromeMetadataPacket chrome_metadata = 51; 7784 GpuCounterEvent gpu_counter_event = 52; 7785 GpuRenderStageEvent gpu_render_stage_event = 53; 7786 StreamingProfilePacket streaming_profile_packet = 54; 7787 HeapGraph heap_graph = 56; 7788 GraphicsFrameEvent graphics_frame_event = 57; 7789 VulkanMemoryEvent vulkan_memory_event = 62; 7790 GpuLog gpu_log = 63; 7791 VulkanApiEvent vulkan_api_event = 65; 7792 PerfSample perf_sample = 66; 7793 CpuInfo cpu_info = 67; 7794 SmapsPacket smaps_packet = 68; 7795 TracingServiceEvent service_event = 69; 7796 InitialDisplayState initial_display_state = 70; 7797 GpuMemTotalEvent gpu_mem_total_event = 71; 7798 MemoryTrackerSnapshot memory_tracker_snapshot = 73; 7799 7800 // Only used in profile packets. 7801 ProfiledFrameSymbols profiled_frame_symbols = 55; 7802 ModuleSymbols module_symbols = 61; 7803 DeobfuscationMapping deobfuscation_mapping = 64; 7804 7805 // Only used by TrackEvent. 7806 TrackDescriptor track_descriptor = 60; 7807 7808 // Deprecated, use TrackDescriptor instead. 7809 ProcessDescriptor process_descriptor = 43; 7810 7811 // Deprecated, use TrackDescriptor instead. 7812 ThreadDescriptor thread_descriptor = 44; 7813 7814 // Events from the Linux kernel ftrace infrastructure. 7815 FtraceEventBundle ftrace_events = 1; 7816 7817 // This field is emitted at periodic intervals (~10s) and 7818 // contains always the binary representation of the UUID 7819 // {82477a76-b28d-42ba-81dc-33326d57a079}. This is used to be able to 7820 // efficiently partition long traces without having to fully parse them. 7821 bytes synchronization_marker = 36; 7822 7823 // Zero or more proto encoded trace packets compressed using deflate. 7824 // Each compressed_packets TracePacket (including the two field ids and 7825 // sizes) should be less than 512KB. 7826 bytes compressed_packets = 50; 7827 7828 // Data sources can extend the trace proto with custom extension protos (see 7829 // docs/design-docs/extensions.md). When they do that, the descriptor of 7830 // their extension proto descriptor is serialized in this packet. This 7831 // allows trace_processor to deserialize extended messages using reflection 7832 // even if the extension proto is not checked in the Perfetto repo. 7833 ExtensionDescriptor extension_descriptor = 72; 7834 7835 // This field is only used for testing. 7836 // In previous versions of this proto this field had the id 268435455 7837 // This caused many problems: 7838 // - protozero decoder does not handle field ids larger than 999. 7839 // - old versions of protoc produce Java bindings with syntax errors when 7840 // the field id is large enough. 7841 TestEvent for_testing = 900; 7842 } 7843 7844 // Trusted user id of the producer which generated this packet. Keep in sync 7845 // with TrustedPacket.trusted_uid. 7846 // 7847 // TODO(eseckler): Emit this field in a PacketSequenceDescriptor message 7848 // instead. 7849 oneof optional_trusted_uid { int32 trusted_uid = 3; }; 7850 7851 // Service-assigned identifier of the packet sequence this packet belongs to. 7852 // Uniquely identifies a producer + writer pair within the tracing session. A 7853 // value of zero denotes an invalid ID. Keep in sync with 7854 // TrustedPacket.trusted_packet_sequence_id. 7855 oneof optional_trusted_packet_sequence_id { 7856 uint32 trusted_packet_sequence_id = 10; 7857 } 7858 7859 // Incrementally emitted interned data, valid only on the packet's sequence 7860 // (packets with the same |trusted_packet_sequence_id|). The writer will 7861 // usually emit new interned data in the same TracePacket that first refers to 7862 // it (since the last reset of interning state). It may also be emitted 7863 // proactively in advance of referring to them in later packets. 7864 optional InternedData interned_data = 12; 7865 7866 enum SequenceFlags { 7867 SEQ_UNSPECIFIED = 0; 7868 7869 // Set by the writer to indicate that it will re-emit any incremental data 7870 // for the packet's sequence before referring to it again. This includes 7871 // interned data as well as periodically emitted data like 7872 // Process/ThreadDescriptors. This flag only affects the current packet 7873 // sequence (see |trusted_packet_sequence_id|). 7874 // 7875 // When set, this TracePacket and subsequent TracePackets on the same 7876 // sequence will not refer to any incremental data emitted before this 7877 // TracePacket. For example, previously emitted interned data will be 7878 // re-emitted if it is referred to again. 7879 // 7880 // When the reader detects packet loss (|previous_packet_dropped|), it needs 7881 // to skip packets in the sequence until the next one with this flag set, to 7882 // ensure intact incremental data. 7883 SEQ_INCREMENTAL_STATE_CLEARED = 1; 7884 7885 // This packet requires incremental state, such as TracePacketDefaults or 7886 // InternedData, to be parsed correctly. The trace reader should skip this 7887 // packet if incremental state is not valid on this sequence, i.e. if no 7888 // packet with the SEQ_INCREMENTAL_STATE_CLEARED flag has been seen on the 7889 // current |trusted_packet_sequence_id|. 7890 SEQ_NEEDS_INCREMENTAL_STATE = 2; 7891 }; 7892 optional uint32 sequence_flags = 13; 7893 7894 // DEPRECATED. Moved to SequenceFlags::SEQ_INCREMENTAL_STATE_CLEARED. 7895 optional bool incremental_state_cleared = 41; 7896 7897 // Default values for fields of later TracePackets emitted on this packet's 7898 // sequence (TracePackets with the same |trusted_packet_sequence_id|). 7899 // It must be reemitted when incremental state is cleared (see 7900 // |incremental_state_cleared|). 7901 // Requires that any future packet emitted on the same sequence specifies 7902 // the SEQ_NEEDS_INCREMENTAL_STATE flag. 7903 // TracePacketDefaults always override the global defaults for any future 7904 // packet on this sequence (regardless of SEQ_NEEDS_INCREMENTAL_STATE). 7905 optional TracePacketDefaults trace_packet_defaults = 59; 7906 7907 // Flag set by the service if, for the current packet sequence (see 7908 // |trusted_packet_sequence_id|), either: 7909 // * this is the first packet, or 7910 // * one or multiple packets were dropped since the last packet that the 7911 // consumer read from the sequence. This can happen if chunks in the trace 7912 // buffer are overridden before the consumer could read them when the trace 7913 // is configured in ring buffer mode. 7914 // 7915 // When packet loss occurs, incrementally emitted data (including interned 7916 // data) on the sequence should be considered invalid up until the next packet 7917 // with SEQ_INCREMENTAL_STATE_CLEARED set. 7918 optional bool previous_packet_dropped = 42; 7919} 7920 7921// End of protos/perfetto/trace/trace_packet.proto 7922 7923// Begin of protos/perfetto/trace/trace.proto 7924 7925message Trace { 7926 repeated TracePacket packet = 1; 7927 7928 // Do NOT add any other field here. This is just a convenience wrapper for 7929 // the use case of a trace being saved to a file. There are other cases 7930 // (streaming) where TracePacket are directly streamed without being wrapped 7931 // in a Trace proto. Nothing should ever rely on the full trace, all the 7932 // logic should be based on TracePacket(s). 7933} 7934 7935// End of protos/perfetto/trace/trace.proto 7936 7937// Begin of protos/perfetto/trace/test_extensions.proto 7938 7939// Extensions for TrackEvent used for integration testing. This proto file is 7940// compiled to descriptor and is used in tools/diff_test_trace_processor.py. 7941// 7942// See docs/design-docs/extensions.md for more details. 7943message TestExtension { 7944 extend TrackEvent { 7945 optional string string_extension_for_testing = 9900; 7946 repeated int32 int_extension_for_testing = 9901; 7947 optional string omitted_extension_for_testing = 9902; 7948 optional TestExtensionChild nested_message_extension_for_testing = 9903; 7949 } 7950} 7951 7952message TestExtensionChild { 7953 optional string child_field_for_testing = 1; 7954} 7955 7956// End of protos/perfetto/trace/test_extensions.proto 7957