mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +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:
parent
5db1eb9961
commit
0329ddf46a
12 changed files with 52 additions and 26 deletions
|
@ -20,7 +20,7 @@
|
|||
extern DeprecatedString s_serenity_resource_root;
|
||||
extern Browser::Settings* s_settings;
|
||||
|
||||
Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path)
|
||||
Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path, WebView::EnableCallgrindProfiling enable_callgrind_profiling)
|
||||
: QWidget(window)
|
||||
, m_window(window)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ Tab::Tab(BrowserWindow* window, StringView webdriver_content_ipc_path)
|
|||
m_layout->setSpacing(0);
|
||||
m_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
m_view = new WebContentView(webdriver_content_ipc_path);
|
||||
m_view = new WebContentView(webdriver_content_ipc_path, enable_callgrind_profiling);
|
||||
m_toolbar = new QToolBar(this);
|
||||
m_location_edit = new LocationEdit(this);
|
||||
m_reset_zoom_button = new QToolButton(m_toolbar);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue