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