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/android_log_constants.proto 15 16// Values from NDK's android/log.h. 17enum AndroidLogId { 18 LID_DEFAULT = 0; // MAIN. 19 LID_RADIO = 1; 20 LID_EVENTS = 2; 21 LID_SYSTEM = 3; 22 LID_CRASH = 4; 23 LID_STATS = 5; 24 LID_SECURITY = 6; 25 LID_KERNEL = 7; 26} 27 28enum AndroidLogPriority { 29 PRIO_UNSPECIFIED = 0; 30 PRIO_UNUSED = 1; // _DEFAULT, but should never be seen in logs. 31 PRIO_VERBOSE = 2; 32 PRIO_DEBUG = 3; 33 PRIO_INFO = 4; 34 PRIO_WARN = 5; 35 PRIO_ERROR = 6; 36 PRIO_FATAL = 7; 37} 38 39// End of protos/perfetto/common/android_log_constants.proto 40 41// Begin of protos/perfetto/common/sys_stats_counters.proto 42 43// When editing entries here remember also to update "sys_stats_counters.h" with 44// the corresponding string definitions for the actual /proc files parser. 45 46// Counter definitions for Linux's /proc/meminfo. 47enum MeminfoCounters { 48 MEMINFO_UNSPECIFIED = 0; 49 MEMINFO_MEM_TOTAL = 1; 50 MEMINFO_MEM_FREE = 2; 51 MEMINFO_MEM_AVAILABLE = 3; 52 MEMINFO_BUFFERS = 4; 53 MEMINFO_CACHED = 5; 54 MEMINFO_SWAP_CACHED = 6; 55 MEMINFO_ACTIVE = 7; 56 MEMINFO_INACTIVE = 8; 57 MEMINFO_ACTIVE_ANON = 9; 58 MEMINFO_INACTIVE_ANON = 10; 59 MEMINFO_ACTIVE_FILE = 11; 60 MEMINFO_INACTIVE_FILE = 12; 61 MEMINFO_UNEVICTABLE = 13; 62 MEMINFO_MLOCKED = 14; 63 MEMINFO_SWAP_TOTAL = 15; 64 MEMINFO_SWAP_FREE = 16; 65 MEMINFO_DIRTY = 17; 66 MEMINFO_WRITEBACK = 18; 67 MEMINFO_ANON_PAGES = 19; 68 MEMINFO_MAPPED = 20; 69 MEMINFO_SHMEM = 21; 70 MEMINFO_SLAB = 22; 71 MEMINFO_SLAB_RECLAIMABLE = 23; 72 MEMINFO_SLAB_UNRECLAIMABLE = 24; 73 MEMINFO_KERNEL_STACK = 25; 74 MEMINFO_PAGE_TABLES = 26; 75 MEMINFO_COMMIT_LIMIT = 27; 76 MEMINFO_COMMITED_AS = 28; 77 MEMINFO_VMALLOC_TOTAL = 29; 78 MEMINFO_VMALLOC_USED = 30; 79 MEMINFO_VMALLOC_CHUNK = 31; 80 MEMINFO_CMA_TOTAL = 32; 81 MEMINFO_CMA_FREE = 33; 82} 83 84// Counter definitions for Linux's /proc/vmstat. 85enum VmstatCounters { 86 VMSTAT_UNSPECIFIED = 0; 87 VMSTAT_NR_FREE_PAGES = 1; 88 VMSTAT_NR_ALLOC_BATCH = 2; 89 VMSTAT_NR_INACTIVE_ANON = 3; 90 VMSTAT_NR_ACTIVE_ANON = 4; 91 VMSTAT_NR_INACTIVE_FILE = 5; 92 VMSTAT_NR_ACTIVE_FILE = 6; 93 VMSTAT_NR_UNEVICTABLE = 7; 94 VMSTAT_NR_MLOCK = 8; 95 VMSTAT_NR_ANON_PAGES = 9; 96 VMSTAT_NR_MAPPED = 10; 97 VMSTAT_NR_FILE_PAGES = 11; 98 VMSTAT_NR_DIRTY = 12; 99 VMSTAT_NR_WRITEBACK = 13; 100 VMSTAT_NR_SLAB_RECLAIMABLE = 14; 101 VMSTAT_NR_SLAB_UNRECLAIMABLE = 15; 102 VMSTAT_NR_PAGE_TABLE_PAGES = 16; 103 VMSTAT_NR_KERNEL_STACK = 17; 104 VMSTAT_NR_OVERHEAD = 18; 105 VMSTAT_NR_UNSTABLE = 19; 106 VMSTAT_NR_BOUNCE = 20; 107 VMSTAT_NR_VMSCAN_WRITE = 21; 108 VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM = 22; 109 VMSTAT_NR_WRITEBACK_TEMP = 23; 110 VMSTAT_NR_ISOLATED_ANON = 24; 111 VMSTAT_NR_ISOLATED_FILE = 25; 112 VMSTAT_NR_SHMEM = 26; 113 VMSTAT_NR_DIRTIED = 27; 114 VMSTAT_NR_WRITTEN = 28; 115 VMSTAT_NR_PAGES_SCANNED = 29; 116 VMSTAT_WORKINGSET_REFAULT = 30; 117 VMSTAT_WORKINGSET_ACTIVATE = 31; 118 VMSTAT_WORKINGSET_NODERECLAIM = 32; 119 VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES = 33; 120 VMSTAT_NR_FREE_CMA = 34; 121 VMSTAT_NR_SWAPCACHE = 35; 122 VMSTAT_NR_DIRTY_THRESHOLD = 36; 123 VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD = 37; 124 VMSTAT_PGPGIN = 38; 125 VMSTAT_PGPGOUT = 39; 126 VMSTAT_PGPGOUTCLEAN = 40; 127 VMSTAT_PSWPIN = 41; 128 VMSTAT_PSWPOUT = 42; 129 VMSTAT_PGALLOC_DMA = 43; 130 VMSTAT_PGALLOC_NORMAL = 44; 131 VMSTAT_PGALLOC_MOVABLE = 45; 132 VMSTAT_PGFREE = 46; 133 VMSTAT_PGACTIVATE = 47; 134 VMSTAT_PGDEACTIVATE = 48; 135 VMSTAT_PGFAULT = 49; 136 VMSTAT_PGMAJFAULT = 50; 137 VMSTAT_PGREFILL_DMA = 51; 138 VMSTAT_PGREFILL_NORMAL = 52; 139 VMSTAT_PGREFILL_MOVABLE = 53; 140 VMSTAT_PGSTEAL_KSWAPD_DMA = 54; 141 VMSTAT_PGSTEAL_KSWAPD_NORMAL = 55; 142 VMSTAT_PGSTEAL_KSWAPD_MOVABLE = 56; 143 VMSTAT_PGSTEAL_DIRECT_DMA = 57; 144 VMSTAT_PGSTEAL_DIRECT_NORMAL = 58; 145 VMSTAT_PGSTEAL_DIRECT_MOVABLE = 59; 146 VMSTAT_PGSCAN_KSWAPD_DMA = 60; 147 VMSTAT_PGSCAN_KSWAPD_NORMAL = 61; 148 VMSTAT_PGSCAN_KSWAPD_MOVABLE = 62; 149 VMSTAT_PGSCAN_DIRECT_DMA = 63; 150 VMSTAT_PGSCAN_DIRECT_NORMAL = 64; 151 VMSTAT_PGSCAN_DIRECT_MOVABLE = 65; 152 VMSTAT_PGSCAN_DIRECT_THROTTLE = 66; 153 VMSTAT_PGINODESTEAL = 67; 154 VMSTAT_SLABS_SCANNED = 68; 155 VMSTAT_KSWAPD_INODESTEAL = 69; 156 VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY = 70; 157 VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY = 71; 158 VMSTAT_PAGEOUTRUN = 72; 159 VMSTAT_ALLOCSTALL = 73; 160 VMSTAT_PGROTATED = 74; 161 VMSTAT_DROP_PAGECACHE = 75; 162 VMSTAT_DROP_SLAB = 76; 163 VMSTAT_PGMIGRATE_SUCCESS = 77; 164 VMSTAT_PGMIGRATE_FAIL = 78; 165 VMSTAT_COMPACT_MIGRATE_SCANNED = 79; 166 VMSTAT_COMPACT_FREE_SCANNED = 80; 167 VMSTAT_COMPACT_ISOLATED = 81; 168 VMSTAT_COMPACT_STALL = 82; 169 VMSTAT_COMPACT_FAIL = 83; 170 VMSTAT_COMPACT_SUCCESS = 84; 171 VMSTAT_COMPACT_DAEMON_WAKE = 85; 172 VMSTAT_UNEVICTABLE_PGS_CULLED = 86; 173 VMSTAT_UNEVICTABLE_PGS_SCANNED = 87; 174 VMSTAT_UNEVICTABLE_PGS_RESCUED = 88; 175 VMSTAT_UNEVICTABLE_PGS_MLOCKED = 89; 176 VMSTAT_UNEVICTABLE_PGS_MUNLOCKED = 90; 177 VMSTAT_UNEVICTABLE_PGS_CLEARED = 91; 178 VMSTAT_UNEVICTABLE_PGS_STRANDED = 92; 179} 180// End of protos/perfetto/common/sys_stats_counters.proto 181 182// Begin of protos/perfetto/common/trace_stats.proto 183 184// Statistics for the internals of the tracing service. 185// 186// Next id: 10. 187message TraceStats { 188 // From TraceBuffer::Stats. 189 // 190 // Next id: 19. 191 message BufferStats { 192 // Size of the circular buffer in bytes. 193 optional uint64 buffer_size = 12; 194 195 // Num. bytes written into the circular buffer, including chunk headers. 196 optional uint64 bytes_written = 1; 197 198 // Num. bytes overwritten before they have been read (i.e. loss of data). 199 optional uint64 bytes_overwritten = 13; 200 201 // Total size of chunks that were fully read from the circular buffer by the 202 // consumer. This may not be equal to |bytes_written| either in the middle 203 // of tracing, or if |chunks_overwritten| is non-zero. Note that this is the 204 // size of the chunks read from the buffer, including chunk headers, which 205 // will be different from the total size of packets returned to the 206 // consumer. 207 // 208 // The current utilization of the trace buffer (mid-tracing) can be obtained 209 // by subtracting |bytes_read| and |bytes_overwritten| from |bytes_written|, 210 // adding the difference of |padding_bytes_written| and 211 // |padding_bytes_cleared|, and comparing this sum to the |buffer_size|. 212 // Note that this represents the total size of buffered data in the buffer, 213 // yet this data may be spread non-contiguously through the buffer and may 214 // be overridden before the utilization reaches 100%. 215 optional uint64 bytes_read = 14; 216 217 // Num. bytes that were allocated as padding between chunks in the circular 218 // buffer. 219 optional uint64 padding_bytes_written = 15; 220 221 // Num. of padding bytes that were removed from the circular buffer when 222 // they were overwritten. 223 // 224 // The difference between |padding_bytes_written| and 225 // |padding_bytes_cleared| denotes the total size of padding currently 226 // present in the buffer. 227 optional uint64 padding_bytes_cleared = 16; 228 229 // Num. chunks (!= packets) written into the buffer. 230 optional uint64 chunks_written = 2; 231 232 // Num. chunks (!= packets) rewritten into the buffer. This means we rewrote 233 // the same chunk with additional packets appended to the end. 234 optional uint64 chunks_rewritten = 10; 235 236 // Num. chunks overwritten before they have been read (i.e. loss of data). 237 optional uint64 chunks_overwritten = 3; 238 239 // Num. chunks discarded (i.e. loss of data). Can be > 0 only when a buffer 240 // is configured with FillPolicy == DISCARD. 241 optional uint64 chunks_discarded = 18; 242 243 // Num. chunks (!= packets) that were fully read from the circular buffer by 244 // the consumer. This may not be equal to |chunks_written| either in the 245 // middle of tracing, or if |chunks_overwritten| is non-zero. 246 optional uint64 chunks_read = 17; 247 248 // Num. chunks that were committed out of order. 249 optional uint64 chunks_committed_out_of_order = 11; 250 251 // Num. times the ring buffer wrapped around. 252 optional uint64 write_wrap_count = 4; 253 254 // Num. out-of-band (OOB) patches that succeeded. 255 optional uint64 patches_succeeded = 5; 256 257 // Num. OOB patches that failed (e.g., the chunk to patch was gone). 258 optional uint64 patches_failed = 6; 259 260 // Num. readaheads (for large multi-chunk packet reads) that ended up in a 261 // successful packet read. 262 optional uint64 readaheads_succeeded = 7; 263 264 // Num. readaheads aborted because of missing chunks in the sequence stream. 265 // Note that a small number > 0 is totally expected: occasionally, when 266 // issuing a read, the very last packet in a sequence might be incomplete 267 // (because the producer is still writing it while we read). The read will 268 // stop at that point, for that sequence, increasing this counter. 269 optional uint64 readaheads_failed = 8; 270 271 // Num. of violations of the SharedMemoryABI found while writing or reading 272 // the buffer. This is an indication of either a bug in the producer(s) or 273 // malicious producer(s). 274 optional uint64 abi_violations = 9; 275 } 276 277 // Stats for the TraceBuffer(s) of the current trace session. 278 repeated BufferStats buffer_stats = 1; 279 280 // Num. producers connected (whether they are involved in the current tracing 281 // session or not). 282 optional uint32 producers_connected = 2; 283 284 // Num. producers ever seen for all trace sessions since startup (it's a good 285 // proxy for inferring num. producers crashed / killed). 286 optional uint64 producers_seen = 3; 287 288 // Num. data sources registered for all trace sessions. 289 optional uint32 data_sources_registered = 4; 290 291 // Num. data sources ever seen for all trace sessions since startup. 292 optional uint64 data_sources_seen = 5; 293 294 // Num. concurrently active tracing sessions. 295 optional uint32 tracing_sessions = 6; 296 297 // Num. buffers for all tracing session (not just the current one). This will 298 // be >= buffer_stats.size(), because the latter is only about the current 299 // session. 300 optional uint32 total_buffers = 7; 301 302 // The fields below have been introduced in Android Q. 303 304 // Num. chunks that were discarded by the service before attempting to commit 305 // them to a buffer, e.g. because the producer specified an invalid buffer ID. 306 optional uint64 chunks_discarded = 8; 307 308 // Num. patches that were discarded by the service before attempting to apply 309 // them to a buffer, e.g. because the producer specified an invalid buffer ID. 310 optional uint64 patches_discarded = 9; 311} 312 313// End of protos/perfetto/common/trace_stats.proto 314 315// Begin of protos/perfetto/trace/android/android_log.proto 316 317message AndroidLogPacket { 318 message LogEvent { 319 // The log buffer (e.g. MAIN, SYSTEM, RADIO) the event comes from. 320 optional AndroidLogId log_id = 1; 321 322 // PID (TGID), TID and UID of the task that emitted the event. 323 optional int32 pid = 2; 324 optional int32 tid = 3; 325 optional int32 uid = 4; 326 327 // Timestamp [ns]. The clock source is CLOCK_REALTIME, unlike many other 328 // Perfetto trace events that instead use CLOCK_BOOTTIME. The trace 329 // processor will take care of realigning clocks using the ClockSnapshot(s). 330 optional uint64 timestamp = 5; 331 332 // When log_id == LID_EVENTS, |tag| corresponds to the event name defined in 333 // the second column of /system/etc/event-log-tags. For all other events, 334 // |tag| is the app-specified argument passed to __android_log_write(). 335 optional string tag = 6; 336 337 // Empty when log_id == LID_EVENTS. 338 optional AndroidLogPriority prio = 7; 339 340 // Empty when log_id == LID_EVENTS. 341 optional string message = 8; 342 343 message Arg { 344 optional string name = 1; 345 oneof value { 346 int64 int_value = 2; 347 float float_value = 3; 348 string string_value = 4; 349 } 350 } 351 // Only populated when log_id == LID_EVENTS. 352 repeated Arg args = 9; 353 } 354 355 repeated LogEvent events = 1; 356 357 // Stats are emitted only upon Flush() and are monotonic (i.e. they are 358 // absolute counters since the beginning of the lifetime of the tracing 359 // session and NOT relative to the previous Stats snapshot). 360 message Stats { 361 // Total number of log events seen, including errors and skipped entries 362 // (num of events stored in the trace = total - failed - skipped). 363 optional uint64 num_total = 1; 364 365 // Parser failures. 366 optional uint64 num_failed = 2; 367 368 // Messages skipped due to filters. 369 optional uint64 num_skipped = 3; 370 } 371 optional Stats stats = 2; 372} 373 374// End of protos/perfetto/trace/android/android_log.proto 375 376// Begin of protos/perfetto/trace/android/packages_list.proto 377 378message PackagesList { 379 message PackageInfo { 380 optional string name = 1; 381 optional uint64 uid = 2; 382 optional bool debuggable = 3; 383 optional bool profileable_from_shell = 4; 384 optional int64 version_code = 5; 385 } 386 387 repeated PackageInfo packages = 1; 388 389 // At least one error occurred parsing the packages.list. 390 optional bool parse_error = 2; 391 392 // Failed to open / read packages.list. 393 optional bool read_error = 3; 394} 395 396// End of protos/perfetto/trace/android/packages_list.proto 397 398// Begin of protos/perfetto/trace/clock_snapshot.proto 399 400// A snapshot of clock readings to allow for trace alignment. 401message ClockSnapshot { 402 message Clock { 403 enum Type { 404 UNKNOWN = 0; 405 REALTIME = 1; 406 REALTIME_COARSE = 2; 407 MONOTONIC = 3; 408 MONOTONIC_COARSE = 4; 409 MONOTONIC_RAW = 5; 410 BOOTTIME = 6; 411 PROCESS_CPUTIME = 7; 412 THREAD_CPUTIME = 8; 413 } 414 optional Type type = 1; 415 optional uint64 timestamp = 2; 416 } 417 repeated Clock clocks = 1; 418} 419 420// End of protos/perfetto/trace/clock_snapshot.proto 421 422// Begin of protos/perfetto/trace/filesystem/inode_file_map.proto 423 424// Represents the mapping between inode numbers in a block device and their path 425// on the filesystem 426message InodeFileMap { 427 // Representation of Entry 428 message Entry { 429 optional uint64 inode_number = 1; 430 431 // The path to the file, e.g. "etc/file.xml" 432 // List of strings for multiple hardlinks 433 repeated string paths = 2; 434 435 // The file type 436 enum Type { 437 UNKNOWN = 0; 438 FILE = 1; 439 DIRECTORY = 2; 440 } 441 optional Type type = 3; 442 } 443 444 optional uint64 block_device_id = 1; 445 446 // The mount points of the block device, e.g. ["system"]. 447 repeated string mount_points = 2; 448 449 // The list of all the entries from the block device 450 repeated Entry entries = 3; 451} 452 453// End of protos/perfetto/trace/filesystem/inode_file_map.proto 454 455// Begin of protos/perfetto/trace/ftrace/binder.proto 456 457message BinderTransactionFtraceEvent { 458 optional int32 debug_id = 1; 459 optional int32 target_node = 2; 460 optional int32 to_proc = 3; 461 optional int32 to_thread = 4; 462 optional int32 reply = 5; 463 optional uint32 code = 6; 464 optional uint32 flags = 7; 465} 466message BinderTransactionReceivedFtraceEvent { 467 optional int32 debug_id = 1; 468} 469message BinderSetPriorityFtraceEvent { 470 optional int32 proc = 1; 471 optional int32 thread = 2; 472 optional uint32 old_prio = 3; 473 optional uint32 new_prio = 4; 474 optional uint32 desired_prio = 5; 475} 476message BinderLockFtraceEvent { 477 optional string tag = 1; 478} 479message BinderLockedFtraceEvent { 480 optional string tag = 1; 481} 482message BinderUnlockFtraceEvent { 483 optional string tag = 1; 484} 485message BinderTransactionAllocBufFtraceEvent { 486 optional uint64 data_size = 1; 487 optional int32 debug_id = 2; 488 optional uint64 offsets_size = 3; 489} 490 491// End of protos/perfetto/trace/ftrace/binder.proto 492 493// Begin of protos/perfetto/trace/ftrace/block.proto 494 495message BlockRqIssueFtraceEvent { 496 optional uint64 dev = 1; 497 optional uint64 sector = 2; 498 optional uint32 nr_sector = 3; 499 optional uint32 bytes = 4; 500 optional string rwbs = 5; 501 optional string comm = 6; 502 optional string cmd = 7; 503} 504message BlockBioBackmergeFtraceEvent { 505 optional uint64 dev = 1; 506 optional uint64 sector = 2; 507 optional uint32 nr_sector = 3; 508 optional string rwbs = 4; 509 optional string comm = 5; 510} 511message BlockBioBounceFtraceEvent { 512 optional uint64 dev = 1; 513 optional uint64 sector = 2; 514 optional uint32 nr_sector = 3; 515 optional string rwbs = 4; 516 optional string comm = 5; 517} 518message BlockBioCompleteFtraceEvent { 519 optional uint64 dev = 1; 520 optional uint64 sector = 2; 521 optional uint32 nr_sector = 3; 522 optional int32 error = 4; 523 optional string rwbs = 5; 524} 525message BlockBioFrontmergeFtraceEvent { 526 optional uint64 dev = 1; 527 optional uint64 sector = 2; 528 optional uint32 nr_sector = 3; 529 optional string rwbs = 4; 530 optional string comm = 5; 531} 532message BlockBioQueueFtraceEvent { 533 optional uint64 dev = 1; 534 optional uint64 sector = 2; 535 optional uint32 nr_sector = 3; 536 optional string rwbs = 4; 537 optional string comm = 5; 538} 539message BlockBioRemapFtraceEvent { 540 optional uint64 dev = 1; 541 optional uint64 sector = 2; 542 optional uint32 nr_sector = 3; 543 optional uint64 old_dev = 4; 544 optional uint64 old_sector = 5; 545 optional string rwbs = 6; 546} 547message BlockDirtyBufferFtraceEvent { 548 optional uint64 dev = 1; 549 optional uint64 sector = 2; 550 optional uint64 size = 3; 551} 552message BlockGetrqFtraceEvent { 553 optional uint64 dev = 1; 554 optional uint64 sector = 2; 555 optional uint32 nr_sector = 3; 556 optional string rwbs = 4; 557 optional string comm = 5; 558} 559message BlockPlugFtraceEvent { 560 optional string comm = 1; 561} 562message BlockRqAbortFtraceEvent { 563 optional uint64 dev = 1; 564 optional uint64 sector = 2; 565 optional uint32 nr_sector = 3; 566 optional int32 errors = 4; 567 optional string rwbs = 5; 568 optional string cmd = 6; 569} 570message BlockRqCompleteFtraceEvent { 571 optional uint64 dev = 1; 572 optional uint64 sector = 2; 573 optional uint32 nr_sector = 3; 574 optional int32 errors = 4; 575 optional string rwbs = 5; 576 optional string cmd = 6; 577} 578message BlockRqInsertFtraceEvent { 579 optional uint64 dev = 1; 580 optional uint64 sector = 2; 581 optional uint32 nr_sector = 3; 582 optional uint32 bytes = 4; 583 optional string rwbs = 5; 584 optional string comm = 6; 585 optional string cmd = 7; 586} 587message BlockRqRemapFtraceEvent { 588 optional uint64 dev = 1; 589 optional uint64 sector = 2; 590 optional uint32 nr_sector = 3; 591 optional uint64 old_dev = 4; 592 optional uint64 old_sector = 5; 593 optional uint32 nr_bios = 6; 594 optional string rwbs = 7; 595} 596message BlockRqRequeueFtraceEvent { 597 optional uint64 dev = 1; 598 optional uint64 sector = 2; 599 optional uint32 nr_sector = 3; 600 optional int32 errors = 4; 601 optional string rwbs = 5; 602 optional string cmd = 6; 603} 604message BlockSleeprqFtraceEvent { 605 optional uint64 dev = 1; 606 optional uint64 sector = 2; 607 optional uint32 nr_sector = 3; 608 optional string rwbs = 4; 609 optional string comm = 5; 610} 611message BlockSplitFtraceEvent { 612 optional uint64 dev = 1; 613 optional uint64 sector = 2; 614 optional uint64 new_sector = 3; 615 optional string rwbs = 4; 616 optional string comm = 5; 617} 618message BlockTouchBufferFtraceEvent { 619 optional uint64 dev = 1; 620 optional uint64 sector = 2; 621 optional uint64 size = 3; 622} 623message BlockUnplugFtraceEvent { 624 optional int32 nr_rq = 1; 625 optional string comm = 2; 626} 627 628// End of protos/perfetto/trace/ftrace/block.proto 629 630// Begin of protos/perfetto/trace/ftrace/clk.proto 631 632message ClkEnableFtraceEvent { 633 optional string name = 1; 634} 635message ClkDisableFtraceEvent { 636 optional string name = 1; 637} 638message ClkSetRateFtraceEvent { 639 optional string name = 1; 640 optional uint64 rate = 2; 641} 642 643// End of protos/perfetto/trace/ftrace/clk.proto 644 645// Begin of protos/perfetto/trace/ftrace/ext4.proto 646 647message Ext4DaWriteBeginFtraceEvent { 648 optional uint64 dev = 1; 649 optional uint64 ino = 2; 650 optional int64 pos = 3; 651 optional uint32 len = 4; 652 optional uint32 flags = 5; 653} 654message Ext4DaWriteEndFtraceEvent { 655 optional uint64 dev = 1; 656 optional uint64 ino = 2; 657 optional int64 pos = 3; 658 optional uint32 len = 4; 659 optional uint32 copied = 5; 660} 661message Ext4SyncFileEnterFtraceEvent { 662 optional uint64 dev = 1; 663 optional uint64 ino = 2; 664 optional uint64 parent = 3; 665 optional int32 datasync = 4; 666} 667message Ext4SyncFileExitFtraceEvent { 668 optional uint64 dev = 1; 669 optional uint64 ino = 2; 670 optional int32 ret = 3; 671} 672message Ext4AllocDaBlocksFtraceEvent { 673 optional uint64 dev = 1; 674 optional uint64 ino = 2; 675 optional uint32 data_blocks = 3; 676 optional uint32 meta_blocks = 4; 677} 678message Ext4AllocateBlocksFtraceEvent { 679 optional uint64 dev = 1; 680 optional uint64 ino = 2; 681 optional uint64 block = 3; 682 optional uint32 len = 4; 683 optional uint32 logical = 5; 684 optional uint32 lleft = 6; 685 optional uint32 lright = 7; 686 optional uint64 goal = 8; 687 optional uint64 pleft = 9; 688 optional uint64 pright = 10; 689 optional uint32 flags = 11; 690} 691message Ext4AllocateInodeFtraceEvent { 692 optional uint64 dev = 1; 693 optional uint64 ino = 2; 694 optional uint64 dir = 3; 695 optional uint32 mode = 4; 696} 697message Ext4BeginOrderedTruncateFtraceEvent { 698 optional uint64 dev = 1; 699 optional uint64 ino = 2; 700 optional int64 new_size = 3; 701} 702message Ext4CollapseRangeFtraceEvent { 703 optional uint64 dev = 1; 704 optional uint64 ino = 2; 705 optional int64 offset = 3; 706 optional int64 len = 4; 707} 708message Ext4DaReleaseSpaceFtraceEvent { 709 optional uint64 dev = 1; 710 optional uint64 ino = 2; 711 optional uint64 i_blocks = 3; 712 optional int32 freed_blocks = 4; 713 optional int32 reserved_data_blocks = 5; 714 optional int32 reserved_meta_blocks = 6; 715 optional int32 allocated_meta_blocks = 7; 716 optional uint32 mode = 8; 717} 718message Ext4DaReserveSpaceFtraceEvent { 719 optional uint64 dev = 1; 720 optional uint64 ino = 2; 721 optional uint64 i_blocks = 3; 722 optional int32 reserved_data_blocks = 4; 723 optional int32 reserved_meta_blocks = 5; 724 optional uint32 mode = 6; 725 optional int32 md_needed = 7; 726} 727message Ext4DaUpdateReserveSpaceFtraceEvent { 728 optional uint64 dev = 1; 729 optional uint64 ino = 2; 730 optional uint64 i_blocks = 3; 731 optional int32 used_blocks = 4; 732 optional int32 reserved_data_blocks = 5; 733 optional int32 reserved_meta_blocks = 6; 734 optional int32 allocated_meta_blocks = 7; 735 optional int32 quota_claim = 8; 736 optional uint32 mode = 9; 737} 738message Ext4DaWritePagesFtraceEvent { 739 optional uint64 dev = 1; 740 optional uint64 ino = 2; 741 optional uint64 first_page = 3; 742 optional int64 nr_to_write = 4; 743 optional int32 sync_mode = 5; 744 optional uint64 b_blocknr = 6; 745 optional uint32 b_size = 7; 746 optional uint32 b_state = 8; 747 optional int32 io_done = 9; 748 optional int32 pages_written = 10; 749} 750message Ext4DaWritePagesExtentFtraceEvent { 751 optional uint64 dev = 1; 752 optional uint64 ino = 2; 753 optional uint64 lblk = 3; 754 optional uint32 len = 4; 755 optional uint32 flags = 5; 756} 757message Ext4DirectIOEnterFtraceEvent { 758 optional uint64 dev = 1; 759 optional uint64 ino = 2; 760 optional int64 pos = 3; 761 optional uint64 len = 4; 762 optional int32 rw = 5; 763} 764message Ext4DirectIOExitFtraceEvent { 765 optional uint64 dev = 1; 766 optional uint64 ino = 2; 767 optional int64 pos = 3; 768 optional uint64 len = 4; 769 optional int32 rw = 5; 770 optional int32 ret = 6; 771} 772message Ext4DiscardBlocksFtraceEvent { 773 optional uint64 dev = 1; 774 optional uint64 blk = 2; 775 optional uint64 count = 3; 776} 777message Ext4DiscardPreallocationsFtraceEvent { 778 optional uint64 dev = 1; 779 optional uint64 ino = 2; 780} 781message Ext4DropInodeFtraceEvent { 782 optional uint64 dev = 1; 783 optional uint64 ino = 2; 784 optional int32 drop = 3; 785} 786message Ext4EsCacheExtentFtraceEvent { 787 optional uint64 dev = 1; 788 optional uint64 ino = 2; 789 optional uint32 lblk = 3; 790 optional uint32 len = 4; 791 optional uint64 pblk = 5; 792 optional uint32 status = 6; 793} 794message Ext4EsFindDelayedExtentRangeEnterFtraceEvent { 795 optional uint64 dev = 1; 796 optional uint64 ino = 2; 797 optional uint32 lblk = 3; 798} 799message Ext4EsFindDelayedExtentRangeExitFtraceEvent { 800 optional uint64 dev = 1; 801 optional uint64 ino = 2; 802 optional uint32 lblk = 3; 803 optional uint32 len = 4; 804 optional uint64 pblk = 5; 805 optional uint64 status = 6; 806} 807message Ext4EsInsertExtentFtraceEvent { 808 optional uint64 dev = 1; 809 optional uint64 ino = 2; 810 optional uint32 lblk = 3; 811 optional uint32 len = 4; 812 optional uint64 pblk = 5; 813 optional uint64 status = 6; 814} 815message Ext4EsLookupExtentEnterFtraceEvent { 816 optional uint64 dev = 1; 817 optional uint64 ino = 2; 818 optional uint32 lblk = 3; 819} 820message Ext4EsLookupExtentExitFtraceEvent { 821 optional uint64 dev = 1; 822 optional uint64 ino = 2; 823 optional uint32 lblk = 3; 824 optional uint32 len = 4; 825 optional uint64 pblk = 5; 826 optional uint64 status = 6; 827 optional int32 found = 7; 828} 829message Ext4EsRemoveExtentFtraceEvent { 830 optional uint64 dev = 1; 831 optional uint64 ino = 2; 832 optional int64 lblk = 3; 833 optional int64 len = 4; 834} 835message Ext4EsShrinkFtraceEvent { 836 optional uint64 dev = 1; 837 optional int32 nr_shrunk = 2; 838 optional uint64 scan_time = 3; 839 optional int32 nr_skipped = 4; 840 optional int32 retried = 5; 841} 842message Ext4EsShrinkCountFtraceEvent { 843 optional uint64 dev = 1; 844 optional int32 nr_to_scan = 2; 845 optional int32 cache_cnt = 3; 846} 847message Ext4EsShrinkScanEnterFtraceEvent { 848 optional uint64 dev = 1; 849 optional int32 nr_to_scan = 2; 850 optional int32 cache_cnt = 3; 851} 852message Ext4EsShrinkScanExitFtraceEvent { 853 optional uint64 dev = 1; 854 optional int32 nr_shrunk = 2; 855 optional int32 cache_cnt = 3; 856} 857message Ext4EvictInodeFtraceEvent { 858 optional uint64 dev = 1; 859 optional uint64 ino = 2; 860 optional int32 nlink = 3; 861} 862message Ext4ExtConvertToInitializedEnterFtraceEvent { 863 optional uint64 dev = 1; 864 optional uint64 ino = 2; 865 optional uint32 m_lblk = 3; 866 optional uint32 m_len = 4; 867 optional uint32 u_lblk = 5; 868 optional uint32 u_len = 6; 869 optional uint64 u_pblk = 7; 870} 871message Ext4ExtConvertToInitializedFastpathFtraceEvent { 872 optional uint64 dev = 1; 873 optional uint64 ino = 2; 874 optional uint32 m_lblk = 3; 875 optional uint32 m_len = 4; 876 optional uint32 u_lblk = 5; 877 optional uint32 u_len = 6; 878 optional uint64 u_pblk = 7; 879 optional uint32 i_lblk = 8; 880 optional uint32 i_len = 9; 881 optional uint64 i_pblk = 10; 882} 883message Ext4ExtHandleUnwrittenExtentsFtraceEvent { 884 optional uint64 dev = 1; 885 optional uint64 ino = 2; 886 optional int32 flags = 3; 887 optional uint32 lblk = 4; 888 optional uint64 pblk = 5; 889 optional uint32 len = 6; 890 optional uint32 allocated = 7; 891 optional uint64 newblk = 8; 892} 893message Ext4ExtInCacheFtraceEvent { 894 optional uint64 dev = 1; 895 optional uint64 ino = 2; 896 optional uint32 lblk = 3; 897 optional int32 ret = 4; 898} 899message Ext4ExtLoadExtentFtraceEvent { 900 optional uint64 dev = 1; 901 optional uint64 ino = 2; 902 optional uint64 pblk = 3; 903 optional uint32 lblk = 4; 904} 905message Ext4ExtMapBlocksEnterFtraceEvent { 906 optional uint64 dev = 1; 907 optional uint64 ino = 2; 908 optional uint32 lblk = 3; 909 optional uint32 len = 4; 910 optional uint32 flags = 5; 911} 912message Ext4ExtMapBlocksExitFtraceEvent { 913 optional uint64 dev = 1; 914 optional uint64 ino = 2; 915 optional uint32 flags = 3; 916 optional uint64 pblk = 4; 917 optional uint32 lblk = 5; 918 optional uint32 len = 6; 919 optional uint32 mflags = 7; 920 optional int32 ret = 8; 921} 922message Ext4ExtPutInCacheFtraceEvent { 923 optional uint64 dev = 1; 924 optional uint64 ino = 2; 925 optional uint32 lblk = 3; 926 optional uint32 len = 4; 927 optional uint64 start = 5; 928} 929message Ext4ExtRemoveSpaceFtraceEvent { 930 optional uint64 dev = 1; 931 optional uint64 ino = 2; 932 optional uint32 start = 3; 933 optional uint32 end = 4; 934 optional int32 depth = 5; 935} 936message Ext4ExtRemoveSpaceDoneFtraceEvent { 937 optional uint64 dev = 1; 938 optional uint64 ino = 2; 939 optional uint32 start = 3; 940 optional uint32 end = 4; 941 optional int32 depth = 5; 942 optional int64 partial = 6; 943 optional uint32 eh_entries = 7; 944} 945message Ext4ExtRmIdxFtraceEvent { 946 optional uint64 dev = 1; 947 optional uint64 ino = 2; 948 optional uint64 pblk = 3; 949} 950message Ext4ExtRmLeafFtraceEvent { 951 optional uint64 dev = 1; 952 optional uint64 ino = 2; 953 optional int64 partial = 3; 954 optional uint32 start = 4; 955 optional uint32 ee_lblk = 5; 956 optional uint64 ee_pblk = 6; 957 optional int32 ee_len = 7; 958} 959message Ext4ExtShowExtentFtraceEvent { 960 optional uint64 dev = 1; 961 optional uint64 ino = 2; 962 optional uint64 pblk = 3; 963 optional uint32 lblk = 4; 964 optional uint32 len = 5; 965} 966message Ext4FallocateEnterFtraceEvent { 967 optional uint64 dev = 1; 968 optional uint64 ino = 2; 969 optional int64 offset = 3; 970 optional int64 len = 4; 971 optional int32 mode = 5; 972 optional int64 pos = 6; 973} 974message Ext4FallocateExitFtraceEvent { 975 optional uint64 dev = 1; 976 optional uint64 ino = 2; 977 optional int64 pos = 3; 978 optional uint32 blocks = 4; 979 optional int32 ret = 5; 980} 981message Ext4FindDelallocRangeFtraceEvent { 982 optional uint64 dev = 1; 983 optional uint64 ino = 2; 984 optional uint32 from = 3; 985 optional uint32 to = 4; 986 optional int32 reverse = 5; 987 optional int32 found = 6; 988 optional uint32 found_blk = 7; 989} 990message Ext4ForgetFtraceEvent { 991 optional uint64 dev = 1; 992 optional uint64 ino = 2; 993 optional uint64 block = 3; 994 optional int32 is_metadata = 4; 995 optional uint32 mode = 5; 996} 997message Ext4FreeBlocksFtraceEvent { 998 optional uint64 dev = 1; 999 optional uint64 ino = 2; 1000 optional uint64 block = 3; 1001 optional uint64 count = 4; 1002 optional int32 flags = 5; 1003 optional uint32 mode = 6; 1004} 1005message Ext4FreeInodeFtraceEvent { 1006 optional uint64 dev = 1; 1007 optional uint64 ino = 2; 1008 optional uint32 uid = 3; 1009 optional uint32 gid = 4; 1010 optional uint64 blocks = 5; 1011 optional uint32 mode = 6; 1012} 1013message Ext4GetImpliedClusterAllocExitFtraceEvent { 1014 optional uint64 dev = 1; 1015 optional uint32 flags = 2; 1016 optional uint32 lblk = 3; 1017 optional uint64 pblk = 4; 1018 optional uint32 len = 5; 1019 optional int32 ret = 6; 1020} 1021message Ext4GetReservedClusterAllocFtraceEvent { 1022 optional uint64 dev = 1; 1023 optional uint64 ino = 2; 1024 optional uint32 lblk = 3; 1025 optional uint32 len = 4; 1026} 1027message Ext4IndMapBlocksEnterFtraceEvent { 1028 optional uint64 dev = 1; 1029 optional uint64 ino = 2; 1030 optional uint32 lblk = 3; 1031 optional uint32 len = 4; 1032 optional uint32 flags = 5; 1033} 1034message Ext4IndMapBlocksExitFtraceEvent { 1035 optional uint64 dev = 1; 1036 optional uint64 ino = 2; 1037 optional uint32 flags = 3; 1038 optional uint64 pblk = 4; 1039 optional uint32 lblk = 5; 1040 optional uint32 len = 6; 1041 optional uint32 mflags = 7; 1042 optional int32 ret = 8; 1043} 1044message Ext4InsertRangeFtraceEvent { 1045 optional uint64 dev = 1; 1046 optional uint64 ino = 2; 1047 optional int64 offset = 3; 1048 optional int64 len = 4; 1049} 1050message Ext4InvalidatepageFtraceEvent { 1051 optional uint64 dev = 1; 1052 optional uint64 ino = 2; 1053 optional uint64 index = 3; 1054 optional uint64 offset = 4; 1055 optional uint32 length = 5; 1056} 1057message Ext4JournalStartFtraceEvent { 1058 optional uint64 dev = 1; 1059 optional uint64 ip = 2; 1060 optional int32 blocks = 3; 1061 optional int32 rsv_blocks = 4; 1062 optional int32 nblocks = 5; 1063} 1064message Ext4JournalStartReservedFtraceEvent { 1065 optional uint64 dev = 1; 1066 optional uint64 ip = 2; 1067 optional int32 blocks = 3; 1068} 1069message Ext4JournalledInvalidatepageFtraceEvent { 1070 optional uint64 dev = 1; 1071 optional uint64 ino = 2; 1072 optional uint64 index = 3; 1073 optional uint64 offset = 4; 1074 optional uint32 length = 5; 1075} 1076message Ext4JournalledWriteEndFtraceEvent { 1077 optional uint64 dev = 1; 1078 optional uint64 ino = 2; 1079 optional int64 pos = 3; 1080 optional uint32 len = 4; 1081 optional uint32 copied = 5; 1082} 1083message Ext4LoadInodeFtraceEvent { 1084 optional uint64 dev = 1; 1085 optional uint64 ino = 2; 1086} 1087message Ext4LoadInodeBitmapFtraceEvent { 1088 optional uint64 dev = 1; 1089 optional uint32 group = 2; 1090} 1091message Ext4MarkInodeDirtyFtraceEvent { 1092 optional uint64 dev = 1; 1093 optional uint64 ino = 2; 1094 optional uint64 ip = 3; 1095} 1096message Ext4MbBitmapLoadFtraceEvent { 1097 optional uint64 dev = 1; 1098 optional uint32 group = 2; 1099} 1100message Ext4MbBuddyBitmapLoadFtraceEvent { 1101 optional uint64 dev = 1; 1102 optional uint32 group = 2; 1103} 1104message Ext4MbDiscardPreallocationsFtraceEvent { 1105 optional uint64 dev = 1; 1106 optional int32 needed = 2; 1107} 1108message Ext4MbNewGroupPaFtraceEvent { 1109 optional uint64 dev = 1; 1110 optional uint64 ino = 2; 1111 optional uint64 pa_pstart = 3; 1112 optional uint64 pa_lstart = 4; 1113 optional uint32 pa_len = 5; 1114} 1115message Ext4MbNewInodePaFtraceEvent { 1116 optional uint64 dev = 1; 1117 optional uint64 ino = 2; 1118 optional uint64 pa_pstart = 3; 1119 optional uint64 pa_lstart = 4; 1120 optional uint32 pa_len = 5; 1121} 1122message Ext4MbReleaseGroupPaFtraceEvent { 1123 optional uint64 dev = 1; 1124 optional uint64 pa_pstart = 2; 1125 optional uint32 pa_len = 3; 1126} 1127message Ext4MbReleaseInodePaFtraceEvent { 1128 optional uint64 dev = 1; 1129 optional uint64 ino = 2; 1130 optional uint64 block = 3; 1131 optional uint32 count = 4; 1132} 1133message Ext4MballocAllocFtraceEvent { 1134 optional uint64 dev = 1; 1135 optional uint64 ino = 2; 1136 optional uint32 orig_logical = 3; 1137 optional int32 orig_start = 4; 1138 optional uint32 orig_group = 5; 1139 optional int32 orig_len = 6; 1140 optional uint32 goal_logical = 7; 1141 optional int32 goal_start = 8; 1142 optional uint32 goal_group = 9; 1143 optional int32 goal_len = 10; 1144 optional uint32 result_logical = 11; 1145 optional int32 result_start = 12; 1146 optional uint32 result_group = 13; 1147 optional int32 result_len = 14; 1148 optional uint32 found = 15; 1149 optional uint32 groups = 16; 1150 optional uint32 buddy = 17; 1151 optional uint32 flags = 18; 1152 optional uint32 tail = 19; 1153 optional uint32 cr = 20; 1154} 1155message Ext4MballocDiscardFtraceEvent { 1156 optional uint64 dev = 1; 1157 optional uint64 ino = 2; 1158 optional int32 result_start = 3; 1159 optional uint32 result_group = 4; 1160 optional int32 result_len = 5; 1161} 1162message Ext4MballocFreeFtraceEvent { 1163 optional uint64 dev = 1; 1164 optional uint64 ino = 2; 1165 optional int32 result_start = 3; 1166 optional uint32 result_group = 4; 1167 optional int32 result_len = 5; 1168} 1169message Ext4MballocPreallocFtraceEvent { 1170 optional uint64 dev = 1; 1171 optional uint64 ino = 2; 1172 optional uint32 orig_logical = 3; 1173 optional int32 orig_start = 4; 1174 optional uint32 orig_group = 5; 1175 optional int32 orig_len = 6; 1176 optional uint32 result_logical = 7; 1177 optional int32 result_start = 8; 1178 optional uint32 result_group = 9; 1179 optional int32 result_len = 10; 1180} 1181message Ext4OtherInodeUpdateTimeFtraceEvent { 1182 optional uint64 dev = 1; 1183 optional uint64 ino = 2; 1184 optional uint64 orig_ino = 3; 1185 optional uint32 uid = 4; 1186 optional uint32 gid = 5; 1187 optional uint32 mode = 6; 1188} 1189message Ext4PunchHoleFtraceEvent { 1190 optional uint64 dev = 1; 1191 optional uint64 ino = 2; 1192 optional int64 offset = 3; 1193 optional int64 len = 4; 1194 optional int32 mode = 5; 1195} 1196message Ext4ReadBlockBitmapLoadFtraceEvent { 1197 optional uint64 dev = 1; 1198 optional uint32 group = 2; 1199} 1200message Ext4ReadpageFtraceEvent { 1201 optional uint64 dev = 1; 1202 optional uint64 ino = 2; 1203 optional uint64 index = 3; 1204} 1205message Ext4ReleasepageFtraceEvent { 1206 optional uint64 dev = 1; 1207 optional uint64 ino = 2; 1208 optional uint64 index = 3; 1209} 1210message Ext4RemoveBlocksFtraceEvent { 1211 optional uint64 dev = 1; 1212 optional uint64 ino = 2; 1213 optional uint32 from = 3; 1214 optional uint32 to = 4; 1215 optional int64 partial = 5; 1216 optional uint64 ee_pblk = 6; 1217 optional uint32 ee_lblk = 7; 1218 optional uint32 ee_len = 8; 1219} 1220message Ext4RequestBlocksFtraceEvent { 1221 optional uint64 dev = 1; 1222 optional uint64 ino = 2; 1223 optional uint32 len = 3; 1224 optional uint32 logical = 4; 1225 optional uint32 lleft = 5; 1226 optional uint32 lright = 6; 1227 optional uint64 goal = 7; 1228 optional uint64 pleft = 8; 1229 optional uint64 pright = 9; 1230 optional uint32 flags = 10; 1231} 1232message Ext4RequestInodeFtraceEvent { 1233 optional uint64 dev = 1; 1234 optional uint64 dir = 2; 1235 optional uint32 mode = 3; 1236} 1237message Ext4SyncFsFtraceEvent { 1238 optional uint64 dev = 1; 1239 optional int32 wait = 2; 1240} 1241message Ext4TrimAllFreeFtraceEvent { 1242 optional int32 dev_major = 1; 1243 optional int32 dev_minor = 2; 1244 optional uint32 group = 3; 1245 optional int32 start = 4; 1246 optional int32 len = 5; 1247} 1248message Ext4TrimExtentFtraceEvent { 1249 optional int32 dev_major = 1; 1250 optional int32 dev_minor = 2; 1251 optional uint32 group = 3; 1252 optional int32 start = 4; 1253 optional int32 len = 5; 1254} 1255message Ext4TruncateEnterFtraceEvent { 1256 optional uint64 dev = 1; 1257 optional uint64 ino = 2; 1258 optional uint64 blocks = 3; 1259} 1260message Ext4TruncateExitFtraceEvent { 1261 optional uint64 dev = 1; 1262 optional uint64 ino = 2; 1263 optional uint64 blocks = 3; 1264} 1265message Ext4UnlinkEnterFtraceEvent { 1266 optional uint64 dev = 1; 1267 optional uint64 ino = 2; 1268 optional uint64 parent = 3; 1269 optional int64 size = 4; 1270} 1271message Ext4UnlinkExitFtraceEvent { 1272 optional uint64 dev = 1; 1273 optional uint64 ino = 2; 1274 optional int32 ret = 3; 1275} 1276message Ext4WriteBeginFtraceEvent { 1277 optional uint64 dev = 1; 1278 optional uint64 ino = 2; 1279 optional int64 pos = 3; 1280 optional uint32 len = 4; 1281 optional uint32 flags = 5; 1282} 1283message Ext4WriteEndFtraceEvent { 1284 optional uint64 dev = 1; 1285 optional uint64 ino = 2; 1286 optional int64 pos = 3; 1287 optional uint32 len = 4; 1288 optional uint32 copied = 5; 1289} 1290message Ext4WritepageFtraceEvent { 1291 optional uint64 dev = 1; 1292 optional uint64 ino = 2; 1293 optional uint64 index = 3; 1294} 1295message Ext4WritepagesFtraceEvent { 1296 optional uint64 dev = 1; 1297 optional uint64 ino = 2; 1298 optional int64 nr_to_write = 3; 1299 optional int64 pages_skipped = 4; 1300 optional int64 range_start = 5; 1301 optional int64 range_end = 6; 1302 optional uint64 writeback_index = 7; 1303 optional int32 sync_mode = 8; 1304 optional uint32 for_kupdate = 9; 1305 optional uint32 range_cyclic = 10; 1306} 1307message Ext4WritepagesResultFtraceEvent { 1308 optional uint64 dev = 1; 1309 optional uint64 ino = 2; 1310 optional int32 ret = 3; 1311 optional int32 pages_written = 4; 1312 optional int64 pages_skipped = 5; 1313 optional uint64 writeback_index = 6; 1314 optional int32 sync_mode = 7; 1315} 1316message Ext4ZeroRangeFtraceEvent { 1317 optional uint64 dev = 1; 1318 optional uint64 ino = 2; 1319 optional int64 offset = 3; 1320 optional int64 len = 4; 1321 optional int32 mode = 5; 1322} 1323 1324// End of protos/perfetto/trace/ftrace/ext4.proto 1325 1326// Begin of protos/perfetto/trace/ftrace/f2fs.proto 1327 1328message F2fsDoSubmitBioFtraceEvent { 1329 optional uint64 dev = 1; 1330 optional int32 btype = 2; 1331 optional uint32 sync = 3; 1332 optional uint64 sector = 4; 1333 optional uint32 size = 5; 1334} 1335message F2fsEvictInodeFtraceEvent { 1336 optional uint64 dev = 1; 1337 optional uint64 ino = 2; 1338 optional uint64 pino = 3; 1339 optional uint32 mode = 4; 1340 optional int64 size = 5; 1341 optional uint32 nlink = 6; 1342 optional uint64 blocks = 7; 1343 optional uint32 advise = 8; 1344} 1345message F2fsFallocateFtraceEvent { 1346 optional uint64 dev = 1; 1347 optional uint64 ino = 2; 1348 optional int32 mode = 3; 1349 optional int64 offset = 4; 1350 optional int64 len = 5; 1351 optional int64 size = 6; 1352 optional uint64 blocks = 7; 1353 optional int32 ret = 8; 1354} 1355message F2fsGetDataBlockFtraceEvent { 1356 optional uint64 dev = 1; 1357 optional uint64 ino = 2; 1358 optional uint64 iblock = 3; 1359 optional uint64 bh_start = 4; 1360 optional uint64 bh_size = 5; 1361 optional int32 ret = 6; 1362} 1363message F2fsGetVictimFtraceEvent { 1364 optional uint64 dev = 1; 1365 optional int32 type = 2; 1366 optional int32 gc_type = 3; 1367 optional int32 alloc_mode = 4; 1368 optional int32 gc_mode = 5; 1369 optional uint32 victim = 6; 1370 optional uint32 ofs_unit = 7; 1371 optional uint32 pre_victim = 8; 1372 optional uint32 prefree = 9; 1373 optional uint32 free = 10; 1374} 1375message F2fsIgetFtraceEvent { 1376 optional uint64 dev = 1; 1377 optional uint64 ino = 2; 1378 optional uint64 pino = 3; 1379 optional uint32 mode = 4; 1380 optional int64 size = 5; 1381 optional uint32 nlink = 6; 1382 optional uint64 blocks = 7; 1383 optional uint32 advise = 8; 1384} 1385message F2fsIgetExitFtraceEvent { 1386 optional uint64 dev = 1; 1387 optional uint64 ino = 2; 1388 optional int32 ret = 3; 1389} 1390message F2fsNewInodeFtraceEvent { 1391 optional uint64 dev = 1; 1392 optional uint64 ino = 2; 1393 optional int32 ret = 3; 1394} 1395message F2fsReadpageFtraceEvent { 1396 optional uint64 dev = 1; 1397 optional uint64 ino = 2; 1398 optional uint64 index = 3; 1399 optional uint64 blkaddr = 4; 1400 optional int32 type = 5; 1401} 1402message F2fsReserveNewBlockFtraceEvent { 1403 optional uint64 dev = 1; 1404 optional uint32 nid = 2; 1405 optional uint32 ofs_in_node = 3; 1406} 1407message F2fsSetPageDirtyFtraceEvent { 1408 optional uint64 dev = 1; 1409 optional uint64 ino = 2; 1410 optional int32 type = 3; 1411 optional int32 dir = 4; 1412 optional uint64 index = 5; 1413 optional int32 dirty = 6; 1414} 1415message F2fsSubmitWritePageFtraceEvent { 1416 optional uint64 dev = 1; 1417 optional uint64 ino = 2; 1418 optional int32 type = 3; 1419 optional uint64 index = 4; 1420 optional uint32 block = 5; 1421} 1422message F2fsSyncFileEnterFtraceEvent { 1423 optional uint64 dev = 1; 1424 optional uint64 ino = 2; 1425 optional uint64 pino = 3; 1426 optional uint32 mode = 4; 1427 optional int64 size = 5; 1428 optional uint32 nlink = 6; 1429 optional uint64 blocks = 7; 1430 optional uint32 advise = 8; 1431} 1432message F2fsSyncFileExitFtraceEvent { 1433 optional uint64 dev = 1; 1434 optional uint64 ino = 2; 1435 optional uint32 need_cp = 3; 1436 optional int32 datasync = 4; 1437 optional int32 ret = 5; 1438} 1439message F2fsSyncFsFtraceEvent { 1440 optional uint64 dev = 1; 1441 optional int32 dirty = 2; 1442 optional int32 wait = 3; 1443} 1444message F2fsTruncateFtraceEvent { 1445 optional uint64 dev = 1; 1446 optional uint64 ino = 2; 1447 optional uint64 pino = 3; 1448 optional uint32 mode = 4; 1449 optional int64 size = 5; 1450 optional uint32 nlink = 6; 1451 optional uint64 blocks = 7; 1452 optional uint32 advise = 8; 1453} 1454message F2fsTruncateBlocksEnterFtraceEvent { 1455 optional uint64 dev = 1; 1456 optional uint64 ino = 2; 1457 optional int64 size = 3; 1458 optional uint64 blocks = 4; 1459 optional uint64 from = 5; 1460} 1461message F2fsTruncateBlocksExitFtraceEvent { 1462 optional uint64 dev = 1; 1463 optional uint64 ino = 2; 1464 optional int32 ret = 3; 1465} 1466message F2fsTruncateDataBlocksRangeFtraceEvent { 1467 optional uint64 dev = 1; 1468 optional uint64 ino = 2; 1469 optional uint32 nid = 3; 1470 optional uint32 ofs = 4; 1471 optional int32 free = 5; 1472} 1473message F2fsTruncateInodeBlocksEnterFtraceEvent { 1474 optional uint64 dev = 1; 1475 optional uint64 ino = 2; 1476 optional int64 size = 3; 1477 optional uint64 blocks = 4; 1478 optional uint64 from = 5; 1479} 1480message F2fsTruncateInodeBlocksExitFtraceEvent { 1481 optional uint64 dev = 1; 1482 optional uint64 ino = 2; 1483 optional int32 ret = 3; 1484} 1485message F2fsTruncateNodeFtraceEvent { 1486 optional uint64 dev = 1; 1487 optional uint64 ino = 2; 1488 optional uint32 nid = 3; 1489 optional uint32 blk_addr = 4; 1490} 1491message F2fsTruncateNodesEnterFtraceEvent { 1492 optional uint64 dev = 1; 1493 optional uint64 ino = 2; 1494 optional uint32 nid = 3; 1495 optional uint32 blk_addr = 4; 1496} 1497message F2fsTruncateNodesExitFtraceEvent { 1498 optional uint64 dev = 1; 1499 optional uint64 ino = 2; 1500 optional int32 ret = 3; 1501} 1502message F2fsTruncatePartialNodesFtraceEvent { 1503 optional uint64 dev = 1; 1504 optional uint64 ino = 2; 1505 optional uint32 nid = 3; 1506 optional int32 depth = 4; 1507 optional int32 err = 5; 1508} 1509message F2fsUnlinkEnterFtraceEvent { 1510 optional uint64 dev = 1; 1511 optional uint64 ino = 2; 1512 optional int64 size = 3; 1513 optional uint64 blocks = 4; 1514 optional string name = 5; 1515} 1516message F2fsUnlinkExitFtraceEvent { 1517 optional uint64 dev = 1; 1518 optional uint64 ino = 2; 1519 optional int32 ret = 3; 1520} 1521message F2fsVmPageMkwriteFtraceEvent { 1522 optional uint64 dev = 1; 1523 optional uint64 ino = 2; 1524 optional int32 type = 3; 1525 optional int32 dir = 4; 1526 optional uint64 index = 5; 1527 optional int32 dirty = 6; 1528} 1529message F2fsWriteBeginFtraceEvent { 1530 optional uint64 dev = 1; 1531 optional uint64 ino = 2; 1532 optional int64 pos = 3; 1533 optional uint32 len = 4; 1534 optional uint32 flags = 5; 1535} 1536message F2fsWriteCheckpointFtraceEvent { 1537 optional uint64 dev = 1; 1538 optional uint32 is_umount = 2; 1539 optional string msg = 3; 1540} 1541message F2fsWriteEndFtraceEvent { 1542 optional uint64 dev = 1; 1543 optional uint64 ino = 2; 1544 optional int64 pos = 3; 1545 optional uint32 len = 4; 1546 optional uint32 copied = 5; 1547} 1548 1549// End of protos/perfetto/trace/ftrace/f2fs.proto 1550 1551// Begin of protos/perfetto/trace/ftrace/filemap.proto 1552 1553message MmFilemapAddToPageCacheFtraceEvent { 1554 optional uint64 pfn = 1; 1555 optional uint64 i_ino = 2; 1556 optional uint64 index = 3; 1557 optional uint64 s_dev = 4; 1558 optional uint64 page = 5; 1559} 1560message MmFilemapDeleteFromPageCacheFtraceEvent { 1561 optional uint64 pfn = 1; 1562 optional uint64 i_ino = 2; 1563 optional uint64 index = 3; 1564 optional uint64 s_dev = 4; 1565 optional uint64 page = 5; 1566} 1567 1568// End of protos/perfetto/trace/ftrace/filemap.proto 1569 1570// Begin of protos/perfetto/trace/ftrace/ftrace.proto 1571 1572message PrintFtraceEvent { 1573 optional uint64 ip = 1; 1574 optional string buf = 2; 1575} 1576 1577// End of protos/perfetto/trace/ftrace/ftrace.proto 1578 1579// Begin of protos/perfetto/trace/ftrace/ftrace_event.proto 1580 1581message FtraceEvent { 1582 // Nanoseconds since an epoch. 1583 // Epoch is configurable by writing into trace_clock. 1584 // By default this timestamp is CPU local. 1585 // TODO: Figure out a story for reconciling the various clocks. 1586 optional uint64 timestamp = 1; 1587 1588 // Kernel pid (do not confuse with userspace pid aka tgid) 1589 optional uint32 pid = 2; 1590 1591 oneof event { 1592 PrintFtraceEvent print = 3; 1593 SchedSwitchFtraceEvent sched_switch = 4; 1594 // removed field with id 5; 1595 // removed field with id 6; 1596 // removed field with id 7; 1597 // removed field with id 8; 1598 // removed field with id 9; 1599 // removed field with id 10; 1600 CpuFrequencyFtraceEvent cpu_frequency = 11; 1601 CpuFrequencyLimitsFtraceEvent cpu_frequency_limits = 12; 1602 CpuIdleFtraceEvent cpu_idle = 13; 1603 ClockEnableFtraceEvent clock_enable = 14; 1604 ClockDisableFtraceEvent clock_disable = 15; 1605 ClockSetRateFtraceEvent clock_set_rate = 16; 1606 SchedWakeupFtraceEvent sched_wakeup = 17; 1607 SchedBlockedReasonFtraceEvent sched_blocked_reason = 18; 1608 SchedCpuHotplugFtraceEvent sched_cpu_hotplug = 19; 1609 SchedWakingFtraceEvent sched_waking = 20; 1610 // removed field with id 21 1611 // removed field with id 22 1612 // removed field with id 23 1613 // removed field with id 24 1614 // removed field with id 25 1615 // removed field with id 26 1616 // removed field with id 27 1617 // removed field with id 28 1618 // removed field with id 29 1619 // removed field with id 30 1620 // removed field with id 31 1621 // removed field with id 32 1622 // removed field with id 33 1623 // removed field with id 34 1624 LowmemoryKillFtraceEvent lowmemory_kill = 35; 1625 // removed field with id 36 1626 // removed field with id 37 1627 // removed field with id 38 1628 // removed field with id 39 1629 // removed field with id 40 1630 Ext4DaWriteBeginFtraceEvent ext4_da_write_begin = 41; 1631 Ext4DaWriteEndFtraceEvent ext4_da_write_end = 42; 1632 Ext4SyncFileEnterFtraceEvent ext4_sync_file_enter = 43; 1633 Ext4SyncFileExitFtraceEvent ext4_sync_file_exit = 44; 1634 BlockRqIssueFtraceEvent block_rq_issue = 45; 1635 MmVmscanDirectReclaimBeginFtraceEvent mm_vmscan_direct_reclaim_begin = 46; 1636 MmVmscanDirectReclaimEndFtraceEvent mm_vmscan_direct_reclaim_end = 47; 1637 MmVmscanKswapdWakeFtraceEvent mm_vmscan_kswapd_wake = 48; 1638 MmVmscanKswapdSleepFtraceEvent mm_vmscan_kswapd_sleep = 49; 1639 BinderTransactionFtraceEvent binder_transaction = 50; 1640 BinderTransactionReceivedFtraceEvent binder_transaction_received = 51; 1641 BinderSetPriorityFtraceEvent binder_set_priority = 52; 1642 BinderLockFtraceEvent binder_lock = 53; 1643 BinderLockedFtraceEvent binder_locked = 54; 1644 BinderUnlockFtraceEvent binder_unlock = 55; 1645 // removed field with id 56 1646 // removed field with id 57 1647 // removed field with id 58 1648 // removed field with id 59 1649 // removed field with id 60 1650 // removed field with id 61 1651 // removed field with id 62 1652 // removed field with id 63 1653 // removed field with id 64 1654 // removed field with id 65 1655 // removed field with id 66 1656 // removed field with id 67 1657 // removed field with id 68 1658 // removed field with id 69 1659 // removed field with id 70 1660 // removed field with id 71 1661 // removed field with id 72 1662 // removed field with id 73 1663 // removed field with id 74 1664 // removed field with id 75 1665 // removed field with id 76 1666 // removed field with id 77 1667 // removed field with id 78 1668 // removed field with id 79 1669 // removed field with id 80 1670 // removed field with id 81 1671 // removed field with id 82 1672 // removed field with id 83 1673 // removed field with id 84 1674 // removed field with id 85 1675 // removed field with id 86 1676 // removed field with id 87 1677 // removed field with id 88 1678 // removed field with id 89 1679 // removed field with id 90 1680 // removed field with id 91 1681 // removed field with id 92 1682 // removed field with id 93 1683 // removed field with id 94 1684 // removed field with id 95 1685 // removed field with id 96 1686 MmFilemapAddToPageCacheFtraceEvent mm_filemap_add_to_page_cache = 97; 1687 MmFilemapDeleteFromPageCacheFtraceEvent mm_filemap_delete_from_page_cache = 1688 98; 1689 // removed field with id 99 1690 // removed field with id 100 1691 // removed field with id 101 1692 // removed field with id 102 1693 // removed field with id 103 1694 // removed field with id 104 1695 // removed field with id 105 1696 // removed field with id 106 1697 // removed field with id 107 1698 // removed field with id 108 1699 // removed field with id 109 1700 // removed field with id 110 1701 // removed field with id 111 1702 // removed field with id 112 1703 SuspendResumeFtraceEvent suspend_resume = 113; 1704 SchedWakeupNewFtraceEvent sched_wakeup_new = 114; 1705 BlockBioBackmergeFtraceEvent block_bio_backmerge = 115; 1706 BlockBioBounceFtraceEvent block_bio_bounce = 116; 1707 BlockBioCompleteFtraceEvent block_bio_complete = 117; 1708 BlockBioFrontmergeFtraceEvent block_bio_frontmerge = 118; 1709 BlockBioQueueFtraceEvent block_bio_queue = 119; 1710 BlockBioRemapFtraceEvent block_bio_remap = 120; 1711 BlockDirtyBufferFtraceEvent block_dirty_buffer = 121; 1712 BlockGetrqFtraceEvent block_getrq = 122; 1713 BlockPlugFtraceEvent block_plug = 123; 1714 BlockRqAbortFtraceEvent block_rq_abort = 124; 1715 BlockRqCompleteFtraceEvent block_rq_complete = 125; 1716 BlockRqInsertFtraceEvent block_rq_insert = 126; 1717 // removed field with id 127; 1718 BlockRqRemapFtraceEvent block_rq_remap = 128; 1719 BlockRqRequeueFtraceEvent block_rq_requeue = 129; 1720 BlockSleeprqFtraceEvent block_sleeprq = 130; 1721 BlockSplitFtraceEvent block_split = 131; 1722 BlockTouchBufferFtraceEvent block_touch_buffer = 132; 1723 BlockUnplugFtraceEvent block_unplug = 133; 1724 Ext4AllocDaBlocksFtraceEvent ext4_alloc_da_blocks = 134; 1725 Ext4AllocateBlocksFtraceEvent ext4_allocate_blocks = 135; 1726 Ext4AllocateInodeFtraceEvent ext4_allocate_inode = 136; 1727 Ext4BeginOrderedTruncateFtraceEvent ext4_begin_ordered_truncate = 137; 1728 Ext4CollapseRangeFtraceEvent ext4_collapse_range = 138; 1729 Ext4DaReleaseSpaceFtraceEvent ext4_da_release_space = 139; 1730 Ext4DaReserveSpaceFtraceEvent ext4_da_reserve_space = 140; 1731 Ext4DaUpdateReserveSpaceFtraceEvent ext4_da_update_reserve_space = 141; 1732 Ext4DaWritePagesFtraceEvent ext4_da_write_pages = 142; 1733 Ext4DaWritePagesExtentFtraceEvent ext4_da_write_pages_extent = 143; 1734 Ext4DirectIOEnterFtraceEvent ext4_direct_IO_enter = 144; 1735 Ext4DirectIOExitFtraceEvent ext4_direct_IO_exit = 145; 1736 Ext4DiscardBlocksFtraceEvent ext4_discard_blocks = 146; 1737 Ext4DiscardPreallocationsFtraceEvent ext4_discard_preallocations = 147; 1738 Ext4DropInodeFtraceEvent ext4_drop_inode = 148; 1739 Ext4EsCacheExtentFtraceEvent ext4_es_cache_extent = 149; 1740 Ext4EsFindDelayedExtentRangeEnterFtraceEvent 1741 ext4_es_find_delayed_extent_range_enter = 150; 1742 Ext4EsFindDelayedExtentRangeExitFtraceEvent 1743 ext4_es_find_delayed_extent_range_exit = 151; 1744 Ext4EsInsertExtentFtraceEvent ext4_es_insert_extent = 152; 1745 Ext4EsLookupExtentEnterFtraceEvent ext4_es_lookup_extent_enter = 153; 1746 Ext4EsLookupExtentExitFtraceEvent ext4_es_lookup_extent_exit = 154; 1747 Ext4EsRemoveExtentFtraceEvent ext4_es_remove_extent = 155; 1748 Ext4EsShrinkFtraceEvent ext4_es_shrink = 156; 1749 Ext4EsShrinkCountFtraceEvent ext4_es_shrink_count = 157; 1750 Ext4EsShrinkScanEnterFtraceEvent ext4_es_shrink_scan_enter = 158; 1751 Ext4EsShrinkScanExitFtraceEvent ext4_es_shrink_scan_exit = 159; 1752 Ext4EvictInodeFtraceEvent ext4_evict_inode = 160; 1753 Ext4ExtConvertToInitializedEnterFtraceEvent 1754 ext4_ext_convert_to_initialized_enter = 161; 1755 Ext4ExtConvertToInitializedFastpathFtraceEvent 1756 ext4_ext_convert_to_initialized_fastpath = 162; 1757 Ext4ExtHandleUnwrittenExtentsFtraceEvent ext4_ext_handle_unwritten_extents = 1758 163; 1759 Ext4ExtInCacheFtraceEvent ext4_ext_in_cache = 164; 1760 Ext4ExtLoadExtentFtraceEvent ext4_ext_load_extent = 165; 1761 Ext4ExtMapBlocksEnterFtraceEvent ext4_ext_map_blocks_enter = 166; 1762 Ext4ExtMapBlocksExitFtraceEvent ext4_ext_map_blocks_exit = 167; 1763 Ext4ExtPutInCacheFtraceEvent ext4_ext_put_in_cache = 168; 1764 Ext4ExtRemoveSpaceFtraceEvent ext4_ext_remove_space = 169; 1765 Ext4ExtRemoveSpaceDoneFtraceEvent ext4_ext_remove_space_done = 170; 1766 Ext4ExtRmIdxFtraceEvent ext4_ext_rm_idx = 171; 1767 Ext4ExtRmLeafFtraceEvent ext4_ext_rm_leaf = 172; 1768 Ext4ExtShowExtentFtraceEvent ext4_ext_show_extent = 173; 1769 Ext4FallocateEnterFtraceEvent ext4_fallocate_enter = 174; 1770 Ext4FallocateExitFtraceEvent ext4_fallocate_exit = 175; 1771 Ext4FindDelallocRangeFtraceEvent ext4_find_delalloc_range = 176; 1772 Ext4ForgetFtraceEvent ext4_forget = 177; 1773 Ext4FreeBlocksFtraceEvent ext4_free_blocks = 178; 1774 Ext4FreeInodeFtraceEvent ext4_free_inode = 179; 1775 Ext4GetImpliedClusterAllocExitFtraceEvent 1776 ext4_get_implied_cluster_alloc_exit = 180; 1777 Ext4GetReservedClusterAllocFtraceEvent ext4_get_reserved_cluster_alloc = 1778 181; 1779 Ext4IndMapBlocksEnterFtraceEvent ext4_ind_map_blocks_enter = 182; 1780 Ext4IndMapBlocksExitFtraceEvent ext4_ind_map_blocks_exit = 183; 1781 Ext4InsertRangeFtraceEvent ext4_insert_range = 184; 1782 Ext4InvalidatepageFtraceEvent ext4_invalidatepage = 185; 1783 Ext4JournalStartFtraceEvent ext4_journal_start = 186; 1784 Ext4JournalStartReservedFtraceEvent ext4_journal_start_reserved = 187; 1785 Ext4JournalledInvalidatepageFtraceEvent ext4_journalled_invalidatepage = 1786 188; 1787 Ext4JournalledWriteEndFtraceEvent ext4_journalled_write_end = 189; 1788 Ext4LoadInodeFtraceEvent ext4_load_inode = 190; 1789 Ext4LoadInodeBitmapFtraceEvent ext4_load_inode_bitmap = 191; 1790 Ext4MarkInodeDirtyFtraceEvent ext4_mark_inode_dirty = 192; 1791 Ext4MbBitmapLoadFtraceEvent ext4_mb_bitmap_load = 193; 1792 Ext4MbBuddyBitmapLoadFtraceEvent ext4_mb_buddy_bitmap_load = 194; 1793 Ext4MbDiscardPreallocationsFtraceEvent ext4_mb_discard_preallocations = 195; 1794 Ext4MbNewGroupPaFtraceEvent ext4_mb_new_group_pa = 196; 1795 Ext4MbNewInodePaFtraceEvent ext4_mb_new_inode_pa = 197; 1796 Ext4MbReleaseGroupPaFtraceEvent ext4_mb_release_group_pa = 198; 1797 Ext4MbReleaseInodePaFtraceEvent ext4_mb_release_inode_pa = 199; 1798 Ext4MballocAllocFtraceEvent ext4_mballoc_alloc = 200; 1799 Ext4MballocDiscardFtraceEvent ext4_mballoc_discard = 201; 1800 Ext4MballocFreeFtraceEvent ext4_mballoc_free = 202; 1801 Ext4MballocPreallocFtraceEvent ext4_mballoc_prealloc = 203; 1802 Ext4OtherInodeUpdateTimeFtraceEvent ext4_other_inode_update_time = 204; 1803 Ext4PunchHoleFtraceEvent ext4_punch_hole = 205; 1804 Ext4ReadBlockBitmapLoadFtraceEvent ext4_read_block_bitmap_load = 206; 1805 Ext4ReadpageFtraceEvent ext4_readpage = 207; 1806 Ext4ReleasepageFtraceEvent ext4_releasepage = 208; 1807 Ext4RemoveBlocksFtraceEvent ext4_remove_blocks = 209; 1808 Ext4RequestBlocksFtraceEvent ext4_request_blocks = 210; 1809 Ext4RequestInodeFtraceEvent ext4_request_inode = 211; 1810 Ext4SyncFsFtraceEvent ext4_sync_fs = 212; 1811 Ext4TrimAllFreeFtraceEvent ext4_trim_all_free = 213; 1812 Ext4TrimExtentFtraceEvent ext4_trim_extent = 214; 1813 Ext4TruncateEnterFtraceEvent ext4_truncate_enter = 215; 1814 Ext4TruncateExitFtraceEvent ext4_truncate_exit = 216; 1815 Ext4UnlinkEnterFtraceEvent ext4_unlink_enter = 217; 1816 Ext4UnlinkExitFtraceEvent ext4_unlink_exit = 218; 1817 Ext4WriteBeginFtraceEvent ext4_write_begin = 219; 1818 // removed field with id 220; 1819 // removed field with id 221; 1820 // removed field with id 222; 1821 // removed field with id 223; 1822 // removed field with id 224; 1823 // removed field with id 225; 1824 // removed field with id 226; 1825 // removed field with id 227; 1826 // removed field with id 228; 1827 // removed field with id 229; 1828 Ext4WriteEndFtraceEvent ext4_write_end = 230; 1829 Ext4WritepageFtraceEvent ext4_writepage = 231; 1830 Ext4WritepagesFtraceEvent ext4_writepages = 232; 1831 Ext4WritepagesResultFtraceEvent ext4_writepages_result = 233; 1832 Ext4ZeroRangeFtraceEvent ext4_zero_range = 234; 1833 TaskNewtaskFtraceEvent task_newtask = 235; 1834 TaskRenameFtraceEvent task_rename = 236; 1835 SchedProcessExecFtraceEvent sched_process_exec = 237; 1836 SchedProcessExitFtraceEvent sched_process_exit = 238; 1837 SchedProcessForkFtraceEvent sched_process_fork = 239; 1838 SchedProcessFreeFtraceEvent sched_process_free = 240; 1839 SchedProcessHangFtraceEvent sched_process_hang = 241; 1840 SchedProcessWaitFtraceEvent sched_process_wait = 242; 1841 F2fsDoSubmitBioFtraceEvent f2fs_do_submit_bio = 243; 1842 F2fsEvictInodeFtraceEvent f2fs_evict_inode = 244; 1843 F2fsFallocateFtraceEvent f2fs_fallocate = 245; 1844 F2fsGetDataBlockFtraceEvent f2fs_get_data_block = 246; 1845 F2fsGetVictimFtraceEvent f2fs_get_victim = 247; 1846 F2fsIgetFtraceEvent f2fs_iget = 248; 1847 F2fsIgetExitFtraceEvent f2fs_iget_exit = 249; 1848 F2fsNewInodeFtraceEvent f2fs_new_inode = 250; 1849 F2fsReadpageFtraceEvent f2fs_readpage = 251; 1850 F2fsReserveNewBlockFtraceEvent f2fs_reserve_new_block = 252; 1851 F2fsSetPageDirtyFtraceEvent f2fs_set_page_dirty = 253; 1852 F2fsSubmitWritePageFtraceEvent f2fs_submit_write_page = 254; 1853 F2fsSyncFileEnterFtraceEvent f2fs_sync_file_enter = 255; 1854 F2fsSyncFileExitFtraceEvent f2fs_sync_file_exit = 256; 1855 F2fsSyncFsFtraceEvent f2fs_sync_fs = 257; 1856 F2fsTruncateFtraceEvent f2fs_truncate = 258; 1857 F2fsTruncateBlocksEnterFtraceEvent f2fs_truncate_blocks_enter = 259; 1858 F2fsTruncateBlocksExitFtraceEvent f2fs_truncate_blocks_exit = 260; 1859 F2fsTruncateDataBlocksRangeFtraceEvent f2fs_truncate_data_blocks_range = 1860 261; 1861 F2fsTruncateInodeBlocksEnterFtraceEvent f2fs_truncate_inode_blocks_enter = 1862 262; 1863 F2fsTruncateInodeBlocksExitFtraceEvent f2fs_truncate_inode_blocks_exit = 1864 263; 1865 F2fsTruncateNodeFtraceEvent f2fs_truncate_node = 264; 1866 F2fsTruncateNodesEnterFtraceEvent f2fs_truncate_nodes_enter = 265; 1867 F2fsTruncateNodesExitFtraceEvent f2fs_truncate_nodes_exit = 266; 1868 F2fsTruncatePartialNodesFtraceEvent f2fs_truncate_partial_nodes = 267; 1869 F2fsUnlinkEnterFtraceEvent f2fs_unlink_enter = 268; 1870 F2fsUnlinkExitFtraceEvent f2fs_unlink_exit = 269; 1871 F2fsVmPageMkwriteFtraceEvent f2fs_vm_page_mkwrite = 270; 1872 F2fsWriteBeginFtraceEvent f2fs_write_begin = 271; 1873 F2fsWriteCheckpointFtraceEvent f2fs_write_checkpoint = 272; 1874 F2fsWriteEndFtraceEvent f2fs_write_end = 273; 1875 AllocPagesIommuEndFtraceEvent alloc_pages_iommu_end = 274; 1876 AllocPagesIommuFailFtraceEvent alloc_pages_iommu_fail = 275; 1877 AllocPagesIommuStartFtraceEvent alloc_pages_iommu_start = 276; 1878 AllocPagesSysEndFtraceEvent alloc_pages_sys_end = 277; 1879 AllocPagesSysFailFtraceEvent alloc_pages_sys_fail = 278; 1880 AllocPagesSysStartFtraceEvent alloc_pages_sys_start = 279; 1881 DmaAllocContiguousRetryFtraceEvent dma_alloc_contiguous_retry = 280; 1882 IommuMapRangeFtraceEvent iommu_map_range = 281; 1883 IommuSecPtblMapRangeEndFtraceEvent iommu_sec_ptbl_map_range_end = 282; 1884 IommuSecPtblMapRangeStartFtraceEvent iommu_sec_ptbl_map_range_start = 283; 1885 IonAllocBufferEndFtraceEvent ion_alloc_buffer_end = 284; 1886 IonAllocBufferFailFtraceEvent ion_alloc_buffer_fail = 285; 1887 IonAllocBufferFallbackFtraceEvent ion_alloc_buffer_fallback = 286; 1888 IonAllocBufferStartFtraceEvent ion_alloc_buffer_start = 287; 1889 IonCpAllocRetryFtraceEvent ion_cp_alloc_retry = 288; 1890 IonCpSecureBufferEndFtraceEvent ion_cp_secure_buffer_end = 289; 1891 IonCpSecureBufferStartFtraceEvent ion_cp_secure_buffer_start = 290; 1892 IonPrefetchingFtraceEvent ion_prefetching = 291; 1893 IonSecureCmaAddToPoolEndFtraceEvent ion_secure_cma_add_to_pool_end = 292; 1894 IonSecureCmaAddToPoolStartFtraceEvent ion_secure_cma_add_to_pool_start = 1895 293; 1896 IonSecureCmaAllocateEndFtraceEvent ion_secure_cma_allocate_end = 294; 1897 IonSecureCmaAllocateStartFtraceEvent ion_secure_cma_allocate_start = 295; 1898 IonSecureCmaShrinkPoolEndFtraceEvent ion_secure_cma_shrink_pool_end = 296; 1899 IonSecureCmaShrinkPoolStartFtraceEvent ion_secure_cma_shrink_pool_start = 1900 297; 1901 KfreeFtraceEvent kfree = 298; 1902 KmallocFtraceEvent kmalloc = 299; 1903 KmallocNodeFtraceEvent kmalloc_node = 300; 1904 KmemCacheAllocFtraceEvent kmem_cache_alloc = 301; 1905 KmemCacheAllocNodeFtraceEvent kmem_cache_alloc_node = 302; 1906 KmemCacheFreeFtraceEvent kmem_cache_free = 303; 1907 MigratePagesEndFtraceEvent migrate_pages_end = 304; 1908 MigratePagesStartFtraceEvent migrate_pages_start = 305; 1909 MigrateRetryFtraceEvent migrate_retry = 306; 1910 MmPageAllocFtraceEvent mm_page_alloc = 307; 1911 MmPageAllocExtfragFtraceEvent mm_page_alloc_extfrag = 308; 1912 MmPageAllocZoneLockedFtraceEvent mm_page_alloc_zone_locked = 309; 1913 MmPageFreeFtraceEvent mm_page_free = 310; 1914 MmPageFreeBatchedFtraceEvent mm_page_free_batched = 311; 1915 MmPagePcpuDrainFtraceEvent mm_page_pcpu_drain = 312; 1916 RssStatFtraceEvent rss_stat = 313; 1917 IonHeapShrinkFtraceEvent ion_heap_shrink = 314; 1918 IonHeapGrowFtraceEvent ion_heap_grow = 315; 1919 // removed field with id 316 1920 // removed field with id 317 1921 // removed field with id 318 1922 // removed field with id 319 1923 ClkEnableFtraceEvent clk_enable = 320; 1924 ClkDisableFtraceEvent clk_disable = 321; 1925 ClkSetRateFtraceEvent clk_set_rate = 322; 1926 BinderTransactionAllocBufFtraceEvent binder_transaction_alloc_buf = 323; 1927 SignalDeliverFtraceEvent signal_deliver = 324; 1928 SignalGenerateFtraceEvent signal_generate = 325; 1929 // removed field with id 326 1930 GenericFtraceEvent generic = 327; 1931 MmEventRecordFtraceEvent mm_event_record = 328; 1932 SysEnterFtraceEvent sys_enter = 329; 1933 SysExitFtraceEvent sys_exit = 330; 1934 ZeroFtraceEvent zero = 331; 1935 GpuFrequencyFtraceEvent gpu_frequency = 332; 1936 } 1937} 1938 1939// End of protos/perfetto/trace/ftrace/ftrace_event.proto 1940 1941// Begin of protos/perfetto/trace/ftrace/ftrace_event_bundle.proto 1942 1943message FtraceEventBundle { 1944 optional uint32 cpu = 1; 1945 repeated FtraceEvent event = 2; 1946 // Total of all overwrite fields from the headers of all kernel 1947 // ftrace pages we parsed into this FtraceEventBundle. Zero if 1948 // no overwriting occurred, a number larger than zero if some overwriting 1949 // occurred. 1950 optional uint32 overwrite_count = 3; 1951} 1952 1953// End of protos/perfetto/trace/ftrace/ftrace_event_bundle.proto 1954 1955// Begin of protos/perfetto/trace/ftrace/ftrace_stats.proto 1956 1957// Per-CPU stats for the ftrace data source gathered from the kernel from 1958// /sys/kernel/debug/tracing/per_cpu/cpuX/stats. 1959message FtraceCpuStats { 1960 // CPU index. 1961 optional uint64 cpu = 1; 1962 1963 // Number of entries still in the kernel buffer. Ideally this should be close 1964 // to zero, as events are consumed regularly and moved into the userspace 1965 // buffers (or file). 1966 optional uint64 entries = 2; 1967 1968 // Number of events lost in kernel buffers due to overwriting of old events 1969 // before userspace had a chance to drain them. 1970 optional uint64 overrun = 3; 1971 1972 // This should always be zero. If not the buffer size is way too small or 1973 // something went wrong with the tracer. 1974 optional uint64 commit_overrun = 4; 1975 1976 // Bytes actually read (not overwritten). 1977 optional uint64 bytes_read = 5; 1978 1979 // The timestamp for the oldest event still in the ring buffer. 1980 optional double oldest_event_ts = 6; 1981 1982 // The current timestamp. 1983 optional double now_ts = 7; 1984 1985 // If the kernel buffer has overwrite mode disabled, this will show the number 1986 // of new events that were lost because the buffer was full. This is similar 1987 // to |overrun| but only for the overwrite=false case. 1988 optional uint64 dropped_events = 8; 1989 1990 // The number of events read. 1991 optional uint64 read_events = 9; 1992} 1993 1994// Ftrace stats for all CPUs. 1995message FtraceStats { 1996 enum Phase { 1997 UNSPECIFIED = 0; 1998 START_OF_TRACE = 1; 1999 END_OF_TRACE = 2; 2000 } 2001 2002 // Tells when stats were sampled. There should be one sample at the beginning 2003 // of the trace and one sample at the end. 2004 optional Phase phase = 1; 2005 2006 // Per-CPU stats (one entry for each CPU). 2007 repeated FtraceCpuStats cpu_stats = 2; 2008} 2009 2010// End of protos/perfetto/trace/ftrace/ftrace_stats.proto 2011 2012// Begin of protos/perfetto/trace/ftrace/generic.proto 2013 2014// This generic proto is used to output events in the trace 2015// when a specific proto for that event does not exist. 2016message GenericFtraceEvent { 2017 message Field { 2018 optional string name = 1; 2019 oneof value { 2020 string str_value = 3; 2021 int64 int_value = 4; 2022 uint64 uint_value = 5; 2023 } 2024 } 2025 2026 optional string event_name = 1; 2027 repeated Field field = 2; 2028} 2029 2030// End of protos/perfetto/trace/ftrace/generic.proto 2031 2032// Begin of protos/perfetto/trace/ftrace/kmem.proto 2033 2034message AllocPagesIommuEndFtraceEvent { 2035 optional uint32 gfp_flags = 1; 2036 optional uint32 order = 2; 2037} 2038message AllocPagesIommuFailFtraceEvent { 2039 optional uint32 gfp_flags = 1; 2040 optional uint32 order = 2; 2041} 2042message AllocPagesIommuStartFtraceEvent { 2043 optional uint32 gfp_flags = 1; 2044 optional uint32 order = 2; 2045} 2046message AllocPagesSysEndFtraceEvent { 2047 optional uint32 gfp_flags = 1; 2048 optional uint32 order = 2; 2049} 2050message AllocPagesSysFailFtraceEvent { 2051 optional uint32 gfp_flags = 1; 2052 optional uint32 order = 2; 2053} 2054message AllocPagesSysStartFtraceEvent { 2055 optional uint32 gfp_flags = 1; 2056 optional uint32 order = 2; 2057} 2058message DmaAllocContiguousRetryFtraceEvent { 2059 optional int32 tries = 1; 2060} 2061message IommuMapRangeFtraceEvent { 2062 optional uint64 chunk_size = 1; 2063 optional uint64 len = 2; 2064 optional uint64 pa = 3; 2065 optional uint64 va = 4; 2066} 2067message IommuSecPtblMapRangeEndFtraceEvent { 2068 optional uint64 len = 1; 2069 optional int32 num = 2; 2070 optional uint32 pa = 3; 2071 optional int32 sec_id = 4; 2072 optional uint64 va = 5; 2073} 2074message IommuSecPtblMapRangeStartFtraceEvent { 2075 optional uint64 len = 1; 2076 optional int32 num = 2; 2077 optional uint32 pa = 3; 2078 optional int32 sec_id = 4; 2079 optional uint64 va = 5; 2080} 2081message IonAllocBufferEndFtraceEvent { 2082 optional string client_name = 1; 2083 optional uint32 flags = 2; 2084 optional string heap_name = 3; 2085 optional uint64 len = 4; 2086 optional uint32 mask = 5; 2087} 2088message IonAllocBufferFailFtraceEvent { 2089 optional string client_name = 1; 2090 optional int64 error = 2; 2091 optional uint32 flags = 3; 2092 optional string heap_name = 4; 2093 optional uint64 len = 5; 2094 optional uint32 mask = 6; 2095} 2096message IonAllocBufferFallbackFtraceEvent { 2097 optional string client_name = 1; 2098 optional int64 error = 2; 2099 optional uint32 flags = 3; 2100 optional string heap_name = 4; 2101 optional uint64 len = 5; 2102 optional uint32 mask = 6; 2103} 2104message IonAllocBufferStartFtraceEvent { 2105 optional string client_name = 1; 2106 optional uint32 flags = 2; 2107 optional string heap_name = 3; 2108 optional uint64 len = 4; 2109 optional uint32 mask = 5; 2110} 2111message IonCpAllocRetryFtraceEvent { 2112 optional int32 tries = 1; 2113} 2114message IonCpSecureBufferEndFtraceEvent { 2115 optional uint64 align = 1; 2116 optional uint64 flags = 2; 2117 optional string heap_name = 3; 2118 optional uint64 len = 4; 2119} 2120message IonCpSecureBufferStartFtraceEvent { 2121 optional uint64 align = 1; 2122 optional uint64 flags = 2; 2123 optional string heap_name = 3; 2124 optional uint64 len = 4; 2125} 2126message IonPrefetchingFtraceEvent { 2127 optional uint64 len = 1; 2128} 2129message IonSecureCmaAddToPoolEndFtraceEvent { 2130 optional uint32 is_prefetch = 1; 2131 optional uint64 len = 2; 2132 optional int32 pool_total = 3; 2133} 2134message IonSecureCmaAddToPoolStartFtraceEvent { 2135 optional uint32 is_prefetch = 1; 2136 optional uint64 len = 2; 2137 optional int32 pool_total = 3; 2138} 2139message IonSecureCmaAllocateEndFtraceEvent { 2140 optional uint64 align = 1; 2141 optional uint64 flags = 2; 2142 optional string heap_name = 3; 2143 optional uint64 len = 4; 2144} 2145message IonSecureCmaAllocateStartFtraceEvent { 2146 optional uint64 align = 1; 2147 optional uint64 flags = 2; 2148 optional string heap_name = 3; 2149 optional uint64 len = 4; 2150} 2151message IonSecureCmaShrinkPoolEndFtraceEvent { 2152 optional uint64 drained_size = 1; 2153 optional uint64 skipped_size = 2; 2154} 2155message IonSecureCmaShrinkPoolStartFtraceEvent { 2156 optional uint64 drained_size = 1; 2157 optional uint64 skipped_size = 2; 2158} 2159message KfreeFtraceEvent { 2160 optional uint64 call_site = 1; 2161 optional uint64 ptr = 2; 2162} 2163message KmallocFtraceEvent { 2164 optional uint64 bytes_alloc = 1; 2165 optional uint64 bytes_req = 2; 2166 optional uint64 call_site = 3; 2167 optional uint32 gfp_flags = 4; 2168 optional uint64 ptr = 5; 2169} 2170message KmallocNodeFtraceEvent { 2171 optional uint64 bytes_alloc = 1; 2172 optional uint64 bytes_req = 2; 2173 optional uint64 call_site = 3; 2174 optional uint32 gfp_flags = 4; 2175 optional int32 node = 5; 2176 optional uint64 ptr = 6; 2177} 2178message KmemCacheAllocFtraceEvent { 2179 optional uint64 bytes_alloc = 1; 2180 optional uint64 bytes_req = 2; 2181 optional uint64 call_site = 3; 2182 optional uint32 gfp_flags = 4; 2183 optional uint64 ptr = 5; 2184} 2185message KmemCacheAllocNodeFtraceEvent { 2186 optional uint64 bytes_alloc = 1; 2187 optional uint64 bytes_req = 2; 2188 optional uint64 call_site = 3; 2189 optional uint32 gfp_flags = 4; 2190 optional int32 node = 5; 2191 optional uint64 ptr = 6; 2192} 2193message KmemCacheFreeFtraceEvent { 2194 optional uint64 call_site = 1; 2195 optional uint64 ptr = 2; 2196} 2197message MigratePagesEndFtraceEvent { 2198 optional int32 mode = 1; 2199} 2200message MigratePagesStartFtraceEvent { 2201 optional int32 mode = 1; 2202} 2203message MigrateRetryFtraceEvent { 2204 optional int32 tries = 1; 2205} 2206message MmPageAllocFtraceEvent { 2207 optional uint32 gfp_flags = 1; 2208 optional int32 migratetype = 2; 2209 optional uint32 order = 3; 2210 optional uint64 page = 4; 2211 optional uint64 pfn = 5; 2212} 2213message MmPageAllocExtfragFtraceEvent { 2214 optional int32 alloc_migratetype = 1; 2215 optional int32 alloc_order = 2; 2216 optional int32 fallback_migratetype = 3; 2217 optional int32 fallback_order = 4; 2218 optional uint64 page = 5; 2219 optional int32 change_ownership = 6; 2220 optional uint64 pfn = 7; 2221} 2222message MmPageAllocZoneLockedFtraceEvent { 2223 optional int32 migratetype = 1; 2224 optional uint32 order = 2; 2225 optional uint64 page = 3; 2226 optional uint64 pfn = 4; 2227} 2228message MmPageFreeFtraceEvent { 2229 optional uint32 order = 1; 2230 optional uint64 page = 2; 2231 optional uint64 pfn = 3; 2232} 2233message MmPageFreeBatchedFtraceEvent { 2234 optional int32 cold = 1; 2235 optional uint64 page = 2; 2236 optional uint64 pfn = 3; 2237} 2238message MmPagePcpuDrainFtraceEvent { 2239 optional int32 migratetype = 1; 2240 optional uint32 order = 2; 2241 optional uint64 page = 3; 2242 optional uint64 pfn = 4; 2243} 2244message RssStatFtraceEvent { 2245 optional int32 member = 1; 2246 optional int64 size = 2; 2247} 2248message IonHeapShrinkFtraceEvent { 2249 optional string heap_name = 1; 2250 optional uint64 len = 2; 2251 optional int64 total_allocated = 3; 2252} 2253message IonHeapGrowFtraceEvent { 2254 optional string heap_name = 1; 2255 optional uint64 len = 2; 2256 optional int64 total_allocated = 3; 2257} 2258 2259// End of protos/perfetto/trace/ftrace/kmem.proto 2260 2261// Begin of protos/perfetto/trace/ftrace/lowmemorykiller.proto 2262 2263message LowmemoryKillFtraceEvent { 2264 optional string comm = 1; 2265 optional int32 pid = 2; 2266 optional int64 pagecache_size = 3; 2267 optional int64 pagecache_limit = 4; 2268 optional int64 free = 5; 2269} 2270 2271// End of protos/perfetto/trace/ftrace/lowmemorykiller.proto 2272 2273// Begin of protos/perfetto/trace/ftrace/mm_event.proto 2274 2275message MmEventRecordFtraceEvent { 2276 optional uint32 avg_lat = 1; 2277 optional uint32 count = 2; 2278 optional uint32 max_lat = 3; 2279 optional uint32 type = 4; 2280} 2281 2282// End of protos/perfetto/trace/ftrace/mm_event.proto 2283 2284// Begin of protos/perfetto/trace/ftrace/power.proto 2285 2286message CpuFrequencyFtraceEvent { 2287 optional uint32 state = 1; 2288 optional uint32 cpu_id = 2; 2289} 2290message CpuFrequencyLimitsFtraceEvent { 2291 optional uint32 min_freq = 1; 2292 optional uint32 max_freq = 2; 2293 optional uint32 cpu_id = 3; 2294} 2295message CpuIdleFtraceEvent { 2296 optional uint32 state = 1; 2297 optional uint32 cpu_id = 2; 2298} 2299message ClockEnableFtraceEvent { 2300 optional string name = 1; 2301 optional uint64 state = 2; 2302 optional uint64 cpu_id = 3; 2303} 2304message ClockDisableFtraceEvent { 2305 optional string name = 1; 2306 optional uint64 state = 2; 2307 optional uint64 cpu_id = 3; 2308} 2309message ClockSetRateFtraceEvent { 2310 optional string name = 1; 2311 optional uint64 state = 2; 2312 optional uint64 cpu_id = 3; 2313} 2314message SuspendResumeFtraceEvent { 2315 optional string action = 1; 2316 optional int32 val = 2; 2317 optional uint32 start = 3; 2318} 2319message GpuFrequencyFtraceEvent { 2320 optional uint32 gpu_id = 1; 2321 optional uint32 state = 2; 2322} 2323 2324// End of protos/perfetto/trace/ftrace/power.proto 2325 2326// Begin of protos/perfetto/trace/ftrace/raw_syscalls.proto 2327 2328message SysEnterFtraceEvent { 2329 optional int64 id = 1; 2330} 2331message SysExitFtraceEvent { 2332 optional int64 id = 1; 2333 optional int64 ret = 2; 2334} 2335 2336// End of protos/perfetto/trace/ftrace/raw_syscalls.proto 2337 2338// Begin of protos/perfetto/trace/ftrace/sched.proto 2339 2340message SchedSwitchFtraceEvent { 2341 optional string prev_comm = 1; 2342 optional int32 prev_pid = 2; 2343 optional int32 prev_prio = 3; 2344 optional int64 prev_state = 4; 2345 optional string next_comm = 5; 2346 optional int32 next_pid = 6; 2347 optional int32 next_prio = 7; 2348} 2349message SchedWakeupFtraceEvent { 2350 optional string comm = 1; 2351 optional int32 pid = 2; 2352 optional int32 prio = 3; 2353 optional int32 success = 4; 2354 optional int32 target_cpu = 5; 2355} 2356message SchedBlockedReasonFtraceEvent { 2357 optional int32 pid = 1; 2358 optional uint64 caller = 2; 2359 optional uint32 io_wait = 3; 2360} 2361message SchedCpuHotplugFtraceEvent { 2362 optional int32 affected_cpu = 1; 2363 optional int32 error = 2; 2364 optional int32 status = 3; 2365} 2366message SchedWakingFtraceEvent { 2367 optional string comm = 1; 2368 optional int32 pid = 2; 2369 optional int32 prio = 3; 2370 optional int32 success = 4; 2371 optional int32 target_cpu = 5; 2372} 2373message SchedWakeupNewFtraceEvent { 2374 optional string comm = 1; 2375 optional int32 pid = 2; 2376 optional int32 prio = 3; 2377 optional int32 success = 4; 2378 optional int32 target_cpu = 5; 2379} 2380message SchedProcessExecFtraceEvent { 2381 optional string filename = 1; 2382 optional int32 pid = 2; 2383 optional int32 old_pid = 3; 2384} 2385message SchedProcessExitFtraceEvent { 2386 optional string comm = 1; 2387 optional int32 pid = 2; 2388 optional int32 tgid = 3; 2389 optional int32 prio = 4; 2390} 2391message SchedProcessForkFtraceEvent { 2392 optional string parent_comm = 1; 2393 optional int32 parent_pid = 2; 2394 optional string child_comm = 3; 2395 optional int32 child_pid = 4; 2396} 2397message SchedProcessFreeFtraceEvent { 2398 optional string comm = 1; 2399 optional int32 pid = 2; 2400 optional int32 prio = 3; 2401} 2402message SchedProcessHangFtraceEvent { 2403 optional string comm = 1; 2404 optional int32 pid = 2; 2405} 2406message SchedProcessWaitFtraceEvent { 2407 optional string comm = 1; 2408 optional int32 pid = 2; 2409 optional int32 prio = 3; 2410} 2411 2412// End of protos/perfetto/trace/ftrace/sched.proto 2413 2414// Begin of protos/perfetto/trace/ftrace/signal.proto 2415 2416message SignalDeliverFtraceEvent { 2417 optional int32 code = 1; 2418 optional uint64 sa_flags = 2; 2419 optional int32 sig = 3; 2420} 2421message SignalGenerateFtraceEvent { 2422 optional int32 code = 1; 2423 optional string comm = 2; 2424 optional int32 group = 3; 2425 optional int32 pid = 4; 2426 optional int32 result = 5; 2427 optional int32 sig = 6; 2428} 2429 2430// End of protos/perfetto/trace/ftrace/signal.proto 2431 2432// Begin of protos/perfetto/trace/ftrace/systrace.proto 2433 2434message ZeroFtraceEvent { 2435 optional int32 flag = 1; 2436 optional string name = 2; 2437 optional int32 pid = 3; 2438 optional int64 value = 4; 2439} 2440 2441// End of protos/perfetto/trace/ftrace/systrace.proto 2442 2443// Begin of protos/perfetto/trace/ftrace/task.proto 2444 2445message TaskNewtaskFtraceEvent { 2446 optional int32 pid = 1; 2447 optional string comm = 2; 2448 optional uint64 clone_flags = 3; 2449 optional int32 oom_score_adj = 4; 2450} 2451message TaskRenameFtraceEvent { 2452 optional int32 pid = 1; 2453 optional string oldcomm = 2; 2454 optional string newcomm = 3; 2455 optional int32 oom_score_adj = 4; 2456} 2457 2458// End of protos/perfetto/trace/ftrace/task.proto 2459 2460// Begin of protos/perfetto/trace/ftrace/vmscan.proto 2461 2462message MmVmscanDirectReclaimBeginFtraceEvent { 2463 optional int32 order = 1; 2464 optional int32 may_writepage = 2; 2465 optional uint32 gfp_flags = 3; 2466} 2467message MmVmscanDirectReclaimEndFtraceEvent { 2468 optional uint64 nr_reclaimed = 1; 2469} 2470message MmVmscanKswapdWakeFtraceEvent { 2471 optional int32 nid = 1; 2472 optional int32 order = 2; 2473} 2474message MmVmscanKswapdSleepFtraceEvent { 2475 optional int32 nid = 1; 2476} 2477 2478// End of protos/perfetto/trace/ftrace/vmscan.proto 2479 2480// Begin of protos/perfetto/trace/interned_data/interned_data.proto 2481 2482// ------------------------------ DATA INTERNING: ------------------------------ 2483// Interning indexes are built up gradually by adding the entries contained in 2484// each TracePacket of the same packet sequence (packets emitted by the same 2485// producer and TraceWriter, see |trusted_packet_sequence_id|). Thus, packets 2486// can only refer to interned data from other packets in the same sequence. 2487// 2488// The writer will emit new entries when it encounters new internable values 2489// that aren't yet in the index. Data in current and subsequent TracePackets can 2490// then refer to the entry by its position (interning ID, abbreviated "iid") in 2491// its index. An interning ID with value 0 is considered invalid (not set). 2492// 2493// Because of the incremental build-up, the interning index will miss data when 2494// TracePackets are lost, e.g. because a chunk was overridden in the central 2495// ring buffer. To avoid invalidation of the whole trace in such a case, the 2496// index is periodically reset (see |incremental_state_cleared| in TracePacket). 2497// When packet loss occurs, the reader will only lose interning data up to the 2498// next reset. 2499// ----------------------------------------------------------------------------- 2500 2501// Message that contains new entries for the interning indices of a packet 2502// sequence. 2503// 2504// The writer will usually emit new entries in the same TracePacket that first 2505// refers to them (since the last reset of interning state). They may also be 2506// emitted proactively in advance of referring to them in later packets. 2507// 2508// Next id: 5. 2509message InternedData { 2510 // Each field's message type needs to specify an |iid| field, which is the ID 2511 // of the entry in the field's interning index. Each field constructs its own 2512 // index, thus interning IDs are scoped to the tracing session and field 2513 // (usually as a counter for efficient var-int encoding). It is illegal to 2514 // override entries in an index (using the same iid for two different values) 2515 // within the same tracing session, even after a reset of the emitted 2516 // interning state. 2517 repeated EventCategory event_categories = 1; 2518 repeated LegacyEventName legacy_event_names = 2; 2519 repeated DebugAnnotationName debug_annotation_names = 3; 2520 repeated SourceLocation source_locations = 4; 2521 // Note: field IDs up to 15 should be used for frequent data only. 2522} 2523 2524// End of protos/perfetto/trace/interned_data/interned_data.proto 2525 2526// Begin of protos/perfetto/trace/power/battery_counters.proto 2527 2528message BatteryCounters { 2529 // Battery capacity in microampere-hours(µAh). Also known as Coulomb counter. 2530 optional int64 charge_counter_uah = 1; 2531 2532 // Remaining battery capacity percentage of total capacity 2533 optional float capacity_percent = 2; 2534 2535 // Instantaneous battery current in microamperes(µA). 2536 // Positive values indicate net current entering the battery from a charge 2537 // source, negative values indicate net current discharging from the battery. 2538 optional int64 current_ua = 3; 2539 2540 // Instantaneous battery current in microamperes(µA). 2541 optional int64 current_avg_ua = 4; 2542} 2543 2544// End of protos/perfetto/trace/power/battery_counters.proto 2545 2546// Begin of protos/perfetto/trace/power/power_rails.proto 2547 2548message PowerRails { 2549 2550 message RailDescriptor { 2551 // Index corresponding to the rail 2552 optional uint32 index = 1; 2553 // Name of the rail 2554 optional string rail_name = 2; 2555 // Name of the subsystem to which this rail belongs 2556 optional string subsys_name = 3; 2557 // Hardware sampling rate 2558 optional uint32 sampling_rate = 4; 2559 } 2560 2561 // This is only emitted at the beginning of the trace. 2562 repeated RailDescriptor rail_descriptor = 1; 2563 2564 message EnergyData { 2565 // Index corresponding to RailDescriptor.index 2566 optional uint32 index = 1; 2567 // Time since device boot(CLOCK_BOOTTIME) in milli-seconds 2568 optional uint64 timestamp_ms = 2; 2569 // Accumulated energy since device boot in microwatt-seconds (uWs) 2570 optional uint64 energy = 3; 2571 } 2572 2573 repeated EnergyData energy_data = 2; 2574} 2575 2576// End of protos/perfetto/trace/power/power_rails.proto 2577 2578// Begin of protos/perfetto/trace/profiling/profile_packet.proto 2579 2580message ProfilePacket { 2581 // either a function or library name. 2582 repeated InternedString strings = 1; 2583 message InternedString { 2584 optional uint64 id = 1; 2585 optional bytes str = 2; 2586 } 2587 2588 repeated Mapping mappings = 4; 2589 message Mapping { 2590 optional uint64 id = 1; // Interning key. 2591 optional uint64 build_id = 2; // Interning key. 2592 optional uint64 offset = 3; 2593 optional uint64 start = 4; 2594 optional uint64 end = 5; 2595 optional uint64 load_bias = 6; 2596 // E.g. ["system", "lib64", "libc.so"] 2597 repeated uint64 path_string_ids = 7; // id of string. 2598 } 2599 2600 repeated Frame frames = 2; 2601 message Frame { 2602 optional uint64 id = 1; // Interning key 2603 // E.g. "fopen" 2604 optional uint64 function_name_id = 2; // id of string. 2605 optional uint64 mapping_id = 3; 2606 optional uint64 rel_pc = 4; 2607 } 2608 2609 repeated Callstack callstacks = 3; 2610 message Callstack { 2611 optional uint64 id = 1; 2612 // Frames of this callstack. Bottom frame first. 2613 repeated uint64 frame_ids = 2; 2614 } 2615 2616 message HeapSample { 2617 optional uint64 callstack_id = 1; 2618 // bytes allocated at this frame. 2619 optional uint64 self_allocated = 2; 2620 // bytes allocated at this frame that have been freed. 2621 optional uint64 self_freed = 3; 2622 optional uint64 timestamp = 4; // timestamp [opt] 2623 optional uint64 alloc_count = 5; 2624 optional uint64 free_count = 6; 2625 } 2626 2627 message Histogram { 2628 message Bucket { 2629 // This bucket counts values from the previous bucket's (or -infinity if 2630 // this is the first bucket) upper_limit (inclusive) to this upper_limit 2631 // (exclusive). 2632 optional uint64 upper_limit = 1; 2633 // This is the highest bucket. This is set instead of the upper_limit. Any 2634 // values larger or equal to the previous bucket's upper_limit are counted 2635 // in this bucket. 2636 optional bool max_bucket = 2; 2637 // Number of values that fall into this range. 2638 optional uint64 count = 3; 2639 } 2640 repeated Bucket buckets = 1; 2641 } 2642 2643 message ProcessStats { 2644 optional uint64 unwinding_errors = 1; 2645 optional uint64 heap_samples = 2; 2646 optional uint64 map_reparses = 3; 2647 optional Histogram unwinding_time_us = 4; 2648 optional uint64 total_unwinding_time_us = 5; 2649 } 2650 2651 repeated ProcessHeapSamples process_dumps = 5; 2652 message ProcessHeapSamples { 2653 optional uint64 pid = 1; 2654 2655 // This process was profiled from startup. 2656 // If false, this process was already running when profiling started. 2657 optional bool from_startup = 3; 2658 2659 // This process was not profiled because a concurrent session was active. 2660 // If this is true, samples will be empty. 2661 optional bool rejected_concurrent = 4; 2662 2663 // This process disconnected while it was profiled. 2664 // If false, the process outlived the profiling session. 2665 optional bool disconnected = 6; 2666 2667 // If disconnected, this disconnect was caused by the client overrunning 2668 // the buffer. 2669 optional bool buffer_overran = 7; 2670 2671 // If disconnected, this disconnected was caused by the shared memory 2672 // buffer being corrupted. THIS IS ALWAYS A BUG IN HEAPPROFD OR CLIENT 2673 // MEMORY CORRUPTION. 2674 optional bool buffer_corrupted = 8; 2675 2676 // Timestamp of the state of the target process that this dump represents. 2677 // This can be different to the timestamp of the TracePackets for various 2678 // reasons: 2679 // * If disconnected is set above, this is the timestamp of last state 2680 // heapprofd had of the process before it disconnected. 2681 // * Otherwise, if the rate of events produced by the process is high, 2682 // heapprofd might be behind. 2683 // 2684 // TODO(fmayer): This is MONOTONIC_COARSE. Refactor ClockSnapshot::Clock 2685 // to have a type enum that we can reuse here. 2686 optional uint64 timestamp = 9; 2687 2688 optional ProcessStats stats = 5; 2689 2690 repeated HeapSample samples = 2; 2691 } 2692 2693 optional bool continued = 6; 2694 optional uint64 index = 7; 2695} 2696 2697// End of protos/perfetto/trace/profiling/profile_packet.proto 2698 2699// Begin of protos/perfetto/trace/ps/process_stats.proto 2700 2701// Per-process periodically sampled stats. These samples are wrapped in a 2702// dedicated message (as opposite to be fields in process_tree.proto) because 2703// they are dumped at a different rate than cmdline and thread list. 2704// Note: not all of these stats will be present in every ProcessStats message 2705// and sometimes processes may be missing . This is because counters are 2706// cached to reduce emission of counters which do not change. 2707message ProcessStats { 2708 message Process { 2709 optional int32 pid = 1; 2710 2711 // See /proc/[pid]/status in `man 5 proc` for a description of these fields. 2712 optional uint64 vm_size_kb = 2; 2713 optional uint64 vm_rss_kb = 3; 2714 optional uint64 rss_anon_kb = 4; 2715 optional uint64 rss_file_kb = 5; 2716 optional uint64 rss_shmem_kb = 6; 2717 optional uint64 vm_swap_kb = 7; 2718 optional uint64 vm_locked_kb = 8; 2719 optional uint64 vm_hwm_kb = 9; 2720 // When adding a new field remember to update kProcMemCounterSize in 2721 // the trace processor. 2722 2723 optional int64 oom_score_adj = 10; 2724 } 2725 repeated Process processes = 1; 2726 2727 // The time at which we finish collecting this batch of samples; 2728 // the top-level packet timestamp is the time at which 2729 // we begin collection. 2730 // TODO(dancol): analysis might be improved by 2731 // time-bracketing each sample as well as the whole 2732 // ProcessStats, but doing that is probably gated on 2733 // a vdso for CLOCK_BOOTTIME. 2734 optional uint64 collection_end_timestamp = 2; 2735} 2736 2737// End of protos/perfetto/trace/ps/process_stats.proto 2738 2739// Begin of protos/perfetto/trace/ps/process_tree.proto 2740 2741message ProcessTree { 2742 // Representation of a thread. 2743 message Thread { 2744 // The thread id (as per gettid()) 2745 optional int32 tid = 1; 2746 2747 // Thread group id (i.e. the PID of the process, == TID of the main thread) 2748 optional int32 tgid = 3; 2749 2750 // The name of the thread. 2751 optional string name = 2; 2752 } 2753 2754 // Representation of a process. 2755 message Process { 2756 // The UNIX process ID, aka thread group ID (as per getpid()). 2757 optional int32 pid = 1; 2758 2759 // The parent process ID, as per getppid(). 2760 optional int32 ppid = 2; 2761 2762 // The command line for the process, as per /proc/pid/cmdline. 2763 // If it is a kernel thread there will only be one cmdline field 2764 // and it will contain /proc/pid/comm. 2765 repeated string cmdline = 3; 2766 2767 // No longer used as of Apr 2018, when the dedicated |threads| field was 2768 // introduced in ProcessTree. 2769 repeated Thread threads_deprecated = 4 [deprecated = true]; 2770 } 2771 2772 // List of processes and threads in the client. These lists are incremental 2773 // and not exhaustive. A process and its threads might show up separately in 2774 // different ProcessTree messages. A thread might event not show up at all, if 2775 // no sched_switch activity was detected, for instance: 2776 // #0 { processes: [{pid: 10, ...}], threads: [{pid: 11, tgid: 10}] } 2777 // #1 { threads: [{pid: 12, tgid: 10}] } 2778 // #2 { processes: [{pid: 20, ...}], threads: [{pid: 13, tgid: 10}] } 2779 repeated Process processes = 1; 2780 repeated Thread threads = 2; 2781 2782 // The time at which we finish collecting this process tree; 2783 // the top-level packet timestamp is the time at which 2784 // we begin collection. 2785 optional uint64 collection_end_timestamp = 3; 2786} 2787 2788// End of protos/perfetto/trace/ps/process_tree.proto 2789 2790// Begin of protos/perfetto/trace/sys_stats/sys_stats.proto 2791 2792// Various Linux system stat counters from /proc. 2793// The fields in this message can be reported at different rates and with 2794// different granularity. See sys_stats_config.proto. 2795message SysStats { 2796 // Counters from /proc/meminfo. Values are in KB. 2797 message MeminfoValue { 2798 optional MeminfoCounters key = 1; 2799 optional uint64 value = 2; 2800 }; 2801 repeated MeminfoValue meminfo = 1; 2802 2803 // Counter from /proc/vmstat. Units are often pages, not KB. 2804 message VmstatValue { 2805 optional VmstatCounters key = 1; 2806 optional uint64 value = 2; 2807 }; 2808 repeated VmstatValue vmstat = 2; 2809 2810 // Times in each mode, since boot. Unit: nanoseconds. 2811 message CpuTimes { 2812 optional uint32 cpu_id = 1; 2813 optional uint64 user_ns = 2; // Time spent in user mode. 2814 optional uint64 user_ice_ns = 3; // Time spent in user mode (low prio). 2815 optional uint64 system_mode_ns = 4; // Time spent in system mode. 2816 optional uint64 idle_ns = 5; // Time spent in the idle task. 2817 optional uint64 io_wait_ns = 6; // Time spent waiting for I/O. 2818 optional uint64 irq_ns = 7; // Time spent servicing interrupts. 2819 optional uint64 softirq_ns = 8; // Time spent servicing softirqs. 2820 } 2821 repeated CpuTimes cpu_stat = 3; // One entry per cpu. 2822 2823 // Num processes forked since boot. 2824 // Populated only if FORK_COUNT in config.stat_counters. 2825 optional uint64 num_forks = 4; 2826 2827 message InterruptCount { 2828 optional int32 irq = 1; 2829 optional uint64 count = 2; 2830 } 2831 2832 // Number of interrupts, broken by IRQ number. 2833 // Populated only if IRQ_COUNTS in config.stat_counters. 2834 optional uint64 num_irq_total = 5; // Total num of irqs serviced since boot. 2835 repeated InterruptCount num_irq = 6; 2836 2837 // Number of softirqs, broken by softirq number. 2838 // Populated only if SOFTIRQ_COUNTS in config.stat_counters. 2839 optional uint64 num_softirq_total = 7; // Total num of softirqs since boot. 2840 repeated InterruptCount num_softirq = 8; // Per-softirq count. 2841 2842 // The time at which we finish collecting this set of samples; 2843 // the top-level packet timestamp is the time at which 2844 // we begin collection. 2845 optional uint64 collection_end_timestamp = 9; 2846} 2847 2848// End of protos/perfetto/trace/sys_stats/sys_stats.proto 2849 2850// Begin of protos/perfetto/trace/system_info.proto 2851 2852message Utsname { 2853 optional string sysname = 1; 2854 optional string version = 2; 2855 optional string release = 3; 2856 optional string machine = 4; 2857} 2858 2859message SystemInfo { 2860 optional Utsname utsname = 1; 2861} 2862 2863// End of protos/perfetto/trace/system_info.proto 2864 2865// Begin of protos/perfetto/trace/trace.proto 2866 2867message Trace { 2868 repeated TracePacket packet = 1; 2869 2870 // Do NOT add any other field here. This is just a convenience wrapper for 2871 // the use case of a trace being saved to a file. There are other cases 2872 // (streaming) where TracePacket are directly streamed without being wrapped 2873 // in a Trace proto. Nothing should ever rely on the full trace, all the 2874 // logic should be based on TracePacket(s). 2875} 2876 2877// End of protos/perfetto/trace/trace.proto 2878 2879// Begin of protos/perfetto/trace/trace_packet.proto 2880 2881// The root object emitted by Perfetto. A perfetto trace is just a stream of 2882// TracePacket(s). 2883// 2884// Next reserved id: 13 (up to 15). 2885// Next id: 51. 2886message TracePacket { 2887 // TODO(primiano): in future we should add a timestamp_clock_domain field to 2888 // allow mixing timestamps from different clock domains. 2889 optional uint64 timestamp = 8; // Timestamp [ns]. 2890 2891 oneof data { 2892 FtraceEventBundle ftrace_events = 1; 2893 ProcessTree process_tree = 2; 2894 ProcessStats process_stats = 9; 2895 InodeFileMap inode_file_map = 4; 2896 // removed field with id 5 2897 ClockSnapshot clock_snapshot = 6; 2898 SysStats sys_stats = 7; 2899 TrackEvent track_event = 11; 2900 2901 // IDs up to 15 are reserved. They take only one byte to encode their 2902 // preamble so should be used for freqeuent events. 2903 2904 TraceConfig trace_config = 33; 2905 FtraceStats ftrace_stats = 34; 2906 TraceStats trace_stats = 35; 2907 ProfilePacket profile_packet = 37; 2908 BatteryCounters battery = 38; 2909 PowerRails power_rails = 40; 2910 AndroidLogPacket android_log = 39; 2911 SystemInfo system_info = 45; 2912 Trigger trigger = 46; 2913 PackagesList packages_list = 47; 2914 2915 // Only used by TrackEvent. 2916 ProcessDescriptor process_descriptor = 43; 2917 ThreadDescriptor thread_descriptor = 44; 2918 2919 // This field is emitted at periodic intervals (~10s) and 2920 // contains always the binary representation of the UUID 2921 // {82477a76-b28d-42ba-81dc-33326d57a079}. This is used to be able to 2922 // efficiently partition long traces without having to fully parse them. 2923 bytes synchronization_marker = 36; 2924 2925 // Zero or more proto encoded trace packets compressed using deflate. 2926 // Each compressed_packets TracePacket (including the two field ids and 2927 // sizes) should be less than 512KB. 2928 bytes compressed_packets = 50; 2929 2930 // This field is only used for testing. 2931 // In previous versions of this proto this field had the id 268435455 2932 // This caused many problems: 2933 // - protozero decoder does not handle field ids larger than 999. 2934 // - old versions of protoc produce Java bindings with syntax errors when 2935 // the field id is large enough. 2936 // removed field with id 900 2937 } 2938 2939 // Trusted user id of the producer which generated this packet. Keep in sync 2940 // with TrustedPacket.trusted_uid. 2941 // 2942 // TODO(eseckler): Emit this field in a PacketSequenceDescriptor message 2943 // instead. 2944 oneof optional_trusted_uid { int32 trusted_uid = 3; }; 2945 2946 // Service-assigned identifier of the packet sequence this packet belongs to. 2947 // Uniquely identifies a producer + writer pair within the tracing session. A 2948 // value of zero denotes an invalid ID. Keep in sync with 2949 // TrustedPacket.trusted_packet_sequence_id. 2950 oneof optional_trusted_packet_sequence_id { 2951 uint32 trusted_packet_sequence_id = 10; 2952 } 2953 2954 // Incrementally emitted interned data, valid only on the packet's sequence 2955 // (packets with the same |trusted_packet_sequence_id|). The writer will 2956 // usually emit new interned data in the same TracePacket that first refers to 2957 // it (since the last reset of interning state). It may also be emitted 2958 // proactively in advance of referring to them in later packets. 2959 optional InternedData interned_data = 12; 2960 2961 // Set to true by the writer to indicate that it will re-emit any incremental 2962 // data for the packet's sequence before referring to it again. This includes 2963 // interned data as well as periodically emitted data like 2964 // Process/ThreadDescriptors. This flag only affects the current packet 2965 // sequence (see |trusted_packet_sequence_id|). 2966 // 2967 // When set to true, this TracePacket and subsequent TracePackets on the same 2968 // sequence will not refer to any incremental data emitted before this 2969 // TracePacket. For example, previously emitted interned data will be 2970 // re-emitted if it is referred to again. 2971 // 2972 // When the reader detects packet loss (|previous_packet_dropped|), it needs 2973 // to skip packets in the sequence until the next one with this flag set, to 2974 // ensure intact incremental data. 2975 optional bool incremental_state_cleared = 41; 2976 2977 // Flag set by the service if, for the current packet sequence (see 2978 // |trusted_packet_sequence_id|), either: 2979 // * this is the first packet, or 2980 // * one or multiple packets were dropped since the last packet that the 2981 // consumer read from the sequence. This can happen if chunks in the trace 2982 // buffer are overridden before the consumer could read them when the trace 2983 // is configured in ring buffer mode. 2984 // 2985 // When packet loss occurs, incrementally emitted data (including interned 2986 // data) on the sequence should be considered invalid up until the next packet 2987 // with |incremental_state_cleared| set. 2988 optional bool previous_packet_dropped = 42; 2989} 2990 2991// End of protos/perfetto/trace/trace_packet.proto 2992 2993// Begin of protos/perfetto/trace/track_event/debug_annotation.proto 2994 2995// Key/value annotations provided in untyped TRACE_EVENT macros. These 2996// annotations are intended for debug use and are not considered a stable API 2997// surface. As such, they should not be relied upon to implement (new) metrics. 2998message DebugAnnotation { 2999 message NestedValue { 3000 enum NestedType { 3001 UNSPECIFIED = 0; // leaf value. 3002 DICT = 1; 3003 ARRAY = 2; 3004 } 3005 optional NestedType nested_type = 1; 3006 3007 repeated string dict_keys = 2; 3008 repeated NestedValue dict_values = 3; 3009 repeated NestedValue array_values = 4; 3010 optional int64 int_value = 5; 3011 optional double double_value = 6; 3012 optional bool bool_value = 7; 3013 optional string string_value = 8; 3014 } 3015 3016 optional uint32 name_iid = 1; // interned DebugAnnotationName. 3017 3018 oneof value { 3019 bool bool_value = 2; 3020 uint64 uint_value = 3; 3021 int64 int_value = 4; 3022 double double_value = 5; 3023 string string_value = 6; 3024 // Pointers are stored in a separate type as the JSON output treats them 3025 // differently from other uint64 values. 3026 uint64 pointer_value = 7; 3027 NestedValue nested_value = 8; 3028 3029 // Legacy instrumentation may not support conversion of nested data to 3030 // NestedValue yet. 3031 string legacy_json_value = 9; 3032 } 3033} 3034 3035// -------------------- 3036// Interned data types: 3037// -------------------- 3038 3039message DebugAnnotationName { 3040 optional uint32 iid = 1; 3041 optional string name = 2; 3042} 3043 3044// End of protos/perfetto/trace/track_event/debug_annotation.proto 3045 3046// Begin of protos/perfetto/trace/track_event/process_descriptor.proto 3047 3048// Process-wide data that is periodically emitted by one thread per process. 3049// Valid for all events in packet sequences emitted by the same process. 3050// 3051// Next id: 5. 3052message ProcessDescriptor { 3053 optional int32 pid = 1; 3054 repeated string cmdline = 2; 3055 3056 // To support old UI. New UI should determine default sorting by process_type. 3057 optional int32 legacy_sort_index = 3; 3058 3059 // See chromium's content::ProcessType. 3060 enum ChromeProcessType { 3061 PROCESS_UNSPECIFIED = 0; 3062 PROCESS_BROWSER = 1; 3063 PROCESS_RENDERER = 2; 3064 PROCESS_UTILITY = 3; 3065 PROCESS_ZYGOTE = 4; 3066 PROCESS_SANDBOX_HELPER = 5; 3067 PROCESS_GPU = 6; 3068 PROCESS_PPAPI_PLUGIN = 7; 3069 PROCESS_PPAPI_BROKER = 8; 3070 } 3071 optional ChromeProcessType chrome_process_type = 4; 3072} 3073 3074// End of protos/perfetto/trace/track_event/process_descriptor.proto 3075 3076// Begin of protos/perfetto/trace/track_event/task_execution.proto 3077 3078// TrackEvent arguments describing the execution of a task. 3079message TaskExecution { 3080 // Source location that the task was posted from. 3081 optional uint32 posted_from_iid = 1; // interned SourceLocation. 3082} 3083 3084// -------------------- 3085// Interned data types: 3086// -------------------- 3087 3088message SourceLocation { 3089 optional uint32 iid = 1; 3090 3091 // We intend to add a binary symbol version of this in the future. 3092 optional string file_name = 2; 3093 optional string function_name = 3; 3094} 3095 3096// End of protos/perfetto/trace/track_event/task_execution.proto 3097 3098// Begin of protos/perfetto/trace/track_event/thread_descriptor.proto 3099 3100// Periodically emitted data that's common to all events emitted by the same 3101// thread, i.e. all events in the same packet sequence. Valid for all subsequent 3102// events in the same sequence. 3103// 3104// Next id: 8. 3105message ThreadDescriptor { 3106 optional int32 pid = 1; 3107 optional int32 tid = 2; 3108 3109 // To support old UI. New UI should determine default sorting by thread_type. 3110 optional int32 legacy_sort_index = 3; 3111 3112 enum ChromeThreadType { 3113 THREAD_UNSPECIFIED = 0; 3114 // TODO(eseckler): Add thread types. 3115 }; 3116 optional ChromeThreadType chrome_thread_type = 4; 3117 3118 // TODO(eseckler): Replace this with ChromeThreadType where possible. 3119 optional string thread_name = 5; 3120 3121 // Absolute reference values. Clock values in subsequent TrackEvents can be 3122 // encoded accumulatively and relative to these. This reduces their var-int 3123 // encoding size. 3124 optional int64 reference_timestamp_us = 6; 3125 optional int64 reference_thread_time_us = 7; 3126} 3127 3128// End of protos/perfetto/trace/track_event/thread_descriptor.proto 3129 3130// Begin of protos/perfetto/trace/track_event/track_event.proto 3131 3132// Trace events emitted by client instrumentation library (TRACE_EVENT macros), 3133// which describe activity on a track, such as a thread, task sequence, or 3134// asynchronous track. 3135// 3136// This message is optimized for writing and makes heavy use of data interning 3137// and delta encoding (e.g. of timestamps) to reduce data repetition and encoded 3138// data size. 3139// 3140// A TrackEvent exists in the context of its packet sequence (TracePackets 3141// emitted by the same producer + writer) and refers to data in preceding 3142// TracePackets emitted on the same sequence, both directly and indirectly. For 3143// example, interned data entries are emitted as part of a TracePacket and 3144// directly referred to from TrackEvents by their interning IDs. Attributes 3145// shared by all events on the same sequence (e.g. their thread and process 3146// association) are emitted as part of ProcessDescriptor and ThreadDescriptor 3147// messages in separate TracePackets instead. 3148// 3149// Next reserved id: 7 (up to 15). 3150// Next id: 20. 3151message TrackEvent { 3152 // Timestamp in microseconds (usually CLOCK_MONOTONIC). 3153 oneof timestamp { 3154 // Delta timestamp value since the last TrackEvent or ThreadDescriptor. To 3155 // calculate the absolute timestamp value, sum up all delta values of the 3156 // preceding TrackEvents since the last ThreadDescriptor and add the sum to 3157 // the |reference_timestamp| in ThreadDescriptor. This value should always 3158 // be positive. 3159 int64 timestamp_delta_us = 1; 3160 // Absolute value (e.g. a manually specified timestamp in the macro). 3161 // This is a one-off value that does not affect delta timestamp computation 3162 // in subsequent TrackEvents. 3163 int64 timestamp_absolute_us = 16; 3164 } 3165 3166 // CPU time for the current thread (e.g., CLOCK_THREAD_CPUTIME_ID) in 3167 // microseconds. 3168 oneof thread_time { 3169 // Same encoding as |timestamp| fields above. 3170 int64 thread_time_delta_us = 2; 3171 // TODO(eseckler): Consider removing absolute thread time support. It's 3172 // currently required to support writing PHASE_COMPLETE events out-of-order, 3173 // but shouldn't be required anymore when we split them into begin/end. 3174 int64 thread_time_absolute_us = 17; 3175 } 3176 3177 // We intend to add a binary symbol version of this in the future. 3178 repeated uint32 category_iids = 3; // interned EventCategoryName. 3179 3180 // TODO(eseckler): May also want a debug_name for untyped debug-only events. 3181 3182 // Unstable key/value annotations shown in the trace viewer but not intended 3183 // for metrics use. 3184 repeated DebugAnnotation debug_annotations = 4; 3185 3186 // Typed event arguments: 3187 optional TaskExecution task_execution = 5; 3188 // TODO(eseckler): New argument types go here :) 3189 3190 // Apart from {category, time, thread time, tid, pid}, other legacy trace 3191 // event attributes are initially simply proxied for conversion to a JSON 3192 // trace. We intend to gradually transition these attributes to similar native 3193 // features in TrackEvent (e.g. async + flow events), or deprecate them 3194 // without replacement where transition is unsuitable. 3195 // 3196 // Next reserved id: 15 (up to 16). 3197 // Next id: 20. 3198 message LegacyEvent { 3199 optional uint32 name_iid = 1; // interned LegacyEventName. 3200 optional int32 phase = 2; 3201 optional int64 duration_us = 3; 3202 optional int64 thread_duration_us = 4; 3203 3204 reserved 5; // used to be |flags|. 3205 3206 oneof id { 3207 uint64 unscoped_id = 6; 3208 uint64 local_id = 10; 3209 uint64 global_id = 11; 3210 } 3211 // Additional optional scope for |id|. 3212 optional string id_scope = 7; 3213 3214 // Consider the thread timestamps for async BEGIN/END event pairs as valid. 3215 optional bool use_async_tts = 9; 3216 3217 // Idenfifies a flow. Flow events with the same bind_id are connected. 3218 optional uint64 bind_id = 8; 3219 // Use the enclosing slice as binding point for a flow end event instead of 3220 // the next slice. Flow start/step events always bind to the enclosing 3221 // slice. 3222 optional bool bind_to_enclosing = 12; 3223 3224 enum FlowDirection { 3225 FLOW_UNSPECIFIED = 0; 3226 FLOW_IN = 1; 3227 FLOW_OUT = 2; 3228 FLOW_INOUT = 3; 3229 } 3230 optional FlowDirection flow_direction = 13; 3231 3232 enum InstantEventScope { 3233 SCOPE_UNSPECIFIED = 0; 3234 SCOPE_GLOBAL = 1; 3235 SCOPE_PROCESS = 2; 3236 SCOPE_THREAD = 3; 3237 } 3238 optional InstantEventScope instant_event_scope = 14; 3239 3240 // Override the pid/tid if the writer needs to emit events on behalf of 3241 // another process/thread. This should be the exception. Normally, the 3242 // pid+tid from ThreadDescriptor is used. 3243 optional int32 pid_override = 18; 3244 optional int32 tid_override = 19; 3245 } 3246 3247 optional LegacyEvent legacy_event = 6; 3248} 3249 3250// -------------------- 3251// Interned data types: 3252// -------------------- 3253 3254message EventCategory { 3255 optional uint32 iid = 1; 3256 optional string name = 2; 3257} 3258 3259message LegacyEventName { 3260 optional uint32 iid = 1; 3261 optional string name = 2; 3262} 3263 3264// End of protos/perfetto/trace/track_event/track_event.proto 3265 3266// Begin of protos/perfetto/trace/trigger.proto 3267 3268// When a TracingSession receives a trigger it records the boot time nanoseconds 3269// in the TracePacket's timestamp field as well as the name of the producer that 3270// triggered it. We emit this data so filtering can be done on triggers received 3271// in the trace. 3272message Trigger { 3273 // Name of the trigger which was received. 3274 optional string trigger_name = 1; 3275 // The actual producer that activated |trigger|. 3276 optional string producer_name = 2; 3277 // The verified UID of the producer. 3278 optional int32 trusted_producer_uid = 3; 3279} 3280 3281// End of protos/perfetto/trace/trigger.proto 3282 3283// Begin of protos/perfetto/config/android/android_log_config.proto 3284 3285message AndroidLogConfig { 3286 repeated AndroidLogId log_ids = 1; 3287 3288 reserved 2; // Was |poll_ms|, deprecated. 3289 3290 // If set ignores all log messages whose prio is < the given value. 3291 optional AndroidLogPriority min_prio = 3; 3292 3293 // If non-empty ignores all log messages whose tag doesn't match one of the 3294 // specified values. 3295 repeated string filter_tags = 4; 3296} 3297 3298// End of protos/perfetto/config/android/android_log_config.proto 3299 3300// Begin of protos/perfetto/config/chrome/chrome_config.proto 3301 3302// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py 3303// to reflect changes in the corresponding C++ headers. 3304 3305message ChromeConfig { 3306 optional string trace_config = 1; 3307 3308 // When enabled, the data source should only fill in fields in the output that 3309 // are not potentially privacy sensitive. 3310 optional bool privacy_filtering_enabled = 2; 3311} 3312 3313// End of protos/perfetto/config/chrome/chrome_config.proto 3314 3315// Begin of protos/perfetto/config/data_source_config.proto 3316 3317// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py 3318// to reflect changes in the corresponding C++ headers. 3319 3320// The configuration that is passed to each data source when starting tracing. 3321message DataSourceConfig { 3322 // Data source unique name, e.g., "linux.ftrace". This must match 3323 // the name passed by the data source when it registers (see 3324 // RegisterDataSource()). 3325 optional string name = 1; 3326 3327 // The index of the logging buffer where TracePacket(s) will be stored. 3328 // This field doesn't make a major difference for the Producer(s). The final 3329 // logging buffers, in fact, are completely owned by the Service. We just ask 3330 // the Producer to copy this number into the chunk headers it emits, so that 3331 // the Service can quickly identify the buffer where to move the chunks into 3332 // without expensive lookups on its fastpath. 3333 optional uint32 target_buffer = 2; 3334 3335 // Set by the service to indicate the duration of the trace. 3336 // DO NOT SET in consumer as this will be overridden by the service. 3337 optional uint32 trace_duration_ms = 3; 3338 3339 // Set by the service to indicate whether this tracing session has extra 3340 // guardrails. 3341 // DO NOT SET in consumer as this will be overridden by the service. 3342 optional bool enable_extra_guardrails = 6; 3343 3344 // Set by the service to indicate which tracing session the data source 3345 // belongs to. The intended use case for this is checking if two data sources, 3346 // one of which produces metadata for the other one, belong to the same trace 3347 // session and hence should be linked together. 3348 // This field was introduced in Aug 2018 after Android P. 3349 optional uint64 tracing_session_id = 4; 3350 3351 // Keeep the lower IDs (up to 99) for fields that are *not* specific to 3352 // data-sources and needs to be processed by the traced daemon. 3353 3354 optional FtraceConfig ftrace_config = 100; 3355 optional ChromeConfig chrome_config = 101; 3356 optional InodeFileConfig inode_file_config = 102; 3357 optional ProcessStatsConfig process_stats_config = 103; 3358 optional SysStatsConfig sys_stats_config = 104; 3359 optional HeapprofdConfig heapprofd_config = 105; 3360 optional AndroidPowerConfig android_power_config = 106; 3361 optional AndroidLogConfig android_log_config = 107; 3362 optional PackagesListConfig packages_list_config = 109; 3363 3364 // This is a fallback mechanism to send a free-form text config to the 3365 // producer. In theory this should never be needed. All the code that 3366 // is part of the platform (i.e. traced service) is supposed to *not* truncate 3367 // the trace config proto and propagate unknown fields. However, if anything 3368 // in the pipeline (client or backend) ends up breaking this forward compat 3369 // plan, this field will become the escape hatch to allow future data sources 3370 // to get some meaningful configuration. 3371 optional string legacy_config = 1000; 3372 3373 // This field is only used for testing. 3374 optional TestConfig for_testing = 3375 268435455; // 2^28 - 1, max field id for protos supported by Java. 3376} 3377 3378// End of protos/perfetto/config/data_source_config.proto 3379 3380// Begin of protos/perfetto/config/ftrace/ftrace_config.proto 3381 3382// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py 3383// to reflect changes in the corresponding C++ headers. 3384 3385message FtraceConfig { 3386 repeated string ftrace_events = 1; 3387 repeated string atrace_categories = 2; 3388 repeated string atrace_apps = 3; 3389 // *Per-CPU* buffer size. 3390 optional uint32 buffer_size_kb = 10; 3391 optional uint32 drain_period_ms = 11; 3392} 3393 3394// End of protos/perfetto/config/ftrace/ftrace_config.proto 3395 3396// Begin of protos/perfetto/config/inode_file/inode_file_config.proto 3397 3398// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py 3399// to reflect changes in the corresponding C++ headers. 3400 3401message InodeFileConfig { 3402 message MountPointMappingEntry { 3403 optional string mountpoint = 1; 3404 repeated string scan_roots = 2; 3405 } 3406 3407 // How long to pause between batches. 3408 optional uint32 scan_interval_ms = 1; 3409 3410 // How long to wait before the first scan in order to accumulate inodes. 3411 optional uint32 scan_delay_ms = 2; 3412 3413 // How many inodes to scan in one batch. 3414 optional uint32 scan_batch_size = 3; 3415 3416 // Do not scan for inodes not found in the static map. 3417 optional bool do_not_scan = 4; 3418 3419 // If non-empty, only scan inodes corresponding to block devices named in 3420 // this list. 3421 repeated string scan_mount_points = 5; 3422 3423 // When encountering an inode belonging to a block device corresponding 3424 // to one of the mount points in this map, scan its scan_roots instead. 3425 repeated MountPointMappingEntry mount_point_mapping = 6; 3426} 3427 3428// End of protos/perfetto/config/inode_file/inode_file_config.proto 3429 3430// Begin of protos/perfetto/config/power/android_power_config.proto 3431 3432message AndroidPowerConfig { 3433 enum BatteryCounters { 3434 BATTERY_COUNTER_UNSPECIFIED = 0; 3435 BATTERY_COUNTER_CHARGE = 1; // Coulomb counter. 3436 BATTERY_COUNTER_CAPACITY_PERCENT = 2; // Charge (%). 3437 BATTERY_COUNTER_CURRENT = 3; // Instantaneous current. 3438 BATTERY_COUNTER_CURRENT_AVG = 4; // Avg current. 3439 } 3440 optional uint32 battery_poll_ms = 1; 3441 repeated BatteryCounters battery_counters = 2; 3442 3443 // Where available enables per-power-rail measurements. 3444 optional bool collect_power_rails = 3; 3445} 3446 3447// End of protos/perfetto/config/power/android_power_config.proto 3448 3449// Begin of protos/perfetto/config/process_stats/process_stats_config.proto 3450 3451// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py 3452// to reflect changes in the corresponding C++ headers. 3453 3454message ProcessStatsConfig { 3455 enum Quirks { 3456 QUIRKS_UNSPECIFIED = 0; 3457 3458 // This has been deprecated and ignored as per 2018-05-01. Full scan at 3459 // startup is now disabled by default and can be re-enabled using the 3460 // |scan_all_processes_on_start| arg. 3461 DISABLE_INITIAL_DUMP = 1 [deprecated = true]; 3462 3463 DISABLE_ON_DEMAND = 2; 3464 } 3465 3466 repeated Quirks quirks = 1; 3467 3468 // If enabled all processes will be scanned and dumped when the trace starts. 3469 optional bool scan_all_processes_on_start = 2; 3470 3471 // If enabled thread names are also recoded (this is redundant if sched_switch 3472 // is enabled). 3473 optional bool record_thread_names = 3; 3474 3475 // If > 0 samples counters (see process_stats.proto) from 3476 // /proc/pid/status and oom_score_adj every X ms. 3477 // This is required to be > 100ms to avoid excessive CPU usage. 3478 // TODO(primiano): add CPU cost for change this value. 3479 optional uint32 proc_stats_poll_ms = 4; 3480 3481 // If empty samples stats for all processes. If non empty samples stats only 3482 // for processes matching the given string in their argv0 (i.e. the first 3483 // entry of /proc/pid/cmdline). 3484 // TODO(primiano): implement this feature. 3485 // repeated string proc_stats_filter = 5; 3486 3487 // This is required to be either = 0 or a multiple of |proc_stats_poll_ms| 3488 // (default: |proc_stats_poll_ms|). If = 0, will be set to 3489 // |proc_stats_poll_ms|. Non-multiples will be rounded down to the nearest 3490 // multiple. 3491 optional uint32 proc_stats_cache_ttl_ms = 6; 3492} 3493 3494// End of protos/perfetto/config/process_stats/process_stats_config.proto 3495 3496// Begin of protos/perfetto/config/sys_stats/sys_stats_config.proto 3497 3498// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py 3499// to reflect changes in the corresponding C++ headers. 3500 3501// This file defines the configuration for the Linux /proc poller data source, 3502// which injects counters in the trace. 3503// Counters that are needed in the trace must be explicitly listed in the 3504// *_counters fields. This is to avoid spamming the trace with all counters 3505// at all times. 3506// The sampling rate is configurable. All polling rates (*_period_ms) need 3507// to be integer multiples of each other. 3508// OK: [10ms, 10ms, 10ms], [10ms, 20ms, 10ms], [10ms, 20ms, 60ms] 3509// Not OK: [10ms, 10ms, 11ms], [10ms, 15ms, 20ms] 3510message SysStatsConfig { 3511 // Polls /proc/meminfo every X ms, if non-zero. 3512 // This is required to be > 10ms to avoid excessive CPU usage. 3513 // Cost: 0.3 ms [read] + 0.07 ms [parse + trace injection] 3514 optional uint32 meminfo_period_ms = 1; 3515 3516 // Only the counters specified below are reported. 3517 repeated MeminfoCounters meminfo_counters = 2; 3518 3519 // Polls /proc/vmstat every X ms, if non-zero. 3520 // This is required to be > 10ms to avoid excessive CPU usage. 3521 // Cost: 0.2 ms [read] + 0.3 ms [parse + trace injection] 3522 optional uint32 vmstat_period_ms = 3; 3523 repeated VmstatCounters vmstat_counters = 4; 3524 3525 // Pols /proc/stat every X ms, if non-zero. 3526 // This is required to be > 10ms to avoid excessive CPU usage. 3527 // Cost: 4.1 ms [read] + 1.9 ms [parse + trace injection] 3528 optional uint32 stat_period_ms = 5; 3529 enum StatCounters { 3530 STAT_UNSPECIFIED = 0; 3531 STAT_CPU_TIMES = 1; 3532 STAT_IRQ_COUNTS = 2; 3533 STAT_SOFTIRQ_COUNTS = 3; 3534 STAT_FORK_COUNT = 4; 3535 } 3536 repeated StatCounters stat_counters = 6; 3537} 3538 3539// End of protos/perfetto/config/sys_stats/sys_stats_config.proto 3540 3541// Begin of protos/perfetto/config/test_config.proto 3542 3543// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py 3544// to reflect changes in the corresponding C++ headers. 3545 3546// The configuration for a fake producer used in tests. 3547message TestConfig { 3548 message DummyFields { 3549 optional uint32 field_uint32 = 1; 3550 optional int32 field_int32 = 2; 3551 optional uint64 field_uint64 = 3; 3552 optional int64 field_int64 = 4; 3553 optional fixed64 field_fixed64 = 5; 3554 optional sfixed64 field_sfixed64 = 6; 3555 optional fixed32 field_fixed32 = 7; 3556 optional sfixed32 field_sfixed32 = 8; 3557 optional double field_double = 9; 3558 optional float field_float = 10; 3559 optional sint64 field_sint64 = 11; 3560 optional sint32 field_sint32 = 12; 3561 optional string field_string = 13; 3562 optional bytes field_bytes = 14; 3563 } 3564 3565 // The number of messages the fake producer should send. 3566 optional uint32 message_count = 1; 3567 3568 // The maximum number of messages which should be sent each second. 3569 // The actual obserced speed may be lower if the producer is unable to 3570 // work fast enough. 3571 // If this is zero or unset, the producer will send as fast as possible. 3572 optional uint32 max_messages_per_second = 2; 3573 3574 // The seed value for a simple multiplicative congruential pseudo-random 3575 // number sequence. 3576 optional uint32 seed = 3; 3577 3578 // The size of each message in bytes. Should be greater than or equal 5 to 3579 // account for the number of bytes needed to encode the random number and a 3580 // null byte for the string. 3581 optional uint32 message_size = 4; 3582 3583 // Whether the producer should send a event batch when the data source is 3584 // is initially registered. 3585 optional bool send_batch_on_register = 5; 3586 3587 optional DummyFields dummy_fields = 6; 3588} 3589 3590// End of protos/perfetto/config/test_config.proto 3591 3592// Begin of protos/perfetto/config/trace_config.proto 3593 3594// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos 3595// to reflect changes in the corresponding C++ headers. 3596 3597// The overall config that is used when starting a new tracing session through 3598// ProducerPort::StartTracing(). 3599// It contains the general config for the logging buffer(s) and the configs for 3600// all the data source being enabled. 3601// 3602// Next id: 26. 3603message TraceConfig { 3604 message BufferConfig { 3605 optional uint32 size_kb = 1; 3606 3607 reserved 2; // |page_size|, now deprecated. 3608 reserved 3; // |optimize_for|, now deprecated. 3609 3610 enum FillPolicy { 3611 UNSPECIFIED = 0; 3612 3613 // Default behavior. The buffer operates as a conventional ring buffer. 3614 // If the writer is faster than the reader (or if the reader reads only 3615 // after tracing is stopped) newly written packets will overwrite old 3616 // packets. 3617 RING_BUFFER = 1; 3618 3619 // Behaves like RING_BUFFER as long as there is space in the buffer or 3620 // the reader catches up with the writer. As soon as the writer hits 3621 // an unread chunk, it stops accepting new data in the buffer. 3622 DISCARD = 2; 3623 } 3624 optional FillPolicy fill_policy = 4; 3625 } 3626 repeated BufferConfig buffers = 1; 3627 3628 message DataSource { 3629 // Filters and data-source specific config. It contains also the unique name 3630 // of the data source, the one passed in the DataSourceDescriptor when they 3631 // register on the service. 3632 optional protos.DataSourceConfig config = 1; 3633 3634 // Optional. If multiple producers (~processes) expose the same data source 3635 // and |producer_name_filter| != "", the data source is enabled only for 3636 // producers whose names match any of the producer_name_filter below. 3637 // The |producer_name_filter| has to be an exact match. (TODO(primiano): 3638 // support wildcards or regex). 3639 // This allows to enable a data source only for specific processes. 3640 // The "repeated" field has OR sematics: specifying a filter ["foo", "bar"] 3641 // will enable data source on both "foo" and "bar" (if existent). 3642 repeated string producer_name_filter = 2; 3643 } 3644 repeated DataSource data_sources = 2; 3645 3646 // Config for builtin trace packets emitted by perfetto like trace stats, 3647 // system info, etc. 3648 message BuiltinDataSource { 3649 // Disable emitting clock timestamps into the trace. 3650 optional bool disable_clock_snapshotting = 1; 3651 3652 optional bool disable_trace_config = 2; 3653 3654 optional bool disable_system_info = 3; 3655 } 3656 optional BuiltinDataSource builtin_data_sources = 20; 3657 3658 // If specified, the trace will be stopped |duration_ms| after starting. 3659 // However in case of traces with triggers, see 3660 // TriggerConfig.trigger_timeout_ms instead. 3661 optional uint32 duration_ms = 3; 3662 3663 // This is set when --dropbox is passed to the Perfetto command line client 3664 // and enables guardrails that limit resource usage for traces requested 3665 // by statsd. 3666 optional bool enable_extra_guardrails = 4; 3667 3668 enum LockdownModeOperation { 3669 LOCKDOWN_UNCHANGED = 0; 3670 LOCKDOWN_CLEAR = 1; 3671 LOCKDOWN_SET = 2; 3672 } 3673 // Reject producers that are not running under the same UID as the tracing 3674 // service. 3675 optional LockdownModeOperation lockdown_mode = 5; 3676 3677 message ProducerConfig { 3678 // Identifies the producer for which this config is for. 3679 optional string producer_name = 1; 3680 3681 // Specifies the preferred size of the shared memory buffer. If the size is 3682 // larger than the max size, the max will be used. If it is smaller than 3683 // the page size or doesn't fit pages evenly into it, it will fall back to 3684 // the size specified by the producer or finally the default shared memory 3685 // size. 3686 optional uint32 shm_size_kb = 2; 3687 3688 // Specifies the preferred size of each page in the shared memory buffer. 3689 // Must be an integer multiple of 4K. 3690 optional uint32 page_size_kb = 3; 3691 } 3692 3693 repeated ProducerConfig producers = 6; 3694 3695 // Contains statsd-specific metadata about an alert associated with the trace. 3696 message StatsdMetadata { 3697 // The identifier of the alert which triggered this trace. 3698 optional int64 triggering_alert_id = 1; 3699 // The uid which registered the triggering configuration with statsd. 3700 optional int32 triggering_config_uid = 2; 3701 // The identifier of the config which triggered the alert. 3702 optional int64 triggering_config_id = 3; 3703 // The identifier of the subscription which triggered this trace. 3704 optional int64 triggering_subscription_id = 4; 3705 } 3706 3707 // Statsd-specific metadata. 3708 optional StatsdMetadata statsd_metadata = 7; 3709 3710 // When true, the EnableTracing() request must also provide a file descriptor. 3711 // The service will then periodically read packets out of the trace buffer and 3712 // store it into the passed file. 3713 optional bool write_into_file = 8; 3714 3715 // Optional. If non-zero tunes the write period. A min value of 100ms is 3716 // enforced (i.e. smaller values are ignored). 3717 optional uint32 file_write_period_ms = 9; 3718 3719 // Optional. When non zero the periodic write stops once at most X bytes 3720 // have been written into the file. Tracing is disabled when this limit is 3721 // reached, even if |duration_ms| has not been reached yet. 3722 optional uint64 max_file_size_bytes = 10; 3723 3724 // Contains flags which override the default values of the guardrails inside 3725 // Perfetto. These values are only affect userdebug builds. 3726 message GuardrailOverrides { 3727 // Override the default limit (in bytes) for uploading data to server within 3728 // a 24 hour period. 3729 optional uint64 max_upload_per_day_bytes = 1; 3730 } 3731 3732 optional GuardrailOverrides guardrail_overrides = 11; 3733 3734 // When true, data sources are not started until an explicit call to 3735 // StartTracing() on the consumer port. This is to support early 3736 // initialization and fast trace triggering. This can be used only when the 3737 // Consumer explicitly triggers the StartTracing() method. 3738 // This should not be used in a remote trace config via statsd, doing so will 3739 // result in a hung trace session. 3740 optional bool deferred_start = 12; 3741 3742 // When set, it periodically issues a Flush() to all data source, forcing them 3743 // to commit their data into the tracing service. This can be used for 3744 // quasi-real-time streaming mode and to guarantee some partial ordering of 3745 // events in the trace in windows of X ms. 3746 optional uint32 flush_period_ms = 13; 3747 3748 // Wait for this long for producers to acknowledge flush requests. 3749 // Default 5s. 3750 optional uint32 flush_timeout_ms = 14; 3751 3752 reserved 15; // |disable_clock_snapshotting| moved. 3753 3754 // Android-only. If set, sends an intent to the Traceur system app when the 3755 // trace ends to notify it about the trace readiness. 3756 optional bool notify_traceur = 16; 3757 3758 // Triggers allow producers to start or stop the tracing session when an event 3759 // occurs. 3760 // 3761 // For example if we are tracing probabilistically, most traces will be 3762 // uninteresting. Triggers allow us to keep only the interesting ones such as 3763 // those traces during which the device temperature reached a certain 3764 // threshold. In this case the producer can activate a trigger to keep 3765 // (STOP_TRACING) the trace, otherwise it can also begin a trace 3766 // (START_TRACING) because it knows something is about to happen. 3767 message TriggerConfig { 3768 enum TriggerMode { 3769 UNSPECIFIED = 0; 3770 3771 // When this mode is chosen, data sources are not started until one of the 3772 // |triggers| are received. This supports early initialization and fast 3773 // starting of the tracing system. On triggering, the session will then 3774 // record for |stop_delay_ms|. However if no trigger is seen 3775 // after |trigger_timeout_ms| the session will be stopped and no data will 3776 // be returned. 3777 START_TRACING = 1; 3778 3779 // When this mode is chosen, the session will be started via the normal 3780 // EnableTracing() & StartTracing(). If no trigger is ever seen 3781 // the session will be stopped after |trigger_timeout_ms| and no data will 3782 // be returned. However if triggered the trace will stop after 3783 // |stop_delay_ms| and any data in the buffer will be returned to the 3784 // consumer. 3785 STOP_TRACING = 2; 3786 } 3787 optional TriggerMode trigger_mode = 1; 3788 3789 message Trigger { 3790 // The producer must specify this name to activate the trigger. 3791 optional string name = 1; 3792 3793 // The a std::regex that will match the producer that can activate this 3794 // trigger. This is optional. If unset any producers can activate this 3795 // trigger. 3796 optional string producer_name_regex = 2; 3797 3798 // After a trigger is received either in START_TRACING or STOP_TRACING 3799 // mode then the trace will end |stop_delay_ms| after triggering. 3800 optional uint32 stop_delay_ms = 3; 3801 } 3802 // A list of triggers which are related to this configuration. If ANY 3803 // trigger is seen then an action will be performed based on |trigger_mode|. 3804 repeated Trigger triggers = 2; 3805 3806 // Required and must be positive if a TriggerConfig is specified. This is 3807 // how long this TraceConfig should wait for a trigger to arrive. After this 3808 // period of time if no trigger is seen the TracingSession will be cleaned 3809 // up. 3810 optional uint32 trigger_timeout_ms = 3; 3811 } 3812 optional TriggerConfig trigger_config = 17; 3813 3814 // When this is non-empty the perfetto command line tool will ignore the rest 3815 // of this TraceConfig and instead connect to the perfetto service as a 3816 // producer and send these triggers, potentially stopping or starting traces 3817 // that were previous configured to use a TriggerConfig. 3818 repeated string activate_triggers = 18; 3819 3820 // Configuration for trace contents that reference earlier trace data. For 3821 // example, a data source might intern strings, and emit packets containing 3822 // {interned id : string} pairs. Future packets from that data source can then 3823 // use the interned ids instead of duplicating the raw string contents. The 3824 // trace parser will then need to use that interning table to fully interpret 3825 // the rest of the trace. 3826 message IncrementalStateConfig { 3827 // If nonzero, notify eligible data sources to clear their incremental state 3828 // periodically, with the given period. The notification is sent only to 3829 // data sources that have |handles_incremental_state_clear| set in their 3830 // DataSourceDescriptor. The notification requests that the data source 3831 // stops referring to past trace contents. This is particularly useful when 3832 // tracing in ring buffer mode, where it is not exceptional to overwrite old 3833 // trace data. 3834 // 3835 // Warning: this time-based global clearing is likely to be removed in the 3836 // future, to be replaced with a smarter way of sending the notifications 3837 // only when necessary. 3838 optional uint32 clear_period_ms = 1; 3839 } 3840 optional IncrementalStateConfig incremental_state_config = 21; 3841 3842 // Additional guardrail used by the Perfetto command line client. 3843 // On user builds when --dropbox is set perfetto will refuse to trace unless 3844 // this is also set. 3845 // Added in Q. 3846 optional bool allow_user_build_tracing = 19; 3847 3848 // If set the tracing service will ensure there is at most one tracing session 3849 // with this key. 3850 optional string unique_session_name = 22; 3851 3852 // Compress trace with the given method. Best effort. 3853 enum CompressionType { 3854 COMPRESSION_TYPE_UNSPECIFIED = 0; 3855 COMPRESSION_TYPE_DEFLATE = 1; 3856 }; 3857 optional CompressionType compression_type = 24; 3858 3859 // Android-only. Debug builds only. Not for general use. If set, saves a 3860 // Dropbox trace into an incident. This field is read by perfetto_cmd, rather 3861 // than the tracing service. All fields are mandatory. 3862 message IncidentReportConfig { 3863 optional string destination_package = 1; 3864 optional string destination_class = 2; 3865 // Level of filtering in the requested incident. See |Destination| in 3866 // frameworks/base/core/proto/android/privacy.proto. 3867 optional int32 privacy_level = 3; 3868 // If true, do not write the trace into dropbox (i.e. incident only). 3869 // Otherwise, write to both dropbox and incident. 3870 optional bool skip_dropbox = 4; 3871 } 3872 optional IncidentReportConfig incident_report_config = 25; 3873} 3874 3875// End of protos/perfetto/config/trace_config.proto 3876 3877// Begin of protos/perfetto/config/profiling/heapprofd_config.proto 3878 3879// Configuration for go/heapprofd. 3880message HeapprofdConfig { 3881 message ContinuousDumpConfig { 3882 // ms to wait before first dump. 3883 optional uint32 dump_phase_ms = 5; 3884 // ms to wait between following dumps. 3885 optional uint32 dump_interval_ms = 6; 3886 }; 3887 3888 // Set to 1 for perfect accuracy. 3889 // Otherwise, sample every sample_interval_bytes on average. 3890 // 3891 // See https://docs.perfetto.dev/#/heapprofd?id=sampling-interval for more 3892 // details. 3893 optional uint64 sampling_interval_bytes = 1; 3894 3895 // E.g. surfaceflinger, com.android.phone 3896 // This input is normalized in the following way: if it contains slashes, 3897 // everything up to the last slash is discarded. If it contains "@", 3898 // everything after the first @ is discared. 3899 // E.g. /system/bin/surfaceflinger@1.0 normalizes to surfaceflinger. 3900 // This transformation is also applied to the processes' command lines when 3901 // matching. 3902 repeated string process_cmdline = 2; 3903 3904 // For watermark based triggering or local debugging. 3905 repeated uint64 pid = 4; 3906 3907 // Profile all processes eligible for profiling on the system. 3908 // See https://docs.perfetto.dev/#/heapprofd?id=target-processes for which 3909 // processes are eligible. 3910 // 3911 // On unmodified userdebug builds, this will lead to system crashes. Zygote 3912 // will crash when trying to launch a new process as it will have an 3913 // unexpected open socket to heapprofd. 3914 // 3915 // heapprofd will likely be overloaded by the amount of data for low 3916 // sampling intervals. 3917 optional bool all = 5; 3918 3919 // Do not emit function names for mappings starting with this prefix. 3920 // E.g. /system to not emit symbols for any system libraries. 3921 repeated string skip_symbol_prefix = 7; 3922 3923 // Dump once at the end of the trace, emitting the heap dump at maximum 3924 // memory usage. 3925 // optional bool retain_max = 5; // TODO(fmayer): Implement 3926 3927 // Dump at a predefined interval. 3928 optional ContinuousDumpConfig continuous_dump_config = 6; 3929 3930 // Size of the shared memory buffer between the profiled processes and 3931 // heapprofd. Defaults to 8 MiB. If larger than 500 MiB, truncated to 500 3932 // MiB. 3933 // 3934 // Needs to be: 3935 // * at least 8192, 3936 // * a power of two, 3937 // * a multiple of 4096. 3938 optional uint64 shmem_size_bytes = 8; 3939 3940 // When the shmem buffer is full, block the client instead of ending the 3941 // trace. Use with caution as this will significantly slow down the target 3942 // process. 3943 optional bool block_client = 9; 3944} 3945 3946// End of protos/perfetto/config/profiling/heapprofd_config.proto 3947 3948// Begin of protos/perfetto/config/android/packages_list_config.proto 3949 3950// Data source that lists details (such as version code) about packages on an 3951// Android device. 3952message PackagesListConfig { 3953 // If not empty, emit info about only the following list of package names 3954 // (exact match, no regex). Otherwise, emit info about all packages. 3955 repeated string package_name_filter = 1; 3956} 3957 3958// End of protos/perfetto/config/android/packages_list_config.proto 3959