Bug 42328 - WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled
Summary: WebKitTestRunner needs to support layoutTestController.setJavaScriptProfiling...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Jesus Sanchez-Palencia
URL:
Keywords: InRadar
Depends on:
Blocks: 87284
  Show dependency treegraph
 
Reported: 2010-07-14 20:53 PDT by Maciej Stachowiak
Modified: 2012-05-30 06:05 PDT (History)
13 users (show)

See Also:


Attachments
WIP for ews testing (60.73 KB, patch)
2012-05-24 13:36 PDT, Jesus Sanchez-Palencia
gustavo: commit-queue-
Details | Formatted Diff | Diff
WIP for ews testing v2 (62.05 KB, patch)
2012-05-24 14:17 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff
Patch (72.96 KB, patch)
2012-05-25 08:25 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff
WIP for ews testing v3 (77.54 KB, patch)
2012-05-25 12:47 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff
Patch (80.82 KB, patch)
2012-05-25 14:03 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff
Patch (81.89 KB, patch)
2012-05-28 06:32 PDT, Jesus Sanchez-Palencia
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2010-07-14 20:53:41 PDT
WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled
Comment 1 Maciej Stachowiak 2010-07-14 20:58:55 PDT
<rdar://problem/8193637>
Comment 2 Ryosuke Niwa 2011-06-10 22:53:26 PDT
Added inspector/profiler/cpu-profiler-profiling-without-inspector.html to the skipped list in http://trac.webkit.org/changeset/88597.
Comment 3 Jesus Sanchez-Palencia 2012-05-24 13:36:18 PDT
Created attachment 143883 [details]
WIP for ews testing
Comment 4 WebKit Review Bot 2012-05-24 13:39:38 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 5 Gustavo Noronha (kov) 2012-05-24 13:48:25 PDT
Comment on attachment 143883 [details]
WIP for ews testing

Attachment 143883 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/12803245
Comment 6 Build Bot 2012-05-24 14:11:33 PDT
Comment on attachment 143883 [details]
WIP for ews testing

Attachment 143883 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/12816002
Comment 7 Jesus Sanchez-Palencia 2012-05-24 14:17:19 PDT
Created attachment 143893 [details]
WIP for ews testing v2
Comment 8 Jesus Sanchez-Palencia 2012-05-25 08:25:39 PDT
Created attachment 144076 [details]
Patch
Comment 9 Caio Marcelo de Oliveira Filho 2012-05-25 10:22:10 PDT
Comment on attachment 144076 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=144076&action=review

> Source/WebCore/ChangeLog:8
> +        Add setJavaScriptProfilingEnabled() to window.internals.settings. No new tests, but this

Given the last reviews related to window.internals, I think would be good to have some rationale why this function is a good fit for moving there.

> Source/WebCore/testing/InternalSettings.cpp:120
> +#if ENABLE(INSPECTOR)
> +    if (page() && page()->inspectorController())
> +        page()->inspectorController()->disableProfiler();
> +#endif

Why not save and use the original value like the others?

I'm also wondering whether we could have InspectorController::setProfilerEnabled(bool) instead of disableProfiler()/enableProfiler().
Comment 10 Jesus Sanchez-Palencia 2012-05-25 11:12:30 PDT
(In reply to comment #9)

Thanks for having a look!

> > Source/WebCore/testing/InternalSettings.cpp:120
> > +#if ENABLE(INSPECTOR)
> > +    if (page() && page()->inspectorController())
> > +        page()->inspectorController()->disableProfiler();
> > +#endif
> 
> Why not save and use the original value like the others?
> 
> I'm also wondering whether we could have InspectorController::setProfilerEnabled(bool) instead of disableProfiler()/enableProfiler().

I like the idea. I will upload a new patch soon with this and also with the default value coming from InspectorController::profilerEnabled().
Comment 11 Jesus Sanchez-Palencia 2012-05-25 12:47:49 PDT
Created attachment 144126 [details]
WIP for ews testing v3
Comment 12 Gustavo Noronha (kov) 2012-05-25 12:56:19 PDT
Comment on attachment 144126 [details]
WIP for ews testing v3

Attachment 144126 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/12803577
Comment 13 Build Bot 2012-05-25 13:13:06 PDT
Comment on attachment 144126 [details]
WIP for ews testing v3

Attachment 144126 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12801549
Comment 14 Build Bot 2012-05-25 13:18:59 PDT
Comment on attachment 144126 [details]
WIP for ews testing v3

Attachment 144126 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/12802540
Comment 15 Jesus Sanchez-Palencia 2012-05-25 14:03:30 PDT
Created attachment 144145 [details]
Patch
Comment 16 Build Bot 2012-05-25 14:58:20 PDT
Comment on attachment 144145 [details]
Patch

Attachment 144145 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12805587
Comment 17 Hajime Morrita 2012-05-27 19:08:44 PDT
It looks you forgot to remove now-invalidated symbols from WebCore.exp.in.
Comment 18 Jesus Sanchez-Palencia 2012-05-28 06:32:00 PDT
Created attachment 144347 [details]
Patch
Comment 19 Eric Seidel (no email) 2012-05-28 12:11:03 PDT
Comment on attachment 144347 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=144347&action=review

Seems reasonable.

> Source/WebCore/testing/InternalSettings.cpp:105
> +    , m_originalJavaScriptProfilingEnabled((page() && page()->inspectorController()) ? page()->inspectorController()->profilerEnabled() : false)

This could be an && instead of a ternary.
Comment 20 Jesus Sanchez-Palencia 2012-05-28 12:24:01 PDT
(In reply to comment #19)
> (From update of attachment 144347 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=144347&action=review
> 
> Seems reasonable.
> 
> > Source/WebCore/testing/InternalSettings.cpp:105
> > +    , m_originalJavaScriptProfilingEnabled((page() && page()->inspectorController()) ? page()->inspectorController()->profilerEnabled() : false)
> 
> This could be an && instead of a ternary.

Thanks! I will fix it before landing.
Comment 21 Jesus Sanchez-Palencia 2012-05-28 13:01:29 PDT
Committed r118705: <http://trac.webkit.org/changeset/118705>