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