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