mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
tools: Improve instrumentation and add it for some layout (#33647)
Improves the instrumentation to skip all function arguments and also add spans for some layout modes. This is preparation for improving the performance of flexbox. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
20eb927843
commit
719b5aba24
8 changed files with 140 additions and 115 deletions
|
@ -152,7 +152,7 @@ use servo_config::{opts, pref};
|
|||
use servo_rand::{random, Rng, ServoRng, SliceRandom};
|
||||
use servo_url::{Host, ImmutableOrigin, ServoUrl};
|
||||
use style_traits::CSSPixel;
|
||||
use tracing::{span, Level};
|
||||
use tracing::{instrument, span, Level};
|
||||
use webgpu::swapchain::WGPUImageMap;
|
||||
use webgpu::{self, WebGPU, WebGPURequest, WebGPUResponse};
|
||||
use webrender::{RenderApi, RenderApiSender};
|
||||
|
@ -1195,7 +1195,7 @@ where
|
|||
}
|
||||
|
||||
/// Handles loading pages, navigation, and granting access to the compositor
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_request(&mut self) {
|
||||
#[derive(Debug)]
|
||||
enum Request {
|
||||
|
@ -1292,13 +1292,13 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_request_for_pipeline_namespace(&mut self, request: PipelineNamespaceRequest) {
|
||||
let PipelineNamespaceRequest(sender) = request;
|
||||
let _ = sender.send(self.next_pipeline_namespace_id());
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_request_from_background_hang_monitor(&self, message: HangMonitorAlert) {
|
||||
match message {
|
||||
HangMonitorAlert::Profile(bytes) => self
|
||||
|
@ -1312,7 +1312,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_request_from_network_listener(&mut self, message: (PipelineId, FetchResponseMsg)) {
|
||||
let (id, message_) = message;
|
||||
let result = match self.pipelines.get(&id) {
|
||||
|
@ -1338,7 +1338,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_request_from_compositor(&mut self, message: FromCompositorMsg) {
|
||||
trace_msg_from_compositor!(message, "{message:?}");
|
||||
match message {
|
||||
|
@ -1566,7 +1566,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_request_from_script(&mut self, message: (PipelineId, FromScriptMsg)) {
|
||||
let (source_pipeline_id, content) = message;
|
||||
trace_script_msg!(content, "{source_pipeline_id}: {content:?}");
|
||||
|
@ -1896,7 +1896,7 @@ where
|
|||
}
|
||||
|
||||
/// Broadcast a message via routers in various event-loops.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_schedule_broadcast(
|
||||
&self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -1940,7 +1940,7 @@ where
|
|||
}
|
||||
|
||||
/// Remove a channel-name for a given broadcast router.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_remove_broadcast_channel_name_in_router(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -1976,7 +1976,7 @@ where
|
|||
}
|
||||
|
||||
/// Note a new channel-name relevant to a given broadcast router.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_new_broadcast_channel_name_in_router(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -1998,7 +1998,7 @@ where
|
|||
}
|
||||
|
||||
/// Remove a broadcast router.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_remove_broadcast_channel_router(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -2017,7 +2017,7 @@ where
|
|||
}
|
||||
|
||||
/// Add a new broadcast router.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_new_broadcast_channel_router(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -2040,7 +2040,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_wgpu_request(
|
||||
&mut self,
|
||||
source_pipeline_id: PipelineId,
|
||||
|
@ -2118,7 +2118,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_request_from_layout(&mut self, message: FromLayoutMsg) {
|
||||
trace_layout_msg!(message, "{message:?}");
|
||||
match message {
|
||||
|
@ -2133,7 +2133,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_message_port_transfer_completed(
|
||||
&mut self,
|
||||
router_id: Option<MessagePortRouterId>,
|
||||
|
@ -2272,7 +2272,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_complete_message_port_transfer(
|
||||
&mut self,
|
||||
router_id: MessagePortRouterId,
|
||||
|
@ -2353,7 +2353,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_reroute_messageport(&mut self, port_id: MessagePortId, task: PortMessageTask) {
|
||||
let info = match self.message_ports.get_mut(&port_id) {
|
||||
Some(info) => info,
|
||||
|
@ -2385,7 +2385,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_messageport_shipped(&mut self, port_id: MessagePortId) {
|
||||
if let Some(info) = self.message_ports.get_mut(&port_id) {
|
||||
match info.state {
|
||||
|
@ -2440,7 +2440,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_remove_messageport(&mut self, port_id: MessagePortId) {
|
||||
let entangled = match self.message_ports.remove(&port_id) {
|
||||
Some(info) => info.entangled_with,
|
||||
|
@ -2488,7 +2488,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_entangle_messageports(&mut self, port1: MessagePortId, port2: MessagePortId) {
|
||||
if let Some(info) = self.message_ports.get_mut(&port1) {
|
||||
info.entangled_with = Some(port2);
|
||||
|
@ -2514,7 +2514,7 @@ where
|
|||
///
|
||||
/// The Job Queue is essentially the channel to a SW manager,
|
||||
/// which are scoped per origin.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_schedule_serviceworker_job(&mut self, pipeline_id: PipelineId, job: Job) {
|
||||
let origin = job.scope_url.origin();
|
||||
|
||||
|
@ -2554,7 +2554,7 @@ where
|
|||
let _ = sw_manager.send(ServiceWorkerMsg::ScheduleJob(job));
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_broadcast_storage_event(
|
||||
&self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -2585,7 +2585,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_exit(&mut self) {
|
||||
debug!("Handling exit.");
|
||||
|
||||
|
@ -2666,7 +2666,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_shutdown(&mut self) {
|
||||
debug!("Handling shutdown.");
|
||||
|
||||
|
@ -2791,7 +2791,7 @@ where
|
|||
self.pipelines.remove(&pipeline_id);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_send_error(&mut self, pipeline_id: PipelineId, err: IpcError) {
|
||||
// Treat send error the same as receiving a panic message
|
||||
error!("{}: Send error ({})", pipeline_id, err);
|
||||
|
@ -2803,7 +2803,7 @@ where
|
|||
self.handle_panic(top_level_browsing_context_id, reason, None);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_panic(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: Option<TopLevelBrowsingContextId>,
|
||||
|
@ -2901,7 +2901,7 @@ where
|
|||
});
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_log_entry(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: Option<TopLevelBrowsingContextId>,
|
||||
|
@ -2981,7 +2981,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_new_top_level_browsing_context(
|
||||
&mut self,
|
||||
url: ServoUrl,
|
||||
|
@ -3048,7 +3048,7 @@ where
|
|||
});
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_close_top_level_browsing_context(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -3095,7 +3095,7 @@ where
|
|||
debug!("{top_level_browsing_context_id}: Closed");
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_iframe_size_msg(&mut self, iframe_sizes: Vec<IFrameSizeMsg>) {
|
||||
for IFrameSizeMsg {
|
||||
browsing_context_id,
|
||||
|
@ -3112,7 +3112,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_subframe_loaded(&mut self, pipeline_id: PipelineId) {
|
||||
let browsing_context_id = match self.pipelines.get(&pipeline_id) {
|
||||
Some(pipeline) => pipeline.browsing_context_id,
|
||||
|
@ -3153,7 +3153,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_navigate_request(
|
||||
&self,
|
||||
id: PipelineId,
|
||||
|
@ -3174,7 +3174,7 @@ where
|
|||
// iframe via script. This will result in a new pipeline being spawned and
|
||||
// a child being added to the parent browsing context. This message is never
|
||||
// the result of a page navigation.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_script_loaded_url_in_iframe_msg(&mut self, load_info: IFrameLoadInfoWithData) {
|
||||
let IFrameLoadInfo {
|
||||
parent_pipeline_id,
|
||||
|
@ -3281,7 +3281,7 @@ where
|
|||
});
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_script_new_iframe(&mut self, load_info: IFrameLoadInfoWithData) {
|
||||
let IFrameLoadInfo {
|
||||
parent_pipeline_id,
|
||||
|
@ -3342,7 +3342,7 @@ where
|
|||
});
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_script_new_auxiliary(&mut self, load_info: AuxiliaryBrowsingContextLoadInfo) {
|
||||
let AuxiliaryBrowsingContextLoadInfo {
|
||||
load_data,
|
||||
|
@ -3428,19 +3428,19 @@ where
|
|||
});
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_pending_paint_metric(&self, pipeline_id: PipelineId, epoch: Epoch) {
|
||||
self.compositor_proxy
|
||||
.send(CompositorMsg::PendingPaintMetric(pipeline_id, epoch))
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_set_cursor_msg(&mut self, cursor: Cursor) {
|
||||
self.embedder_proxy
|
||||
.send((None, EmbedderMsg::SetCursor(cursor)))
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_change_running_animations_state(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -3458,7 +3458,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_tick_animation(&mut self, pipeline_id: PipelineId, tick_type: AnimationTickType) {
|
||||
let pipeline = match self.pipelines.get(&pipeline_id) {
|
||||
Some(pipeline) => pipeline,
|
||||
|
@ -3474,7 +3474,7 @@ where
|
|||
/// Schedule a navigation(via load_url).
|
||||
/// 1: Ask the embedder for permission.
|
||||
/// 2: Store the details of the navigation, pending approval from the embedder.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn schedule_navigation(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -3501,7 +3501,7 @@ where
|
|||
self.embedder_proxy.send(msg);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn load_url(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -3630,7 +3630,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_abort_load_url_msg(&mut self, new_pipeline_id: PipelineId) {
|
||||
let pending_index = self
|
||||
.pending_changes
|
||||
|
@ -3648,7 +3648,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_load_complete_msg(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -3697,7 +3697,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_navigated_to_fragment(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -3729,7 +3729,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_traverse_history_msg(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -3871,7 +3871,7 @@ where
|
|||
self.update_webview_in_compositor(top_level_browsing_context_id);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn update_browsing_context(
|
||||
&mut self,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
|
@ -3996,7 +3996,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn update_pipeline(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -4023,7 +4023,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_joint_session_history_length(
|
||||
&self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -4037,7 +4037,7 @@ where
|
|||
let _ = response_sender.send(length as u32);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_push_history_state_msg(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -4077,7 +4077,7 @@ where
|
|||
self.notify_history_changed(top_level_browsing_context_id);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_replace_history_state_msg(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -4102,7 +4102,7 @@ where
|
|||
session_history.replace_history_state(pipeline_id, history_state_id, url);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_ime_dismissed(&mut self) {
|
||||
// Send to the focused browsing contexts' current pipeline.
|
||||
let focused_browsing_context_id = self
|
||||
|
@ -4133,7 +4133,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_key_msg(&mut self, event: KeyboardEvent) {
|
||||
// Send to the focused browsing contexts' current pipeline. If it
|
||||
// doesn't exist, fall back to sending to the compositor.
|
||||
|
@ -4172,7 +4172,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_reload_msg(&mut self, top_level_browsing_context_id: TopLevelBrowsingContextId) {
|
||||
let browsing_context_id = BrowsingContextId::from(top_level_browsing_context_id);
|
||||
let pipeline_id = match self.browsing_contexts.get(&browsing_context_id) {
|
||||
|
@ -4191,7 +4191,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_post_message_msg(
|
||||
&mut self,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
|
@ -4230,7 +4230,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_get_pipeline(
|
||||
&mut self,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
|
@ -4252,7 +4252,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_get_browsing_context(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -4267,7 +4267,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_focus_msg(&mut self, pipeline_id: PipelineId) {
|
||||
let (browsing_context_id, top_level_browsing_context_id) =
|
||||
match self.pipelines.get(&pipeline_id) {
|
||||
|
@ -4302,7 +4302,7 @@ where
|
|||
self.focus_parent_pipeline(browsing_context_id);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn focus_parent_pipeline(&mut self, browsing_context_id: BrowsingContextId) {
|
||||
let parent_pipeline_id = match self.browsing_contexts.get(&browsing_context_id) {
|
||||
Some(ctx) => ctx.parent_pipeline_id,
|
||||
|
@ -4333,7 +4333,7 @@ where
|
|||
self.focus_parent_pipeline(parent_browsing_context_id);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_remove_iframe_msg(
|
||||
&mut self,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
|
@ -4346,7 +4346,7 @@ where
|
|||
result
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_set_throttled_complete(&mut self, pipeline_id: PipelineId, throttled: bool) {
|
||||
let browsing_context_id = match self.pipelines.get(&pipeline_id) {
|
||||
Some(pipeline) => pipeline.browsing_context_id,
|
||||
|
@ -4381,7 +4381,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_create_canvas_paint_thread_msg(
|
||||
&mut self,
|
||||
size: UntypedSize2D<u64>,
|
||||
|
@ -4405,7 +4405,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_webdriver_msg(&mut self, msg: WebDriverCommandMsg) {
|
||||
// Find the script channel for the given parent pipeline,
|
||||
// and pass the event to that script thread.
|
||||
|
@ -4536,7 +4536,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn set_webview_throttled(&mut self, webview_id: WebViewId, throttled: bool) {
|
||||
let browsing_context_id = BrowsingContextId::from(webview_id);
|
||||
let pipeline_id = match self.browsing_contexts.get(&browsing_context_id) {
|
||||
|
@ -4551,7 +4551,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn notify_history_changed(&self, top_level_browsing_context_id: TopLevelBrowsingContextId) {
|
||||
// Send a flat projection of the history to embedder.
|
||||
// The final vector is a concatenation of the LoadData of the past
|
||||
|
@ -4668,7 +4668,7 @@ where
|
|||
self.embedder_proxy.send(msg);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn load_url_for_webdriver(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -4696,7 +4696,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn change_session_history(&mut self, change: SessionHistoryChange) {
|
||||
debug!(
|
||||
"{}: Setting to {}",
|
||||
|
@ -4851,7 +4851,7 @@ where
|
|||
self.update_webview_in_compositor(change.top_level_browsing_context_id);
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn focused_browsing_context_is_descendant_of(
|
||||
&self,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
|
@ -4867,7 +4867,7 @@ where
|
|||
})
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn trim_history(&mut self, top_level_browsing_context_id: TopLevelBrowsingContextId) {
|
||||
let pipelines_to_evict = {
|
||||
let session_history = self.get_joint_session_history(top_level_browsing_context_id);
|
||||
|
@ -4927,7 +4927,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_activate_document_msg(&mut self, pipeline_id: PipelineId) {
|
||||
debug!("{}: Document ready to activate", pipeline_id);
|
||||
|
||||
|
@ -4973,7 +4973,7 @@ where
|
|||
}
|
||||
|
||||
/// Called when the window is resized.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_window_size_msg(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -4996,7 +4996,7 @@ where
|
|||
}
|
||||
|
||||
/// Called when the window exits from fullscreen mode
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_exit_fullscreen_msg(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -5010,7 +5010,7 @@ where
|
|||
/// to check if the output image is "stable" and can be written as a screenshot
|
||||
/// for reftests.
|
||||
/// Since this function is only used in reftests, we do not harden it against panic.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_is_ready_to_save_image(
|
||||
&mut self,
|
||||
pipeline_states: HashMap<PipelineId, Epoch>,
|
||||
|
@ -5094,7 +5094,7 @@ where
|
|||
}
|
||||
|
||||
/// Get the current activity of a pipeline.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn get_activity(&self, pipeline_id: PipelineId) -> DocumentActivity {
|
||||
let mut ancestor_id = pipeline_id;
|
||||
loop {
|
||||
|
@ -5121,7 +5121,7 @@ where
|
|||
}
|
||||
|
||||
/// Set the current activity of a pipeline.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn set_activity(&self, pipeline_id: PipelineId, activity: DocumentActivity) {
|
||||
debug!("{}: Setting activity to {:?}", pipeline_id, activity);
|
||||
if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
|
||||
|
@ -5140,14 +5140,14 @@ where
|
|||
}
|
||||
|
||||
/// Update the current activity of a pipeline.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn update_activity(&self, pipeline_id: PipelineId) {
|
||||
self.set_activity(pipeline_id, self.get_activity(pipeline_id));
|
||||
}
|
||||
|
||||
/// Handle updating the size of a browsing context.
|
||||
/// This notifies every pipeline in the context of the new size.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn resize_browsing_context(
|
||||
&mut self,
|
||||
new_size: WindowSizeData,
|
||||
|
@ -5204,7 +5204,7 @@ where
|
|||
}
|
||||
|
||||
// Handle switching from fullscreen mode
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn switch_fullscreen_mode(&mut self, browsing_context_id: BrowsingContextId) {
|
||||
if let Some(browsing_context) = self.browsing_contexts.get(&browsing_context_id) {
|
||||
let pipeline_id = browsing_context.pipeline_id;
|
||||
|
@ -5224,7 +5224,7 @@ where
|
|||
}
|
||||
|
||||
// Close and return the browsing context with the given id (and its children), if it exists.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn close_browsing_context(
|
||||
&mut self,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
|
@ -5264,7 +5264,7 @@ where
|
|||
}
|
||||
|
||||
// Close the children of a browsing context
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn close_browsing_context_children(
|
||||
&mut self,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
|
@ -5295,7 +5295,7 @@ where
|
|||
}
|
||||
|
||||
// Discard the pipeline for a given document, udpdate the joint session history.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_discard_document(
|
||||
&mut self,
|
||||
top_level_browsing_context_id: TopLevelBrowsingContextId,
|
||||
|
@ -5327,7 +5327,7 @@ where
|
|||
}
|
||||
|
||||
// Send a message to script requesting the document associated with this pipeline runs the 'unload' algorithm.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn unload_document(&self, pipeline_id: PipelineId) {
|
||||
if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
|
||||
let msg = ConstellationControlMsg::UnloadDocument(pipeline_id);
|
||||
|
@ -5336,7 +5336,7 @@ where
|
|||
}
|
||||
|
||||
// Close all pipelines at and beneath a given browsing context
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn close_pipeline(
|
||||
&mut self,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -5400,7 +5400,7 @@ where
|
|||
}
|
||||
|
||||
// Randomly close a pipeline -if --random-pipeline-closure-probability is set
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn maybe_close_random_pipeline(&mut self) {
|
||||
match self.random_pipeline_closure {
|
||||
Some((ref mut rng, probability)) => {
|
||||
|
@ -5438,7 +5438,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn get_joint_session_history(
|
||||
&mut self,
|
||||
top_level_id: TopLevelBrowsingContextId,
|
||||
|
@ -5450,7 +5450,7 @@ where
|
|||
}
|
||||
|
||||
// Convert a browsing context to a sendable form to pass to the compositor
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn browsing_context_to_sendable(
|
||||
&self,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
|
@ -5480,7 +5480,7 @@ where
|
|||
}
|
||||
|
||||
/// Send the frame tree for the given webview to the compositor.
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn update_webview_in_compositor(&mut self, webview_id: WebViewId) {
|
||||
// Note that this function can panic, due to ipc-channel creation failure.
|
||||
// avoiding this panic would require a mechanism for dealing
|
||||
|
@ -5493,7 +5493,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_media_session_action_msg(&mut self, action: MediaSessionActionType) {
|
||||
if let Some(media_session_pipeline_id) = self.active_media_session {
|
||||
let result = match self.pipelines.get(&media_session_pipeline_id) {
|
||||
|
@ -5520,7 +5520,7 @@ where
|
|||
}
|
||||
|
||||
/// Handle GamepadEvents from the embedder and forward them to the script thread
|
||||
#[tracing::instrument(skip(self), fields(servo_profiling = true))]
|
||||
#[instrument(skip_all, fields(servo_profiling = true))]
|
||||
fn handle_gamepad_msg(&mut self, event: GamepadEvent) {
|
||||
// Send to the focused browsing contexts' current pipeline.
|
||||
let focused_browsing_context_id = self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue