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