diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-05-17 17:24:03 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-06-22 07:51:41 +0000 |
commit | 774f54339e5db91f785733232d3950366db65d07 (patch) | |
tree | 068e1b47bd1af94d77094ed12b604a6b83d9c22a /chromium/base/tracing | |
parent | f7eaed5286974984ba5f9e3189d8f49d03e99f81 (diff) | |
download | qtwebengine-chromium-774f54339e5db91f785733232d3950366db65d07.tar.gz |
BASELINE: Update Chromium to 102.0.5005.57
Change-Id: I885f714bb40ee724c28f94ca6bd8dbdb39915158
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/tracing')
-rw-r--r-- | chromium/base/tracing/perfetto_platform.cc | 5 | ||||
-rw-r--r-- | chromium/base/tracing/perfetto_task_runner.cc | 2 | ||||
-rw-r--r-- | chromium/base/tracing/perfetto_task_runner_unittest.cc | 1 | ||||
-rw-r--r-- | chromium/base/tracing/protos/chrome_track_event.proto | 101 | ||||
-rw-r--r-- | chromium/base/tracing/tracing_tls.h | 1 |
5 files changed, 103 insertions, 7 deletions
diff --git a/chromium/base/tracing/perfetto_platform.cc b/chromium/base/tracing/perfetto_platform.cc index 62a6ea47943..0cb8905bd99 100644 --- a/chromium/base/tracing/perfetto_platform.cc +++ b/chromium/base/tracing/perfetto_platform.cc @@ -11,6 +11,7 @@ #include "base/tracing/perfetto_task_runner.h" #include "base/tracing_buildflags.h" #include "build/build_config.h" +#include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.gen.h" #include "third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.gen.h" #if !BUILDFLAG(IS_NACL) @@ -83,12 +84,12 @@ std::string PerfettoPlatform::GetCurrentProcessName() { void PerfettoPlatform::OnThreadNameChanged(const char* name) { #if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) - // TODO(skyostil): Also capture names for threads which predate tracing being - // initialized. + int process_id = base::trace_event::TraceLog::GetInstance()->process_id(); if (perfetto::Tracing::IsInitialized()) { auto track = perfetto::ThreadTrack::Current(); auto desc = track.Serialize(); desc.mutable_thread()->set_thread_name(name); + desc.mutable_thread()->set_pid(process_id); perfetto::TrackEvent::SetTrackDescriptor(track, std::move(desc)); } #endif // BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) diff --git a/chromium/base/tracing/perfetto_task_runner.cc b/chromium/base/tracing/perfetto_task_runner.cc index e8e15c0eccb..55fb6a56fa8 100644 --- a/chromium/base/tracing/perfetto_task_runner.cc +++ b/chromium/base/tracing/perfetto_task_runner.cc @@ -9,9 +9,9 @@ #include "base/bind.h" #include "base/containers/contains.h" +#include "base/notreached.h" #include "base/task/common/checked_lock_impl.h" #include "base/task/common/scoped_defer_task_posting.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "base/task/thread_pool/thread_pool_instance.h" #include "base/threading/sequenced_task_runner_handle.h" diff --git a/chromium/base/tracing/perfetto_task_runner_unittest.cc b/chromium/base/tracing/perfetto_task_runner_unittest.cc index fb40dfd4172..c4eccd5b9d0 100644 --- a/chromium/base/tracing/perfetto_task_runner_unittest.cc +++ b/chromium/base/tracing/perfetto_task_runner_unittest.cc @@ -11,7 +11,6 @@ #include "base/files/scoped_file.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" -#include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "base/test/bind.h" #include "base/test/task_environment.h" diff --git a/chromium/base/tracing/protos/chrome_track_event.proto b/chromium/base/tracing/protos/chrome_track_event.proto index e9a85d5a688..debe2a7a10e 100644 --- a/chromium/base/tracing/protos/chrome_track_event.proto +++ b/chromium/base/tracing/protos/chrome_track_event.proto @@ -5,6 +5,7 @@ syntax = "proto2"; import public "protos/perfetto/trace/track_event/track_event.proto"; +import public "protos/perfetto/trace/track_event/debug_annotation.proto"; package perfetto.protos; @@ -150,6 +151,13 @@ message FrameTreeNodeInfo { // Whether there's a speculative RenderFrameHost or not. optional bool has_speculative_render_frame_host = 3; + + optional RenderFrameHost current_frame_host = 4; + optional RenderFrameHost speculative_frame_host = 5; + + // Additional untyped debug information associated with this + // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API. + repeated DebugAnnotation debug_annotations = 99; } message ChromeHashedPerformanceMark { @@ -202,6 +210,10 @@ message RenderProcessHost { // Details about the associated browser context. optional ChromeBrowserContext browser_context = 4; + + // Additional untyped debug information associated with this + // RenderProcessHost, populated via TracedProto::AddDebugAnnotations API. + repeated DebugAnnotation debug_annotations = 99; } message RenderProcessHostListener { @@ -268,10 +280,34 @@ message SiteInstance { // related SiteInstances in the same BrowsingInstance. optional int32 related_active_contents_count = 5; - // The number of active RenderFrameHosts which belong to this SiteInstance. + // The number of active RenderFrameHosts this SiteInstance's SiteInstanceGroup + // has. optional int32 active_rfh_count = 6; + + // The SiteInstanceGroup this SiteInstance belongs to. + optional SiteInstanceGroup site_instance_group = 7; + + // Additional untyped debug information associated with this + // SiteInstance, populated via TracedProto::AddDebugAnnotations API. + repeated DebugAnnotation debug_annotations = 99; +} + +message SiteInstanceGroup { + // The ID of the SiteInstanceGroup. + optional int32 site_instance_group_id = 1; + + // The number of active frames in this SiteInstanceGroup. + optional int32 active_frame_count = 2; + + // The process ID of the SiteInstanceGroup. + optional RenderProcessHost process = 3; + + // Additional untyped debug information associated with this + // SiteInstanceGroup, populated via TracedProto::AddDebugAnnotations API. + repeated DebugAnnotation debug_annotations = 99; } +// Next ID: 7 message RenderViewHost { // The RenderViewHostMapId for the RenderViewHost. optional int32 rvh_map_id = 1; @@ -279,14 +315,21 @@ message RenderViewHost { // The routing ID for the RenderViewHost. optional int32 routing_id = 2; - // The process ID of the RenderViewHost. + // The process ID of the RenderViewHost. Deprecated in favour of |process|. optional int32 process_id = 3; + // Process this RenderViewHost is associated with. + optional RenderProcessHost process = 6; + // Whether the RenderViewHost is in back/forward cache or not. optional bool is_in_back_forward_cache = 4; // Whether the renderer-side RenderView is created. optional bool renderer_view_created = 5; + + // Additional untyped debug information associated with this + // RenderViewHost, populated via TracedProto::AddDebugAnnotations API. + repeated DebugAnnotation debug_annotations = 99; } message RenderFrameProxyHost { @@ -306,6 +349,14 @@ message RenderFrameProxyHost { // Whether the renderer-side RenderFrameProxy is live or not. optional bool is_render_frame_proxy_live = 5; + + // The SiteInstanceGroupId of the SiteInstanceGroup associated with the + // RenderFrameProxyHost. + optional int32 site_instance_group_id = 6; + + // Additional untyped debug information associated with this + // RenderFrameProxyHost, populated via TracedProto::AddDebugAnnotations API. + repeated DebugAnnotation debug_annotations = 99; } message AndroidView { @@ -396,6 +447,15 @@ message GlobalRenderFrameHostId { optional int32 process_id = 2; } +message BrowsingContextState { + // The ID of the BrowsingInstance that the BrowsingContextState belongs to. + optional int32 browsing_instance_id = 1; + + // Additional untyped debug information associated with this + // FrameTreeNode, populated via TracedProto::AddDebugAnnotations API. + repeated DebugAnnotation debug_annotations = 99; +} + message RenderFrameHost { optional RenderProcessHost process = 1; optional GlobalRenderFrameHostId render_frame_host_id = 2; @@ -421,6 +481,11 @@ message RenderFrameHost { optional RenderFrameHost parent = 8; optional RenderFrameHost outer_document = 9; optional RenderFrameHost embedder = 10; + optional BrowsingContextState browsing_context_state = 11; + + // Additional untyped debug information associated with this + // RenderViewHost, populated via TracedProto::AddDebugAnnotations API. + repeated DebugAnnotation debug_annotations = 99; } message ChromeThreadPoolTask { @@ -516,6 +581,7 @@ message BackForwardCacheCanStoreDocumentResult { NO_RESPONSE_HEAD = 52; ACTIVATION_NAVIGATION_DISALLOWED_FOR_BUG_1234857 = 53; ERROR_DOCUMENT = 54; + FENCED_FRAMES_EMBEDDER = 55; } optional BackForwardCacheNotRestoredReason @@ -684,9 +750,30 @@ message ProcessSingleton { optional RemoteHungProcessTerminateReason remote_process_terminate_reason = 2; } +message NavigationHandle { + optional int64 navigation_id = 1; + optional bool has_committed = 2; + optional bool is_error_page = 3; + optional FrameTreeNodeInfo frame_tree_node = 4; + optional RenderFrameHost render_frame_host = 5; + + // Additional untyped debug information associated with this + // NavigationHandle/Request, populated via TracedProto::AddDebugAnnotations + // API. + repeated DebugAnnotation debug_annotations = 99; +} + +enum DeviceThermalState { + DEVICE_THERMAL_STATE_UNKNOWN = 0; + DEVICE_THERMAL_STATE_NOMINAL = 1; + DEVICE_THERMAL_STATE_FAIR = 2; + DEVICE_THERMAL_STATE_SERIOUS = 3; + DEVICE_THERMAL_STATE_CRITICAL = 4; +} + message ChromeTrackEvent { // Extension range for Chrome: 1000-1999 - // Next ID: 1034 + // Next ID: 1037 extend TrackEvent { optional ChromeAppState chrome_app_state = 1000; @@ -760,5 +847,13 @@ message ChromeTrackEvent { optional EventLatency event_latency = 1032; optional ProcessSingleton process_singleton = 1033; + + optional SiteInstanceGroup site_instance_group = 1034; + + optional BrowsingContextState browsing_context_state = 1035; + + optional DeviceThermalState device_thermal_state = 1036; + + optional NavigationHandle navigation = 1037; } } diff --git a/chromium/base/tracing/tracing_tls.h b/chromium/base/tracing/tracing_tls.h index 074ecb6294a..697899244e7 100644 --- a/chromium/base/tracing/tracing_tls.h +++ b/chromium/base/tracing/tracing_tls.h @@ -6,6 +6,7 @@ #define BASE_TRACING_TRACING_TLS_H_ #include "base/base_export.h" +#include "base/check.h" #include "base/memory/raw_ptr.h" #include "base/threading/thread_local.h" |