1// Copyright 2020 The Chromium Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto2"; 6 7import public "protos/perfetto/trace/track_event/track_event.proto"; 8import public "protos/perfetto/trace/track_event/debug_annotation.proto"; 9import public "protos/perfetto/trace/track_event/source_location.proto"; 10 11package perfetto.protos; 12 13enum ChromeAppState { 14 APP_STATE_FOREGROUND = 1; 15 APP_STATE_BACKGROUND = 2; 16} 17 18enum MemoryPressureLevel { 19 MEMORY_PRESSURE_LEVEL_NONE = 0; 20 MEMORY_PRESSURE_LEVEL_MODERATE = 1; 21 MEMORY_PRESSURE_LEVEL_CRITICAL = 2; 22} 23 24message ChromeMemoryPressureNotification { 25 optional MemoryPressureLevel level = 1; 26 27 // ID of interned source location where MemoryPressureListener was created 28 optional uint64 creation_location_iid = 2; 29} 30 31message BlinkTaskScope { 32 enum TaskScopeType { 33 TASK_SCOPE_UNKNOWN = 0; 34 TASK_SCOPE_CALLBACK = 1; 35 TASK_SCOPE_SCHEDULED_ACTION = 2; 36 TASK_SCOPE_SCRIPT_EXECUTION = 3; 37 TASK_SCOPE_POST_MESSAGE = 4; 38 TASK_SCOPE_POP_STATE = 5; 39 TASK_SCOPE_SCHEDULER_POST_TASK = 6; 40 TASK_SCOPE_REQUEST_IDLE_CALLBACK = 7; 41 TASK_SCOPE_XML_HTTP_REQUEST = 8; 42 TASK_SCOPE_SOFT_NAVIGATION = 9; 43 } 44 optional TaskScopeType type = 1; 45 optional int64 scope_task_id = 2; 46 optional int64 running_task_id_to_be_restored = 3; 47 48 reserved 4, 5; 49 reserved "continuation_task_id_to_be_restored", "parent_task_id"; 50} 51 52message ChromeTaskAnnotator { 53 enum DelayPolicy { 54 FLEXIBLE_NO_SOONER = 0; 55 FLEXIBLE_PREFER_EARLY = 1; 56 PRECISE = 2; 57 } 58 optional uint32 ipc_hash = 1; 59 // The delay in microseconds that was specified, if any, when this task was 60 // posted. This is only valid for delayed tasks. 61 optional uint64 task_delay_us = 2; 62 optional DelayPolicy delay_policy = 3; 63} 64 65message ChromeBrowserContext { 66 reserved 1; 67 optional string id = 2; 68} 69 70message ChromeProfileDestroyer { 71 optional fixed64 profile_ptr = 1; 72 optional bool is_off_the_record = 2; 73 optional string otr_profile_id = 3; 74 optional uint32 host_count_at_creation = 4; 75 optional uint32 host_count_at_destruction = 5; 76 optional fixed64 render_process_host_ptr = 6; 77} 78 79message ChromeTaskPostedToDisabledQueue { 80 optional string task_queue_name = 1; 81 optional uint64 time_since_disabled_ms = 2; 82 optional uint32 ipc_hash = 3; 83 optional uint64 source_location_iid = 4; 84} 85 86message ChromeRasterTask { 87 optional int64 source_frame_number = 1; 88} 89 90message ChromeMessagePumpForUI { 91 // The MSG defined in winuser.h. 92 optional uint32 message_id = 1; 93 // The result of the Win32 API call WaitForMultipleObjectsEx(). 94 optional uint32 wait_for_object_result = 2; 95} 96 97// An enumeration specifying the reason of the RenderFrame deletion. 98// This is copied from content/common/frame.mojom. 99enum FrameDeleteIntention { 100 // The frame being deleted isn't a (speculative) main frame. 101 FRAME_DELETE_INTENTION_NOT_MAIN_FRAME = 0; 102 103 // The frame being deleted is a speculative main frame, and it is being 104 // deleted as part of the shutdown for that WebContents. The entire RenderView 105 // etc will be destroyed by a separate IPC sent later. 106 FRAME_DELETE_INTENTION_SPECULATIVE_MAIN_FRAME_FOR_SHUTDOWN = 1; 107 108 // The frame being deleted is a speculative main frame, and it is being 109 // deleted because the speculative navigation was cancelled. This is not part 110 // of shutdown. 111 FRAME_DELETE_INTENTION_SPECULATIVE_MAIN_FRAME_FOR_NAVIGATION_CANCELLED = 2; 112} 113 114message RenderFrameImplDeletion { 115 // The intent for the deletion. 116 optional FrameDeleteIntention intent = 1; 117 118 // Whether the frame that's about to be deleted has a pending navigation 119 // commit. 120 optional bool has_pending_commit = 2; 121 122 // Whether the frame that's about to be deleted has a pending cross-document 123 // navigation commit. 124 optional bool has_pending_cross_document_commit = 3; 125 126 // The FrameTreeNode ID of the frame that's about to be deleted. 127 optional uint64 frame_tree_node_id = 4; 128} 129 130// Corresponds to `content::ShouldSwapBrowsingInstance`. 131// Note that the enum values here are not equivalent to the content enum and 132// must be converted explicitly. See `ShouldSwapBrowsingInstanceToProto`. 133enum ShouldSwapBrowsingInstance { 134 // Was used for all "no BrowsingInstance swap" scenarios, now broken down in 135 // separate reasons. 136 SHOULD_SWAP_BROWSING_INSTANCE_NO = 0; 137 138 // Forced BrowsingInstance swap. 139 SHOULD_SWAP_BROWSING_INSTANCE_YES_FORCE_SWAP = 1; 140 141 // Proactive BrowsingInstance swap for cross-site navigation. 142 SHOULD_SWAP_BROWSING_INSTANCE_YES_CROSS_SITE_PROACTIVE_SWAP = 2; 143 144 // Proactive BrowsingInstance swap for same-site navigation. 145 SHOULD_SWAP_BROWSING_INSTANCE_YES_SAME_SITE_PROACTIVE_SWAP = 3; 146 147 SHOULD_SWAP_BROWSING_INSTANCE_NO_PROACTIVE_SWAP_DISABLED = 4; 148 SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_MAIN_FRAME = 5; 149 SHOULD_SWAP_BROWSING_INSTANCE_NO_HAS_RELATED_ACTIVE_CONTENTS = 6; 150 SHOULD_SWAP_BROWSING_INSTANCE_NO_DOES_NOT_HAVE_SITE = 7; 151 SHOULD_SWAP_BROWSING_INSTANCE_NO_SOURCE_URL_SCHEME_NOT_HTTP_OR_HTTPS = 8; 152 SHOULD_SWAP_BROWSING_INSTANCE_NO_DESTINATION_URL_SCHEME_NOT_HTTP_OR_HTTPS = 9; 153 SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_SITE_NAVIGATION = 10; 154 SHOULD_SWAP_BROWSING_INSTANCE_NO_RELOADING_ERROR_PAGE = 11; 155 SHOULD_SWAP_BROWSING_INSTANCE_NO_ALREADY_HAS_MATCHING_BROWSING_INSTANCE = 12; 156 SHOULD_SWAP_BROWSING_INSTANCE_NO_RENDERER_DEBUG_URL = 13; 157 SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_NEEDED_FOR_BACK_FORWARD_CACHE = 14; 158 SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_DOCUMENT_NAVIGATION = 15; 159 SHOULD_SWAP_BROWSING_INSTANCE_NO_SAME_URL_NAVIGATION = 16; 160 SHOULD_SWAP_BROWSING_INSTANCE_NO_WILL_REPLACE_ENTRY = 17; 161 SHOULD_SWAP_BROWSING_INSTANCE_NO_RELOAD = 18; 162 SHOULD_SWAP_BROWSING_INSTANCE_NO_GUEST = 19; 163 SHOULD_SWAP_BROWSING_INSTANCE_NO_HAS_NOT_COMMITTED_ANY_NAVIGATION = 20; 164 // The following reason was deprecated from https://crrev.com/c/3858766 165 SHOULD_SWAP_BROWSING_INSTANCE_NO_UNLOAD_HANDLER_EXISTS_ON_SAME_SITE_NAVIGATION = 166 21; 167 SHOULD_SWAP_BROWSING_INSTANCE_NO_NOT_PRIMARY_MAIN_FRAME = 22; 168 SHOULD_SWAP_BROWSING_INSTANCE_NO_INITIATOR_REQUESTED_NO_PROACTIVE_SWAP = 23; 169} 170 171message ShouldSwapBrowsingInstancesResult { 172 // The FrameTreeNode ID. 173 optional uint64 frame_tree_node_id = 1; 174 175 // Whether a navigation will do a BrowsingInstance swap or not. 176 optional ShouldSwapBrowsingInstance result = 2; 177} 178 179message FrameTreeNodeInfo { 180 // The FrameTreeNode ID. 181 optional uint64 frame_tree_node_id = 1; 182 183 // Whether the frame is a main frame or not. 184 optional bool is_main_frame = 2; 185 186 // Whether there's a speculative RenderFrameHost or not. 187 optional bool has_speculative_render_frame_host = 3; 188 189 optional RenderFrameHost current_frame_host = 4; 190 optional RenderFrameHost speculative_frame_host = 5; 191 192 // NOTE: this proto must be kept consistent with 193 // content::FrameType. 194 enum FrameType { 195 UNSPECIFIED_FRAME_TYPE = 0; 196 SUBFRAME = 1; 197 PRIMARY_MAIN_FRAME = 2; 198 PRERENDER_MAIN_FRAME = 3; 199 FENCED_FRAME_ROOT = 4; 200 } 201 202 optional FrameType frame_type = 6; 203 204 // Additional untyped debug information associated with this 205 // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API. 206 repeated DebugAnnotation debug_annotations = 99; 207} 208 209message ChromeHashedPerformanceMark { 210 optional uint32 site_hash = 1; 211 optional string site = 2; 212 optional uint32 mark_hash = 3; 213 optional string mark = 4; 214 215 // A randomly generated unique identifier for a given ExecutionContext 216 // (document, worker, etc). Used to be able to correlate events in a process 217 // where there are multiple execution contexts from the same site. 218 optional uint32 execution_context_id = 5; 219 220 // Indicates the sequence number of this particular mark being emitted from 221 // a particular site in the scope of a single ExecutionContext. Typical 222 // sites emit batches of events that are correlated in time (a thing started, 223 // a thing reached a given milestone, a thing completed). When these events 224 // are intermixed it is useful to know which ones are semantically related. 225 // The value is generated by the content itself, but shifted by a fixed 226 // random offset at runtime so as to limit usage as a side channel. 227 optional uint32 sequence_number = 6; 228} 229 230// Sent on SQL errors where we need string diagnostics. Corresponds to 231// `Database::DatabaseDiagnostics` in the Chrome SQL code. Does not contain any 232// PII, because the bound values are not included in the SQL statement. 233message ChromeSqlDiagnostics { 234 optional int32 reported_sqlite_error_code = 1; 235 optional int32 error_code = 2; 236 optional int32 last_errno = 3; 237 optional string sql_statement = 4; 238 optional int32 version = 5; 239 240 // Most rows in 'sql_schema' have a non-NULL 'sql' column. Those rows' 'sql' 241 // contents are logged here, one element per row. 242 repeated string schema_sql_rows = 6; 243 244 // Some rows of 'sql_schema' have a NULL 'sql' column. They are typically 245 // autogenerated indices, like "sqlite_autoindex_downloads_slices_1". These 246 // are also logged here by their 'name' column, one element per row. 247 repeated string schema_other_row_names = 7; 248 249 optional bool has_valid_header = 8; 250 optional bool has_valid_schema = 9; 251 optional string error_message = 10; 252} 253 254message ChromeWebAppBadNavigate { 255 optional bool is_kiosk = 1; 256 optional bool has_hosted_app_controller = 2; 257 optional string app_name = 3; 258 optional uint32 system_app_type = 4; 259 optional bool web_app_provider_registry_ready = 5; 260 optional bool system_web_app_manager_synchronized = 6; 261} 262 263// These IDs are generated at compile time and differ for each chrome version. 264// IDs are stable on for a given chrome version but are changing when resources 265// are added or removed to chrome. 266message ResourceBundle { 267 optional uint32 resource_id = 1; 268} 269 270// Information about RenderProcessHost. 271message RenderProcessHost { 272 // Unique Id to identify the RenderProcessHost. This is the browser-side, 273 // persistent id for this RenderProcessHost that stays constant even across OS 274 // layer processes managed by this RenderProcessHost. 275 optional uint32 id = 1; 276 // See ProcessLock::ToString(). 277 optional string process_lock = 2; 278 // The PID of the child process. 279 optional int32 child_process_id = 3; 280 281 // Details about the associated browser context. 282 optional ChromeBrowserContext browser_context = 4; 283 284 // Additional untyped debug information associated with this 285 // RenderProcessHost, populated via TracedProto::AddDebugAnnotations API. 286 repeated DebugAnnotation debug_annotations = 99; 287} 288 289message RenderProcessHostListener { 290 // Routing ID of the listener to the RenderProcessHost, recorded when a new ID 291 // is added or when an ID is removed. 292 optional uint32 routing_id = 1; 293} 294 295message RenderProcessHostCleanup { 296 // Number of IPC listeners registered to the host when Cleanup() was called. 297 optional uint32 listener_count = 1; 298 // Number of "keep alive" references active in the RenderProcessHost, recorded 299 // when Cleanup() was called. 300 optional uint32 keep_alive_ref_count = 2; 301 // Number of "shutdown delay" references active in the RenderProcessHost, 302 // recorded when Cleanup() was called. 303 optional uint32 shutdown_delay_ref_count = 3; 304 // Number of "worker delay" references active in the RenderProcessHost, 305 // recorded when Cleanup() was called. 306 optional uint32 worker_ref_count = 4; 307 // Number of "pending reuse" references active in the RenderProcessHost, 308 // recorded when Cleanup() was called. 309 optional uint32 pending_reuse_ref_count = 5; 310 // Number of NavigationStateKeepAlive references active in the 311 // RenderProcessHost, recorded when Cleanup() was called. 312 optional uint32 navigation_state_keepalive_count = 6; 313} 314 315message ChildProcessLauncherPriority { 316 // True if the new priority set to background. 317 optional bool is_backgrounded = 1; 318 // True if the renderer proecss has pending views. 319 optional bool has_pending_views = 2; 320 321 // Importance of the child process in Android. 322 enum Importance { 323 IMPORTANCE_NORMAL = 1; 324 IMPORTANCE_MODERATE = 2; 325 IMPORTANCE_IMPORTANT = 3; 326 } 327 optional Importance importance = 3; 328} 329 330// Information that identifies a Chrome Extension. 331message ChromeExtensionId { 332 // Unique id that identifies a Chrome Extension. 333 optional string extension_id = 1; 334 335 // Pseudonymized `extension_id` field (see also 336 // content::PseudonymizationUtil::PseudonymizeString method). 337 optional uint32 pseudonymized_extension_id = 2; 338} 339 340message SiteInstance { 341 // The ID of the SiteInstance. 342 optional int32 site_instance_id = 1; 343 344 // The ID of the BrowsingInstance that the SiteInstance belongs to. 345 optional int32 browsing_instance_id = 2; 346 347 // Whether the SiteInstance is the "default SiteInstance" or not. Non-isolated 348 // sites on Android are not assigned to their own specific per-site process, 349 // and shares SiteInstances with each other (the default SiteInstance). 350 optional bool is_default = 3; 351 352 // Whether this SiteInstance has a running process associated with it. 353 optional bool has_process = 4; 354 355 // Returns the total active WebContents count for this SiteInstance and all 356 // related SiteInstances in the same BrowsingInstance. 357 optional int32 related_active_contents_count = 5; 358 359 // The number of active RenderFrameHosts this SiteInstance's SiteInstanceGroup 360 // has. 361 optional int32 active_rfh_count = 6; 362 363 // The SiteInstanceGroup this SiteInstance belongs to. 364 optional SiteInstanceGroup site_instance_group = 7; 365 366 // Additional untyped debug information associated with this 367 // SiteInstance, populated via TracedProto::AddDebugAnnotations API. 368 repeated DebugAnnotation debug_annotations = 99; 369} 370 371message SiteInstanceGroup { 372 // The ID of the SiteInstanceGroup. 373 optional int32 site_instance_group_id = 1; 374 375 // The number of active frames in this SiteInstanceGroup. 376 optional int32 active_frame_count = 2; 377 378 // The process ID of the SiteInstanceGroup. 379 optional RenderProcessHost process = 3; 380 381 // Additional untyped debug information associated with this 382 // SiteInstanceGroup, populated via TracedProto::AddDebugAnnotations API. 383 repeated DebugAnnotation debug_annotations = 99; 384} 385 386// Next ID: 7 387message RenderViewHost { 388 // The RenderViewHostMapId for the RenderViewHost. 389 optional int32 rvh_map_id = 1; 390 391 // The routing ID for the RenderViewHost. 392 optional int32 routing_id = 2; 393 394 // The process ID of the RenderViewHost. Deprecated in favour of |process|. 395 optional int32 process_id = 3; 396 397 // Process this RenderViewHost is associated with. 398 optional RenderProcessHost process = 6; 399 400 // Whether the RenderViewHost is in back/forward cache or not. 401 optional bool is_in_back_forward_cache = 4; 402 403 // Whether the renderer-side RenderView is created. 404 optional bool renderer_view_created = 5; 405 406 // Additional untyped debug information associated with this 407 // RenderViewHost, populated via TracedProto::AddDebugAnnotations API. 408 repeated DebugAnnotation debug_annotations = 99; 409} 410 411message RenderFrameProxyHost { 412 // The routing ID for the RenderFrameProxyHost. 413 optional int32 routing_id = 1; 414 415 // The process ID of the RenderFrameProxyHost. 416 optional int32 process_id = 2; 417 418 // The RenderViewHostMapId of the RenderViewHost associated with the 419 // RenderFrameProxyHost. 420 optional int32 rvh_map_id = 3; 421 422 // The SiteInstanceId of the SiteInstance associated with the 423 // RenderFrameProxyHost. 424 optional int32 site_instance_id = 4; 425 426 // Whether the renderer-side RenderFrameProxy is live or not. 427 optional bool is_render_frame_proxy_live = 5; 428 429 // The SiteInstanceGroupId of the SiteInstanceGroup associated with the 430 // RenderFrameProxyHost. 431 optional int32 site_instance_group_id = 6; 432 433 // Additional untyped debug information associated with this 434 // RenderFrameProxyHost, populated via TracedProto::AddDebugAnnotations API. 435 repeated DebugAnnotation debug_annotations = 99; 436} 437 438message AndroidView { 439 optional int32 id = 1; 440 optional int32 parent_id = 2; 441 optional bool is_shown = 3; 442 optional bool is_dirty = 4; 443 optional string class_name = 5; 444 optional string resource_name = 6; 445} 446 447message AndroidActivity { 448 optional string name = 1; 449 repeated AndroidView view = 2; 450} 451 452message AndroidViewDump { 453 repeated AndroidActivity activity = 1; 454} 455 456message ParkableStringCompressInBackground { 457 // The size of the string that is being compressed, in bytes. 458 optional int32 size_bytes = 1; 459} 460 461message ParkableStringUnpark { 462 // The size of the string that is being unparked, in bytes. 463 optional int32 size_bytes = 1; 464 465 // The elapsed time since the string was written to disk (in seconds), or -1 466 // if it hadn't yet been written to disk. 467 optional int32 time_since_last_disk_write_sec = 2; 468} 469 470message ChromeSamplingProfilerSampleCollected { 471 optional int32 frame_count = 1; 472 473 enum WriteStatus { 474 WRITE_STATUS_NONE = 0; 475 WRITE_STATUS_BUFFERING_SAMPLE = 1; 476 WRITE_STATUS_WRITING_BUFFERED = 2; 477 WRITE_STATUS_WRITING_TO_TRACE = 3; 478 } 479 optional WriteStatus write_status = 2; 480 481 optional int32 sampled_thread_id = 3; 482} 483 484// Reports the latency caused by each breakdown in the 485// SendBeginMainFrameToCommit stage of the PipelineReporter. 486message SendBeginMainFrameToCommitBreakdown { 487 // Handle input events breakdown 488 optional uint64 handle_input_events_us = 1; 489 490 // Animate breakdown 491 optional uint64 animate_us = 2; 492 493 // Style update breakdown 494 optional uint64 style_update_us = 3; 495 496 // Layout update breakdown 497 optional uint64 layout_update_us = 4; 498 499 // Accessibility update breakdown 500 optional uint64 accessibility_update_us = 12; 501 502 // Prepaint breakdown 503 optional uint64 prepaint_us = 5; 504 505 // Compositing inputs breakdown 506 optional uint64 compositing_inputs_us = 6; 507 508 // Compositing assignments breakdown 509 optional uint64 compositing_assignments_us = 7; 510 511 // Paint breakdown 512 optional uint64 paint_us = 8; 513 514 // Composite commit breakdown 515 optional uint64 composite_commit_us = 9; 516 517 // Update layers breakdown 518 optional uint64 update_layers_us = 10; 519 520 // Beginmainsenttostarted breakdown 521 optional uint64 begin_main_sent_to_started_us = 11; 522} 523 524message GlobalRenderFrameHostId { 525 optional int32 routing_id = 1; 526 optional int32 process_id = 2; 527} 528 529message BrowsingContextState { 530 // The ID of the BrowsingInstance that the BrowsingContextState belongs to. 531 optional int32 browsing_instance_id = 1; 532 533 // The ID of the CoopRelatedGroup that the BrowsingContextState belongs to. 534 optional int32 coop_related_group_id = 2 [deprecated = true]; 535 536 // The token of the CoopRelatedGroup that the BrowsingContextState belongs to. 537 optional string coop_related_group_token = 3; 538 539 // Additional untyped debug information associated with this 540 // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API. 541 repeated DebugAnnotation debug_annotations = 99; 542} 543 544message RenderFrameHost { 545 optional RenderProcessHost process = 1; 546 optional GlobalRenderFrameHostId render_frame_host_id = 2; 547 548 // NOTE: this proto must be kept consistent with 549 // RenderFrameHostImpl::LifecycleStateImpl. 550 enum LifecycleState { 551 UNSPECIFIED = 0; 552 SPECULATIVE = 1; 553 PENDING_COMMIT = 2; 554 PRERENDERING = 3; 555 ACTIVE = 4; 556 IN_BACK_FORWARD_CACHE = 5; 557 RUNNING_UNLOAD_HANDLERS = 6; 558 READY_TO_BE_DELETED = 7; 559 } 560 561 optional LifecycleState lifecycle_state = 3; 562 optional string origin = 4; 563 optional string url = 5; 564 optional uint64 frame_tree_node_id = 6; 565 optional SiteInstance site_instance = 7; 566 optional RenderFrameHost parent = 8; 567 optional RenderFrameHost outer_document = 9; 568 optional RenderFrameHost embedder = 10; 569 optional BrowsingContextState browsing_context_state = 11; 570 optional FrameTreeNodeInfo.FrameType frame_type = 12; 571 572 // Additional untyped debug information associated with this 573 // RenderViewHost, populated via TracedProto::AddDebugAnnotations API. 574 repeated DebugAnnotation debug_annotations = 99; 575} 576 577message ChromeThreadPoolTask { 578 enum Priority { 579 PRIORITY_UNSPECIFIED = 0; 580 PRIORITY_BEST_EFFORT = 1; 581 PRIORITY_USER_VISIBLE = 2; 582 PRIORITY_USER_BLOCKING = 3; 583 } 584 585 enum ExecutionMode { 586 EXECTUION_MODE_UNSPECIFIED = 0; 587 EXECUTION_MODE_PARALLEL = 1; 588 EXECUTION_MODE_SEQUENCED = 2; 589 EXECUTION_MODE_SINGLE_THREAD = 3; 590 EXECUTION_MODE_JOB = 4; 591 } 592 593 enum ShutdownBehavior { 594 SHUTDOWN_BEHAVIOR_UNSPECIFIED = 0; 595 SHUTDOWN_BEHAVIOR_CONTINUE_ON_SHUTDOWN = 1; 596 SHUTDOWN_BEHAVIOR_SKIP_ON_SHUTDOWN = 2; 597 SHUTDOWN_BEHAVIOR_BLOCK_SHUTDOWN = 3; 598 } 599 600 optional Priority task_priority = 1; 601 optional ExecutionMode execution_mode = 2; 602 optional int64 sequence_token = 3; 603 optional ShutdownBehavior shutdown_behavior = 4; 604} 605 606// TODO(crbug.com/40797026): Add more information. 607message BackForwardCacheCanStoreDocumentResult { 608 enum BackForwardCacheNotRestoredReason { 609 NOT_MAIN_FRAME = 1; 610 // BackForwardCache is disabled due to low memory device, base::Feature or 611 // command line. Note that the more specific NotRestoredReasons 612 // BACK_FORWARD_CACHE_DISABLED_BY_LOW_MEMORY and 613 // BACK_FORWARD_CACHE_DISABLED_BY_COMMAND_LINE will also be set as other 614 // reasons along with this when appropriate. 615 BACK_FORWARD_CACHE_DISABLED = 2; 616 RELATED_ACTIVE_CONTENTS_EXIST = 3; 617 HTTP_STATUS_NOT_OK = 4; 618 SCHEME_NOT_HTTP_OR_HTTPS = 5; 619 LOADING = 6; 620 WAS_GRANTED_MEDIA_ACCESS = 7; 621 BLOCKLISTED_FEATURES = 8; 622 DISABLE_FOR_RENDER_FRAME_HOST_CALLED = 9; 623 DOMAIN_NOT_ALLOWED = 10; 624 HTTP_METHOD_NOT_GET = 11; 625 SUBFRAME_IS_NAVIGATING = 12; 626 TIMEOUT = 13; 627 CACHE_LIMIT = 14; 628 JAVASCRIPT_EXECUTION = 15; 629 RENDERER_PROCESS_KILLED = 16; 630 RENDERER_PROCESS_CRASHED = 17; 631 GRANTED_MEDIA_STREAM_ACCESS = 19; 632 SCHEDULER_TRACKED_FEATURE_USED = 20; 633 CONFLICTING_BROWSING_INSTANCE = 21; 634 CACHE_FLUSHED = 22; 635 SERVICE_WORKER_VERSION_ACTIVATION = 23; 636 SESSION_RESTORED = 24; 637 UNKNOWN = 25; 638 SERVICE_WORKER_POST_MESSAGE = 26; 639 ENTERED_BACK_FORWARD_CACHE_BEFORE_SERVICE_WORKER_HOST_ADDED = 27; 640 NOT_MOST_RECENT_NAVIGATION_ENTRY = 28; 641 SERVICE_WORKER_CLAIM = 29; 642 IGNORE_EVENT_AND_EVICT = 30; 643 HAVE_INNER_CONTENTS = 31; 644 TIMEOUT_PUTTING_IN_CACHE = 32; 645 // BackForwardCache is disabled due to low memory device. 646 BACK_FORWARD_CACHE_DISABLED_BY_LOW_MEMORY = 33; 647 // BackForwardCache is disabled due to command-line switch (may include 648 // cases where the embedder disabled it due to, e.g., enterprise policy). 649 BACK_FORWARD_CACHE_DISABLED_BY_COMMAND_LINE = 34; 650 NETWORK_REQUEST_REDIRECTED = 35; 651 NETWORK_REQUEST_TIMEOUT = 36; 652 NETWORK_EXCEEDS_BUFFER_LIMIT = 37; 653 NAVIGATION_CANCELLED_WHILE_RESTORING = 38; 654 BACK_FORWARD_CACHE_DISABLED_FOR_PRERENDER = 39; 655 USER_AGENT_OVERRIDE_DIFFERS = 40; 656 NETWORK_REQUEST_DATAPIPE_DRAINED_AS_BYTES_CONSUMER = 41; 657 FOREGROUND_CACHE_LIMIT = 42; 658 BROWSING_INSTANCE_NOT_SWAPPED = 43; 659 BACK_FORWARD_CACHE_DISABLED_FOR_DELEGATE = 44; 660 OPT_IN_UNLOAD_HEADER_NOT_PRESENT = 45; 661 UNLOAD_HANDLER_EXISTS_IN_MAIN_FRAME = 46; 662 UNLOAD_HANDLER_EXISTS_IN_SUBFRAME = 47; 663 SERVICE_WORKER_UNREGISTRATION = 48; 664 CACHE_CONTROL_NO_STORE = 49; 665 CACHE_CONTROL_NO_STORE_COOKIE_MODIFIED = 50; 666 CACHE_CONTROL_NO_STORE_HTTP_ONLY_COOKIE_MODIFIED = 51; 667 NO_RESPONSE_HEAD = 52; 668 ACTIVATION_NAVIGATION_DISALLOWED_FOR_BUG_1234857 = 53; 669 ERROR_DOCUMENT = 54; 670 FENCED_FRAMES_EMBEDDER = 55; 671 COOKIE_DISABLED = 56; 672 HTTP_AUTH_REQUIRED = 57; 673 COOKIE_FLUSHED = 58; 674 BROADCAST_CHANNEL_ON_MESSAGE = 59; 675 WEBVIEW_SETTINGS_CHANGED = 60; 676 WEBVIEW_JAVASCRIPT_OBJECT_CHANGED = 61; 677 WEBVIEW_MESSAGE_LISTENER_INJECTED = 62; 678 WEBVIEW_SAFE_BROWSING_ALLOWLIST_CHANGED = 63; 679 WEBVIEW_DOCUMENT_START_JAVASCRIPT_CHANGED = 64; 680 } 681 682 optional BackForwardCacheNotRestoredReason 683 back_forward_cache_not_restored_reason = 1; 684} 685 686message RendererMainThreadTaskExecution { 687 enum TaskType { 688 TASK_TYPE_UNKNOWN = 0; 689 TASK_TYPE_DOM_MANIPULATION = 1; 690 TASK_TYPE_USER_INTERACTION = 2; 691 TASK_TYPE_NETWORKING = 3; 692 TASK_TYPE_NETWORKING_CONTROL = 4; 693 TASK_TYPE_HISTORY_TRAVERSAL = 5; 694 TASK_TYPE_EMBED = 6; 695 TASK_TYPE_MEDIA_ELEMENT_EVENT = 7; 696 TASK_TYPE_CANVAS_BLOB_SERIALIZATION = 8; 697 TASK_TYPE_MICROTASK = 9; 698 TASK_TYPE_JAVASCRIPT_TIMER_DELAYED_HIGH_NESTING = 10; 699 TASK_TYPE_REMOTE_EVENT = 11; 700 TASK_TYPE_WEB_SOCKET = 12; 701 TASK_TYPE_POSTED_MESSAGE = 13; 702 TASK_TYPE_UNSHIPPED_PORT_MESSAGE = 14; 703 TASK_TYPE_FILE_READING = 15; 704 TASK_TYPE_DATABASE_ACCESS = 16; 705 TASK_TYPE_PRESENTATION = 17; 706 TASK_TYPE_SENSOR = 18; 707 TASK_TYPE_PERFORMANCE_TIMELINE = 19; 708 TASK_TYPE_WEB_GL = 20; 709 TASK_TYPE_IDLE_TASK = 21; 710 TASK_TYPE_MISC_PLATFORM_API = 22; 711 TASK_TYPE_INTERNAL_DEFAULT = 23; 712 TASK_TYPE_INTERNAL_LOADING = 24; 713 714 TASK_TYPE_INTERNAL_TEST = 26; 715 TASK_TYPE_INTERNAL_WEB_CRYPTO = 27; 716 717 TASK_TYPE_INTERNAL_MEDIA = 29; 718 TASK_TYPE_INTERNAL_MEDIA_REALTIME = 30; 719 720 TASK_TYPE_INTERNAL_USER_INTERACTION = 32; 721 TASK_TYPE_INTERNAL_INSPECTOR = 33; 722 723 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_V8 = 37; 724 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_COMPOSITOR = 38; 725 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_DEFAULT = 39; 726 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_INPUT = 40; 727 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_IDLE = 41; 728 729 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_CONTROL = 43; 730 TASK_TYPE_INTERNAL_INTERSECTION_OBSERVER = 44; 731 TASK_TYPE_COMPOSITOR_THREAD_TASK_QUEUE_DEFAULT = 45; 732 TASK_TYPE_WORKER_THREAD_TASK_QUEUE_DEFAULT = 46; 733 TASK_TYPE_WORKER_THREAD_TASK_QUEUE_V8 = 47; 734 TASK_TYPE_WORKER_THREAD_TASK_QUEUE_COMPOSITOR = 48; 735 TASK_TYPE_COMPOSITOR_THREAD_TASK_QUEUE_INPUT = 49; 736 737 // TODO(crbug.com/40583778): Obsolete. Remove. 738 TASK_TYPE_NETWORKING_WITH_URL_LOADER_ANNOTATION = 50; 739 740 TASK_TYPE_WORKER_ANIMATION = 51; 741 742 TASK_TYPE_INTERNAL_TRANSLATION = 55; 743 TASK_TYPE_FONT_LOADING = 56; 744 TASK_TYPE_APPLICATION_LIFECYCLE = 57; 745 TASK_TYPE_BACKGROUND_FETCH = 58; 746 TASK_TYPE_PERMISSION = 59; 747 TASK_TYPE_SERVICE_WORKER_CLIENT_MESSAGE = 60; 748 TASK_TYPE_INTERNAL_CONTENT_CAPTURE = 61; 749 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_MEMORY_PURGE = 62; 750 TASK_TYPE_INTERNAL_NAVIGATION_ASSOCIATED = 63; 751 TASK_TYPE_INTERNAL_NAVIGATION_ASSOCIATED_UNFREEZABLE = 64; 752 TASK_TYPE_INTERNAL_CONTINUE_SCRIPT_LOADING = 65; 753 TASK_TYPE_WEB_LOCKS = 66; 754 TASK_TYPE_WEB_SCHEDULING_POSTED_TASK = 67; 755 TASK_TYPE_INTERNAL_FRAME_LIFE_CYCLE_CONTROL = 68; 756 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_NON_WAKING = 69; 757 TASK_TYPE_INTERNAL_FIND_IN_PAGE = 70; 758 TASK_TYPE_INTERNAL_HIGH_PRIORITY_LOCAL_FRAME = 71; 759 TASK_TYPE_JAVASCRIPT_TIMER_IMMEDIATE = 72; 760 TASK_TYPE_JAVASCRIPT_TIMER_DELAYED_LOW_NESTING = 73; 761 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_IPC_TRACKING = 74; 762 TASK_TYPE_NETWORKING_UNFREEZABLE = 75; 763 TASK_TYPE_WAKE_LOCK = 76; 764 TASK_TYPE_INTERNAL_INPUT_BLOCKING = 77; 765 TASK_TYPE_WEB_GPU = 78; 766 TASK_TYPE_INTERNAL_POST_MESSAGE_FORWARDING = 79; 767 TASK_TYPE_INTERNAL_NAVIGATION_CANCELLATION = 80; 768 TASK_TYPE_LOW_PRIORITY_SCRIPT_EXECUTION = 81; 769 TASK_TYPE_STORAGE = 82; 770 TASK_TYPE_NETWORKING_UNFREEZABLE_RENDER_BLOCKING_LOADING = 83; 771 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_V8_USER_VISIBLE = 84; 772 TASK_TYPE_CLIPBOARD = 85; 773 TASK_TYPE_MACHINE_LEARNING = 86; 774 TASK_TYPE_MAIN_THREAD_TASK_QUEUE_V8_BEST_EFFORT = 87; 775 } 776 777 enum FrameType { 778 FRAME_TYPE_UNSPECIFIED = 0; 779 FRAME_TYPE_MAIN_FRAME = 1; 780 FRAME_TYPE_SAME_ORIGIN_SUBFRAME = 2; 781 FRAME_TYPE_CROSS_ORIGIN_SUBFRAME = 3; 782 } 783 784 optional TaskType task_type = 1; 785 786 // FrameScheduler related data 787 optional bool frame_visible = 2; 788 optional bool page_visible = 3; 789 optional FrameType frame_type = 4; 790 optional bool is_ad_frame = 5; 791} 792 793message EventLatency { 794 enum EventType { 795 EVENT_TYPE_UNSPECIFIED = 0; 796 MOUSE_PRESSED = 1; 797 MOUSE_RELEASED = 2; 798 MOUSE_WHEEL = 3; 799 KEY_PRESSED = 4; 800 KEY_RELEASED = 5; 801 TOUCH_PRESSED = 6; 802 TOUCH_RELEASED = 7; 803 TOUCH_MOVED = 8; 804 GESTURE_SCROLL_BEGIN = 9; 805 GESTURE_SCROLL_UPDATE = 10; 806 GESTURE_SCROLL_END = 11; 807 GESTURE_DOUBLE_TAP = 12; 808 GESTURE_LONG_PRESS = 13; 809 GESTURE_LONG_TAP = 14; 810 GESTURE_SHOW_PRESS = 15; 811 GESTURE_TAP = 16; 812 GESTURE_TAP_CANCEL = 17; 813 GESTURE_TAP_DOWN = 18; 814 GESTURE_TAP_UNCONFIRMED = 19; 815 GESTURE_TWO_FINGER_TAP = 20; 816 FIRST_GESTURE_SCROLL_UPDATE = 21; 817 MOUSE_DRAGGED = 22; 818 GESTURE_PINCH_BEGIN = 23; 819 GESTURE_PINCH_END = 24; 820 GESTURE_PINCH_UPDATE = 25; 821 INERTIAL_GESTURE_SCROLL_UPDATE = 26; 822 MOUSE_MOVED_EVENT = 27; 823 } 824 825 optional EventType event_type = 1; 826 optional bool has_high_latency = 2; 827 repeated string high_latency_stage = 3; 828 // This is same as LatencyInfo's trace_id, using the name event_latency_id to 829 // move away from the generic trace_id name used at other places as well. 830 optional int64 event_latency_id = 4; 831 // This is set only for scroll updates and is based on the 832 // Event.ScrollJank.DelayedFramesPercentage.FixedWindow metric. 833 optional bool is_janky_scrolled_frame = 5; 834 // The interval that this frame was produced for according to the 835 // BeginFrameArgs. 836 optional double vsync_interval_ms = 6; 837} 838 839message ProcessSingleton { 840 enum RemoteProcessInteractionResult { 841 INTERACTION_RESULT_UNSPECIFIED = 0; 842 TERMINATE_FAILED = 1; 843 REMOTE_PROCESS_NOT_FOUND = 2; 844 TERMINATE_WAIT_TIMEOUT = 3; 845 RUNNING_PROCESS_NOTIFY_ERROR = 4; 846 TERMINATE_NOT_ENOUGH_PERMISSIONS = 5; 847 REMOTE_PROCESS_SHUTTING_DOWN = 6; 848 PROFILE_UNLOCKED = 7; 849 PROFILE_UNLOCKED_BEFORE_KILL = 8; 850 SAME_BROWSER_INSTANCE = 9; 851 SAME_BROWSER_INSTANCE_BEFORE_KILL = 10; 852 FAILED_TO_EXTRACT_PID = 11; 853 INVALID_LOCK_FILE = 12; 854 ORPHANED_LOCK_FILE = 13; 855 USER_REFUSED_TERMINATION = 14; 856 TERMINATE_SUCCEEDED = 100; 857 } 858 859 enum RemoteHungProcessTerminateReason { 860 TERMINATE_REASON_UNSPECIFIED = 0; 861 USER_ACCEPTED_TERMINATION = 1; 862 NO_VISIBLE_WINDOW_FOUND = 2; 863 NOTIFY_ATTEMPTS_EXCEEDED = 3; 864 SOCKET_WRITE_FAILED = 4; 865 SOCKET_READ_FAILED = 5; 866 } 867 868 optional RemoteProcessInteractionResult remote_process_interaction_result = 1; 869 optional RemoteHungProcessTerminateReason remote_process_terminate_reason = 2; 870} 871 872message NavigationHandle { 873 optional int64 navigation_id = 1; 874 optional bool has_committed = 2; 875 optional bool is_error_page = 3; 876 optional FrameTreeNodeInfo frame_tree_node = 4; 877 optional RenderFrameHost render_frame_host = 5; 878 879 // Additional untyped debug information associated with this 880 // NavigationHandle/Request, populated via TracedProto::AddDebugAnnotations 881 // API. 882 repeated DebugAnnotation debug_annotations = 99; 883} 884 885enum DeviceThermalState { 886 DEVICE_THERMAL_STATE_UNKNOWN = 0; 887 DEVICE_THERMAL_STATE_NOMINAL = 1; 888 DEVICE_THERMAL_STATE_FAIR = 2; 889 DEVICE_THERMAL_STATE_SERIOUS = 3; 890 DEVICE_THERMAL_STATE_CRITICAL = 4; 891} 892 893// Used to log which Android IPC was called and how long it took. 894message AndroidIPC { 895 optional string name = 1; 896 optional int64 dur_ms = 2; 897} 898 899message SequenceManagerTask { 900 enum Priority { 901 UNKNOWN = 0; 902 CONTROL_PRIORITY = 1; 903 HIGHEST_PRIORITY = 2; 904 VERY_HIGH_PRIORITY = 3; 905 HIGH_PRIORITY = 4; 906 NORMAL_PRIORITY = 5; 907 LOW_PRIORITY = 6; 908 BEST_EFFORT_PRIORITY = 7; 909 910 // Renderer-specific priorities. 911 HIGH_PRIORITY_CONTINUATION = 8; 912 NORMAL_PRIORITY_CONTINUATION = 9; 913 LOW_PRIORITY_CONTINUATION = 10; 914 EXTREMELY_HIGH_PRIORITY = 11; 915 } 916 917 enum QueueName { 918 UNKNOWN_TQ = 0; 919 DEFAULT_TQ = 1; 920 TASK_ENVIRONMENT_DEFAULT_TQ = 2; 921 TEST2_TQ = 3; 922 TEST_TQ = 4; 923 CONTROL_TQ = 5; 924 925 SUBTHREAD_CONTROL_TQ = 6; 926 SUBTHREAD_DEFAULT_TQ = 7; 927 SUBTHREAD_INPUT_TQ = 8; 928 929 UI_BEST_EFFORT_TQ = 9; 930 UI_BOOTSTRAP_TQ = 10; 931 UI_CONTROL_TQ = 11; 932 UI_DEFAULT_TQ = 12; 933 UI_NAVIGATION_NETWORK_RESPONSE_TQ = 13; 934 UI_RUN_ALL_PENDING_TQ = 14; 935 UI_SERVICE_WORKER_STORAGE_CONTROL_RESPONSE_TQ = 15; 936 UI_THREAD_TQ = 16; 937 UI_USER_BLOCKING_TQ = 17; 938 UI_USER_INPUT_TQ = 18; 939 UI_USER_VISIBLE_TQ = 19; 940 941 IO_BEST_EFFORT_TQ = 20; 942 IO_BOOTSTRAP_TQ = 21; 943 IO_CONTROL_TQ = 22; 944 IO_DEFAULT_TQ = 23; 945 IO_NAVIGATION_NETWORK_RESPONSE_TQ = 24; 946 IO_RUN_ALL_PENDING_TQ = 25; 947 IO_SERVICE_WORKER_STORAGE_CONTROL_RESPONSE_TQ = 26; 948 IO_THREAD_TQ = 27; 949 IO_USER_BLOCKING_TQ = 28; 950 IO_USER_INPUT_TQ = 29; 951 IO_USER_VISIBLE_TQ = 30; 952 953 COMPOSITOR_TQ = 31; 954 DETACHED_TQ = 32; 955 FRAME_DEFERRABLE_TQ = 33; 956 FRAME_LOADING_CONTROL_TQ = 34; 957 FRAME_LOADING_TQ = 35; 958 FRAME_PAUSABLE_TQ = 36; 959 FRAME_THROTTLEABLE_TQ = 37; 960 FRAME_UNPAUSABLE_TQ = 38; 961 IDLE_TQ = 39; 962 INPUT_TQ = 40; 963 IPC_TRACKING_FOR_CACHED_PAGES_TQ = 41; 964 NON_WAKING_TQ = 42; 965 OTHER_TQ = 43; 966 V8_TQ = 44; 967 WEB_SCHEDULING_TQ = 45; 968 969 WORKER_IDLE_TQ = 46; 970 WORKER_PAUSABLE_TQ = 47; 971 WORKER_THREAD_INTERNAL_TQ = 48; 972 WORKER_THROTTLEABLE_TQ = 49; 973 WORKER_UNPAUSABLE_TQ = 50; 974 WORKER_WEB_SCHEDULING_TQ = 51; 975 976 UI_USER_BLOCKING_DEFERRABLE_TQ = 52; 977 IO_USER_BLOCKING_DEFERRABLE_TQ = 53; 978 979 UI_BEFORE_UNLOAD_BROWSER_RESPONSE_TQ = 54; 980 IO_BEFORE_UNLOAD_BROWSER_RESPONSE_TQ = 55; 981 982 V8_USER_VISIBLE_TQ = 56; 983 V8_BEST_EFFORT_TQ = 57; 984 } 985 986 optional Priority priority = 1; 987 optional QueueName queue_name = 2; 988} 989 990message AndroidToolbar { 991 enum BlockCaptureReason { 992 BLOCKED_UNKNOWN = 0; 993 BLOCKED_TOOLBAR_OR_RESULT_NULL = 1; 994 BLOCKED_VIEW_NOT_DIRTY = 2; 995 BLOCKED_SNAPSHOT_SAME = 3; 996 BLOCKED_URL_BAR_HAS_FOCUS = 4; 997 BLOCKED_URL_BAR_FOCUS_IN_PROGRESS = 5; 998 BLOCKED_OPTIONAL_BUTTON_ANIMATION_IN_PROGRESS = 6; 999 BLOCKED_STATUS_ICON_ANIMATION_IN_PROGRESS = 7; 1000 BLOCKED_SCROLL_ABLATION = 8; 1001 BLOCKED_BROWSER_CONTROLS_LOCKED = 9; 1002 BLOCKED_TAB_SWITCHER_MODE = 10; 1003 BLOCKED_COMPOSITOR_IN_MOTION = 11; 1004 BLOCKED_NTP_Y_TRANSLATION = 12; 1005 BLOCKED_FULLSCREEN = 13; 1006 } 1007 enum AllowCaptureReason { 1008 ALLOWED_UNKNOWN = 0; 1009 ALLOWED_FORCE_CAPTURE = 1; 1010 ALLOWED_SNAPSHOT_DIFFERENCE = 2; 1011 } 1012 enum SnapshotDifference { 1013 DIFF_NONE = 0; 1014 DIFF_NULL = 1; 1015 DIFF_TINT = 2; 1016 DIFF_TAB_COUNT = 3; 1017 DIFF_OPTIONAL_BUTTON = 4; 1018 DIFF_VISUAL_STATE = 5; 1019 DIFF_SECURITY_ICON = 6; 1020 DIFF_SHOWING_UPDATE_BADGE = 7; 1021 DIFF_PAINT_PREVIEW = 8; 1022 DIFF_PROGRESS = 9; 1023 DIFF_LOCATION_BAR_WIDTH = 10; 1024 DIFF_URL_TEXT = 11; 1025 DIFF_HOME_BUTTON = 12; 1026 DIFF_TITLE_TEXT = 13; 1027 DIFF_CCT_ANIMATION = 14; 1028 DIFF_BOOKMARK_BUTTON = 15; 1029 DIFF_BACK_BUTTON = 16; 1030 DIFF_FORWARD_BUTTON = 17; 1031 DIFF_RELOAD_BUTTON = 18; 1032 } 1033 1034 optional BlockCaptureReason block_capture_reason = 1; 1035 optional AllowCaptureReason allow_capture_reason = 2; 1036 optional SnapshotDifference snapshot_difference = 3; 1037} 1038 1039message ActiveProcesses { 1040 repeated int32 pid = 1; 1041} 1042 1043message UkmPageLoadTimingUpdate { 1044 // This can be used to uniquely identify a navigation from the point of view 1045 // of UKM. 1046 optional int64 ukm_source_id = 1; 1047 1048 // The URL of a page can change throughout its lifetime. This is the current 1049 // url when this timing update was dispatched. 1050 optional string latest_url = 2; 1051 1052 // Latest fully aggregated value of Cumulative Layout Shift. 1053 optional float latest_cumulative_layout_shift = 3; 1054 1055 // Latest fully aggregated value of Largest Contentful Paint. 1056 optional double latest_largest_contentful_paint_ms = 4; 1057 1058 optional double first_contentful_paint_ms = 5; 1059} 1060 1061// A serialisation of v8StackFrame class. 1062message V8StackFrame { 1063 // Code location (path to the script and line/column number) 1064 message ScriptLocation { 1065 optional string source_url = 1; 1066 optional int64 line_number = 2; 1067 optional int64 column_number = 3; 1068 } 1069 1070 // The name of the function that was called 1071 optional string function_name = 1; 1072 1073 // If the function was defined in a script, contains the location within the 1074 // script. 1075 optional ScriptLocation script_location = 2; 1076} 1077 1078// Serializes the blink::ExecutionContext object. 1079message BlinkExecutionContext { 1080 // Definition of different context types. 1081 enum ContextType { 1082 UNKNOWN_CONTEXT = 0; 1083 WINDOW = 1; 1084 WORKLET = 2; 1085 DEDICATED_WORKER = 3; 1086 SHARED_WORKER = 4; 1087 SERVICE_WORKER = 5; 1088 } 1089 1090 // Definition of world type. 1091 enum WorldType { 1092 WORLD_UNKNOWN = 0; 1093 WORLD_MAIN = 1; 1094 WORLD_ISOLATED = 2; 1095 WORLD_INSPECTOR_ISOLATED = 3; 1096 WORLD_REG_EXP = 4; 1097 WORLD_FOR_V8_CONTEXT_SNAPSHOT_NON_MAIN = 5; 1098 WORLD_WORKER = 6; 1099 WORLD_SHADOW_REALM = 7; 1100 } 1101 1102 optional ContextType type = 1; 1103 // Contains url of frame or worker. 1104 optional string url = 2; 1105 // The origin of the execution context. 1106 optional string origin = 3; 1107 // The world type of the execution context. 1108 optional WorldType world_type = 4; 1109} 1110 1111// Serializes the blink::SourceLocation object. 1112message BlinkSourceLocation { 1113 optional string function_name = 1; 1114 optional int32 script_id = 2; 1115 optional string url = 3; 1116 optional int32 line_number = 4; 1117 optional int32 column_number = 5; 1118 optional string stack_trace = 6; 1119 repeated V8StackFrame stack_frames = 7; 1120} 1121 1122// Contains the meta information for high entropy events (like api calls) 1123// that are to be traced for debugging in the context of identifiability study. 1124message BlinkHighEntropyAPI { 1125 // Serialization of a parameter passed to a javascript function. 1126 // Contains the stringified type of the object and some string representation 1127 // of its value. 1128 message JSFunctionArgument { 1129 // Definition of different types of function parameters. 1130 enum ArgumentType { 1131 UNKNOWN_TYPE = 0; 1132 NULL_TYPE = 1; 1133 UNDEFINED = 2; 1134 BIGINT = 3; 1135 BOOLEAN = 4; 1136 FUNCTION = 5; 1137 NUMBER = 6; 1138 STRING = 7; 1139 SYMBOL = 8; 1140 OBJECT = 9; 1141 } 1142 optional ArgumentType type = 1; 1143 optional string value = 2; 1144 } 1145 1146 // Describes a Javascript API call. 1147 message CalledJsApi { 1148 // Contains class and function name of api called 1149 // similar to "Navigator.languages.get". 1150 optional string identifier = 1; 1151 repeated JSFunctionArgument func_arguments = 2; 1152 1153 // Deprecated in favour of outer source_location. Not filled anymore in 1154 // newer versions of chrome. 1155 optional BlinkSourceLocation source_location = 3 [deprecated = true]; 1156 } 1157 optional BlinkExecutionContext execution_context = 1; 1158 optional CalledJsApi called_api = 2; 1159 optional BlinkSourceLocation source_location = 3; 1160 1161 // Describes lookup of a font. 1162 message FontLookup { 1163 enum FontLookupType { 1164 FONT_LOOKUP_UNKNOWN_TYPE = 0; 1165 FONT_LOOKUP_UNIQUE_OR_FAMILY_NAME = 1; 1166 FONT_LOOKUP_UNIQUE_NAME_ONLY = 2; 1167 } 1168 optional FontLookupType type = 1; 1169 optional string name = 2; 1170 optional uint64 weight = 3; 1171 optional uint64 width = 4; 1172 optional uint64 slope = 5; 1173 } 1174 optional FontLookup font_lookup = 4; 1175} 1176 1177// Contains information about a tab switch measurement. 1178message TabSwitchMeasurement { 1179 // Possible outcomes of a tab switch. Maps to 1180 // blink::ContentToVisibleTimeReporter::TabSwitchResult. 1181 enum Result { 1182 RESULT_UNSPECIFIED = 0; 1183 // A frame was successfully presented after a tab switch. 1184 RESULT_SUCCESS = 1; 1185 // Tab was hidden before a frame was presented after a tab switch. 1186 RESULT_INCOMPLETE = 2; 1187 // TabWasShown called twice for a frame without TabWasHidden between. Treat 1188 // the first TabWasShown as an incomplete tab switch. 1189 RESULT_MISSED_TAB_HIDE = 3; 1190 } 1191 1192 // State of the target tab. Corresponds to the suffixes of the 1193 // Browser.TabSwitchResult2.* histograms. 1194 enum TabState { 1195 STATE_UNSPECIFIED = 0; 1196 // The tab has frames in the frame cache, which can be composited in the 1197 // browser process. 1198 STATE_WITH_SAVED_FRAMES = 1; 1199 // The tab has no frames in the frame cache so must be rendered and 1200 // composited in a renderer process. 1201 STATE_LOADED_NO_SAVED_FRAMES = 2; 1202 // The tab has no frames in the frame cache and is not fully loaded, so it 1203 // must be reloaded before it can be rendered and composited in a renderer 1204 // process. 1205 STATE_NOT_LOADED_NO_SAVED_FRAMES = 3; 1206 } 1207 1208 optional Result result = 1; 1209 optional TabState tab_state = 2; 1210} 1211 1212// Data about scroll deltas and offsets. 1213// All values are in physical screen pixels. 1214message ScrollDeltas { 1215 // The trace_id of the current input. 1216 optional int64 trace_id = 1; 1217 // The original delta for current input. That is, this is the delta that 1218 // the Browser receives from Android, but already scaled to the device's 1219 // screen. 1220 optional float original_delta_x = 2; 1221 optional float original_delta_y = 3; 1222 // The trace_id of the input that the current input is coalesced with. 1223 // If input is not coalesced, this field is null. 1224 optional int64 coalesced_to_trace_id = 4; 1225 // The delta which arrived to compositor. 1226 // This is the sum of all the inputs coalesced together 1227 // with the resampler applied to them. 1228 // This delta is used to calculate a |visual_offset|. 1229 optional float provided_to_compositor_delta_x = 5; 1230 optional float provided_to_compositor_delta_y = 6; 1231 // The offset which compositor set. 1232 optional int64 visual_offset_x = 7; 1233 optional int64 visual_offset_y = 8; 1234 1235 // Data which GPU returns. 1236 // Number of inputs which were shown together in one GPU frame. 1237 optional int32 event_count_in_gpu_frame = 9; 1238 // The trace_ids of inputs which were shown together in one GPU frame. 1239 repeated int64 trace_ids_in_gpu_frame = 10; 1240 // The sum of original deltas of inputs which were shown together in one GPU 1241 // frame. 1242 optional float original_delta_in_gpu_frame_y = 11; 1243 // The sum of predicted deltas of inputs which were shown together in one GPU 1244 // frame. 1245 optional float predicted_delta_in_gpu_frame_y = 12; 1246 // The array of original deltas of inputs which were shown together in one GPU 1247 // frame. 1248 repeated float segregated_original_deltas_in_gpu_frame_y = 13; 1249 // The array of predicted deltas of inputs which were shown together in one 1250 // GPU frame. 1251 repeated float segregated_predicted_deltas_in_gpu_frame_y = 14; 1252} 1253 1254// Debug information for system layer of audio rendering on Windows. 1255message WinRenderAudioFromSource { 1256 // Buffer size used by the platform. 1257 optional uint32 iaudioclient_buffer_size_frames = 1; 1258 // Number of available frames in the platform buffer. 1259 optional uint32 iaudioclient_buffer_unfilled_frames = 2; 1260 // Number of frames requested from the audio stream client. 1261 optional uint32 packet_size_frames = 3; 1262 // Total number of frames requested from the client and written to the 1263 // platform buffer during the stream lifetime. 1264 optional uint64 num_written_frames = 4; 1265 // Total number of frames played by the platform during the stream lifetime. 1266 optional uint64 num_played_out_frames = 5; 1267 // Device frequency reported by the platform; used to convert the stream 1268 // position to frames. 1269 optional uint64 iaudioclock_device_frequency = 6; 1270 // Stream position reported by the platform. 1271 optional uint64 iaudioclock_stream_position = 7; 1272 // Performance counter position reported by the platform. 1273 optional uint64 iaudioclock_qpc_position = 8; 1274 // Stream position increase since the last call, converted to milliseconds. 1275 optional int64 iaudioclock_stream_position_increase_ms = 9; 1276 // Performance counter position since the last call, converted to 1277 // milliseconds. 1278 optional int64 iaudioclock_qpc_position_increase_ms = 10; 1279 // Estimated playout delay, milliseconds. 1280 optional int64 playout_delay_ms = 11; 1281}; 1282 1283// Debug information for system layer of audio rendering on Mac. 1284message MacAUHALStream { 1285 // The number of frames that the stream requests from the audio source. 1286 optional int32 input_buffer_size = 1; 1287 // The number of frames that the OS requests for playout. 1288 optional uint32 output_buffer_size = 2; 1289 // Sample rate of the stream. 1290 optional int32 sample_rate = 3; 1291 // The time that the audio requested by the OS is expected to play out. 1292 optional int64 os_request_playout_timeticks_us = 4; 1293 // Total number of frames requested from the audio source. 1294 optional int32 source_request_frames = 5; 1295 // The delay between the request for audio from the source and when the audio 1296 // is expected to be played out. 1297 optional int64 source_request_playout_delay_us = 6; 1298 // The time when the audio that is requested from the source is expected to 1299 // play out. 1300 optional int64 source_request_playout_timeticks_us = 7; 1301 // The time when audio audio is requested from the source. 1302 optional int64 source_request_current_timeticks_us = 8; 1303 // The audio playout latency that comes from hardware, in milliseconds. 1304 optional int64 hardware_latency_us = 9; 1305 // Whether the kAudioTimeStampHostTimeValid is set on the output 1306 // AudioTimeStamp. 1307 optional bool audiotimestamp_host_time_valid = 10; 1308 // The playout time based on the machine time from AudioTimeStamp. 1309 optional int64 audiotimestamp_mach_timeticks_us = 11; 1310 // The time that the audio requested by the os is expected to be consumed by 1311 // the hardware. Measured in frames since the start of playout. 1312 optional double audiotimestamp_sample_time_frames = 12; 1313 // The time that the previous audio requested by the os was expected to be 1314 // consumed by the hardware. Measured in frames since the start of playout. 1315 optional double audiotimestamp_last_sample_time_frames = 13; 1316 // The duration of audio that was estimated to be lost in the case of a 1317 // glitch. 1318 optional int64 lost_audio_duration_us = 14; 1319}; 1320 1321// Debug information for system layer of audio rendering using ALSA on Linux. 1322message LinuxAlsaOutput { 1323 // The delay between the request for audio from the source and when the audio 1324 // is expected to be played out. 1325 optional int64 source_request_playout_delay_us = 1; 1326 // The number of bytes that are already present in the buffer on a call to 1327 // BufferPacket. 1328 optional int32 forward_bytes = 2; 1329 // Sample rate of the stream. 1330 optional int32 sample_rate = 3; 1331 // Delay obtained by the OS in frames. 1332 optional int32 getcurrentdelay_pcm_delay_frames = 4; 1333 // The number of frames in ALSA's buffer. 1334 optional int32 getcurrentdelay_alsa_buffer_frames = 5; 1335 // The number of frames that can be written to in ALSA's buffer. 1336 optional int32 getcurrentdelay_available_frames = 6; 1337 // The final delay that GetCurrentDelay arrives on, in frames. 1338 optional int32 getcurrentdelay_final_delay_frames = 7; 1339}; 1340 1341// Debug information for system layer of audio rendering using Pulse on Linux. 1342message LinuxPulseOutput { 1343 // The delay between the request for audio from the source and when the audio 1344 // is expected to be played out. 1345 optional int64 source_request_playout_delay_us = 1; 1346 // Sample rate of the stream. 1347 optional int32 sample_rate = 2; 1348 // The number of frames that the stream requests from the audio source. 1349 optional int32 input_buffer_size_frames = 3; 1350 // The number of bytes that the OS requests. 1351 optional uint32 stream_request_bytes = 4; 1352 // The number of bytes in a single frame. 1353 optional uint32 frame_size_bytes = 5; 1354}; 1355 1356// Debug information for system layer of audio rendering on ChromeOS. 1357message CrasUnified { 1358 // The total duration of silence due to missing samples during the stream. 1359 optional int64 underrun_duration_us = 1; 1360 // Previous underrun duration, used for calculating the length of silence 1361 // since the last callback. 1362 optional int64 last_underrun_duration_us = 2; 1363 // Difference in total underrun duration since the last callback. Logged only 1364 // when positive, which is when a glitch occurs. 1365 optional int64 underrun_glitch_duration_us = 3; 1366 // OS playout latency reported by cras. 1367 optional int64 latency_us = 4; 1368 // The number of frames that the stream requests from the audio source. 1369 optional int32 requested_frames = 5; 1370 // The number of frames that the source provided. 1371 optional uint32 filled_frames = 6; 1372 // Sample rate of the stream. 1373 optional int32 sample_rate = 7; 1374}; 1375 1376message ChromeUnguessableToken { 1377 optional uint64 low_token = 1; 1378 optional uint64 high_token = 2; 1379} 1380 1381message FrameSinkId { 1382 optional uint32 frame_sink_client_id = 1; 1383 optional uint32 frame_sink_id = 2; 1384} 1385 1386message LocalSurfaceId { 1387 optional uint32 parent_sequence_number = 1; 1388 optional uint32 child_sequence_number = 2; 1389 optional ChromeUnguessableToken unguessable_token = 3; 1390} 1391 1392message ChromeGraphicsPipeline { 1393 enum StepName { 1394 STEP_UNKNOWN = 0; 1395 STEP_DID_NOT_PRODUCE_FRAME = 1; 1396 STEP_DID_NOT_PRODUCE_COMPOSITOR_FRAME = 22; 1397 STEP_GENERATE_COMPOSITOR_FRAME = 2; 1398 STEP_GENERATE_RENDER_PASS = 3; 1399 STEP_ISSUE_BEGIN_FRAME = 4; 1400 STEP_RECEIVE_COMPOSITOR_FRAME = 5; 1401 STEP_RECEIVE_BEGIN_FRAME = 6; 1402 STEP_RECEIVE_BEGIN_FRAME_DISCARD = 7; 1403 STEP_SEND_BEGIN_MAIN_FRAME = 8 [deprecated = true]; 1404 STEP_SUBMIT_COMPOSITOR_FRAME = 9; 1405 STEP_DRAW_AND_SWAP = 21; 1406 STEP_SURFACE_AGGREGATION = 10; 1407 STEP_SEND_BUFFER_SWAP = 11; 1408 STEP_BUFFER_SWAP_POST_SUBMIT = 12; 1409 STEP_FINISH_BUFFER_SWAP = 13; 1410 STEP_SWAP_BUFFERS_ACK = 14; 1411 1412 // While the above steps are part of the cc/viz/gpu pipeline, the STEP_EXO* 1413 // and STEP_BACKEND* are somehow special. 1414 // 1415 // STEP_BACKEND* is platform independent and it can be used to trace any of 1416 // the backends. For example, it perfectly fits in ozone/drm, ozone/wayland 1417 // or x11 and can be set before and after buffer swap or overlay submission 1418 // that helps to understand the flow better. 1419 // 1420 // The STEP_EXO* is used only by EXO (see below). It relies on a trace id 1421 // from a Wayland client, which can use the "augmented_surface" protocol's 1422 // "augmented_surface.set_frame_trace_id" to pass that value. As a result, 1423 // any of the Wayland clients that use EXO will be able to have a nice trace 1424 // connection and see their buffer submissions' flows. 1425 // 1426 // Speaking about the example, Lacros combines both STEP_BACKEND* and 1427 // STEP_EXO* so that developers are able to trace the frame submission from 1428 // Lacros (cc/viz/gpu) to Ozone/Wayland backend, then to EXO and to Ash 1429 // (viz/gpu). 1430 1431 // Frame submission stages when Exo (Wayland server implementation in Ash 1432 // browser process) is involved. Wayland clients (such as Lacros or ARC++) 1433 // submit visual contents via Wayland surface commits, with which Exo 1434 // constructs compositor frames and forwards to Ash Viz. 1435 STEP_EXO_CONSTRUCT_COMPOSITOR_FRAME = 15; 1436 STEP_EXO_SUBMIT_COMPOSITOR_FRAME = 16; 1437 STEP_EXO_DISCARD_COMPOSITOR_FRAME = 17; 1438 1439 // Frame submission stages in backends that viz uses to submit frames to 1440 // the gpu or to the system compositor. See the explanation above how these 1441 // stages can be used. 1442 STEP_BACKEND_SEND_BUFFER_SWAP = 18; 1443 STEP_BACKEND_SEND_BUFFER_POST_SUBMIT = 19; 1444 STEP_BACKEND_FINISH_BUFFER_SWAP = 20; 1445 } 1446 enum FrameSkippedReason { 1447 SKIPPED_REASON_UNKNOWN = 0; 1448 SKIPPED_REASON_RECOVER_LATENCY = 1; 1449 SKIPPED_REASON_NO_DAMAGE = 2; 1450 SKIPPED_REASON_WAITING_ON_MAIN = 3; 1451 SKIPPED_REASON_DRAW_THROTTLED = 4; 1452 } 1453 optional StepName step = 1; 1454 optional FrameSinkId frame_sink_id = 2; 1455 1456 // Id used to link `ChromeGraphicsPipeline`s corresponding to work done by a 1457 // Viz client to produce a frame. This corresponds to 1458 // `viz::BeginFrameAck.trace_id`. Covers steps: 1459 // * STEP_ISSUE_BEGIN_FRAME 1460 // * STEP_RECEIVE_BEGIN_FRAME 1461 // * STEP_GENERATE_RENDER_PASS 1462 // * STEP_GENERATE_COMPOSITOR_FRAME 1463 // * STEP_SUBMIT_COMPOSITOR_FRAME 1464 // * STEP_RECEIVE_COMPOSITOR_FRAME 1465 // * STEP_RECEIVE_BEGIN_FRAME_DISCARD 1466 // * STEP_DID_NOT_PRODUCE_FRAME 1467 // * STEP_DID_NOT_PRODUCE_COMPOSITOR_FRAME 1468 optional int64 surface_frame_trace_id = 10; 1469 1470 // Id used to link `ChromeGraphicsPipeline`s corresponding to work done 1471 // on creating and presenting one frame *after* surface aggregation. Covers 1472 // steps: 1473 // * STEP_DRAW_AND_SWAP 1474 // * STEP_SURFACE_AGGREGATION 1475 // * STEP_SEND_BUFFER_SWAP 1476 // * STEP_BUFFER_SWAP_POST_SUBMIT 1477 // * STEP_FINISH_BUFFER_SWAP 1478 // * STEP_SWAP_BUFFERS_ACK 1479 optional int64 display_trace_id = 3; 1480 1481 // `viz::BeginFrameAck.trace_id`s for frames aggregated at this step. 1482 // Used with `STEP_SURFACE_AGGREGATION` only. This can be "joined" with 1483 // `surface_frame_trace_id`. 1484 repeated int64 aggregated_surface_frame_trace_ids = 8; 1485 1486 optional LocalSurfaceId local_surface_id = 4; 1487 optional int64 frame_sequence = 5; 1488 optional FrameSkippedReason frame_skipped_reason = 6; 1489 1490 // Optional variable that can be set together with STEP_BACKEND*. 1491 optional int64 backend_frame_id = 7; 1492 1493 // List of LatencyInfo.trace_ids associated with this frame, which 1494 // should allow us to match input to frame production. 1495 repeated int64 latency_ids = 9; 1496}; 1497 1498message LibunwindstackUnwinder { 1499 // The enum is a copy of ErrorCode enum inside third_party/libunwindstack, 1500 // ideally this should be in sync with that. 1501 enum ErrorCode { 1502 ERROR_NONE = 0; // No error. 1503 ERROR_MEMORY_INVALID = 1; // Memory read failed. 1504 ERROR_UNWIND_INFO = 2; // Unable to use unwind information to unwind. 1505 ERROR_UNSUPPORTED = 3; // Encountered unsupported feature. 1506 ERROR_INVALID_MAP = 4; // Unwind in an invalid map. 1507 ERROR_MAX_FRAMES_EXCEEDED = 5; // The number of frames exceed the total 1508 // allowed. 1509 ERROR_REPEATED_FRAME = 6; // The last frame has the same pc/sp as the next. 1510 ERROR_INVALID_ELF = 7; // Unwind in an invalid elf. 1511 ERROR_THREAD_DOES_NOT_EXIST = 8; // Attempt to unwind a local thread that 1512 // does not exist. 1513 ERROR_THREAD_TIMEOUT = 9; // Timeout trying to unwind a local thread. 1514 ERROR_SYSTEM_CALL = 10; // System call failed while unwinding. 1515 ERROR_BAD_ARCH = 11; // Arch invalid (none, or mismatched). 1516 ERROR_MAPS_PARSE = 12; // Failed to parse maps data. 1517 ERROR_INVALID_PARAMETER_LIBUNWINDSTACK = 1518 13; // Invalid parameter passed to function. 1519 ERROR_PTRACE_CALL = 14; // Ptrace call failed while unwinding. 1520 } 1521 optional ErrorCode error_code = 1; 1522 optional int32 num_frames = 2; 1523}; 1524 1525message ScrollPredictorMetrics { 1526 message EventFrameValue { 1527 optional int64 event_trace_id = 1; 1528 // The fractional pixels (can be fractional after the predictor adjusts in 1529 // resampling of input) that the page was scrolled by this frame. 1530 optional float delta_value_pixels = 2; 1531 }; 1532 // Data from the previous, current, and next frame used to determine the 1533 // values below as according to the metric doc: 1534 // http://doc/1Y0u0Tq5eUZff75nYUzQVw6JxmbZAW9m64pJidmnGWsY. 1535 optional EventFrameValue prev_event_frame_value = 1; 1536 optional EventFrameValue cur_event_frame_value = 2; 1537 optional EventFrameValue next_event_frame_value = 3; 1538 // This is the amount of delta processed in this frame that was above the 1539 // janky threshold (as defined by 1540 // http://doc/1Y0u0Tq5eUZff75nYUzQVw6JxmbZAW9m64pJidmnGWsY) 1541 optional float janky_value_pixels = 4; 1542 // True if we are also missing frames (so multiple frames are being presented 1543 // at once). 1544 optional bool has_missed_vsyncs = 5; 1545 // True if we're moving less than the slow scroll threshold as defined by the 1546 // doc above. 1547 optional bool is_slow_scroll = 6; 1548}; 1549 1550// 1551// Critical User Interaction metrics 1552// 1553 1554message PageLoad { 1555 optional int64 navigation_id = 1; 1556 optional string url = 2; 1557} 1558 1559message StartUp { 1560 // This enum must be kept up to date with LaunchCauseMetrics.LaunchCause. 1561 enum LaunchCauseType { 1562 UNINITIALIZED = -1; 1563 OTHER = 0; 1564 CUSTOM_TAB = 1; 1565 TWA = 2; 1566 RECENTS = 3; 1567 RECENTS_OR_BACK = 4; 1568 FOREGROUND_WHEN_LOCKED = 5; 1569 MAIN_LAUNCHER_ICON = 6; 1570 MAIN_LAUNCHER_ICON_SHORTCUT = 7; 1571 HOME_SCREEN_WIDGET = 8; 1572 OPEN_IN_BROWSER_FROM_MENU = 9; 1573 EXTERNAL_SEARCH_ACTION_INTENT = 10; 1574 NOTIFICATION = 11; 1575 EXTERNAL_VIEW_INTENT = 12; 1576 OTHER_CHROME = 13; 1577 WEBAPK_CHROME_DISTRIBUTOR = 14; 1578 WEBAPK_OTHER_DISTRIBUTOR = 15; 1579 HOME_SCREEN_SHORTCUT = 16; 1580 SHARE_INTENT = 17; 1581 NFC = 18; 1582 AUTH_TAB = 19; 1583 } 1584 1585 optional int64 activity_id = 1; 1586 // deprecated field 2. 1587 optional LaunchCauseType launch_cause = 3; 1588} 1589 1590message WebContentInteraction { 1591 enum Type { 1592 INTERACTION_UNSPECIFIED = 0; 1593 INTERACTION_KEYBOARD = 1; 1594 INTERACTION_CLICK_TAP = 2; 1595 INTERACTION_DRAG = 3; 1596 } 1597 1598 optional Type type = 1; 1599 optional int64 total_duration_ms = 2; 1600} 1601 1602message ScrollMetrics { 1603 optional int64 frame_count = 1; 1604 optional int64 vsync_count = 2; 1605 optional int64 missed_vsync_max = 3; 1606 optional int64 missed_vsync_sum = 4; 1607 optional int64 delayed_frame_count = 5; 1608 optional int64 predictor_janky_frame_count = 6; 1609} 1610 1611// The EventForwarder is a subsystem in android that forwards events from Java 1612// code to Chromium's native implementation. In this case we register how many 1613// events there was, what time this event occurred and the current x & y on the 1614// device screen (pixels). 1615// 1616// All data comes from MotionEvent getters so read these for more context: 1617// https://developer.android.com/reference/android/view/MotionEvent 1618message EventForwarder { 1619 // The events getHistorySize(). 1620 optional int32 history_size = 1; 1621 // The time of the oldest event (getHistoricalEventTimeNanos(0)). 1622 optional int64 oldest_time_ns = 2; 1623 // The time of the newest event (getEventTimeNanos(0)). 1624 optional int64 latest_time_ns = 5; 1625 // The X coordinate of the event as reported by MotionEvent.getX(). 1626 optional float x_pixel = 3; 1627 // The Y coordinate of the event as reported by MotionEvent.getY(). 1628 optional float y_pixel = 4; 1629 // Determine if the previous forwarded event changed x coordinate. 1630 optional bool has_x_movement = 6; 1631 // Determine if the previous forwarded event changed y coordinate. 1632 optional bool has_y_movement = 7; 1633} 1634 1635// TouchDispositionGestureFilter is a class on android that detects and forwards 1636// along gesture events based on touch acks and other information. 1637message TouchDispositionGestureFilter { 1638 // The number of gesture's inside of a GestureEventDataPacket. 1639 optional int32 gesture_count = 1; 1640} 1641 1642message ViewClassName { 1643 // The name associated with a View class in browser UI. The class name is set 1644 // by the view class itself through metadata macros and contains no data that 1645 // can be modified by a user. 1646 optional string name = 1; 1647} 1648 1649// Describes Chrome's Compositor scheduler's current state and associated 1650// variables. 1651// 1652// These protos and enums were adapted from the corresponding original JSON 1653// trace event for the scheduler state. In contrast to the JSON, we use strongly 1654// typed enum values instead of strings for many fields, and 1655// microsecond-granularity timestamps. 1656// 1657// The original format was generated in JSON by the code at 1658// https://cs.chromium.org/chromium/src/cc/scheduler/scheduler.cc?l=870&rcl=5e15eabc9c0eec8daf94fdf78e93f13b6e3b63dd 1659// 1660// And is now generated as protozero: 1661// https://cs.chromium.org/chromium/src/cc/scheduler/scheduler.cc?q=Scheduler::AsPro 1662// 1663// All non-delta-timestamps are absolute CLOCK_MONOTONIC timestamps. 1664 1665// Next id: 16 1666enum ChromeCompositorSchedulerActionV2 { 1667 CC_SCHEDULER_ACTION_V2_UNSPECIFIED = 0; 1668 CC_SCHEDULER_ACTION_V2_NONE = 1; 1669 CC_SCHEDULER_ACTION_V2_SEND_BEGIN_MAIN_FRAME = 2; 1670 CC_SCHEDULER_ACTION_V2_COMMIT = 3; 1671 CC_SCHEDULER_ACTION_V2_POST_COMMIT = 14; 1672 CC_SCHEDULER_ACTION_V2_ACTIVATE_SYNC_TREE = 4; 1673 CC_SCHEDULER_ACTION_V2_DRAW_IF_POSSIBLE = 5; 1674 CC_SCHEDULER_ACTION_V2_DRAW_FORCED = 6; 1675 CC_SCHEDULER_ACTION_V2_DRAW_ABORT = 7; 1676 CC_SCHEDULER_ACTION_V2_UPDATE_DISPLAY_TREE = 15; 1677 CC_SCHEDULER_ACTION_V2_BEGIN_LAYER_TREE_FRAME_SINK_CREATION = 8; 1678 CC_SCHEDULER_ACTION_V2_PREPARE_TILES = 9; 1679 CC_SCHEDULER_ACTION_V2_INVALIDATE_LAYER_TREE_FRAME_SINK = 10; 1680 CC_SCHEDULER_ACTION_V2_PERFORM_IMPL_SIDE_INVALIDATION = 11; 1681 CC_SCHEDULER_ACTION_V2_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL = 12; 1682 CC_SCHEDULER_ACTION_V2_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON = 13; 1683} 1684 1685// Next id: 18 1686message ChromeCompositorSchedulerStateV2 { 1687 enum BeginImplFrameDeadlineMode { 1688 DEADLINE_MODE_UNSPECIFIED = 0; 1689 DEADLINE_MODE_NONE = 1; 1690 DEADLINE_MODE_IMMEDIATE = 2; 1691 DEADLINE_MODE_REGULAR = 3; 1692 DEADLINE_MODE_LATE = 4; 1693 DEADLINE_MODE_BLOCKED = 5; 1694 DEADLINE_MODE_WAIT_FOR_SCROLL = 6; 1695 } 1696 optional ChromeCompositorStateMachineV2 state_machine = 1; 1697 optional bool observing_begin_frame_source = 2; 1698 optional bool begin_impl_frame_deadline_task = 3; 1699 optional bool pending_begin_frame_task = 4; 1700 optional bool skipped_last_frame_missed_exceeded_deadline = 5; 1701 optional ChromeCompositorSchedulerActionV2 inside_action = 7; 1702 optional BeginImplFrameDeadlineMode deadline_mode = 8; 1703 optional int64 deadline_us = 9; 1704 optional int64 deadline_scheduled_at_us = 10; 1705 optional int64 now_us = 11; 1706 optional int64 now_to_deadline_delta_us = 12; 1707 optional int64 now_to_deadline_scheduled_at_delta_us = 13; 1708 optional BeginImplFrameArgsV2 begin_impl_frame_args = 14; 1709 optional BeginFrameObserverStateV2 begin_frame_observer_state = 15; 1710 optional BeginFrameSourceStateV2 begin_frame_source_state = 16; 1711 optional CompositorTimingHistoryV2 compositor_timing_history = 17; 1712 1713 reserved 6; 1714} 1715 1716// Describes the current values stored in the Chrome Compositor state machine. 1717// Next id: 3 1718message ChromeCompositorStateMachineV2 { 1719 // Next id: 6 1720 message MajorStateV2 { 1721 enum BeginImplFrameState { 1722 BEGIN_IMPL_FRAME_UNSPECIFIED = 0; 1723 BEGIN_IMPL_FRAME_IDLE = 1; 1724 BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME = 2; 1725 BEGIN_IMPL_FRAME_INSIDE_DEADLINE = 3; 1726 } 1727 enum BeginMainFrameState { 1728 BEGIN_MAIN_FRAME_UNSPECIFIED = 0; 1729 BEGIN_MAIN_FRAME_IDLE = 1; 1730 BEGIN_MAIN_FRAME_SENT = 2; 1731 BEGIN_MAIN_FRAME_READY_TO_COMMIT = 3; 1732 } 1733 enum LayerTreeFrameSinkState { 1734 LAYER_TREE_FRAME_UNSPECIFIED = 0; 1735 LAYER_TREE_FRAME_NONE = 1; 1736 LAYER_TREE_FRAME_ACTIVE = 2; 1737 LAYER_TREE_FRAME_CREATING = 3; 1738 LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT = 4; 1739 LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION = 5; 1740 } 1741 enum ForcedRedrawOnTimeoutState { 1742 FORCED_REDRAW_UNSPECIFIED = 0; 1743 FORCED_REDRAW_IDLE = 1; 1744 FORCED_REDRAW_WAITING_FOR_COMMIT = 2; 1745 FORCED_REDRAW_WAITING_FOR_ACTIVATION = 3; 1746 FORCED_REDRAW_WAITING_FOR_DRAW = 4; 1747 } 1748 optional ChromeCompositorSchedulerActionV2 next_action = 1; 1749 optional BeginImplFrameState begin_impl_frame_state = 2; 1750 optional BeginMainFrameState begin_main_frame_state = 3; 1751 optional LayerTreeFrameSinkState layer_tree_frame_sink_state = 4; 1752 optional ForcedRedrawOnTimeoutState forced_redraw_state = 5; 1753 } 1754 optional MajorStateV2 major_state = 1; 1755 1756 // Next id: 48 1757 message MinorStateV2 { 1758 enum TreePriority { 1759 TREE_PRIORITY_UNSPECIFIED = 0; 1760 TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES = 1; 1761 TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY = 2; 1762 TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY = 3; 1763 } 1764 enum ScrollHandlerState { 1765 SCROLL_HANDLER_UNSPECIFIED = 0; 1766 SCROLL_AFFECTS_SCROLL_HANDLER = 1; 1767 SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER = 2; 1768 } 1769 optional int32 commit_count = 1; 1770 optional int32 current_frame_number = 2; 1771 optional int32 last_frame_number_submit_performed = 3; 1772 optional int32 last_frame_number_draw_performed = 4; 1773 optional int32 last_frame_number_begin_main_frame_sent = 5; 1774 optional bool did_draw = 6; 1775 optional bool did_send_begin_main_frame_for_current_frame = 7; 1776 optional bool did_notify_begin_main_frame_not_expected_until = 8; 1777 optional bool did_notify_begin_main_frame_not_expected_soon = 9; 1778 optional bool wants_begin_main_frame_not_expected = 10; 1779 optional bool did_commit_during_frame = 11; 1780 optional bool did_invalidate_layer_tree_frame_sink = 12; 1781 optional bool did_perform_impl_side_invalidaion = 13; 1782 optional bool did_prepare_tiles = 14; 1783 optional int32 consecutive_checkerboard_animations = 15; 1784 optional int32 pending_submit_frames = 16; 1785 optional int32 submit_frames_with_current_layer_tree_frame_sink = 17; 1786 optional bool needs_redraw = 18; 1787 optional bool needs_prepare_tiles = 19; 1788 optional bool needs_begin_main_frame = 20; 1789 optional bool needs_one_begin_impl_frame = 21; 1790 optional bool visible = 22; 1791 optional bool begin_frame_source_paused = 23; 1792 optional bool can_draw = 24; 1793 optional bool resourceless_draw = 25; 1794 optional bool has_pending_tree = 26; 1795 optional bool pending_tree_is_ready_for_activation = 27; 1796 optional bool active_tree_needs_first_draw = 28; 1797 optional bool active_tree_is_ready_to_draw = 29; 1798 optional bool did_create_and_initialize_first_layer_tree_frame_sink = 30; 1799 optional TreePriority tree_priority = 31; 1800 optional ScrollHandlerState scroll_handler_state = 32; 1801 optional bool critical_begin_main_frame_to_activate_is_fast = 33; 1802 optional bool main_thread_missed_last_deadline = 34; 1803 optional bool video_needs_begin_frames = 36; 1804 optional bool defer_begin_main_frame = 37; 1805 optional bool last_commit_had_no_updates = 38; 1806 optional bool did_draw_in_last_frame = 39; 1807 optional bool did_submit_in_last_frame = 40; 1808 optional bool needs_impl_side_invalidation = 41; 1809 optional bool current_pending_tree_is_impl_side = 42; 1810 optional bool previous_pending_tree_was_impl_side = 43; 1811 optional bool processing_animation_worklets_for_active_tree = 44; 1812 optional bool processing_animation_worklets_for_pending_tree = 45; 1813 optional bool processing_paint_worklets_for_pending_tree = 46; 1814 optional bool should_warm_up = 47; 1815 1816 reserved 35; 1817 } 1818 optional MinorStateV2 minor_state = 2; 1819} 1820 1821// Next id: 12 1822message BeginFrameArgsV2 { 1823 // JSON format has a "type" field that was always just "BeginFrameArgs" we 1824 // drop this in the proto representation, and instead make the JSON format 1825 // "subtype" field become the type field. 1826 enum BeginFrameArgsType { 1827 BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED = 0; 1828 BEGIN_FRAME_ARGS_TYPE_INVALID = 1; 1829 BEGIN_FRAME_ARGS_TYPE_NORMAL = 2; 1830 BEGIN_FRAME_ARGS_TYPE_MISSED = 3; 1831 } 1832 optional BeginFrameArgsType type = 1; 1833 optional uint64 source_id = 2; 1834 optional uint64 sequence_number = 3; 1835 optional int64 frame_time_us = 4; 1836 optional int64 deadline_us = 5; 1837 optional int64 interval_delta_us = 6; 1838 optional bool on_critical_path = 7; 1839 optional bool animate_only = 8; 1840 oneof created_from { 1841 // The interned SourceLocation. 1842 uint64 source_location_iid = 9; 1843 // The SourceLocation that this args was created from. 1844 // TODO(nuskos): Eventually we will support interning inside of 1845 // TypedArgument TraceEvents and then we shouldn't need this SourceLocation 1846 // since we can emit it as part of the InternedData message. When we can 1847 // remove this |source_location|. 1848 SourceLocation source_location = 10; 1849 } 1850 optional int64 frames_throttled_since_last = 11; 1851} 1852 1853// Next id: 7 1854message BeginImplFrameArgsV2 { 1855 optional int64 updated_at_us = 1; 1856 optional int64 finished_at_us = 2; 1857 enum State { 1858 BEGIN_FRAME_FINISHED = 0; 1859 BEGIN_FRAME_USING = 1; 1860 } 1861 optional State state = 3; 1862 oneof args { 1863 // Only set if |state| is BEGIN_FRAME_FINISHED. 1864 BeginFrameArgsV2 current_args = 4; 1865 // Only set if |state| is BEGIN_FRAME_USING. 1866 BeginFrameArgsV2 last_args = 5; 1867 } 1868 message TimestampsInUs { 1869 optional int64 interval_delta = 1; 1870 optional int64 now_to_deadline_delta = 2; 1871 optional int64 frame_time_to_now_delta = 3; 1872 optional int64 frame_time_to_deadline_delta = 4; 1873 optional int64 now = 5; 1874 optional int64 frame_time = 6; 1875 optional int64 deadline = 7; 1876 } 1877 optional TimestampsInUs timestamps_in_us = 6; 1878} 1879 1880message BeginFrameObserverStateV2 { 1881 optional int64 dropped_begin_frame_args = 1; 1882 optional BeginFrameArgsV2 last_begin_frame_args = 2; 1883} 1884 1885message BeginFrameSourceStateV2 { 1886 optional uint32 source_id = 1; 1887 optional bool paused = 2; 1888 optional uint32 num_observers = 3; 1889 optional BeginFrameArgsV2 last_begin_frame_args = 4; 1890} 1891 1892message CompositorTimingHistoryV2 { 1893 optional int64 begin_main_frame_queue_critical_estimate_delta_us = 1; 1894 optional int64 begin_main_frame_queue_not_critical_estimate_delta_us = 2; 1895 optional int64 begin_main_frame_start_to_ready_to_commit_estimate_delta_us = 1896 3; 1897 optional int64 commit_to_ready_to_activate_estimate_delta_us = 4; 1898 optional int64 prepare_tiles_estimate_delta_us = 5; 1899 optional int64 activate_estimate_delta_us = 6; 1900 optional int64 draw_estimate_delta_us = 7; 1901} 1902 1903message WebViewStartup { 1904 optional bool from_ui_thread = 1; 1905 // This enum must be kept in sync with WebViewChromiumAwInit.CallSite 1906 enum CallSite { 1907 GET_AW_TRACING_CONTROLLER = 0; 1908 GET_AW_PROXY_CONTROLLER = 1; 1909 WEBVIEW_INSTANCE = 2; 1910 GET_STATICS = 3; 1911 GET_DEFAULT_GEOLOCATION_PERMISSIONS = 4; 1912 GET_DEFAULT_SERVICE_WORKER_CONTROLLER = 5; 1913 GET_WEB_ICON_DATABASE = 6; 1914 GET_DEFAULT_WEB_STORAGE = 7; 1915 GET_DEFAULT_WEBVIEW_DATABASE = 8; 1916 GET_TRACING_CONTROLLER = 9; 1917 ASYNC_WEBVIEW_STARTUP = 10; 1918 } 1919 optional CallSite call_site = 2; 1920} 1921 1922message AnimationFrameTimingInfo { 1923 optional int64 blocking_duration_ms = 1; 1924 optional int64 duration_ms = 2; 1925 optional int64 num_scripts = 3; 1926} 1927 1928message AnimationFrameScriptTimingInfo { 1929 optional int64 style_duration_ms = 1; 1930 optional int64 layout_duration_ms = 2; 1931 optional int64 pause_duration_ms = 3; 1932 optional string class_like_name = 4; 1933 optional string property_like_name = 5; 1934 optional string source_location_url = 6; 1935 optional string source_location_function_name = 7; 1936 optional int64 source_location_char_position = 8; 1937 enum InvokerType { 1938 UNDEFINED = 0; 1939 CLASSIC_SCRIPT = 1; 1940 MODULE_SCRIPT = 2; 1941 USER_CALLBACK = 3; 1942 EVENT_HANDLER = 4; 1943 PROMISE_RESOLVE = 5; 1944 PROMISE_REJECT = 6; 1945 } 1946 optional InvokerType invoker_type = 9; 1947 enum ThirdPartyTechnology { 1948 UNSPECIFIED = 0; 1949 NONE = 1; 1950 WORD_PRESS = 2; 1951 GOOGLE_ANALYTICS = 3; 1952 GOOGLE_FONT_API = 4; 1953 GOOGLE_TAG_MANAGER = 5; 1954 GOOGLE_MAPS = 6; 1955 META_PIXEL = 7; 1956 YOUTUBE = 8; 1957 ADOBE_ANALYTICS = 9; 1958 TIKTOK_PIXEL = 10; 1959 HOTJAR = 11; 1960 GOOGLE_ADSENSE = 12; 1961 GOOGLE_PUBLISHER_TAG = 13; 1962 GOOGLE_ADS_LIBRARIES = 14; 1963 FUNDING_CHOICES = 15; 1964 ELEMENTOR = 16; 1965 SLIDER_REVOLUTION = 17; 1966 } 1967 optional ThirdPartyTechnology third_party_technology = 10; 1968} 1969 1970message BeginFrameId { 1971 optional uint64 source_id = 1; 1972 optional uint64 sequence_number = 2; 1973} 1974 1975message MainFramePipeline { 1976 enum Step { 1977 UNKNOWN = 0; 1978 SEND_BEGIN_MAIN_FRAME = 1; 1979 BEGIN_MAIN_FRAME = 2; 1980 ABORTED_ON_MAIN = 3; 1981 COMMIT_ON_MAIN = 4; 1982 READY_TO_COMMIT_ON_IMPL = 5; 1983 COMMIT_ON_IMPL = 6; 1984 COMMIT_COMPLETE = 7; 1985 READY_TO_ACTIVATE = 8; 1986 ACTIVATE = 9; 1987 DRAW = 10; 1988 UPDATE_DISPLAY_TREE = 11; 1989 } 1990 1991 // Id connecting the steps of the pipeline together. 1992 optional uint64 main_frame_id = 1; 1993 optional Step step = 2; 1994 1995 // Id for the BeginFrame, which triggered this main frame. 1996 // Set for the SEND_BEGIN_MAIN_FRAME step. 1997 optional BeginFrameId begin_frame_id = 3; 1998 1999 // If the step is ABORTED_ON_MAIN, this field will contain the reason. 2000 enum AbortedOnMainReason { 2001 ABORTED_MAIN_REASON_UNKNOWN = 0; 2002 NOT_VISIBLE = 1; 2003 DEFERRED_UPDATE = 2; 2004 DEFERRED_COMMIT_ABORTED = 3; 2005 NO_UPDATE = 4; 2006 } 2007 optional AbortedOnMainReason aborted_on_main_reason = 4; 2008 2009 // Id of the last begin frame id issued by renderer compositor by the time 2010 // this main frame is drawn for the first time. 2011 // The difference between `begin_frame_id` and 2012 // `last_begin_frame_id_during_first_draw` can be used to reason about the 2013 // main frame latency. Set for the first DRAW step. 2014 optional BeginFrameId last_begin_frame_id_during_first_draw = 5; 2015} 2016 2017message CurrentTask { 2018 // t1 - t0, where t1 is the start timestamp of this slice and t0 is the start 2019 // timestamp of the task containing this slice. 2020 optional uint64 event_offset_from_task_start_time_us = 1; 2021 2022 // Timestamp in microseconds of the start of the task containing this slice. 2023 optional uint64 task_start_time_us = 2; 2024 2025 // t1 - t0, where t1 is the start timestamp of this slice and t0 is the 2026 // timestamp of the time when the task containing this slice 2027 // was queued. 2028 optional uint64 task_queueing_time_us = 3; 2029 2030 // Timestamp in microseconds of the time when the task containing 2031 // this slice was queued. 2032 optional uint64 task_queued_time_us = 4; 2033} 2034 2035message ChromeLatencyInfo2 { 2036 optional int64 trace_id = 1; 2037 2038 // NEXT ID: 15 2039 // All step are optional but the enum is ordered (not by number) below in the 2040 // order we expect them to appear if they are emitted in trace in a blocking 2041 // fashion. 2042 enum Step { 2043 STEP_UNSPECIFIED = 0; 2044 // Emitted on the browser main thread. 2045 STEP_SEND_INPUT_EVENT_UI = 3; 2046 // Happens on the renderer's compositor. 2047 STEP_HANDLE_INPUT_EVENT_IMPL = 5; 2048 STEP_RESAMPLE_SCROLL_EVENTS = 14; 2049 STEP_DID_HANDLE_INPUT_AND_OVERSCROLL = 8; 2050 // Occurs on the Renderer's main thread. 2051 STEP_HANDLE_INPUT_EVENT_MAIN = 4; 2052 STEP_MAIN_THREAD_SCROLL_UPDATE = 2; 2053 STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT = 1; 2054 // Could be emitted on both the renderer's main OR compositor. 2055 STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL = 9; 2056 // Optionally sometimes HANDLED_INPUT_EVENT_MAIN_OR_IMPL will proxy to the 2057 // renderer's compositor and this will be emitted. 2058 STEP_HANDLED_INPUT_EVENT_IMPL = 10; 2059 // Occurs on Browser Main. 2060 STEP_TOUCH_EVENT_HANDLED = 12; 2061 // Occurs on Browser Main. 2062 STEP_GESTURE_EVENT_HANDLED = 13; 2063 // Renderer's compositor. 2064 STEP_SWAP_BUFFERS = 6 [deprecated = true]; 2065 // Happens on the VizCompositor in the GPU process. 2066 STEP_DRAW_AND_SWAP = 7 [deprecated = true]; 2067 // Happens on the GPU main thread after the swap has completed. 2068 STEP_FINISHED_SWAP_BUFFERS = 11 [deprecated = true]; 2069 // See above for NEXT ID, enum steps are not ordered by tag number. 2070 }; 2071 2072 optional Step step = 2; 2073 optional int32 frame_tree_node_id = 3; 2074 2075 // This enum is a copy of LatencyComponentType enum in Chrome, located in 2076 // ui/latency/latency_info.h, modulo added UNKNOWN value per protobuf 2077 // practices. 2078 enum LatencyComponentType { 2079 COMPONENT_UNSPECIFIED = 0; 2080 COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH = 1; 2081 COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL = 2; 2082 COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL = 3; 2083 COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL = 4; 2084 COMPONENT_INPUT_EVENT_LATENCY_UI = 5; 2085 COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN = 6; 2086 COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN = 7; 2087 COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL = 8; 2088 COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT = 9; 2089 COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH = 10; 2090 COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP = 11; 2091 COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME = 12; 2092 COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER = 13; 2093 COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP = 14; 2094 } 2095 2096 message ComponentInfo { 2097 optional LatencyComponentType component_type = 1; 2098 2099 // Microsecond timestamp in CLOCK_MONOTONIC domain 2100 optional uint64 time_us = 2; 2101 }; 2102 2103 repeated ComponentInfo component_info = 4; 2104 optional bool is_coalesced = 5; 2105 optional int64 gesture_scroll_id = 6; 2106 optional int64 touch_id = 7; 2107 2108 // Must be kept in sync with blink::mojom::EventType. 2109 // All values are incremented by one for consistency with other proto enums. 2110 enum InputType { 2111 UNDEFINED_EVENT = 0; 2112 MOUSE_DOWN_EVENT = 1; 2113 MOUSE_UP_EVENT = 2; 2114 MOUSE_MOVE_EVENT = 3; 2115 MOUSE_ENTER_EVENT = 4; 2116 MOUSE_LEAVE_EVENT = 5; 2117 CONTEXT_MENU_EVENT = 6; 2118 2119 MOUSE_WHEEL_EVENT = 7; 2120 2121 RAW_KEY_DOWN_EVENT = 8; 2122 KEY_DOWN_EVENT = 9; 2123 KEY_UP_EVENT = 10; 2124 CHAR_EVENT = 11; 2125 2126 GESTURE_SCROLL_BEGIN_EVENT = 12; 2127 GESTURE_SCROLL_END_EVENT = 13; 2128 GESTURE_SCROLL_UPDATE_EVENT = 14; 2129 GESTURE_FLING_START_EVENT = 15; 2130 GESTURE_FLING_CANCEL_EVENT = 16; 2131 GESTURE_PINCH_BEGIN_EVENT = 17; 2132 GESTURE_PINCH_END_EVENT = 18; 2133 GESTURE_PINCH_UPDATE_EVENT = 19; 2134 2135 GESTURE_BEGIN_EVENT = 20; 2136 2137 GESTURE_TAP_DOWN_EVENT = 21; 2138 GESTURE_SHOW_PRESS_EVENT = 22; 2139 GESTURE_TAP_EVENT = 23; 2140 GESTURE_TAP_CANCEL_EVENT = 24; 2141 GESTURE_SHORT_PRESS_EVENT = 25; 2142 GESTURE_LONG_PRESS_EVENT = 26; 2143 GESTURE_LONG_TAP_EVENT = 27; 2144 GESTURE_TWO_FINGER_TAP_EVENT = 28; 2145 GESTURE_TAP_UNCONFIRMED_EVENT = 29; 2146 2147 GESTURE_DOUBLE_TAP_EVENT = 30; 2148 GESTURE_END_EVENT = 31; 2149 2150 TOUCH_START_EVENT = 32; 2151 TOUCH_MOVE_EVENT = 33; 2152 TOUCH_END_EVENT = 34; 2153 TOUCH_CANCEL_EVENT = 35; 2154 TOUCH_SCROLL_STARTED_EVENT = 36; 2155 2156 POINTER_DOWN_EVENT = 37; 2157 POINTER_UP_EVENT = 38; 2158 POINTER_MOVE_EVENT = 39; 2159 POINTER_RAW_UPDATE_EVENT = 40; 2160 POINTER_CANCEL_EVENT = 41; 2161 POINTER_CAUSED_UA_ACTION_EVENT = 42; 2162 } 2163 2164 // The type of input corresponding to this `ChromeLatencyInfo`. 2165 optional InputType input_type = 8; 2166 2167 // Intended to mirror `blink::mojom::InputEventResultState`. 2168 enum InputResultState { 2169 UNKNOWN = 0; 2170 CONSUMED = 1; 2171 NOT_CONSUMED = 2; 2172 NO_CONSUMER_EXISTS = 3; 2173 IGNORED = 4; 2174 SET_NON_BLOCKING = 5; 2175 SET_NON_BLOCKING_DUE_TO_FLING = 6; 2176 } 2177 2178 // If applicable, the result of handling the input corresponding to this 2179 // `ChromeLatencyInfo`. 2180 optional InputResultState input_result_state = 9; 2181 2182 // `trace_id` values corresponding to inputs that were coalesced/combined into 2183 // the input for this `ChromeLatencyInfo`. 2184 repeated int64 coalesced_trace_ids = 10; 2185} 2186 2187message EventTiming { 2188 optional bool cancelable = 1; 2189 optional string frame = 2; 2190 optional uint32 interaction_id = 3; 2191 optional uint32 interaction_offset = 4; 2192 optional int64 node_id = 5; 2193 optional int64 key_code = 6; 2194 optional int32 pointer_id = 7; 2195 optional uint64 fallback_time_us = 8; 2196 enum EventType { 2197 UNDEFINED = 0; 2198 AUX_CLICK_EVENT = 1; 2199 CLICK_EVENT = 2; 2200 CONTEXT_MENU_EVENT = 3; 2201 DOUBLE_CLICK_EVENT = 4; 2202 MOUSE_DOWN_EVENT = 5; 2203 MOUSE_ENTER_EVENT = 6; 2204 MOUSE_LEAVE_EVENT = 7; 2205 MOUSE_OUT_EVENT = 9; 2206 MOUSE_OVER_EVENT = 10; 2207 MOUSE_UP_EVENT = 11; 2208 POINTER_OVER_EVENT = 12; 2209 POINTER_ENTER_EVENT = 13; 2210 POINTER_DOWN_EVENT = 14; 2211 POINTER_UP_EVENT = 15; 2212 POINTER_CANCEL_EVENT = 16; 2213 POINTER_OUT_EVENT = 17; 2214 POINTER_LEAVE_EVENT = 18; 2215 GOT_POINTER_CAPTURE_EVENT = 19; 2216 LOST_POINTER_CAPTURE_EVENT = 20; 2217 TOUCH_START_EVENT = 21; 2218 TOUCH_END_EVENT = 22; 2219 TOUCH_CANCEL_EVENT = 23; 2220 KEY_DOWN_EVENT = 24; 2221 KEY_PRESS_EVENT = 25; 2222 KEY_UP_EVENT = 26; 2223 BEFORE_INPUT_EVENT = 27; 2224 INPUT_EVENT = 28; 2225 COMPOSITION_START_EVENT = 29; 2226 COMPOSITION_UPDATE_EVENT = 30; 2227 COMPOSITION_END_EVENT = 31; 2228 DRAG_START_EVENT = 32; 2229 DRAG_END_EVENT = 33; 2230 DRAG_ENTER_EVENT = 34; 2231 DRAG_LEAVE_EVENT = 35; 2232 DRAG_OVER_EVENT = 36; 2233 DROP_EVENT = 37; 2234 } 2235 optional EventType type = 9; 2236} 2237 2238// Frame information provided by Android's Choreographer. 2239// See 2240// https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata. 2241// Next ID: 4 2242message AndroidChoreographerFrameCallbackData { 2243 // The time in microseconds at which the frame started being rendered. 2244 // See 2245 // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimenanos. 2246 optional int64 frame_time_us = 1; 2247 2248 message FrameTimeline { 2249 // The token used by the platform to identify the frame timeline. 2250 // See 2251 // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimelinevsyncid. 2252 optional int64 vsync_id = 1; 2253 2254 // The difference in microseconds between: 2255 // (A) the time at which the frame needs to be ready by in order to be 2256 // presented on time and 2257 // (B) the time at which the frame started being rendered (frame_time_us). 2258 // See 2259 // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimelinedeadlinenanos. 2260 optional int64 latch_delta_us = 2; 2261 2262 // The difference in microseconds between: 2263 // (A) the time at which the frame is expected to be presented and 2264 // (B) the time at which the frame started being rendered (frame_time_us). 2265 // See 2266 // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimelineexpectedpresentationtimenanos. 2267 optional int64 present_delta_us = 3; 2268 } 2269 2270 // Possible frame timelines. 2271 // See 2272 // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getframetimelineslength. 2273 repeated FrameTimeline frame_timeline = 2; 2274 2275 // The index (into frame_timeline) of the platform-preferred frame timeline. 2276 // See 2277 // https://developer.android.com/ndk/reference/group/choreographer#achoreographerframecallbackdata_getpreferredframetimelineindex. 2278 optional int64 preferred_frame_timeline_index = 3; 2279} 2280 2281message ChromeTrackEvent { 2282 // Extension range for Chrome: 1000-1999 2283 // Next ID: 1072 2284 extend TrackEvent { 2285 optional ChromeAppState chrome_app_state = 1000; 2286 2287 optional ChromeMemoryPressureNotification 2288 chrome_memory_pressure_notification = 1001; 2289 2290 optional ChromeTaskAnnotator chrome_task_annotator = 1002; 2291 2292 optional ChromeBrowserContext chrome_browser_context = 1003; 2293 2294 optional ChromeProfileDestroyer chrome_profile_destroyer = 1004; 2295 2296 optional ChromeTaskPostedToDisabledQueue 2297 chrome_task_posted_to_disabled_queue = 1005; 2298 2299 optional ChromeRasterTask chrome_raster_task = 1006; 2300 2301 optional ChromeMessagePumpForUI chrome_message_pump_for_ui = 1007; 2302 2303 optional RenderFrameImplDeletion render_frame_impl_deletion = 1008; 2304 2305 optional ShouldSwapBrowsingInstancesResult 2306 should_swap_browsing_instances_result = 1009; 2307 2308 optional FrameTreeNodeInfo frame_tree_node_info = 1010; 2309 2310 optional ChromeHashedPerformanceMark chrome_hashed_performance_mark = 1011; 2311 2312 optional RenderProcessHost render_process_host = 1012; 2313 optional RenderProcessHostCleanup render_process_host_cleanup = 1013; 2314 optional RenderProcessHostListener render_process_host_listener_changed = 2315 1014; 2316 optional ChildProcessLauncherPriority child_process_launcher_priority = 2317 1015; 2318 2319 optional ResourceBundle resource_bundle = 1016; 2320 2321 optional ChromeWebAppBadNavigate chrome_web_app_bad_navigate = 1017; 2322 2323 optional ChromeExtensionId chrome_extension_id = 1018; 2324 2325 optional SiteInstance site_instance = 1019; 2326 2327 optional RenderViewHost render_view_host = 1020; 2328 2329 optional RenderFrameProxyHost render_frame_proxy_host = 1021; 2330 2331 optional AndroidViewDump android_view_dump = 1022; 2332 2333 optional ParkableStringCompressInBackground 2334 parkable_string_compress_in_background = 1023; 2335 optional ParkableStringUnpark parkable_string_unpark = 1024; 2336 2337 optional ChromeSamplingProfilerSampleCollected 2338 chrome_sampling_profiler_sample_completed = 1025; 2339 optional SendBeginMainFrameToCommitBreakdown 2340 send_begin_mainframe_to_commit_breakdown = 1026; 2341 2342 optional GlobalRenderFrameHostId global_render_frame_host_id = 1027; 2343 2344 optional RenderFrameHost render_frame_host = 1028; 2345 2346 optional ChromeThreadPoolTask thread_pool_task = 1029; 2347 2348 optional BackForwardCacheCanStoreDocumentResult 2349 back_forward_cache_can_store_document_result = 1030; 2350 2351 optional RendererMainThreadTaskExecution 2352 renderer_main_thread_task_execution = 1031; 2353 2354 optional EventLatency event_latency = 1032; 2355 2356 optional ProcessSingleton process_singleton = 1033; 2357 2358 optional SiteInstanceGroup site_instance_group = 1034; 2359 2360 optional BrowsingContextState browsing_context_state = 1035; 2361 2362 optional DeviceThermalState device_thermal_state = 1036; 2363 2364 optional NavigationHandle navigation = 1037; 2365 2366 optional AndroidIPC android_ipc = 1038; 2367 2368 optional ChromeSqlDiagnostics sql_diagnostics = 1039; 2369 2370 optional SequenceManagerTask sequence_manager_task = 1040; 2371 2372 optional AndroidToolbar android_toolbar = 1041; 2373 2374 optional ActiveProcesses active_processes = 1042; 2375 2376 optional BlinkTaskScope blink_task_scope = 1043; 2377 2378 optional UkmPageLoadTimingUpdate ukm_page_load_timing_update = 1044; 2379 2380 optional BlinkHighEntropyAPI high_entropy_api = 1045; 2381 2382 optional TabSwitchMeasurement tab_switch_measurement = 1046; 2383 2384 optional ScrollDeltas scroll_deltas = 1047; 2385 2386 optional WinRenderAudioFromSource win_render_audio_from_source = 1048; 2387 2388 optional MacAUHALStream mac_auhal_stream = 1049; 2389 2390 optional LinuxAlsaOutput linux_alsa_output = 1050; 2391 2392 optional LinuxPulseOutput linux_pulse_output = 1051; 2393 2394 optional ChromeGraphicsPipeline chrome_graphics_pipeline = 1052; 2395 2396 optional CrasUnified chromeos_cras_unified = 1053; 2397 2398 optional LibunwindstackUnwinder libunwindstack_unwinder = 1054; 2399 2400 optional ScrollPredictorMetrics scroll_predictor_metrics = 1055; 2401 2402 optional PageLoad page_load = 1056; 2403 2404 optional StartUp startup = 1057; 2405 2406 optional WebContentInteraction web_content_interaction = 1058; 2407 2408 optional EventForwarder event_forwarder = 1059; 2409 2410 optional TouchDispositionGestureFilter touch_disposition_gesture_filter = 2411 1060; 2412 2413 optional ViewClassName view_class_name = 1061; 2414 2415 optional ChromeCompositorSchedulerStateV2 cc_scheduler_state = 1062; 2416 2417 optional WebViewStartup webview_startup = 1063; 2418 2419 optional AnimationFrameTimingInfo animation_frame_timing_info = 1064; 2420 2421 optional AnimationFrameScriptTimingInfo animation_frame_script_timing_info = 2422 1065; 2423 2424 optional ScrollMetrics scroll_metrics = 1066; 2425 2426 optional MainFramePipeline main_frame_pipeline = 1067; 2427 2428 optional ChromeLatencyInfo2 chrome_latency_info = 1068; 2429 2430 optional EventTiming event_timing = 1069; 2431 2432 optional AndroidChoreographerFrameCallbackData 2433 android_choreographer_frame_callback_data = 1070; 2434 2435 optional CurrentTask current_task = 1071; 2436 } 2437} 2438