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

Ladybird+LibWebView: Add -P/--enable-callgrind-profiling option

This adds a -P option to run Ladybird under callgrind. It starts with
instrumentation disabled. To start capturing a profile (once Ladybird
has launched) run `callgrind_control -i on` and to stop it again run
`callgrind_control -i off`.

P.s. This is pretty much stolen from Andreas (and is based on the patch
everyone [that wants a profile] have been manually applying).
This commit is contained in:
MacDue 2023-04-15 01:04:28 +01:00 committed by Andreas Kling
parent 5db1eb9961
commit 0329ddf46a
12 changed files with 52 additions and 26 deletions

View file

@ -47,7 +47,7 @@ class WebContentView final
, public WebView::ViewImplementation {
Q_OBJECT
public:
explicit WebContentView(StringView webdriver_content_ipc_path);
explicit WebContentView(StringView webdriver_content_ipc_path, WebView::EnableCallgrindProfiling);
virtual ~WebContentView() override;
Function<String(Web::HTML::ActivateTab)> on_new_tab;
@ -185,7 +185,7 @@ signals:
private:
// ^WebView::ViewImplementation
virtual void create_client() override;
virtual void create_client(WebView::EnableCallgrindProfiling = WebView::EnableCallgrindProfiling::No) override;
virtual void update_zoom() override;
void request_repaint();