1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:27:45 +00:00

Profiler: Parse and render signpost strings

The first perf_event argument to a PERF_EVENT_SIGNPOST is now
interpreted as a string ID (in the profile strings set.)

This allows us to generate signposts with custom strings. :^)
This commit is contained in:
Andreas Kling 2021-08-11 20:29:34 +02:00
parent 4657c79143
commit 3ed6c137df
3 changed files with 15 additions and 3 deletions

View file

@ -135,7 +135,7 @@ void TimelineTrack::mousemove_event(GUI::MouseEvent& event)
constexpr int hoverable_padding = 2;
Gfx::IntRect hoverable_rect { x - hoverable_padding, frame_thickness(), hoverable_padding * 2, height() - frame_thickness() * 2 };
if (hoverable_rect.contains_horizontally(event.x())) {
GUI::Application::the()->show_tooltip_immediately(String::formatted("Signpost {}, {}", signpost.arg1, signpost.arg2), this);
GUI::Application::the()->show_tooltip_immediately(String::formatted("Signpost {}, {}", signpost.signpost_string, signpost.arg2), this);
hovering_a_signpost = true;
return IterationDecision::Break;
}