forge
Explore
Log in

Don't you dare go Hollow

tty: Rename vblank offset plot to time since presentation

Browse files at this commit

42bb79d7c3c4c9c006226c53167976ec78ae2c94Ivan MolodetskikhParent: 588e6d7
Makes it clearer what this is.
src/backend/tty.rsmodified+13 -11
@@ -92,8 +92,8 @@ struct Surface {
92 vblank_frame: Option<tracy_client::Frame>,92 vblank_frame: Option<tracy_client::Frame>,
93 /// Frame name for the VBlank frame.93 /// Frame name for the VBlank frame.
94 vblank_frame_name: tracy_client::FrameName,94 vblank_frame_name: tracy_client::FrameName,
95- /// Plot name for the VBlank dispatch offset plot.95+ /// Plot name for the time since presentation plot.
96- vblank_plot_name: tracy_client::PlotName,96+ time_since_presentation_plot_name: tracy_client::PlotName,
97 /// Plot name for the presentation misprediction plot.97 /// Plot name for the presentation misprediction plot.
98 presentation_misprediction_plot_name: tracy_client::PlotName,98 presentation_misprediction_plot_name: tracy_client::PlotName,
99 sequence_delta_plot_name: tracy_client::PlotName,99 sequence_delta_plot_name: tracy_client::PlotName,
@@ -586,8 +586,8 @@ impl Tty {
586 586
587 let vblank_frame_name =587 let vblank_frame_name =
588 tracy_client::FrameName::new_leak(format!("vblank on {output_name}"));588 tracy_client::FrameName::new_leak(format!("vblank on {output_name}"));
589- let vblank_plot_name =589+ let time_since_presentation_plot_name =
590- tracy_client::PlotName::new_leak(format!("{output_name} vblank dispatch offset, ms"));590+ tracy_client::PlotName::new_leak(format!("{output_name} time since presentation, ms"));
591 let presentation_misprediction_plot_name = tracy_client::PlotName::new_leak(format!(591 let presentation_misprediction_plot_name = tracy_client::PlotName::new_leak(format!(
592 "{output_name} presentation misprediction, ms"592 "{output_name} presentation misprediction, ms"
593 ));593 ));
@@ -605,7 +605,7 @@ impl Tty {
605 dmabuf_feedback,605 dmabuf_feedback,
606 vblank_frame: None,606 vblank_frame: None,
607 vblank_frame_name,607 vblank_frame_name,
608- vblank_plot_name,608+ time_since_presentation_plot_name,
609 presentation_misprediction_plot_name,609 presentation_misprediction_plot_name,
610 sequence_delta_plot_name,610 sequence_delta_plot_name,
611 };611 };
@@ -694,15 +694,17 @@ impl Tty {
694 format!("vblank on {name}, presentation time unknown")694 format!("vblank on {name}, presentation time unknown")
695 } else if presentation_time > now {695 } else if presentation_time > now {
696 let diff = presentation_time - now;696 let diff = presentation_time - now;
697- tracy_client::Client::running()697+ tracy_client::Client::running().unwrap().plot(
698- .unwrap()698+ surface.time_since_presentation_plot_name,
699- .plot(surface.vblank_plot_name, -diff.as_secs_f64() * 1000.);699+ -diff.as_secs_f64() * 1000.,
700+ );
700 format!("vblank on {name}, presentation is {diff:?} later")701 format!("vblank on {name}, presentation is {diff:?} later")
701 } else {702 } else {
702 let diff = now - presentation_time;703 let diff = now - presentation_time;
703- tracy_client::Client::running()704+ tracy_client::Client::running().unwrap().plot(
704- .unwrap()705+ surface.time_since_presentation_plot_name,
705- .plot(surface.vblank_plot_name, diff.as_secs_f64() * 1000.);706+ diff.as_secs_f64() * 1000.,
707+ );
706 format!("vblank on {name}, presentation was {diff:?} ago")708 format!("vblank on {name}, presentation was {diff:?} ago")
707 };709 };
708 tracy_client::Client::running()710 tracy_client::Client::running()